嵌入式流媒体服务器的设计与实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
计算机网络技术和多媒体技术的不断进步成为网络多媒体应用日益普及和发展的强大动力。人们在生产和生活中,也早已不满足单一的媒体形式,使得基于流媒体技术的相关开发与应用成为当前热点之一。视频会议,视频点播,远程教育,无人监控等分布式多媒体应用正迅速走入人们的生活,使用者根据自己的需求主动获得多媒体信,它们和传统信息发布的最大不同在于其主动性和选择性,这给人们的工作和生活带来了极大的便利和无穷的乐趣。
     与基于PC的流媒体服务器相比,嵌入式流媒体服务器具有体积小,携带方便,功能专业化高,成本较低,稳定性高,实时性好等优点,因此越来越受到开发厂商和消费者的青睐。本文正是在这种背景下,开始研究流媒体技术的实现原理,并在此基础上设计了和实现了一个基于ARM嵌入式处理器HI3510的流媒体服务器。
     本文首先对流媒体传输系统进行了需求分析,在此基础上选择了要使用的相关技术。本文选用实时流协议(RTSP)来进行多用户并发连接管理,和多流控制的功能,从而实现视频点播的功能。由于RTSP所控制和传输的流是多媒体流,因此系统同时实现实时传输协议(RTP),以为多媒体数据流添加实时特性,方便客户端进行实时播放。RTSP服务器端和客户端在进行连接请求和应答时需对会话信息和媒体信息进行描述,本文采用会话描述协议(SDP)来实现对这些信息的描述。同时,本文自行设计了一个命令控制协议MTCP来实现用户与嵌入式设备的交互,实现诸如IP,端口,媒体数据编码格式,图像采样率等硬件参数的设置。
     本文使用C语言编写流服务器应用程序,所有代码的编写遵循模块化设计的原则,以便于进行调试,维护和更新。在进行底层网络接口设计时,同时封装了Windows和Linux的接口函数,以满足不同嵌入式操作系统的需求。但是,本应用仅在Linux操作系统下进行过调试。为了进行流服务器的调试,本文的最后设计了一个基于通用PC的流播放器与之通信。实现实时流播放器,选择了微软的DirectShow作为开发平台。
     通过测试与实际应用,嵌入式流服务器最终达到了我们设计的目标。
The steady advancement of technology in the field of computer networks and multimedia has become a strong impetus to the development and popularization of the networked multimedia applications. Besides, People are dissatisfied with unitary type of media in the work and daily life. All that makes the development and application based on the streaming technology becoming one hotspot. Distributed multimedia applications such as video conference, video on demand, long-distance education, automatic monitor system, etc. are quikly coming into people's life. Through these systems, users can actively get the multimedia information according to the needs of themselves. And that just is the biggest difference to the traditional information promulgation. This kind of transportation way brings much facilities and fun to people's work and life.
     Compared with the streaming server based on PC, the embedded streaming server has the advantage of volumless, portable, function- undevided,low-cost, steady-going and real-time. So, it's becoming the hotspot in commerce. In such background, this paper researches on the principle of streaming midia technology, upon which A streaming server based on ARM embedded CPU HI3510 is designed.
     At the beginning of this paper, the need of multimedia transportation system is first studied. Further, the technology adopted in this system is fixed . RTSP protocol is implemented to deal with the request of multi-user and control multi-stream. Because the stream which the RTSP controls is the multimedia stream, RTP protocol is also adopted to keep the stream real-time. And that is better for the stream client's receiving. Also, SDP is used to describe the session information and media type, which is needed in RTSP method and reply. Further, a kind of command-based contrl protocol is designed and implemented in this paper, in order to complete the interaction between embedded device and users. For example, the set of the IP, port, media type , media sample rate ,etc.
     The streaming server application is codded in C language, and all programe is codded modular in order to make it easy to debug and update. When the part of network interface is designed, both Linux and Windows functions are encapsulated, in order to satisfy the need of different embedded operating systems. However, what we have implemented is just debugged in Linux environment, haven't in Windows yet. When debugged, a streaming client based on PC is designed and implemented to communicate with our server. The streaming client is developed on the Microsoft DirectShow platform.
     Through debuge test and application the streaming media server has been implemented as what we want.
