Commit d46ea102 authored by Antoine Cellerier's avatar Antoine Cellerier

Fix use of logo and erase filters in the Qt extended intf.

parent 8a0180f5
...@@ -250,8 +250,6 @@ void ExtVideo::ChangeVFiltersString( char *psz_name, bool b_add ) ...@@ -250,8 +250,6 @@ void ExtVideo::ChangeVFiltersString( char *psz_name, bool b_add )
char *psz_parser, *psz_string; char *psz_parser, *psz_string;
const char *psz_filter_type; const char *psz_filter_type;
/* Please leave p_libvlc_global. This is where cached modules are
* stored. We're not trying to find a module instance. */
module_t *p_obj = module_Find( p_intf, psz_name ); module_t *p_obj = module_Find( p_intf, psz_name );
if( !p_obj ) if( !p_obj )
{ {
...@@ -504,14 +502,20 @@ void ExtVideo::updateFilterOptions() ...@@ -504,14 +502,20 @@ void ExtVideo::updateFilterOptions()
vlc_object_find_name( p_intf->p_libvlc, vlc_object_find_name( p_intf->p_libvlc,
qtu( module ), qtu( module ),
FIND_CHILD ); FIND_CHILD );
int i_type;
bool b_is_command;
if( !p_obj ) if( !p_obj )
{ {
msg_Err( p_intf, "Module %s not found.", qtu( module ) ); msg_Warn( p_intf, "Module %s not found. You'll need to restart the filter to take the change into account.", qtu( module ) );
return; i_type = config_GetType( p_intf, qtu( option ) );
b_is_command = false;
}
else
{
i_type = var_Type( p_obj, qtu( option ) );
b_is_command = ( i_type & VLC_VAR_ISCOMMAND );
} }
int i_type = var_Type( p_obj, qtu( option ) );
bool b_is_command = ( i_type & VLC_VAR_ISCOMMAND );
if( !b_is_command ) if( !b_is_command )
{ {
msg_Warn( p_intf, "Module %s's %s variable isn't a command. You'll need to restart the filter to take change into account.", msg_Warn( p_intf, "Module %s's %s variable isn't a command. You'll need to restart the filter to take change into account.",
...@@ -581,7 +585,7 @@ void ExtVideo::updateFilterOptions() ...@@ -581,7 +585,7 @@ void ExtVideo::updateFilterOptions()
qtu( option ), qtu( option ),
i_type ); i_type );
vlc_object_release( p_obj ); if( p_obj ) vlc_object_release( p_obj );
} }
#if 0 #if 0
......
...@@ -101,13 +101,13 @@ static const char *const ppsz_pos_descriptions[] = ...@@ -101,13 +101,13 @@ static const char *const ppsz_pos_descriptions[] =
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }; N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
vlc_module_begin(); vlc_module_begin();
set_description( N_("Logo video filter") ); set_capability( "sub filter", 0 );
set_capability( "video filter", 0 ); set_callbacks( CreateFilter, DestroyFilter );
set_description( N_("Logo sub filter") );
set_shortname( N_("Logo overlay") ); set_shortname( N_("Logo overlay") );
set_category( CAT_VIDEO ); set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_SUBPIC ); set_subcategory( SUBCAT_VIDEO_SUBPIC );
add_shortcut( "logo" ); add_shortcut( "logo" );
set_callbacks( Create, Destroy );
add_file( CFG_PREFIX "file", NULL, NULL, FILE_TEXT, FILE_LONGTEXT, false ); add_file( CFG_PREFIX "file", NULL, NULL, FILE_TEXT, FILE_LONGTEXT, false );
add_integer( CFG_PREFIX "x", 0, NULL, POSX_TEXT, POSX_LONGTEXT, true ); add_integer( CFG_PREFIX "x", 0, NULL, POSX_TEXT, POSX_LONGTEXT, true );
...@@ -120,11 +120,11 @@ vlc_module_begin(); ...@@ -120,11 +120,11 @@ vlc_module_begin();
add_integer( CFG_PREFIX "position", -1, NULL, POS_TEXT, POS_LONGTEXT, false ); add_integer( CFG_PREFIX "position", -1, NULL, POS_TEXT, POS_LONGTEXT, false );
change_integer_list( pi_pos_values, ppsz_pos_descriptions, NULL ); change_integer_list( pi_pos_values, ppsz_pos_descriptions, NULL );
/* subpicture filter submodule */ /* video output filter submodule */
add_submodule(); add_submodule();
set_capability( "sub filter", 0 ); set_capability( "video filter", 0 );
set_callbacks( CreateFilter, DestroyFilter ); set_callbacks( Create, Destroy );
set_description( N_("Logo sub filter") ); set_description( N_("Logo video filter") );
vlc_module_end(); vlc_module_end();
static const char *const ppsz_filter_options[] = { static const char *const ppsz_filter_options[] = {
......
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