diff options
author | mplayer-svn <svn@mplayerhq.hu> | 2011-12-31 12:20:08 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-03 01:43:03 +0200 |
commit | 98f15b645ff1d10a914c004d0b076916a5f1f094 (patch) | |
tree | 61cccc0937d86a1f06a01d874a9d33f52603c438 /stream/stream_cdda.c | |
parent | e97d658bdee7b1ebb1e62fcf8d79b150bd40213f (diff) | |
download | mpv-98f15b645ff1d10a914c004d0b076916a5f1f094.tar.bz2 mpv-98f15b645ff1d10a914c004d0b076916a5f1f094.tar.xz |
stream: add new stream control command STREAM_CTRL_GET_NUM_TITLES
This provides the total number of titles (aka tracks) of CDs / VCDs / DVDs.
Additionally, add a titles property to the get_property slave command.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34474 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: ib
Diffstat (limited to 'stream/stream_cdda.c')
-rw-r--r-- | stream/stream_cdda.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c index 8bd179b1df..a014ad14c4 100644 --- a/stream/stream_cdda.c +++ b/stream/stream_cdda.c @@ -254,6 +254,11 @@ static int control(stream_t *stream, int cmd, void *arg) { cdda_priv *p = stream->priv; switch (cmd) { + case STREAM_CTRL_GET_NUM_TITLES: + { + *(unsigned int *)arg = p->cd->tracks; + return STREAM_OK; + } case STREAM_CTRL_GET_NUM_CHAPTERS: { int start_track = get_track_by_sector(p, p->start_sector); |