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配对使用。
{
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配对使用。
相关文章推荐
- c++11 + SDL2 + ffmpeg +OpenAL + java = Android播放器
- Managed Media Aggregation using Rtsp and Rtp
- [总结]FFMPEG视音频编解码零基础学习方法
- 利用Ffmpeg获得flv视频缩略图和视频时间的代码
- codeigniter教程之上传视频并使用ffmpeg转flv示例
- PHP使用ffmpeg给视频增加字幕显示的方法
- PHP+FFMPEG实现将视频自动转码成H264标准Mp4文件
- 快速解决Android平台移植ffmpeg的一些问题
- java调用ffmpeg实现视频转换的方法
- python+ffmpeg视频并发直播压力测试
- php使用ffmpeg向视频中添加文字字幕的实现方法
- [总结]FFMPEG视音频编解码零基础学习方法
- ffmpeg的headers设置
- ffmpeg从rtsp抓流存flv[c# NReco.VideoConverter flv]
- FFMPEG 从rtsp抓取流,转存为flv文件。C语言代码方式.
- CentOs 下安装 ffmpeg 以及添加 ogg 音频支持
- Linux 下ffmpeg视频转码实战一安装
- php使用ffmpeg向视频中添加文字字幕的实现方法
- php使用ffmpeg获取视频信息并截图的实现方法
- FFmpeg音视频编解码实践总结