2

Under Xenial Xerus I am compiling the release version of guvcview against the latest git FFmpeg. In the latest FFmpeg PIX_FMT_YUV420P has been replaced with AV_PIX_FMT_YUV420P and I suspect this variable must be replaced through the guvcview source.

The error that breaks the compile is this:

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

Does anybody have a patch or even some sed magic to fix this issue?

References:

2

You can use guvcview-ffmpeg3.patch from Arch Linux:

--- 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);
| improve this answer | |
  • @andrew.46 Glad to help. I find the Arch repo is a good place to scrounge from. – llogan Sep 30 '16 at 0:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.