Commit bfc77638 authored by Gildas Bazin's avatar Gildas Bazin

* src/video_output/vout_subpictures.c: support for stacking subpictures...

* src/video_output/vout_subpictures.c: support for stacking subpictures filters (eg. --sub-filter=foo,bar).
parent 5c52f23d
...@@ -110,8 +110,13 @@ int spu_Init( spu_t *p_spu ) ...@@ -110,8 +110,13 @@ int spu_Init( spu_t *p_spu )
var_Create( p_spu, "sub-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); var_Create( p_spu, "sub-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
var_Get( p_spu, "sub-filter", &val ); var_Get( p_spu, "sub-filter", &val );
psz_filter = psz_filter_orig = val.psz_string; psz_filter = psz_filter_orig = val.psz_string;
if( psz_filter && *psz_filter ) while( psz_filter && *psz_filter )
{ {
char *psz_parser = strchr( psz_filter, ',' );
if( !psz_parser ) psz_parser = strchr( psz_filter, ':' );
if( psz_parser ) *psz_parser++ = 0;
p_spu->pp_filter[p_spu->i_filter] = p_spu->pp_filter[p_spu->i_filter] =
vlc_object_create( p_spu, VLC_OBJECT_FILTER ); vlc_object_create( p_spu, VLC_OBJECT_FILTER );
vlc_object_attach( p_spu->pp_filter[p_spu->i_filter], p_spu ); vlc_object_attach( p_spu->pp_filter[p_spu->i_filter], p_spu );
...@@ -134,6 +139,13 @@ int spu_Init( spu_t *p_spu ) ...@@ -134,6 +139,13 @@ int spu_Init( spu_t *p_spu )
vlc_object_detach( p_spu->pp_filter[p_spu->i_filter] ); vlc_object_detach( p_spu->pp_filter[p_spu->i_filter] );
vlc_object_destroy( p_spu->pp_filter[p_spu->i_filter] ); vlc_object_destroy( p_spu->pp_filter[p_spu->i_filter] );
} }
if( p_spu->i_filter >= 10 )
{
msg_Dbg( p_spu, "can't add anymore filters" );
}
psz_filter = psz_parser;
} }
if( psz_filter_orig ) free( psz_filter_orig ); if( psz_filter_orig ) free( psz_filter_orig );
......
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