mpv/demux
wm4 e7e06a47a0 demux: support for some kinds of timed metadata
This makes ICY title changes show up at approximately the correct time,
even if the demuxer buffer is huge. (It'll still be wrong if the stream
byte cache contains a meaningful amount of data.)

It should have the same effect for mid-stream metadata changes in e.g.
OGG (untested).

This is still somewhat fishy, but in parts due to ICY being fishy, and
FFmpeg's metadata change API being somewhat fishy. For example, what
happens if you seek? With FFmpeg AVFMT_EVENT_FLAG_METADATA_UPDATED and
AVSTREAM_EVENT_FLAG_METADATA_UPDATED we hope that FFmpeg will correctly
restore the correct metadata when the first packet is returned.

If you seke with ICY, we're out of luck, and some audio will be
associated with the wrong tag until we get a new title through ICY
metadata update at an essentially random point (it's mostly inherent to
ICY). Then the tags will switch back and forth, and this behavior will
stick with the data stored in the demuxer cache. Fortunately, this can
happen only if the HTTP stream is actually seekable, which it usually is
not for ICY things. Seeking doesn't even make sense with ICY, since you
can't know the exact metadata location. Basically ICY metsdata sucks.

Some complexity is due to a microoptimization: I didn't want additional
atomic accesses for each packet if no timed metadata is used. (It
probably doesn't matter at all.)
2018-04-18 01:17:42 +03:00
..
codec_tags.c
codec_tags.h
cue.c cue: strip quotes and leading whitespace from tags 2018-01-30 14:01:15 +01:00
cue.h
demux.c demux: support for some kinds of timed metadata 2018-04-18 01:17:42 +03:00
demux.h demux: support for some kinds of timed metadata 2018-04-18 01:17:42 +03:00
demux_cue.c
demux_disc.c
demux_edl.c demux_edl: fix undefined behavior if mp4 init segment is not provided 2018-03-03 02:38:01 +02:00
demux_lavf.c demux: support for some kinds of timed metadata 2018-04-18 01:17:42 +03:00
demux_libarchive.c
demux_mf.c
demux_mkv.c demux_mkv: fix certain cases of recursive SeekHeads 2018-04-15 21:03:49 +03:00
demux_mkv_timeline.c
demux_null.c demux_null: mark as seekable 2018-01-06 14:42:22 -08:00
demux_playlist.c
demux_rar.c
demux_raw.c
demux_timeline.c demux_timeline: disable pointless packet cache for sub-demuxers 2017-12-10 06:37:49 +02:00
demux_tv.c tv: Recognise v4l2 'JPEG' fourcc 2018-03-04 16:28:24 -08:00
ebml.c Fix various typos in log messages 2017-12-03 21:24:18 +01:00
ebml.h
matroska.h
packet.c demux: support for some kinds of timed metadata 2018-04-18 01:17:42 +03:00
packet.h demux: support for some kinds of timed metadata 2018-04-18 01:17:42 +03:00
stheader.h demux, player: mark dependent tracks 2018-04-17 01:01:50 +03:00
timeline.c
timeline.h