• wm4's avatar
    avcodec, avformat: deprecate anything related to side data merging · d682ae70
    wm4 authored
    This patch deprecates anything that has to do with merging/splitting
    side data. Automatic side data merging (and splitting), as well as all
    API symbols involved in it, are removed completely.
    
    Two FF_API_ defines are dedicated to deprecating API symbols related to
    this: FF_API_MERGE_SD_API removes av_packet_split/merge_side_data in
    libavcodec, and FF_API_LAVF_KEEPSIDE_FLAG deprecates
    AVFMT_FLAG_KEEP_SIDE_DATA in libavformat.
    
    Since it was claimed that changing the default from merging side data to
    not doing it is an ABI change, there are two additional FF_API_ defines,
    which stop using the side data merging/splitting by default (and remove
    any code in avformat/avcodec doing this): FF_API_MERGE_SD in libavcodec,
    and FF_API_LAVF_MERGE_SD in libavformat.
    
    It is very much intended that FF_API_MERGE_SD and FF_API_LAVF_MERGE_SD
    are quickly defined to 0 in the next ABI bump, while the API symbols are
    retained for a longer time for the sake of compatibility.
    AVFMT_FLAG_KEEP_SIDE_DATA will (very much intentionally) do nothing for
    most of the time it will still be defined. Keep in mind that no code
    exists that actually tries to unset this flag for any reason, nor does
    such code need to exist. Code setting this flag explicitly will work as
    before. Thus it's ok for AVFMT_FLAG_KEEP_SIDE_DATA to do nothing once
    side data merging has been removed from libavformat.
    
    In order to avoid that anyone in the future does this incorrectly, here
    is a small guide how to update the internal code on bumps:
    
    - next ABI bump (probably soon):
      - define FF_API_LAVF_MERGE_SD to 0, and remove all code covered by it
      - define FF_API_MERGE_SD to 0, and remove all code covered by it
    - next API bump (typically two years in the future or so):
      - define FF_API_LAVF_KEEPSIDE_FLAG to 0, and remove all code covered
        by it
      - define FF_API_MERGE_SD_API to 0, and remove all code covered by it
    
    This forces anyone who actually wants packet side data to temporarily
    use deprecated API to get it all. If you ask me, this is batshit fucked
    up crazy, but it's how we roll. Making AVFMT_FLAG_KEEP_SIDE_DATA to be
    set by default was rejected as an ABI change, so I'm going all the way
    to get rid of this once and for all.
    Reviewed-by: 's avatarJames Almer <jamrial@gmail.com>
    Reviewed-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
    Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    d682ae70
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
arch.mak Loading commit data...
cmdutils.c Loading commit data...
cmdutils.h Loading commit data...
cmdutils_common_opts.h Loading commit data...
cmdutils_opencl.c Loading commit data...
common.mak Loading commit data...
configure Loading commit data...
ffmpeg.c Loading commit data...
ffmpeg.h Loading commit data...
ffmpeg_cuvid.c Loading commit data...
ffmpeg_dxva2.c Loading commit data...
ffmpeg_filter.c Loading commit data...
ffmpeg_opt.c Loading commit data...
ffmpeg_qsv.c Loading commit data...
ffmpeg_vaapi.c Loading commit data...
ffmpeg_vdpau.c Loading commit data...
ffmpeg_videotoolbox.c Loading commit data...
ffplay.c Loading commit data...
ffprobe.c Loading commit data...
ffserver.c Loading commit data...
ffserver_config.c Loading commit data...
ffserver_config.h Loading commit data...
library.mak Loading commit data...
version.sh Loading commit data...