文档详情

JMF语音视频聊天软件的实现.doc

发布:2018-01-23约2.87万字共57页下载文档
文本预览下载声明
摘 要 随着网络的不断发展,在网络上的语音视频通信成为研究和应用的热点之一。要在网络上进行语音视频通信,便要解决音、视频信号的采集、回放、编解码以及数据的传输的问题。本文将用Java的JMF解决这些问题。JMF是Java的一种可选用的应用编程接口(API)软件包,它为音频和视频等媒体内容的采集、回放、传输和编码转换等提供了一个统一的架构。 JMF用RTP协议传输实时媒体信号。RTP是针对Internet上多媒体数据流的一个传输协议。RTP能在一对一或一对多的传输情况下工作,其目的是提供时间信息和实现流同步。RTP建立在UDP上。RTP只保证实时数据的传输,并不提供可靠的传送机制,也不提供流量控制或拥塞控制,它依靠RTCP提供这些服务。 RTP的一对多的传输,由IP组播实现。IP组播是主机之间“一对一组”的通讯模式。加入了同一个组的主机可以接收到此组内的所有数据,网络中的交换机和路由器只向有需求者复制并转发其所需数据。IP组播能有效地节省网络和主机的资源,并且它允许在广域网上传输。 由于NAT的存在,令许多P2P应用无法应用于NAT背后的主机,语音视频通信也不例外。根据NAT的原理,能用UDP打孔技术进行NAT的穿透。 本文使用JMF完成语音视频聊天软件的实现。该软件既能进行点对点的语音视频通信,也能进行多人语音视频通信,并用UDP打孔技术完成了对NAT的穿透,使该软件能在广域网上使用。 关键字:语音视频通信,JMF,RTP,组播,穿透NAT,UDP打孔技术 ABSTRACT Along with the constant development of the network, the voice and video communications on Internet is one of hot topic of research and application. In order to communication with voice and video on the network, it needs to solve sound and video signals’ collection, playback, codecs and data transmission problems. This paper uses the Java’s JMF to solve these problems. JMF is an available Application Programming Interface (API) package of Java. It provides a unified framework for audio and video media content collection, playback, data conversion and transmission. JMF uses RTP to transmit real-time media signal. RTP is a special transmission protocol for Internet multimedia data streams. RTP can in point-to-point or point-to-multi-point transmission mode, the aim is to provide time information and to achieve flow synchronization. RTP bases on UDP. RTP only guaranteed real-time data’s transmission. It does not provide reliable delivery mechanisms, flow control or congestion control. It relies on RTCP to provide these services. Point-to-multi-point transmission mode of RTP uses IP Multicast technology. IP Multicast is communication mode of hosts one-to-one group. Computers join in a group can receive all the data from this group. Switches and routers only replicate and transmit the data to the computers who need the data. It can
显示全部
相似文档