char *psz_parser, *psz_string;
const char *psz_filter_type;
- module_t *p_obj = module_find( psz_name );
+ /* FIXME temporary hack */
+ const char *psz_module_name = psz_name;
+ if( !strcmp( psz_name, "magnify" ) ||
+ !strcmp( psz_name, "puzzle" ) ||
+ !strcmp( psz_name, "logo" ) ||
+ !strcmp( psz_name, "wall" ) ||
+ !strcmp( psz_name, "clone" ) )
+ psz_module_name = "video_filter_wrapper";
+
+ module_t *p_obj = module_find( psz_module_name );
if( !p_obj )
{
msg_Err( p_intf, "Unable to find filter module \"%s\".", psz_name );
return;
}
- if( module_provides( p_obj, "video filter2" ) )
+ if( module_provides( p_obj, "video filter" ) )
{
- psz_filter_type = "video-filter";
+ psz_filter_type = "vout-filter";
}
- else if( module_provides( p_obj, "video filter" ) )
+ else if( module_provides( p_obj, "video filter2" ) )
{
- psz_filter_type = "vout-filter";
+ psz_filter_type = "video-filter";
}
else if( module_provides( p_obj, "sub filter" ) )
{
"Module instance %s not found, looking in config values.",
qtu( module ) );
#endif
- i_type = config_GetType( p_intf, qtu( option ) ) & 0xf0;
+ i_type = config_GetType( p_intf, qtu( option ) ) & VLC_VAR_CLASS;
switch( i_type )
{
case VLC_VAR_INTEGER:
}
else
{
- i_type = var_Type( p_obj, qtu( option ) ) & 0xf0;
+ i_type = var_Type( p_obj, qtu( option ) ) & VLC_VAR_CLASS;
var_Get( p_obj, qtu( option ), &val );
vlc_object_release( p_obj );
}
QLineEdit *lineedit = qobject_cast<QLineEdit*> ( sender() );
QComboBox *combobox = qobject_cast<QComboBox*> ( sender() );
- i_type &= 0xf0;
+ i_type &= VLC_VAR_CLASS;
if( i_type == VLC_VAR_INTEGER || i_type == VLC_VAR_BOOL )
{
int i_int = 0;
var_SetBool( p_obj, psz_var, value );
break;
case VLC_VAR_VOID:
- var_SetVoid( p_obj, psz_var );
+ var_TriggerCallback( p_obj, psz_var );
break;
}
free( psz_var );
void Equalizer::enable()
{
bool en = ui.enableCheck->isChecked();
- aout_EnableFilter( VLC_OBJECT( p_intf ), "equalizer",
- en ? true : false );
-// aout_EnableFilter( VLC_OBJECT( p_intf ), "upmixer",
-// en ? true : false );
-// aout_EnableFilter( VLC_OBJECT( p_intf ), "vsurround",
-// en ? true : false );
+ aout_EnableFilter( THEPL, "equalizer", en );
+// aout_EnableFilter( THEPL, "upmixer", en );
+// aout_EnableFilter( THEPL, "vsurround", en );
enable( en );
if( presetsComboBox->currentIndex() < 0 )
char * Equalizer::createValuesFromPreset( int i_preset )
{
- char *psz_values;
QString values;
/* Create the QString in Qt */
values += QString( " %1" ).arg( eqz_preset_10b[i_preset]->f_amp[i] );
/* Convert it to char * */
- if( !asprintf( &psz_values, "%s", values.toAscii().constData() ) )
- return NULL;
-
- return psz_values;
+ return strdup( values.toAscii().constData() );
}
void Equalizer::setCorePreset( int i_preset )