Commit be8812ae authored by Laurent Aimar's avatar Laurent Aimar

* all: added an sout-all option to stream all es (does work only with

 demuxer using es_out_* ie everyone but TS and PS).
parent f67a6d79
......@@ -2,7 +2,7 @@
* es_out.c: Es Out handler for input.
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: es_out.c,v 1.2 2003/11/27 04:11:40 fenrir Exp $
* $Id: es_out.c,v 1.3 2003/11/27 05:46:01 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -518,9 +518,18 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
return VLC_SUCCESS;
case ES_OUT_SET_ACTIVE:
{
b = (vlc_bool_t) va_arg( args, vlc_bool_t );
p_sys->b_active = b;
if( b )
{
vlc_value_t val;
val.b_bool = VLC_TRUE;
var_Set( p_sys->p_input, "intf-change", val );
}
return VLC_SUCCESS;
}
case ES_OUT_GET_ACTIVE:
pb = (vlc_bool_t*) va_arg( args, vlc_bool_t * );
......@@ -531,6 +540,8 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
i = (int) va_arg( args, int );
if( i == ES_OUT_MODE_NONE || i == ES_OUT_MODE_ALL || i == ES_OUT_MODE_AUTO )
{
vlc_value_t val;
p_sys->i_mode = i;
/* Reapply policy mode */
......@@ -547,6 +558,10 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
EsOutSelect( out, p_sys->es[i], VLC_FALSE );
}
vlc_mutex_unlock( &p_sys->p_input->stream.stream_lock );
val.b_bool = VLC_TRUE;
var_Set( p_sys->p_input, "intf-change", val );
return VLC_SUCCESS;
}
return VLC_EGENERIC;
......
......@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: input.c,v 1.265 2003/11/27 04:11:40 fenrir Exp $
* $Id: input.c,v 1.266 2003/11/27 05:46:01 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -113,6 +113,7 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent,
var_Create( p_input, "sub-autodetect-fuzzy", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Create( p_input, "sout", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
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-keep", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
......@@ -770,7 +771,13 @@ static int InitThread( input_thread_t * p_input )
}
es_out_Control( p_input->p_es_out, ES_OUT_SET_ACTIVE, VLC_TRUE );
es_out_Control( p_input->p_es_out, ES_OUT_SET_MODE, ES_OUT_MODE_AUTO );
val.b_bool = VLC_FALSE;
if( p_input->stream.p_sout )
{
var_Get( p_input, "sout-all", &val );
}
es_out_Control( p_input->p_es_out, ES_OUT_SET_MODE,
val.b_bool ? ES_OUT_MODE_ALL : ES_OUT_MODE_AUTO );
return VLC_SUCCESS;
}
......
......@@ -2,7 +2,7 @@
* libvlc.h: main libvlc header
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.h,v 1.108 2003/11/22 00:41:07 titer Exp $
* $Id: libvlc.h,v 1.109 2003/11/27 05:46:01 fenrir Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -364,6 +364,10 @@ static char *ppsz_language_text[] =
#define SOUT_LONGTEXT N_( \
"Empty if no stream output.")
#define SOUT_ALL_TEXT N_("Enable streaming of all ES")
#define SOUT_ALL_LONGTEXT N_( \
"This allows you to stream all ES (video, audio and subtitles)")
#define SOUT_DISPLAY_TEXT N_("Display while streaming")
#define SOUT_DISPLAY_LONGTEXT N_( \
"This allows you to play the stream while streaming it.")
......@@ -707,7 +711,8 @@ vlc_module_begin();
SOUT_DISPLAY_LONGTEXT, VLC_TRUE );
add_bool( "sout-keep", VLC_FALSE, NULL, SOUT_KEEP_TEXT,
SOUT_KEEP_LONGTEXT, VLC_TRUE );
add_bool( "sout-all", 0, NULL, SOUT_ALL_TEXT,
SOUT_ALL_LONGTEXT, VLC_TRUE );
add_bool( "sout-audio", 1, NULL, SOUT_AUDIO_TEXT,
SOUT_AUDIO_LONGTEXT, VLC_TRUE );
add_bool( "sout-video", 1, NULL, SOUT_VIDEO_TEXT,
......
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