当前位置:网站首页>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()打开的流的回调函数。
边栏推荐
- 开源crm客户关系统管理系统源码,免费分享
- Qcombox (rewrite) + qcompleter (auto completion, auto loading the drop-down options of qcombox, setting the background color)
- 教你在HbuilderX上使用模拟器运行uni-app,良心教学!!!
- How much do you know about the bank deposit business that software test engineers must know?
- 云呐|固定资产管理系统主要操作流程有哪些
- Spire.PDF for NET 8.7.2
- CloudCompare&PCL 点云随机添加噪声
- Chapter 16 oauth2authorizationrequestredirectwebfilter source code analysis
- 跟着CTF-wiki学pwn——ret2libc1
- How to rotate the synchronized / refreshed icon (EL icon refresh)
猜你喜欢
随机推荐
【在线聊天】原来微信小程序也能回复Facebook主页消息!
SpreadJS 15.1 CN 与 SpreadJS 15.1 EN
[online chat] the original wechat applet can also reply to Facebook homepage messages!
Use CAS instead of synchronized
Rasa 3.x 学习系列-Rasa X 社区版(免费版) 更改
如何获取localStorage中存储的所有值
总结了 800多个 Kubectl 别名,再也不怕记不住命令了!
Cloudcompare & PCL point cloud randomly adds noise
GFS分布式文件系统
Initialiser votre vecteur & initialisateur avec une liste Introduction à la Liste
QT--线程
openssl-1.0.2k版本升级openssl-1.1.1p
Effet Doppler (déplacement de fréquence Doppler)
How to get all the values stored in localstorage
PV static creation and dynamic creation
俄外交部:日韩参加北约峰会影响亚洲安全稳定
Initialize your vector & initializer with a list_ List introduction
有什么不起眼却挣钱的副业?
【QT】Qt使用QJson生成json文件并保存
XML configuration file (DTD detailed explanation)