//libx264对应的AVCodec结构体
AVCodec ff_libx264_encoder = {
.name = "libx264",
.long_name = NULL_IF_CONFIG_SMALL("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_H264,
.priv_data_size = sizeof(X264Context),//与之对应的x264的AVCodeContext中的void * priv_data👉👉👉X264Context *x4
.init = X264_init,
.encode2 = X264_frame,
.close = X264_close,
.capabilities = CODEC_CAP_DELAY | CODEC_CAP_AUTO_THREADS,
.priv_class = &x264_class,
.defaults = x264_defaults,
.init_static_data = X264_init_static,
};
从ff_libx264_encoder定义中可以看出:
init()指向X264_init(),
encode2()指向 X264_frame(),
x264 -----FFmpeg与libx264接口源代码简单分析
最新推荐文章于 2022-10-15 16:19:16 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)