2009年2月17日星期二

Mplayer的代码分析、架构整理,从这里开始

由于工作需要,在接下来的日子里,我要对mplayer进行代码分析,最终整理出它的框架。
mplayer,是一个非常风靡的播放器,从开发到应用都非常普遍,奇怪的是在网上找不到它的技术文档,一丁点也找不到。所以,我在这里整理一点,对自己和大家将来研究和使用它都应该很有帮助。
如果你有相关的东西,请不吝贴到这里来,我也表示万分感谢。

1 条评论:

  1. access_mpcontext
    包含的结构:
    typedef struct MPContext {
    int osd_show_percentage;
    int osd_function;
    ao_functions_t *audio_out;
    play_tree_t *playtree;
    play_tree_iter_t *playtree_iter;
    int eof;
    int play_tree_step;
    int loop_times;

    stream_t *stream;
    demuxer_t *demuxer;
    sh_audio_t *sh_audio;
    sh_video_t *sh_video;
    demux_stream_t *d_audio;
    demux_stream_t *d_video;
    demux_stream_t *d_sub;
    mixer_t mixer;
    vo_functions_t *video_out;
    int num_buffered_frames;
    double delay;
    float begin_skip;
    short edl_muted;
    short user_muted;
    int global_sub_size;
    int global_sub_pos;
    int set_of_sub_pos;
    int set_of_sub_size;
    int global_sub_indices[SUB_SOURCES];
    #ifdef USE_ASS
    ass_track_t* set_of_ass_tracks[MAX_SUBTITLE_FILES];
    #endif
    sub_data* set_of_subtitles[MAX_SUBTITLE_FILES];
    int file_format;
    #ifdef HAS_DVBIN_SUPPORT
    int last_dvb_step;
    int dvbin_reopen;
    #endif
    int was_paused;
    } MPContext;
    包含的方法:
    void *mpctx_get_video_out(struct MPContext *mpctx);
    void *mpctx_get_audio_out(struct MPContext *mpctx);
    void *mpctx_get_playtree_iter(struct MPContext *mpctx);
    void *mpctx_get_mixer(struct MPContext *mpctx);
    int mpctx_get_global_sub_size(struct MPContext *mpctx);
    这个文件大致的功能是记录mplayer实时的状态。

    回复删除

关于我

我的照片
从事计算机软件应用软件开发,4年经验,做过若干个项目,涉及电信、安防、视频等领域。

他/她/它 来过