当前位置:网站首页>Key structure of ffmpeg - avformatcontext
Key structure of ffmpeg - avformatcontext
2022-07-06 00:01:00 【Chen Xiaoshuai HH】
One 、AVFormatContext Structure
AVFormatContext It is a structure that stores the information contained in the audio and video packaging format , It's also FFmpeg The structure that dominates the overall situation , Encapsulation of documents 、 The coding operation starts from here .
The definition of a structure lies in libavformat Medium avformat.h
Two 、 Common variables
struct AVInputFormat *iformat;// Encapsulation format of input data . Only for unpacking , from avformat_open_input() Set up .
struct AVOutputFormat *oformat;// Encapsulation format of output data . For packaging only , The caller is avformat_write_header() Set before .
AVIOContext *pb;// I/O Context .
decapsulation : By user on avformat_open_input() Set before ( Then the user must turn it off manually ) Or through avformat_open_input() Set up .
encapsulation : By user on avformat_write_header() Set before . The caller must pay attention to closing / Release IO Context .
unsigned int nb_streams;//AVFormatContext.streams The number of elements in .
AVStream **streams;// List of all streams in the file .
char filename[1024];// Input / output file name .
int64_t start_time;// The position of the first frame .
int64_t duration;// Duration of flow
int64_t bit_rate;// Total stream bit rate (bit / s), If not available 0.
int64_t probesize;
// The maximum size of the data read from the input to determine the format of the input container .
For packaging only , By the caller at avformat_open_input() Set before .
AVDictionary *metadata;// Metadata
AVCodec *video_codec;// Video codec
AVCodec *audio_codec;// Audio codec
AVCodec *subtitle_codec;// Letter codec
AVCodec *data_codec;// Data codec
int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options);
// open IO stream Callback function for .
void (*io_close)(struct AVFormatContext *s, AVIOContext *pb);
// Turn off use AVFormatContext.io_open() Callback function of the open stream .
边栏推荐
- The use of El cascader and the solution of error reporting
- My colleagues quietly told me that flying Book notification can still play like this
- [noi simulation] Anaid's tree (Mobius inversion, exponential generating function, Ehrlich sieve, virtual tree)
- QT -- thread
- openssl-1.0.2k版本升级openssl-1.1.1p
- There is no network after configuring the agent by capturing packets with Fiddler mobile phones
- Choose to pay tribute to the spirit behind continuous struggle -- Dialogue will values [Issue 4]
- Asynchronous task Whenall timeout - Async task WhenAll with timeout
- Learn PWN from CTF wiki - ret2libc1
- 7.5 simulation summary
猜你喜欢

传输层协议------UDP协议

Problems encountered in the database

Bao Yan notes II software engineering and calculation volume II (Chapter 13-16)

提升工作效率工具:SQL批量生成工具思想

FFMPEG关键结构体——AVCodecContext

Use mapper: --- tkmapper

20220703 周赛:知道秘密的人数-动规(题解)

Gd32f4xx UIP protocol stack migration record

GD32F4xx uIP协议栈移植记录

MySql——CRUD
随机推荐
QT -- thread
C file and folder operation
PV静态创建和动态创建
Research notes I software engineering and calculation volume II (Chapter 1-7)
Russian Foreign Ministry: Japan and South Korea's participation in the NATO summit affects security and stability in Asia
What are Yunna's fixed asset management systems?
14 MySQL view
[QT] QT uses qjson to generate JSON files and save them
How much do you know about the bank deposit business that software test engineers must know?
Yunna | what are the main operating processes of the fixed assets management system
GD32F4xx uIP协议栈移植记录
从底层结构开始学习FPGA----FIFO IP核及其关键参数介绍
Spire Office 7.5.4 for NET
Learn PWN from CTF wiki - ret2libc1
[noi simulation] Anaid's tree (Mobius inversion, exponential generating function, Ehrlich sieve, virtual tree)
CAS and synchronized knowledge
What are the functions of Yunna fixed assets management system?
第16章 OAuth2AuthorizationRequestRedirectWebFilter源码解析
单商户V4.4,初心未变,实力依旧!
Chapter 16 oauth2authorizationrequestredirectwebfilter source code analysis