当前位置:网站首页>FFMPEG关键结构体——AVFormatContext
FFMPEG关键结构体——AVFormatContext
2022-07-05 23:56:00 【陈小帅hh】
一、AVFormatContext结构体
AVFormatContext是存储音视频封装格式中包含的信息的结构体,也是FFmpeg中统领全局的结构体,对文件的封装、编码操作从这里开始。
结构体的定义位于libavformat中的avformat.h
二、常见变量
struct AVInputFormat *iformat;//输入数据的封装格式。仅解封装用,由avformat_open_input()设置。
struct AVOutputFormat *oformat;//输出数据的封装格式。仅封装用,调用者在avformat_write_header()之前设置。
AVIOContext *pb;// I/O上下文。
解封装:由用户在avformat_open_input()之前设置(然后用户必须手动关闭它)或通过avformat_open_input()设置。
封装:由用户在avformat_write_header()之前设置。 调用者必须注意关闭/释放IO上下文。
unsigned int nb_streams;//AVFormatContext.streams中元素的个数。
AVStream **streams;//文件中所有流的列表。
char filename[1024];//输入输出文件名。
int64_t start_time;//第一帧的位置。
int64_t duration;//流的持续时间
int64_t bit_rate;//总流比特率(bit / s),如果不可用则为0。
int64_t probesize;
//从输入读取的用于确定输入容器格式的数据的最大大小。
仅封装用,由调用者在avformat_open_input()之前设置。
AVDictionary *metadata;//元数据
AVCodec *video_codec;//视频编解码器
AVCodec *audio_codec;//音频编解码器
AVCodec *subtitle_codec;//字母编解码器
AVCodec *data_codec;//数据编解码器
int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options);
//打开IO stream的回调函数。
void (*io_close)(struct AVFormatContext *s, AVIOContext *pb);
//关闭使用AVFormatContext.io_open()打开的流的回调函数。
边栏推荐
- [SQL] SQL expansion languages of mainstream databases (T-SQL, pl/sql, pl/pgsql)
- Spreadjs 15.1 CN and spreadjs 15.1 en
- Rasa 3. X learning series -rasa x Community Edition (Free Edition) changes
- Research notes I software engineering and calculation volume II (Chapter 1-7)
- 权限问题:source .bash_profile permission denied
- 【EF Core】EF Core与C# 数据类型映射关系
- 转:未来,这样的组织才能扛住风险
- 4 points tell you the advantages of the combination of real-time chat and chat robots
- TS type declaration
- [EF core] mapping relationship between EF core and C data type
猜你喜欢
如何获取localStorage中存储的所有值
硬件及接口学习总结
Zero rhino technology joined hands with the intelligence Club: the "causal faction" forum was successfully held, and the "causal revolution" brought the next generation of trusted AI
零犀科技携手集智俱乐部:“因果派”论坛成功举办,“因果革命”带来下一代可信AI
Rasa 3.x 学习系列-Rasa X 社区版(免费版) 更改
保研笔记二 软件工程与计算卷二(13-16章)
单商户V4.4,初心未变,实力依旧!
数据库遇到的问题
Learn PWN from CTF wiki - ret2libc1
Rasa 3.x 学习系列-Rasa 3.2.1 新版本发布
随机推荐
20220703 周赛:知道秘密的人数-动规(题解)
【QT】Qt使用QJson生成json文件并保存
提升工作效率工具:SQL批量生成工具思想
Rasa 3.x 学习系列-Rasa 3.2.1 新版本发布
Transport layer protocol ----- UDP protocol
DEJA_VU3D - Cesium功能集 之 055-国内外各厂商地图服务地址汇总说明
硬件及接口学习总结
保研笔记二 软件工程与计算卷二(13-16章)
什么叫做信息安全?包含哪些内容?与网络安全有什么区别?
Zero rhino technology joined hands with the intelligence Club: the "causal faction" forum was successfully held, and the "causal revolution" brought the next generation of trusted AI
第16章 OAuth2AuthorizationRequestRedirectWebFilter源码解析
Senparc.Weixin.Sample.MP源码剖析
JVM details
Chapter 16 oauth2authorizationrequestredirectwebfilter source code analysis
[SQL] SQL expansion languages of mainstream databases (T-SQL, pl/sql, pl/pgsql)
What are Yunna's fixed asset management systems?
[online chat] the original wechat applet can also reply to Facebook homepage messages!
18.(arcgis api for js篇)arcgis api for js点采集(SketchViewModel)
传输层协议------UDP协议
Spreadjs 15.1 CN and spreadjs 15.1 en