嵌入式Linux多媒体播放器的改进及实现
2011-09-23冯新宇
冯新宇
(黑龙江科技学院 电气与信息工程学院,哈尔滨 150027)
嵌入式Linux多媒体播放器的改进及实现
冯新宇
(黑龙江科技学院 电气与信息工程学院,哈尔滨 150027)
针对现有播放器的功能,以目前流行的嵌入式 Linux操作系统及 Qtopia环境下的开源多媒体播放器代码为基础,改进原播放器源码,实现了支持包含MP3音频文件和MPEG4视频文件播放的媒体播放器及文件加载模块的多媒体文件浏览功能,通过制作新的播放器皮肤,来美化显示界面。调试结果显示,各种功能在硬件开发平台 GT2440上得以验证。
嵌入式 Linux;多媒体播放器;Qt;C++
Abstract:Aimed at the function of the currently used multimedia player,this paper introduces the im provement in original code recoding,drawing on embedded Linux operating system in prevailing use and the multimedia player open-code resource underQtopia environment.The improvement is associated with bothMP3 audio files andMPEG4 video files,and MP3 and MPEG4 media players,along with the browsing function ofmultimedia files by loading the documents load module and the embellished outlook by modifying the skin of the player.The paper endswith the verification of all functions on the hardware development platfo rm GT2440.
Key words:embedded Linux;multimedia player;Qt;C++
0 引 言
MP3和MPEG4是现有嵌入式多媒体播放器中应用最广泛的两种格式。现有嵌入式媒体播放器的多媒体文件加载方式,是当文件存储在 CF卡中,一旦卡被插入开发板,卡会被自动扫描,多媒体文件会自动被加载到播放器中并形成播放列表[1]。
Qtopia的嵌入式应用中有一个文件浏览器应用,它可以实现文件检索和高级文件编辑,如文件或文件夹的复制、粘贴、删除。而且,搜索的文件为多媒体文件,它对多媒体文件的加载节点与播放器中多媒体文件的加载节点相同。想利用文件浏览器这个嵌入式应用的代码,删掉高级文件编辑等播放器中用不到的功能,将剩下的代码与播放器中的 playlistwidget文件中的代码糅合在一起,形成具有文件浏览功能的 playlist窗口,考虑到原播放器代码文件间交叉关系比较复杂,即使原 playlist窗口中的子窗口部件及其很多功能函数均不再使用,其中的一些全局变量还是有很多被其他相关联的文件访问[2]。……
