summaryrefslogtreecommitdiffstats
path: root/mp_core.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 /mp_core.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 'mp_core.h')
-rw-r--r--mp_core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/mp_core.h b/mp_core.h
index 04a3dac735..ea21752767 100644
--- a/mp_core.h
+++ b/mp_core.h
@@ -55,6 +55,7 @@ enum stop_play_reason {
PT_NEXT_ENTRY, // prepare to play next entry in playlist
PT_CURRENT_ENTRY, // prepare to play mpctx->playlist->current
PT_STOP, // stop playback, clear playlist
+ PT_RESTART, // restart previous file
PT_QUIT, // stop playback, quit player
};