| With the increasing maturity of computer technology and rapid development ofintegrated chip technology, embedded system plays a more and more important role inpeople’s everyday life and production in recent years. However, different from thesoftware development for personal computer, the limitation of embedded system itself andthe hardware platforms make embedded software development still a problem that needsin-depth study.In this thesis, based on Digital Video Record (DVR) as background, we focus on theproblems of media player in embedded linux system and propose effective solutions todevelop an efficiency media player. First of all, due to the various playing statuses thoselead to difficulty in maintaining, we propose a playing status control strategy based onfinite state machine (FSM) to flexibly switch the playing statuses. Secondly, consideringthe variances of the video files to be played and the decoding capabilities of the mediadecoders, we propose an auto-adapted algorithm to control the playback rate adaptivelywith different situation. This algorithm makes full use of the hardware decoder inembedded system to achieve the best effect. Finally, we propose an algorithm to solve theaudio-video synchronization problem for the audio-video interleaved file recorded realtime, via various in-depth study of the audio-video synchronization mechanism existed.Based the proposed algorithm and research, we combined the algorithm and the actualpractice to develop a lightweight media player for embedded linux system. The playerefficiently achieves basic playback functions with perfect scalability and portability, whichmake the media player easily to add new functions or to port it to other platforms.The various tests show the rationality in application and technical value of theproposed algorithms. Now the algorithms proposed in this thesis and the media playerimplemented based them have been used in several DVR projects. |