From 98f15b645ff1d10a914c004d0b076916a5f1f094 Mon Sep 17 00:00:00 2001 From: mplayer-svn Date: Sat, 31 Dec 2011 12:20:08 +0000 Subject: 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 --- stream/stream_dvd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'stream/stream_dvd.c') diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index 2121e78ccc..b9ffafed8f 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -621,6 +621,11 @@ static int control(stream_t *stream,int cmd,void* arg) *((double *)arg) = (double) mp_get_titleset_length(d->vts_file, d->tt_srpt, d->cur_title-1)/1000.0; return 1; } + case STREAM_CTRL_GET_NUM_TITLES: + { + *((unsigned int *)arg) = d->vmg_file->tt_srpt->nr_of_srpts; + return 1; + } case STREAM_CTRL_GET_NUM_CHAPTERS: { int r; -- cgit v1.2.3