引文
[1] 朱信忠,赵建明.基于WEB交互式视频点播系统的设计与实现.微机发展[J]2003,13(5):72-76
    [2] 周云虹,李志方.流式与非流式传输技术.现代计算机[J],2002(3):33-p35
    [3] 钟玉琢.流媒体和视颇服务器.北京:清华大学出版社,2003:25-30
    [4] 饶雨泰.流媒体服务器实现中应注意的问题.科学技术与工程[J].2005(5):1267-1270
    [5] 方群,王敏,吉逸.基于RTSP/RTP的媒体点播服务器的设计与实现.计算机工程与设计[J],2006(1):54-57
    [6] 高旭,沈苏彬,顾冠群.网络多媒体传输协议浅析.计算机应用研究[J].2000,15(2):6-8
    [7] H.Schulzrinne,S.Casner, R.Frederick,V.Jacobson,RTP:A Transport Protocol for Real-Time Applications, RFC3550,January 2003
    [8] Schulzrinne H,Casner S,Frederick R,et al. RTP:A TransportProtocol for Real-time Applications. RFC1889,January 1996
    [9] Lars-Ake Larzon, Mikael Degermark,Stephen Pink, L-E Jonssosn, ED., G. Fairhurst, Ed.,The Lightweight User Datagram Protocol(UDP-Lite),RFC3828,July 2004
    [10] H.Schulzrinne, A.Rao, R.Lanphier.Real Time Streaming Protocol (RTSP), RFC2326, April 1998
    [11] 查辉,周敬利,余胜生.实时流化协议RTSP的研究和实现[J].计算机工程与应用,1999,35(3):101-104.
    [12] 陶洪久,柳健,田金文.实时流化协议RTSP的分析研究[J].武汉理工大学学报,2001,23(10):67-70.
    [13] M.Handley, V.Jacobson, SDP: Session Description Protocol, RFC2327, April 1998
    [14] 钟玉琢,贺玉文,王琪.基于对象的多媒体数据压缩编码国际标准MPEG-4及其校验模型.北京:科学出版社,2000:210-212
    [15] 薛元昕,韩雏.论流媒体技术及流媒体服务器的建立.现代电子技术[J].2004(16)28-31
    [16] 袁敏,夏勇.流媒体服务器技术与压缩编码方案.广播电视信息 2005(7):57-59
    [17] ITU.H.264 standard 2005.3
    [18] Palacharla.S.,Karmonch,A.,Mahmond,S.A Design and Implementation of a realtime multimedia presentation system using RTP.Computer Software and Application Conference,1997.COMPSAC'97 Proceedings.The Twenty_ First Annual International. 13-15 Aug. 1997
    [19] J.Shin, J.W Kim, and C.J.Kuo. Content-based packet video forwarding mechanism in differentiated service networks. In 10th Int. Workshop Packet Video,Sadinia, Italy, 2000:2-12
    [20] 刘喜龙,石中锁.基于h264的嵌入式视频服务器的设计.微计算机信息.2005(21):39-42
    [21] 王路帮.RTSP协议及其分布式应用框架.安徽职业技术学院学报[J].2006(3):4-6
    [22] 魏春城,张翎.流媒体服务器设计中关键技术的研究 中国电信建设[J].2002(10):34-40
    [23] W.Richard Stevens.TCP/IP协议详解卷一:协议.北京:北京大学出版社,1999
    [24] Jon C.Snader.Effective TCP/IP Programming[M]. Boston: Addison Wesley Longman,2001.
    [25] M. Degermar. Requirements for robust IP/UDP/RTP header compressi-on, RFC3096,July 2001
    [26] S.Wenger, M.Hannuksela RTP Payload Format for H.264 RFC3984, February 2005
    [27] 何炯.实时传输协议(RTP)的简化设计与实现[D].西南交通大学.2003
    [28] 刘文珂.嵌入式处理器与嵌入式软件研究[J].计算机应用,2001(127):56-58.
    [29] 马忠梅,马广云,田泽等.ARM嵌入式处理器结构与应用基础[M].北京:北京航空航天大学出版社,2002.
    [30] 季昱,林俊超,宋飞.ARM嵌入式应用系统开发典型实例[M].北京:中国电力出版社,2005.
    [31] Raj Kamal著,陈曙晖译.嵌入式系统.体系结构编程与设计.北京:清华大学出版社,2005
    [32] www.gnu.org
    [33] 郭胜超,吕强,杨季文等.gdb远程调试及其在嵌入式Linux系统中的应用[J].计算机工程与科学,2004(26):100-109.
    [34] W.Richard Stevents著,施奈川,周利文等译.unix网络编程.北京:清华大学出版社,1999
    [35] Warren W.Gay著.詹俊鹊,于卫译.实战Linux Socket编程.西安:西安电子科技大学出版社,2001.
    [36] 李善平,刘文峰,王焕龙等编著.Linux与嵌入式系统.北京:清华大学出版社,2003.
    [37] 陆其明.DirectShow开发指南.北京:清华大学出版社,2003

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

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

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