FFMpeg分析2:AVInputFormat和AVOutputFormat
来源:互联网 发布:网络联合电视台 编辑:程序博客网 时间:2024/05/18 00:01
我们先看一下音视频播放器的大概结构(个人想法,不保证正确):1、数据源输入(Input)->2、文件格式解析器(Demux)->3、音视频解码(Decoder)->4、颜色空间转换(仅视频)->5、渲染输出(Render Output)。前一篇介绍的几个struct是数据源输入模块里的内容,哪么这一帖所讲的就是第二个模块即文件格式解析器里用到的内容。
AVInputFormat、AVOutputFormat与URLProtocol类似,每一种文件类型都有一个AVInputFormat和AVOutputFormat静态对像并通过av_register_input_format和av_register_output_format函数链成一个表,其表头在utils.c:
/** head of registered input format linked list */
AVInputFormat *first_iformat = NULL;
/** head of registered output format linked list */
AVOutputFormat *first_oformat = NULL;
AVInputFormat和AVOutputFormat的定义分别在avformat.h,代码很长,不贴出来浪费空间了。
当程序运行时,AVInputFormat对像的
int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
AVInputFormat *fmt,
int buf_size,
AVFormatParameters *ap)
{
fmt = av_probe_input_format(pd, 0);//返回该文件的AVInputFormat类型
}
至于AVOutputFormat嘛,下次再说吧,晚安!
- FFMpeg分析2:AVInputFormat和AVOutputFormat
- FFMpeg分析2:AVInputFormat和AVOutputFormat
- FFMpeg分析2:AVInputFormat和AVOutputFormat
- ffmpeg数据结构-AVInputFormat
- FFMPEG结构体之AVOutputFormat
- ffmpeg之AVInputFormat结构体
- ffmpeg——AVOutputFormat 输出文件格式
- 3——FFMPEG之解复用器-----AVInputFormat
- 3——FFMPEG之解复用器-----AVInputFormat
- ffmpeg中对AVInputFormat结构体中函数的调用
- FFmpeg sws_scale分析2
- ffmpeg源码分析2
- FFMpeg分析:URLProtocol,URLContext和ByteIOContext
- FFMpeg分析1:URLProtocol,URLContext和ByteIOContext
- ffmpeg架构和解码流程分析
- FFMpeg分析1:URLProtocol,URLContext和ByteIOContext
- FFmpeg源代码简单分析:av_find_decoder()和av_find_encoder()
- ffmpeg架构和解码流程分析
- Linux 文件权限详解
- QQ能登陆但不能打开网页
- FFMpeg分析1:URLProtocol,URLContext和ByteIOContext
- struts2学习笔记
- FFMpeg分析2:AVInputFormat和AVOutputFormat
- FFMpeg分析2:AVInputFormat和AVOutputFormat
- Comet:基于 HTTP 长连接的“服务器推”技术
- FFMpeg分析3:AVFormatContext和AVIContext、FLVContext等XXXContext
- taskmgr多开补丁
- ViewGroup_caidan
- FMpeg分析4:AVStream
- FMpeg分析5:AVCodecContext和AVCodec
- php验证码无错版(无刷新更换验证码)
- MDK 分散加载文件分析