summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demuxer.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-08-26 01:19:42 +0200
committerwm4 <wm4@nowhere>2012-09-18 21:04:45 +0200
commit88728c6fad99fe6c9cc0b77f95c46d6919f0693a (patch)
tree202bba034426f78e3ffcd20a9b9d660a0be8d86a /libmpdemux/demuxer.h
parent7236ad5ff2dd67e069b3fb2bf9adc1e0f2135e6f (diff)
downloadmpv-88728c6fad99fe6c9cc0b77f95c46d6919f0693a.tar.bz2
mpv-88728c6fad99fe6c9cc0b77f95c46d6919f0693a.tar.xz
core: runtime Matroska edition switching
Add a new slave property which switches the current Matroska edition. Since each edition can define an entirely new timeline, switching the edition will simply restart playback at the beginning of the file with the new edition selected. Add 'E' as new keybinding to step the edition property. DVD titles are still separate. Apparently they work similarly, but I don't have any multi-title DVDs for testing. Also, cdda (for audio CDs) uses the same mechanism as DVDs to report a number of titles, so there seems to be confusion what exactly this mechanism is supposed to do. That's why the edition code is completely separate for now. Remove demuxer.num_titles. It was just a rather useless cache for the return value of the DVD titles related STREAM_CTRL. One rather obscure corner case isn't taken care of: if the ordered chapters file has file local options set, they are reset on playback restart. This is unexpected, because edition switching is meant to behave like seeking back to the beginning of the file.
Diffstat (limited to 'libmpdemux/demuxer.h')
-rw-r--r--libmpdemux/demuxer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h
index cf81ce988c..f2236c6016 100644
--- a/libmpdemux/demuxer.h
+++ b/libmpdemux/demuxer.h
@@ -249,7 +249,8 @@ typedef struct demuxer {
struct sh_stream **streams;
int num_streams;
- int num_titles;
+ int num_editions;
+ int edition;
struct demux_chapter *chapters;
int num_chapters;