您的位置:首页 > 其它

AVCodecContext结构体

2016-06-23 11:39 218 查看
typedef struct AVCodecContext

{

int bit_rate;

int frame_number;

//扩展数据,如mov格式中audio trak中aac格式中esds的附加解码信息。

unsigned char *extradata;

//扩展数据的size

int extradata_size;

//视频的原始的宽度与高度

int width, height; // 此逻辑段仅针对视频

//视频一帧图像的格式,如YUV420

enum PixelFormat pix_fmt;

//音频的采样率

int sample_rate;

//音频的声道的数目

int channels;

int bits_per_sample;

int block_align;

// 指向相应的解码器,如:ff_h264_decoder

struct AVCodec *codec;

//指向具体相应的解码器的context,如H264Context

void *priv_data;

//公共操作函数

int(*get_buffer)(struct AVCodecContext *c, AVFrame *pic);

void(*release_buffer)(struct AVCodecContext *c, AVFrame *pic);

int(*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);

}AVCodecContext;

说明:

AVCodecContext 结构表示程序运行的当前Codec使用的上下文,着重于所有Codec共有的属性(并且是在程序运行时才能确定其值)和关联其他结构的字段。extradata和extradata_size两个字段表述了相应Codec使用的私有数据;codec字段关联相应的编解码器;priv_data字段关联各个具体编解码器独有的属性context,和AVCodec结构中的priv_data_size配对使用。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息