Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-65086

FFMPEG-Chromium deprecated definitions issue

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.11.2
    • 5.10.0
    • WebEngine
    • None

    Description

      During building of bleeding-edge QtWebEngine configured with 'ffmpeg' CLI option with bleeding-edge FFmpeg (from github) GCC reports some errors on the deprecated constants' names. This issue has forced me to analyse changes in FFmpeg sources. I found 4 deprecated names declared in file qtwebengine/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc:

      • FF_INPUT_BUFFER_PADDING_SIZE
      • CODEC_CAP_DR1
      • CODEC_FLAG2_CHUNKS
      • CODEC_FLAG_EMU_EDGE

      These names are now deprecated and CODEC_FLAG_EMU_EDGE removed from original FFmpeg source. To initially fix the problem I added the following definitions into ffmpeg_common.h:

      #define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE
      #define CODEC_CAP_DR1 AV_CODEC_CAP_DR1
      #define CODEC_FLAG2_CHUNKS AV_CODEC_FLAG2_CHUNKS
      #define CODEC_FLAG_EMU_EDGE   0x4000 //Deprecated in FFmpeg, derived from old docs
      

      The changed file is attached to this report.

       

      UPDATE: the first assert in ffmpeg_common.cc now returns false when Qt is built from source with ffmpeg installed also from source:

      // Why FF_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are
      // padded. Check here to ensure FFmpeg only receives data padded to its
      // specifications.
      static_assert(DecoderBuffer::kPaddingSize >= FF_INPUT_BUFFER_PADDING_SIZE, "DecoderBuffer padding size does not fit ffmpeg requirement");
      

      Attachments

        1. ffmpeg_common.h
          7 kB
        2. ffmpeg_common.cc
          26 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            twdragon Andrei Vukolov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes