summaryrefslogtreecommitdiffstats
path: root/libmpdemux/open.c
diff options
context:
space:
mode:
authorjoey <joey@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-08-22 18:47:48 +0000
committerjoey <joey@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-08-22 18:47:48 +0000
commit1b8e3babb84d8b5619e7eeae3c84276614ba5958 (patch)
tree2b6d456360b35b39ef208646cbcd5274c705a09d /libmpdemux/open.c
parent97aeb8861fd019e2a4a70012323f40803b7f9544 (diff)
downloadmpv-1b8e3babb84d8b5619e7eeae3c84276614ba5958.tar.bz2
mpv-1b8e3babb84d8b5619e7eeae3c84276614ba5958.tar.xz
moved combined vobsub_lang into sub_select
add support for dvd subs and ogg subs into sub_select document sub_select vobsub_lang left as a link to sub_select for backwards compatibility git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13090 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/open.c')
-rw-r--r--libmpdemux/open.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libmpdemux/open.c b/libmpdemux/open.c
index 064f5616d3..300acb87a8 100644
--- a/libmpdemux/open.c
+++ b/libmpdemux/open.c
@@ -636,6 +636,25 @@ if(lang){
return d->nr_of_channels ? d->audio_streams[0].id : -1;
}
+int dvd_number_of_subs(stream_t *stream)
+{
+ dvd_priv_t *d;
+ if (!stream) return -1;
+ d = stream->priv;
+ if (!d) return -1;
+ return d->nr_of_subtitles;
+}
+
+int dvd_lang_from_sid(stream_t *stream, int id)
+{
+ dvd_priv_t *d;
+ if (!stream) return 0;
+ d = stream->priv;
+ if (!d) return 0;
+ if (id >= d->nr_of_subtitles) return 0;
+ return d->subtitles[id].language;
+}
+
int dvd_sid_from_lang(stream_t *stream, unsigned char* lang){
dvd_priv_t *d=stream->priv;
int code,i;