• Aman Gupta's avatar
    avformat: add fields to AVProgram/AVStream for PMT change tracking · 2b2f2f65
    Aman Gupta authored
    These fields will allow the mpegts demuxer to expose details about
    the PMT/program which created the AVProgram and its AVStreams.
    
    In mpegts, a PMT which advertises streams has a version number
    which can be incremented at any time. When the version changes,
    the pids which correspond to each of it's streams can also change.
    
    Since ffmpeg creates a new AVStream per pid by default, an API user
    needs the ability to (a) detect when the PMT changed, and (b) tell
    which AVStream were added to replace earlier streams.
    
    This has been a long-standing issue with ffmpeg's handling of mpegts
    streams with PMT changes, and I found two related patches in the wild
    that attempt to solve the same problem:
    
    The first is in MythTV's ffmpeg fork, where they added a
    void (*streams_changed)(void*); to AVFormatContext and call it from
    their fork of the mpegts demuxer whenever the PMT changes.
    
    The second was proposed by XBMC in
    https://ffmpeg.org/pipermail/ffmpeg-devel/2012-December/135036.html,
    where they created a new AVMEDIA_TYPE_DATA stream with id=0 and
    attempted to send packets to it whenever the PMT changed.
    Signed-off-by: 's avatarAman Gupta <aman@tmm1.net>
    2b2f2f65
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools 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...
configure Loading commit data...