changeset 3754:174e473f582d

-alang/-slang options (audio/sub selection by language code)
author arpi
date Wed, 26 Dec 2001 00:16:59 +0000
parents d3fc41a04cb7
children b805040d6645
files cfg-mplayer.h mplayer.c
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-mplayer.h	Wed Dec 26 00:16:09 2001 +0000
+++ b/cfg-mplayer.h	Wed Dec 26 00:16:59 2001 +0000
@@ -235,6 +235,11 @@
 	{"lircconf", &lirc_configfile, CONF_TYPE_STRING, 0, 0, 0}, 
 #endif
 
+#ifdef USE_DVDREAD
+	{"alang", &audio_lang, CONF_TYPE_STRING, 0, 0, 0},
+	{"slang", &dvdsub_lang, CONF_TYPE_STRING, 0, 0, 0},
+#endif
+
 	{"gui", &use_gui, CONF_TYPE_FLAG, 0, 0, 1},
 	{"nogui", &use_gui, CONF_TYPE_FLAG, 0, 1, 0},
       
--- a/mplayer.c	Wed Dec 26 00:16:09 2001 +0000
+++ b/mplayer.c	Wed Dec 26 00:16:59 2001 +0000
@@ -189,6 +189,8 @@
 int audio_id=-1;
 int video_id=-1;
 int dvdsub_id=-1;
+char* audio_lang=NULL;
+char* dvdsub_lang=NULL;
 static int vcd_track=0;
 
 // cache2:
@@ -851,8 +853,11 @@
   exit_player(MSGTR_Exit_eof);
 }
 
+#ifdef USE_DVDREAD
+  current_module="dvd lang->id";
+  if(audio_lang && audio_id==-1) audio_id=dvd_aid_from_lang(stream,audio_lang);
+  if(dvdsub_lang && dvdsub_id==-1) dvdsub_id=dvd_sid_from_lang(stream,dvdsub_lang);
 
-#ifdef USE_DVDREAD
   current_module="spudec";
   vo_spudec=spudec_new(stream->priv);
   if (vo_spudec!=NULL)