Commit c7b3c555 authored by Gildas Bazin's avatar Gildas Bazin

* src/video_output/video_output.c: re-enabled on-the-fly switching of video filters.

parent 22aae046
...@@ -1316,7 +1316,6 @@ static int DeinterlaceCallback( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1316,7 +1316,6 @@ static int DeinterlaceCallback( vlc_object_t *p_this, char const *psz_cmd,
char *psz_mode = newval.psz_string; char *psz_mode = newval.psz_string;
char *psz_filter; char *psz_filter;
unsigned int i;
psz_filter = config_GetPsz( p_vout, "filter" ); psz_filter = config_GetPsz( p_vout, "filter" );
...@@ -1357,28 +1356,16 @@ static int DeinterlaceCallback( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1357,28 +1356,16 @@ static int DeinterlaceCallback( vlc_object_t *p_this, char const *psz_cmd,
var_Set( p_input, "deinterlace-mode", val ); var_Set( p_input, "deinterlace-mode", val );
} }
/* FIXME FIXME input2 --fenrir */ /* Now restart current video stream */
#if 0 var_Get( p_input, "video-es", &val );
/* now restart all video streams */ if( val.i_int >= 0 )
vlc_mutex_lock( &p_input->stream.stream_lock );
p_vout->b_filter_change = VLC_TRUE;
#define ES p_input->stream.pp_es[i]
for( i = 0 ; i < p_input->stream.i_es_number ; i++ )
{ {
if( ( ES->i_cat == VIDEO_ES ) && ES->p_dec != NULL ) p_vout->b_filter_change = VLC_TRUE;
{ var_Set( p_input, "video-es", (vlc_value_t)-VIDEO_ES );
input_UnselectES( p_input, ES ); var_Set( p_input, "video-es", val );
input_SelectES( p_input, ES );
}
#undef ES
} }
vlc_mutex_unlock( &p_input->stream.stream_lock );
vlc_object_release( p_input ); vlc_object_release( p_input );
#endif
val.b_bool = VLC_TRUE; val.b_bool = VLC_TRUE;
var_Set( p_vout, "intf-change", val ); var_Set( p_vout, "intf-change", val );
...@@ -1391,7 +1378,6 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1391,7 +1378,6 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd,
vout_thread_t *p_vout = (vout_thread_t *)p_this; vout_thread_t *p_vout = (vout_thread_t *)p_this;
input_thread_t *p_input; input_thread_t *p_input;
vlc_value_t val; vlc_value_t val;
unsigned int i;
p_input = (input_thread_t *)vlc_object_find( p_this, VLC_OBJECT_INPUT, p_input = (input_thread_t *)vlc_object_find( p_this, VLC_OBJECT_INPUT,
FIND_PARENT ); FIND_PARENT );
...@@ -1402,28 +1388,16 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1402,28 +1388,16 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd,
return( VLC_EGENERIC ); return( VLC_EGENERIC );
} }
/* FIXME FIXME input2 --fenrir */ /* Now restart current video stream */
#if 0 var_Get( p_input, "video-es", &val );
/* Restart the video stream */ if( val.i_int >= 0 )
vlc_mutex_lock( &p_input->stream.stream_lock );
p_vout->b_filter_change = VLC_TRUE;
#define ES p_input->stream.pp_es[i]
for( i = 0 ; i < p_input->stream.i_es_number ; i++ )
{ {
if( ( ES->i_cat == VIDEO_ES ) && ES->p_dec != NULL ) p_vout->b_filter_change = VLC_TRUE;
{ var_Set( p_input, "video-es", (vlc_value_t)-VIDEO_ES );
input_UnselectES( p_input, ES ); var_Set( p_input, "video-es", val );
input_SelectES( p_input, ES );
}
#undef ES
} }
vlc_mutex_unlock( &p_input->stream.stream_lock );
vlc_object_release( p_input ); vlc_object_release( p_input );
#endif
val.b_bool = VLC_TRUE; val.b_bool = VLC_TRUE;
var_Set( p_vout, "intf-change", val ); var_Set( p_vout, "intf-change", val );
......
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