From e28bd7c6dee5cb060c08777a6c90d30df4aa6c4b Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 24 Jan 2008 19:14:05 +0000 Subject: Add new command to switch between dvdnav titles Based on parts of dvdnav monster patches from Otvos Attila git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25845 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_dvdnav.c | 9 +++++++++ stream/stream_dvdnav.h | 1 + 2 files changed, 10 insertions(+) (limited to 'stream') diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index d8d97bf217..03231b017b 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -759,6 +759,15 @@ void mp_dvdnav_get_highlight (stream_t *stream, nav_highlight_t *hl) { hl->ey = hlev.ey; } +void mp_dvdnav_switch_title (stream_t *stream, int title) { + dvdnav_priv_t *priv = (dvdnav_priv_t *) stream->priv; + uint32_t titles; + + dvdnav_get_number_of_titles (priv->dvdnav, &titles); + if (title > 0 && title <= titles) + dvdnav_title_play (priv->dvdnav, title); +} + const stream_info_t stream_info_dvdnav = { "DVDNAV stream", "null", diff --git a/stream/stream_dvdnav.h b/stream/stream_dvdnav.h index 307cfe6c92..a148113f1e 100644 --- a/stream/stream_dvdnav.h +++ b/stream/stream_dvdnav.h @@ -21,5 +21,6 @@ int mp_dvdnav_handle_input(stream_t *stream, int cmd, int *button); void mp_dvdnav_update_mouse_pos(stream_t *stream, int32_t x, int32_t y, int* button); void mp_dvdnav_get_highlight (stream_t *stream, nav_highlight_t *hl); unsigned int *mp_dvdnav_get_spu_clut(stream_t *stream); +void mp_dvdnav_switch_title(stream_t *stream, int title); #endif /* MPLAYER_STREAM_DVDNAV_H */ -- cgit v1.2.3