1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-01 14:50:07 +00:00
mpv/demux
wm4 a0a089f6a4 player: use a separate context for timeline loader stuff
Instead of accessing MPContext in player/timeline/*, create a separate
context struct, which the timeline loaders fill out. It turns out that
there's not much in the way too big MPContext that these need to access.

One major PITA is managing (and closing) the set of open demuxers. The
problem is that we need a list of all demuxers to make sure no unneeded
streams are enabled.

This adds a callback to the demuxer_desc struct, with the intention of
leaving to to the demuxer to call the right loader, instead of
explicitly checking the demuxer type and dispatching manually in common
code. I also considered making the timeline part of the demuxer state,
but decided against: it's too much of a mess wrt. memory management and
threading, and also doesn't make it clear who owns the child demuxers.
With the struct timeline decoupled from the demuxer state, it's at least
somewhat clear that the child demuxers are independent from the "main"
demuxer.

The actual changes to player/timeline/* are separated in the following
commits, because they're quite verbose. Some artifacts will be removed
later as soon as there's only 1 timeline loading mechanism.
2015-02-17 23:46:12 +01:00
..
codec_tags.c demux_mkv: support embedded coverart 2014-12-22 12:53:51 +01:00
codec_tags.h demux_mkv: support embedded coverart 2014-12-22 12:53:51 +01:00
demux_cue.c demux_cue: use stream_peek() 2014-11-16 18:13:41 +01:00
demux_disc.c demux_disc: fix CDDA seekability 2015-02-03 19:32:30 +01:00
demux_edl.c timeline: reject mplayer2 EDL files, change EDL header 2013-11-21 15:59:00 +01:00
demux_lavf.c demux_lavf: hack against hls showing "100%" position 2015-02-17 23:42:04 +01:00
demux_libass.c demux_libass: change how external ASS subtitles are loaded 2014-03-15 22:17:51 +01:00
demux_mf.c demux_mf: move mf.c contents to demux_mf.c 2014-12-29 23:09:50 +01:00
demux_mkv.c demux: hack for instant stream switching 2015-02-13 21:17:17 +01:00
demux_playlist.c demux_playlist: unquote entries in pls playlists 2014-12-30 13:24:43 +01:00
demux_raw.c demux_raw: output smaller audio packets 2015-02-04 10:42:23 +01:00
demux_subreader.c command: export file format as property 2015-01-23 15:59:06 +01:00
demux_tv.c audio: decouple demux and audio decoder/filter sample formats 2014-09-24 22:55:50 +02:00
demux.c demux: chapters without metadata are allowed 2015-02-17 23:44:31 +01:00
demux.h player: use a separate context for timeline loader stuff 2015-02-17 23:46:12 +01:00
ebml.c demux_mkv: fix EBML parsing checks 2015-01-12 14:31:31 +01:00
ebml.h Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
matroska.h demux_mkv: reduce log noise 2014-12-29 23:14:19 +01:00
packet.c demux_mkv: refactor packet parsing 2015-02-05 21:52:07 +01:00
packet.h demux_mkv: refactor packet parsing 2015-02-05 21:52:07 +01:00
stheader.h player: add stream selection by ffmpeg index 2014-10-21 13:19:20 +02:00
timeline.c player: use a separate context for timeline loader stuff 2015-02-17 23:46:12 +01:00
timeline.h player: use a separate context for timeline loader stuff 2015-02-17 23:46:12 +01:00