解码
解码步骤
1 查找解码器(avcodec_find_decoder)
2 打开解码器(avcodec_open2)
3 解码(avcodec_decode_video2)
#include <libavcodec/avcodec.h> // 加入编解码的库
AVCodec 编解码结构体
AVCodecContext 编码器上下文
AVFrame 解码后的帧
av_frame_alloc/av_frame_free() // AVFrame 的分配与释放
avcodec_alloc_context3()/avcodec_free_context() // 创建与释放编解码器的上下文
H264编码
1 查找编码器( avcodec_find_encoder_by_name )
2 设置编码参数 并打开编码器( avcodec_open2 )
3 编码( avcodec_encode_video2 )
解码
// An highlighted block
var foo = 'bar';
解码
// An highlighted block
var foo = 'bar';
解码
// An highlighted block
var foo = 'bar';
解码
// An highlighted block
var foo = 'bar';
解码
// An highlighted block
var foo = 'bar';