首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >针对最新的FFmpeg编译guvcview时出错

针对最新的FFmpeg编译guvcview时出错
EN

Ask Ubuntu用户
提问于 2016-09-29 23:44:55
回答 1查看 306关注 0票数 2

在Xenial Xerus下,我正在针对最新的git FFmpeg编译guvcview的发行版本。在最新的FFmpeg中,PIX_FMT_YUV420P已被AV_PIX_FMT_YUV420P替换,我怀疑必须通过guvcview源代码替换这个变量。

破坏编译的错误是:

代码语言:javascript
复制
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魔法来解决这个问题吗?

参考资料:

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2016-09-30 00:33:50

您可以使用Arch中的guvcview-ffmpeg3.patch

代码语言:javascript
复制
--- 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);
票数 2
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/831390

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档