Commit f0b97796 authored by Christophe Massiot's avatar Christophe Massiot

* src/input/es_out.c: New --no-spu and --no-sout-spu options to disable

   processing of SPU elementary streams.
parent 8ba6d9a8
......@@ -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 );
......
......@@ -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 );
......
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment