VLC 源码分析总结
概述
VLC 属于 Video LAN 开源项目组织中的一款全开源的流
媒体服务器和多媒体播放器。作为流媒体服务器,VLC 跨
平台,支持多操作系统和计算机体系结构;作为多媒体播放
器,VLC 可以播放多种格式的媒体文件。主要包括有:
WMV、ASF、MPG、MP、AVI、H.264 等多种常见媒体格
式。
VLC 采用全模块化结构,在系统内部,通过动态的载入
所需的模块,放入一个 module_bank 的结构体中统一管理,
连 VLC 的 Main 模块也是通过插件的方式动态载入的(通过
module_InitBank 函数在初始化建立 module_bank 时)。对于
不支持动态载入插件的系统环境中,VLC 也可以采用 builtin
的方式,在 VLC 启动的时候静态载入所需要的插件,并放
入 module_bank 统一管理。
VLC 的 模 块 分 成 很 多 类 别 主 要 有 :
access、access_filter、access_output 、audio_filter、audio_mi
xer、audio_output、codec、control、demux、gui、misc、m
ux、packetizer、stream_output、video_filter、video_output
、interface、input、playlist 等(其中黑体为核心模块)。
VLC 无论是作为流媒体服务器还是多媒体播放器,它的实
质思路就是一个“播放器”,之所以这么形象描述,是因为
(The core gives a framework to do the media processing, from
input (files, network streams) to output (audio or video, on
ascreen or a network), going through various muxers, demuxers,
decoders and filters. Even the interfaces are plugins for LibVLC.
It is up to the developer to choose which module will be loaded.
摘于官网说明)它实质处理的是 ES、PES、PS、TS 等流间
的转换、传输与显示。对于流媒体服务器,如果从文件作为