当前位置:网站首页>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()打开的流的回调函数。
边栏推荐
- 教你在HbuilderX上使用模拟器运行uni-app,良心教学!!!
- Initialize your vector & initializer with a list_ List introduction
- 提升工作效率工具:SQL批量生成工具思想
- C file and folder operation
- Laser slam learning record
- Initialiser votre vecteur & initialisateur avec une liste Introduction à la Liste
- [day39 literature extensive reading] a Bayesian perspective on magnetic estimation
- Rasa 3. X learning series -rasa 3.2.1 new release
- 【luogu CF487E】Tourists(圆方树)(树链剖分)(线段树)
- CloudCompare&PCL 点云随机添加噪声
猜你喜欢

4点告诉你实时聊天与聊天机器人组合的优势

【NOI模拟赛】Anaid 的树(莫比乌斯反演,指数型生成函数,埃氏筛,虚树)

STM32__ 06 - single channel ADC

用列錶初始化你的vector&&initializer_list簡介

Part III Verilog enterprise real topic of "Niuke brush Verilog"

Redis高可用——主从复制、哨兵模式、集群
![[online chat] the original wechat applet can also reply to Facebook homepage messages!](/img/d2/1fd4de4bfd433ed397c236ddb97a66.png)
[online chat] the original wechat applet can also reply to Facebook homepage messages!

How to get all the values stored in localstorage

PV static creation and dynamic creation
![[day39 literature extensive reading] a Bayesian perspective on magnetic estimation](/img/9c/438ef820a9f703c21f708bfc1dbbc4.jpg)
[day39 literature extensive reading] a Bayesian perspective on magnetic estimation
随机推荐
MySQL global lock and table lock
【在线聊天】原来微信小程序也能回复Facebook主页消息!
How much do you know about the bank deposit business that software test engineers must know?
Biased sample variance, unbiased sample variance
Senparc.Weixin.Sample.MP源码剖析
What are the functions of Yunna fixed assets management system?
GFS分布式文件系統
PADS ROUTER 使用技巧小记
4 points tell you the advantages of the combination of real-time chat and chat robots
多普勒效应(多普勒频移)
Zhongjun group launched electronic contracts to accelerate the digital development of real estate enterprises
Upgrade openssl-1.1.1p for openssl-1.0.2k
Russian Foreign Ministry: Japan and South Korea's participation in the NATO summit affects security and stability in Asia
[day39 literature extensive reading] a Bayesian perspective on magnetic estimation
How to get all the values stored in localstorage
shardingsphere源码解析
"14th five year plan": emphasis on the promotion of electronic contracts, electronic signatures and other applications
Fiddler Everywhere 3.2.1 Crack
上门预约服务类的App功能详解
el-cascader的使用以及报错解决