From 2bbed8013563e07e3fb5468c41f4d014b33fb887 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 18 Jan 2016 17:42:34 +0100 Subject: demux: remove unused flag --- demux/demux.h | 1 - 1 file changed, 1 deletion(-) (limited to 'demux/demux.h') diff --git a/demux/demux.h b/demux/demux.h index d274be5ae7..7a24230cc8 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -160,7 +160,6 @@ struct demuxer_params { struct matroska_segment_uid *matroska_wanted_uids; int matroska_wanted_segment; bool *matroska_was_valid; - bool expect_subtitle; // -- demux_open_url() only int stream_flags; bool allow_capture; -- cgit v1.2.3 From 5986861c9cbe33509b9a18ad048bbc0de7ba8dbe Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 18 Jan 2016 18:26:14 +0100 Subject: demux: remove unused function --- demux/demux.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'demux/demux.h') diff --git a/demux/demux.h b/demux/demux.h index 7a24230cc8..33cbe0f3b1 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -272,8 +272,6 @@ void demux_set_ts_offset(struct demuxer *demuxer, double offset); int demux_control(struct demuxer *demuxer, int cmd, void *arg); -void demuxer_switch_track(struct demuxer *demuxer, enum stream_type type, - struct sh_stream *stream); void demuxer_select_track(struct demuxer *demuxer, struct sh_stream *stream, bool selected); void demux_set_stream_autoselect(struct demuxer *demuxer, bool autoselect); -- cgit v1.2.3 From f9cefbfec4d7bfec44991d4372aad4fc1b3167a5 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Mon, 21 Dec 2015 17:35:15 -0800 Subject: vd_lavc: feed A53_CC side data packets into the demuxer for eia_608 decoding --- demux/demux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'demux/demux.h') diff --git a/demux/demux.h b/demux/demux.h index 33cbe0f3b1..72ed15888b 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -237,6 +237,7 @@ void free_demuxer(struct demuxer *demuxer); void free_demuxer_and_stream(struct demuxer *demuxer); void demux_add_packet(struct sh_stream *stream, demux_packet_t *dp); +void demuxer_feed_caption(struct sh_stream *stream, demux_packet_t *dp); struct demux_packet *demux_read_packet(struct sh_stream *sh); int demux_read_packet_async(struct sh_stream *sh, struct demux_packet **out_pkt); -- cgit v1.2.3 From 0af5335383887cda7650d4b33bc42759c1a5891f Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 15 Feb 2016 21:04:07 +0100 Subject: Rewrite ordered chapters and timeline stuff This uses a different method to piece segments together. The old approach basically changes to a new file (with a new start offset) any time a segment ends. This meant waiting for audio/video end on segment end, and then changing to the new segment all at once. It had a very weird impact on the playback core, and some things (like truly gapless segment transitions, or frame backstepping) just didn't work. The new approach adds the demux_timeline pseudo-demuxer, which presents an uniform packet stream from the many segments. This is pretty similar to how ordered chapters are implemented everywhere else. It also reminds of the FFmpeg concat pseudo-demuxer. The "pure" version of this approach doesn't work though. Segments can actually have different codec configurations (different extradata), and subtitles are most likely broken too. (Subtitles have multiple corner cases which break the pure stream-concatenation approach completely.) To counter this, we do two things: - Reinit the decoder with each segment. We go as far as allowing concatenating files with completely different codecs for the sake of EDL (which also uses the timeline infrastructure). A "lighter" approach would try to make use of decoder mechanism to update e.g. the extradata, but that seems fragile. - Clip decoded data to segment boundaries. This is equivalent to normal playback core mechanisms like hr-seek, but now the playback core doesn't need to care about these things. These two mechanisms are equivalent to what happened in the old implementation, except they don't happen in the playback core anymore. In other words, the playback core is completely relieved from timeline implementation details. (Which honestly is exactly what I'm trying to do here. I don't think ordered chapter behavior deserves improvement, even if it's bad - but I want to get it out from the playback core.) There is code duplication between audio and video decoder common code. This is awful and could be shareable - but this will happen later. Note that the audio path has some code to clip audio frames for the purpose of codec preroll/gapless handling, but it's not shared as sharing it would cause more pain than it would help. --- demux/demux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'demux/demux.h') diff --git a/demux/demux.h b/demux/demux.h index 72ed15888b..05e645f728 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -160,6 +160,7 @@ struct demuxer_params { struct matroska_segment_uid *matroska_wanted_uids; int matroska_wanted_segment; bool *matroska_was_valid; + struct timeline *timeline; // -- demux_open_url() only int stream_flags; bool allow_capture; -- cgit v1.2.3 From 92ba63079617f6579c276dd3ec54197b56378913 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 28 Feb 2016 19:14:23 +0100 Subject: demux: remove relative seeking Ever since a change in mplayer2 or so, relative seeks were translated to absolute seeks before sending them to the demuxer in most cases. The only exception in current mpv is DVD seeking. Remove the SEEK_ABSOLUTE flag; it's not the implied default. SEEK_FACTOR is kept, because it's sometimes slightly useful for seeking in things like transport streams. (And maybe mkv files without duration set?) DVD seeking is terrible because DVD and libdvdnav are terrible, but mostly because libdvdnav is terrible. libdvdnav does not expose seeking with seek tables. (Although I know xbmc/kodi use an undocumented API that is not declared in the headers by dladdr()ing it - I think the function is dvdnav_jump_to_sector_by_time().) With the current mpv policy if not giving a shit about DVD, just revert our half-working seek hacks and always use dvdnav_time_search(). Relative seeking might get stuck sometimes; in this case --hr-seek=always is recommended. --- demux/demux.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'demux/demux.h') diff --git a/demux/demux.h b/demux/demux.h index 05e645f728..e882e90da8 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -57,7 +57,6 @@ struct demux_ctrl_stream_ctrl { int res; }; -#define SEEK_ABSOLUTE (1 << 0) // argument is a timestamp #define SEEK_FACTOR (1 << 1) // argument is in range [0,1] #define SEEK_FORWARD (1 << 2) // prefer later time if not exact #define SEEK_BACKWARD (1 << 3) // prefer earlier time if not exact @@ -179,9 +178,6 @@ typedef struct demuxer { double start_time; // File format allows PTS resets (even if the current file is without) bool ts_resets_possible; - // Send relative seek requests, instead of SEEK_ABSOLUTE or SEEK_FACTOR. - // This is only done if the user explicitly uses a relative seek. - bool rel_seeks; // Enable fast track switching hacks. This requires from the demuxer: // - seeking is somewhat reliable; packet contents must not change // - packet position (demux_packet.pos) is set, not negative, unique, and -- cgit v1.2.3