From 1215f0871cd7aa4e5aaca85fe86acffa6da0463e Mon Sep 17 00:00:00 2001 From: ib Date: Sun, 21 Oct 2012 14:56:50 +0000 Subject: stream: add STREAM_CTRL_GET_CURRENT_TITLE Add new stream control command STREAM_CTRL_GET_CURRENT_TITLE for DVDs. This provides the current title (aka track) number of a DVD. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35263 b3059339-0415-0410-9bf9-f77b7e298cf2 --- 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 05492ce490..689e773c9d 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -643,6 +643,11 @@ static int control(stream_t *stream,int cmd,void* arg) return 1; } + case STREAM_CTRL_GET_CURRENT_TITLE: + { + *((unsigned int *)arg) = d->cur_title - 1; + return 1; + } case STREAM_CTRL_GET_CURRENT_CHAPTER: { *((unsigned int *)arg) = dvd_chapter_from_cell(d, d->cur_title-1, d->cur_cell); -- cgit v1.2.3