Commit c84f881e authored by Laurent Aimar's avatar Laurent Aimar

* all: a new --input-slave option to start playing with multi-input (#

 is used as a separator), it may or may not work (depend a lot on the
 demux).
parent b9e83af7
......@@ -685,6 +685,41 @@ static int Init( input_thread_t * p_input )
}
free( psz_subtitle );
/* Look for slave */
psz = var_GetString( p_input, "input-slave" );
if( *psz )
{
char *psz_delim = strchr( psz, '#' );
for( ;; )
{
input_source_t *slave;
if( psz_delim )
{
*psz_delim++ = '\0';
}
if( *psz == '\0' )
{
if( psz_delim )
continue;
else
break;
}
msg_Dbg( p_input, "adding slave '%s'", psz );
slave = InputSourceNew( p_input );
if( !InputSourceInit( p_input, slave, psz, NULL ) )
{
TAB_APPEND( p_input->i_slave, p_input->slave, slave );
}
if( !psz_delim )
break;
}
}
free( psz );
/* Set up es_out */
es_out_Control( p_input->p_es_out, ES_OUT_SET_ACTIVE, VLC_TRUE );
val.b_bool = VLC_FALSE;
......
......@@ -426,6 +426,7 @@ void input_ConfigVarInit ( input_thread_t *p_input )
val.b_bool = VLC_TRUE; /* Fixed later*/
var_Change( p_input, "seekable", VLC_VAR_SETVALUE, &val, NULL );
var_Create( p_input, "input-slave", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
}
/*****************************************************************************
......
......@@ -315,6 +315,9 @@ static char *ppsz_align_descriptions[] =
#define STOP_TIME_TEXT N_("Input stop time (seconds)")
#define STOP_TIME_LONGTEXT N_("Input stop time (seconds)")
#define INPUT_SLAVE_TEXT N_("Input slave (experimental)")
#define INPUT_SLAVE_LONGTEXT N_("Input slave (experimental)")
#define BOOKMARKS_TEXT N_("Bookmarks list for a stream")
#define BOOKMARKS_LONGTEXT N_("You can specify a list of bookmarks for a stream in " \
"the form \"{name=bookmark-name,time=optional-time-offset," \
......@@ -862,6 +865,9 @@ vlc_module_begin();
START_TIME_TEXT, START_TIME_LONGTEXT, VLC_TRUE );
add_integer( "stop-time", 0, NULL,
STOP_TIME_TEXT, STOP_TIME_LONGTEXT, VLC_TRUE );
add_string( "input-slave", NULL, NULL,
INPUT_SLAVE_TEXT, INPUT_SLAVE_LONGTEXT, VLC_TRUE );
add_string( "bookmarks", NULL, NULL,
BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, VLC_TRUE );
......
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