用户名: 密码: 验证码:
基于RTP的Linux实时语音传输系统设计
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
VoIP是一种新的快速发展的语音传输技术,其最大优势是能够利用分布广泛的IP互联网作为信息传送平台,并具有价格低、应用形式多样等优点,打破了电信对语音业务的长期垄断,进一步证明IP分组数据网不仅可以传送数据业务,也可以传送语音和视频等实时业务。
     然而由于IP分组网络设计的初衷主要是用于传输文字、图形等数据型业务,而在传送语音、视频等实时媒体时则显得力不从心,如何在因特网上高质量地传输实时语音业务,已成为VoIP的关键问题之一。
     语音信号若要实现在IP网络中的传输,首先需要以固定的间隔对其采样,将模拟语音数字化,组装成IP语音分组,将其通过IP网络发送到目的方,并在接收方将口分组还原成模拟信号。为了保证语音传输质量,需要将传输时延控制在一定范围内,一般需要小于200ms;传输时延的变化或抖动需要通过缓存机制进行消除;一般语音传输容许一定的分组丢失率或误码率。
     本文结合所参与的课题“基于Linux的IP智能终端的开发”,从实时语音传输所涉及到的时延、抖动、丢包等问题出发,提出了改进语音质量的措施与算法,并在此基础上设计实现了基于Linux和RTP协议的实时语音多方通信系统。
     文章首先说明了实时语音通信的背景与现状,针对实时语音传输的特点以及TCP/UDP协议在传输语音业务方面存在的不足,指出引入RTP协议的必要性;接着详细地介绍了实时传输协议RTP/RTCP运行机制;之后介绍了Linux平台下基于RTP协议的实时语音传输系统的软件实现,对涉及的协议、语音数据处理以及缓存管理等内容进行了详细的分析与设计,并采用多线程技术、抖动缓存技术以及UDP传输技术实现语音通信系统;通过实际测试,证明此VoIP软件系统设计正确,性能良好。最后,论文探讨了RTP协议的QoS保障机制及其在大规模应用下的可扩展性等问题。
VoIP is a new fast-growing technology to transfer real-time voice over IP networks. It has the greatest advantage in fully merging into the global IP interconnect environment to supply various kinds of service in low cost. This technology is one of the great supplements for the traditional telephone service which further prove that not only data service like text, picture, but also audio and video service can be transferred through internet.
     As the IP network is initially designed to transfer data like text and picture, it seems inefficient to transfer media like audio and video data real-timely. It has turned to be a critical point on how to transport real-time media data in high QoS through internet.
     The speech signal is transmitted by digitising tiny pieces of it at regular intervals and sending these to the destination where an analogue signal is reconstructed. For good quality communication, the overall delay should be below 200 ms. Delay variance or jitter should be eliminated through buffering. Speech communication is fairly tolerant to lost or corrupted packets.
     As part of the research work—Implementation of Intellectual IP Telephone Terminal on Linux, the author has deeply analyzed the related aspects like delay, jitter, and packet lost in the real-time transfer of voice on IP networks, brought forward some measures to improve on each aspects and also realized a real-time multiple voice system based on Linux.
     The article first introduced some background knowledge of real-time voice transfer, then point out the necessity of RTP/RTCP protocol for transferring voice due to the inefficiency of the TCP counterparts. Then it gave an exhaustive description on RTP/RTCP protocol. Afterward it provided the software impletementation of the voice transmission system through RTP/RTCP protocols upon Linux. The system is implemented through the technology of multi-thread, multiple ring-buffer and UDP Socket transport technique. Finally the author provided the test results, which demonstrates that the system is rightly designed and runs well for transferring real-time voice in high quality. At the last of the article, the author gave some perspective views tailor to problems which exists on large-scale RTP/RTCP application scenery.
