]> git.sesse.net Git - vlc/commitdiff
* src/input/es_out.c: New --no-spu and --no-sout-spu options to disable
authorChristophe Massiot <massiot@videolan.org>
Mon, 19 Dec 2005 16:46:48 +0000 (16:46 +0000)
committerChristophe Massiot <massiot@videolan.org>
Mon, 19 Dec 2005 16:46:48 +0000 (16:46 +0000)
   processing of SPU elementary streams.

src/input/es_out.c
src/input/var.c
src/libvlc.h

index d688aba4cc939215be4574127210a3298f091fa0..549b823ad433c4fdb1ae2d200e1eecfb04639245 100644 (file)
@@ -770,6 +770,17 @@ static void EsSelect( es_out_t *out, es_out_id_t *es )
             return;
         }
     }
+    if( es->fmt.i_cat == SPU_ES )
+    {
+        var_Get( p_input, "spu", &val );
+        if( !var_GetBool( p_input, "spu" ) ||
+            ( p_input->p_sout && !var_GetBool( p_input, "sout-spu" ) ) )
+        {
+            msg_Dbg( p_input, "spu is disabled, not selecting ES 0x%x",
+                     es->i_id );
+            return;
+       }
+    }
 
     es->i_preroll_end = -1;
     es->p_dec = input_DecoderNew( p_input, &es->fmt, VLC_FALSE );
index 4a60bcf1e307008759d79c573da73bc9e0ecae68..7589d9d713f5841a851108196b99f0216e74b738 100644 (file)
@@ -388,6 +388,7 @@ void input_ConfigVarInit ( input_thread_t *p_input )
     /* Create Object Variables for private use only */
     var_Create( p_input, "video", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
     var_Create( p_input, "audio", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
+    var_Create( p_input, "spu", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
 
     var_Create( p_input, "audio-track", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
     var_Create( p_input, "sub-track", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
@@ -410,6 +411,7 @@ void input_ConfigVarInit ( input_thread_t *p_input )
     var_Create( p_input, "sout-all",   VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
     var_Create( p_input, "sout-audio", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
     var_Create( p_input, "sout-video", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
+    var_Create( p_input, "sout-spu", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
     var_Create( p_input, "sout-keep",  VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
 
     var_Create( p_input, "input-repeat", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
index 021ba1f444242fa6de799fce8f4cf39889ea1159..862f3d984638c87090e1aa90f5ae3fdbd43255fb 100644 (file)
@@ -432,6 +432,10 @@ static char *ppsz_clock_descriptions[] =
     "You can use this option to place the subtitles under the movie, " \
     "instead of over the movie. Try several positions.")
 
+#define SPU_TEXT N_("Enable sub-pictures")
+#define SPU_LONGTEXT N_( \
+    "You can completely disable the sub-picture processing.")
+
 #define OSD_TEXT N_("On Screen Display")
 #define OSD_LONGTEXT N_( \
     "VLC can display messages on the video. This is called OSD (On Screen " \
@@ -601,6 +605,11 @@ static char *ppsz_clock_descriptions[] =
     "This allows you to choose if the audio stream should be redirected to " \
     "the stream output facility when this last one is enabled.")
 
+#define SOUT_SPU_TEXT N_("Enable SPU stream output")
+#define SOUT_SPU_LONGTEXT N_( \
+    "This allows you to choose if the SPU streams should be redirected to " \
+    "the stream output facility when this last one is enabled.")
+
 #define SOUT_KEEP_TEXT N_("Keep stream output open" )
 #define SOUT_KEEP_LONGTEXT N_( \
     "This allows you to keep an unique stream output instance across " \
@@ -1096,6 +1105,8 @@ vlc_module_begin();
     set_subcategory( SUBCAT_VIDEO_SUBPIC );
     set_section( N_("On Screen Display") , NULL );
     add_category_hint( N_("Subpictures"), SUB_CAT_LONGTEXT , VLC_FALSE );
+
+    add_bool( "spu", 1, NULL, SPU_TEXT, SPU_LONGTEXT, VLC_TRUE );
     add_bool( "osd", 1, NULL, OSD_TEXT, OSD_LONGTEXT, VLC_FALSE );
 
     set_section( N_("Subtitles") , NULL );
@@ -1257,6 +1268,8 @@ vlc_module_begin();
                                 SOUT_AUDIO_LONGTEXT, VLC_TRUE );
     add_bool( "sout-video", 1, NULL, SOUT_VIDEO_TEXT,
                                 SOUT_VIDEO_LONGTEXT, VLC_TRUE );
+    add_bool( "sout-spu", 1, NULL, SOUT_SPU_TEXT,
+                                SOUT_SPU_LONGTEXT, VLC_TRUE );
 
     set_subcategory( SUBCAT_SOUT_STREAM );
     set_subcategory( SUBCAT_SOUT_MUX );