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:

andrew.46
  • 39,359

1 Answers1

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);
llogan
  • 12,348