在Xenial Xerus下,我正在针对最新的git FFmpeg编译guvcview的发行版本。在最新的FFmpeg中,PIX_FMT_YUV420P已被AV_PIX_FMT_YUV420P替换,我怀疑必须通过guvcview源代码替换这个变量。
破坏编译的错误是:
jpeg_decoder.c:1439:33: error: use of undeclared identifier 'PIX_FMT_YUV422P'; did you mean
'AV_PIX_FMT_YUV422P'?
codec_data->context->pix_fmt = PIX_FMT_YUV422P;
^~~~~~~~~~~~~~~
AV_PIX_FMT_YUV422P有人有补丁甚至sed魔法来解决这个问题吗?
发布于 2016-09-30 00:33:50
您可以使用Arch中的guvcview-ffmpeg3.patch:
--- a/gview_v4l2core/jpeg_decoder.c
+++ b/gview_v4l2core/jpeg_decoder.c
@@ -1436,7 +1436,7 @@
exit(-1);
}
- codec_data->context->pix_fmt = PIX_FMT_YUV422P;
+ codec_data->context->pix_fmt = AV_PIX_FMT_YUV422P;
codec_data->context->width = width;
codec_data->context->height = height;
//jpeg_ctx->context->dsp_mask = (FF_MM_MMX | FF_MM_MMXEXT | FF_MM_SSE);
--- a/gview_v4l2core/uvc_h264.c
+++ b/gview_v4l2core/uvc_h264.c
@@ -970,7 +970,7 @@
}
h264_ctx->context->flags2 |= CODEC_FLAG2_FAST;
- h264_ctx->context->pix_fmt = PIX_FMT_YUV420P;
+ h264_ctx->context->pix_fmt = AV_PIX_FMT_YUV420P;
h264_ctx->context->width = width;
h264_ctx->context->height = height;
//h264_ctx->context->dsp_mask = (FF_MM_MMX | FF_MM_MMXEXT | FF_MM_SSE);https://askubuntu.com/questions/831390
复制相似问题