引文
【1】 H. Schulzrinne, S. Casner, R. Frederick and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", RFC 3550, July 2003
    【2】 H. Schulzrinne, S. Casner, "RTP Profile for Audio and Video Conferences withMinimal Control ", RFC3551, July 2003
    【3】 沈鑫炎,“多媒体传输网络与VoIP系统设计”,人民邮电出版社
    【4】 李辉,胡瑞敏,艾好军等,基于RTP的多媒体流的自适应传输,计算机工程与应用,2004.5,P175
    【5】 Jori Liesenborgs, "Voice over IP in networked virtual environments"
    【6】 Comer D E.Stevens用TCP/IP进行网际互联(第三卷):客户服务器编程与应用(Linux/POSIX套接字版),赵刚,林瑶,蒋慧等译,谢希仁校,电子工业出版社,2001-04
    【7】 Ingo Busse, Bernd Definer, Henning Schulzrinne, Dynamic QoS control of multimedia applications based on RTP, 1995. 3
    【8】 Mark Handley, Henning Schulzrinne, and Eve Schooler, "SIP: Session initiation protocol," Internet Draft,. Internet Engineering Task Force, Dec. 1996
    【9】 Henning Schulzrinne, "A real-time stream control protocol(RTSP'), "Internet Draft, Internet Engineering Task Force, Dec. 1996
    【10】 R. Braden, L. Zhang, S. Berson, S. Herzog, S. Jamin, "Resource ReSer Vation Protocol(RSVP)", RFC2205, Sep 1997
    【11】 Chunlei Liu, "Multimedia Over IP: RSVP, RTP, RTCP, RTSP"
    【12】 林宇 郭凌云,”Linux网络编程”,人民邮电出版社
    【13】 肖文鹏,“Linux下的实时流媒体编程”,IBM developworks中国
    【14】 肖文鹏,Linux音频编程指南,IBM developernetworks中国
    【15】 徐春秀等,IP网络电话中常用的语音压缩编码技术的性能分析,《电子技术应用》,2001第10期
    【16】 孙卫防,实时语音传输中的语音传输缓冲设计,计算机工程与应用,2004.10
    【17】 董文涛,段新涛,秦晓凌等,一种自适应压缩率的实时语音传输系统的实现,计算机工程,2004.2,第30卷第1期
    【18】 黄永峰,李星,多路语音实时处理系统的线程管理与调度,小型微型计算机系统,2000.12,第21卷第12期
    【19】 CCITT, Recommendation G.726, 40, 32, 24, 16kbit/s Adaptive differential pulse code modulation(ADPCM), 1990
    【20】 CCITT, G. 711, Pulse Code Modulation(PCM) of Voice Frequencies, 1972
    【21】 ITU-T, G. 114, One-Way Transmission Time, 1996.2
    【22】 ITU-T, G. 131, Control of talker echo, 1996.8
    【23】 W. Rechard Stevens, Unix Network Programming Volume 2—Interprocess Communications, Prentice Hall PTR
    【24】 W. Rechard Stevens, Unix Network Programming Volume 1—Interprocess Communications, Prentice Hall PTR
    【25】 W.Richard Stevens著,尤晋元等译,″UNIX环境高级编程″,北京机械工业出版社,2001.
    【26】 Gary R.Wright,W.Richard Stevens著, 陆学莹,蒋慧,谢希仁译,TCP/IP详解卷1:实现,北京:机械工业出版,2000.174-197
    【27】 S. Casner, Packet Design, P. Hoschka, MIME Type Registration of RTP Payload Formats, 2003. 7
    【28】 徐春秀,武穆青,IP网络电话中常用的语音压缩编码技术的性能分析,电子技术应用
    【29】 杨静文,卢益民,胡浩,Linux下实时音频传输的实现,电声技术,2005
    【30】 邱小燕,吴产乐,叶刚等,RTP协议中RTCP传输间隔算法,武汉大学学报,2005第1期
    【31】 Butenhof David R.POSIX多线程程序设计,于磊,曾刚译,中国电力出版社,2003—04
    【32】 Open Sound System Programmer's Guide, http://www.opensound.com
    【33】 严俊,马小骏,顾冠群,RTP协议的研究与实现,计算机工程与应用,2000
    【34】 林世洪,王洪,郝建英,IP网络下实时语音应用中的缓冲策略,网络技术,2002.5第58期

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700