[MPlayer-dev-eng] [RFC][PATCH 0/8] Adjustments for current FFmpeg git including major bumps

Alexander Strasser eclipse7 at gmx.net
Thu Apr 4 01:38:27 EEST 2024


Disclaimer: I created this patch set mostly on a slow machine while
travelling, so I wouldn't be surprised if I missed a thing or two.
Also I did only very light testing so far.

At least this compiles for me with internal FFmpeg of today
(2024-04-03).

I labelled this patch set RFC for other reason though:

1. It raises the required C standard setting C11 (e.g. for gcc we used
   gnu99 before)
    * Do we want it? Does it need more changes to our code base?
    * Need to be double-checked but so far compiling against
      external FFmpeg seems to work fine even with gnu99.
        * Maybe we should discuss once again about dropping support
          for internal FFmpeg?

2. It changes ao sdl the AVFifoBuffer replacement (AVFifoBuffer)
    * AVFifo is a mostly completely different implementation
      of a fifo, that only shares similarities of the API.
    * The changes for ao sdl are probably fine, though not as
      straight forward as one would think.
    * There are more 4 more aos that use AVFifoBuffer ao jack,
      ao coreaudio and 2 aos for os/2.
        * for ao jack I have locally some changes that at least
          make it compile and produce audio output, but I still
          need to check about potential concurrency problems.
        * regarding aos for MacOs and os/2 I have no possibilty
          to test, so even if I would craft patches, I would
          need help for testing. I would rather have a developer
          with access to the platform make and test the changes
          similar to what I did for ao sdl.

3. Switch to FFmpeg AVChannelLayout for audio
    * This was a bit more messy than I would have expected and
      I'm not sure it's correct
    * The change is incomplete because a channel_layout cannot
      be requested in the codec context anymore. Setting a
      codec private option named "downmix" should help to
      access that functionality again. Didn't really figure
      out how this exactly works yet...

4. It breaks XvMC support
    * That shouldn't be a big problem as the actual support of
      the hwaccel has been removed from FFmpeg for years now
    * Additionally I talked to XvMC maintainer iive on IRC
      and he suggested to remove vo xvmc, which I have almost
      completed locally except missing docs. Would send as it
      as a follow up patch set after the build problems are solved.


As always comments and testing very welcome!


Alexander Strasser (8):
  fmt-conversion: Remove reference to AV_PIX_FMT_XVMC
  vd ffmpeg: Remove reference to slice_offset which was removed from FFmpeg
  vd_ffmpeg/ve_lavc: Use frame_num instead of frame_number
  Switch to FFmpeg AVChannelLayout
  ao sdl: Remove deactivated code to use SDL_MixAudio
  ao sdl: Switch from AVFifoBuffer to AVFifo
  configure: Disable ffmpeg protocol android_content
  configure: Set C standard to C11

 av_helpers.c            | 19 +++++++------
 configure               |  4 +--
 fmt-conversion.c        |  1 -
 libaf/af_lavcac3enc.c   |  4 +--
 libao2/ao_sdl.c         | 62 ++++++++---------------------------------
 libmpcodecs/ad_ffmpeg.c | 16 +++++------
 libmpcodecs/ae_lavc.c   |  8 +++---
 libmpcodecs/vd_ffmpeg.c |  5 ++--
 libmpcodecs/ve_lavc.c   |  2 +-
 libmpdemux/demux_lavf.c |  6 ++--
 libmpdemux/muxer_lavf.c |  2 +-
 11 files changed, 45 insertions(+), 84 deletions(-)

--


More information about the MPlayer-dev-eng mailing list