VLC_EXPORT( void, __config_ResetAll, ( vlc_object_t * ) );
VLC_EXPORT( module_config_t *, config_FindConfig,( vlc_object_t *, const char * ) );
-VLC_EXPORT( module_t *, config_FindModule,( vlc_object_t *, const char * ) );
VLC_EXPORT( int, config_Duplicate,( module_t *, const module_config_t *, size_t ));
#define module_Exists(a,b) __module_Exists(VLC_OBJECT(a),b)
VLC_EXPORT( vlc_bool_t, __module_Exists, ( vlc_object_t *, const char * ) );
-/* Use only if you know what you're doing... */
-#define module_FindName(a,b) __module_FindName(VLC_OBJECT(a),b)
-VLC_EXPORT( module_t *, __module_FindName, ( vlc_object_t *, const char * ) );
+#define module_Find(a,b) __module_Find(VLC_OBJECT(a),b)
+VLC_EXPORT( module_t *, __module_Find, ( vlc_object_t *, const char * ) );
VLC_EXPORT( void, module_Put, ( module_t *module ) );
VLC_EXPORT( module_config_t *, module_GetConfig, ( const module_t *, unsigned * ) );
/* HACK: Don't use this codec if we don't have an mpga audio filter */
if( p_dec->i_object_type == VLC_OBJECT_DECODER &&
- !config_FindModule( p_this, "mpgatofixed32" ) )
+ !module_Exists( p_this, "mpgatofixed32" ) )
{
return VLC_EGENERIC;
}
if( data->i_type == TYPE_CATEGORY )
return;
else if( data->i_type == TYPE_MODULE )
- p_module = module_FindName( VLC_OBJECT(p_intf), data->psz_name );
+ p_module = module_Find( VLC_OBJECT(p_intf), data->psz_name );
else
{
- p_module = module_FindName( VLC_OBJECT(p_intf), "main" );
+ p_module = module_Find( VLC_OBJECT(p_intf), "main" );
assert( p_module );
}
/* 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_FindName( p_intf, psz_name );
+ module_t *p_obj = module_Find( p_intf, psz_name );
if( !p_obj )
{
msg_Err( p_intf, "Unable to find filter module \"%s\n.", psz_name );
table->setColumnCount( 2 );
table->setAlternatingRowColors( true );
- module_t *p_main = config_FindModule( p_this, "main" );
+ module_t *p_main = module_Find( p_this, "main" );
assert( p_main );
unsigned confsize;
}
}
module_PutConfig (p_config);
+ module_Put (p_module);
table->resizeColumnToContents( 0 );
/* Now add user filters */
if( var_Type( p_aout, "visual" ) == 0 )
{
- module_t *p_module;
var_Create( p_aout, "visual", VLC_VAR_STRING | VLC_VAR_HASCHOICE );
text.psz_string = _("Visualizations");
var_Change( p_aout, "visual", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_aout, "visual", VLC_VAR_ADDCHOICE, &val, &text );
/* Look for goom plugin */
- p_module = config_FindModule( VLC_OBJECT(p_aout), "goom" );
- if( p_module )
+ if( module_Exists( VLC_OBJECT(p_aout), "goom" ) )
{
val.psz_string = "goom"; text.psz_string = "Goom";
var_Change( p_aout, "visual", VLC_VAR_ADDCHOICE, &val, &text );
}
/* Look for galaktos plugin */
- p_module = config_FindModule( VLC_OBJECT(p_aout), "galaktos" );
- if( p_module )
+ if( module_Exists( VLC_OBJECT(p_aout), "galaktos" ) )
{
val.psz_string = "galaktos"; text.psz_string = "GaLaktos";
var_Change( p_aout, "visual", VLC_VAR_ADDCHOICE, &val, &text );
return NULL;
}
-/*****************************************************************************
- * config_FindModule: find a specific module structure.
- *****************************************************************************/
-module_t *config_FindModule( vlc_object_t *p_this, const char *psz_name )
-{
- vlc_list_t *p_list;
- module_t *p_module, *p_result = NULL;
- int i_index;
-
- if( !psz_name ) return NULL;
-
- p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
-
- for( i_index = 0; i_index < p_list->i_count; i_index++ )
- {
- p_module = (module_t *)p_list->p_values[i_index].p_object;
- if( !strcmp( p_module->psz_object_name, psz_name ) )
- {
- p_result = p_module;
- break;
- }
- }
-
- vlc_list_release( p_list );
-
- return p_result;
-}
-
/*****************************************************************************
* config_Duplicate: creates a duplicate of a module's configuration data.
*****************************************************************************
__config_ChainParse
config_Duplicate
config_FindConfig
-config_FindModule
config_GetDataDir
__config_GetFloat
__config_GetInt
LocaleFree
mdate
__module_Exists
-__module_FindName
+__module_Find
module_GetConfig
module_GetHelp
module_GetName
}
/*****************************************************************************
- * module_FindName: get a pointer to a module_t given it's name.
+ * module_Find: get a pointer to a module_t given it's name.
*****************************************************************************/
-module_t *__module_FindName( vlc_object_t *p_this, const char * psz_name )
+module_t *__module_Find( vlc_object_t *p_this, const char * psz_name )
{
vlc_list_t *p_list;
int i;
/*****************************************************************************
- * module_Put: release a module_t pointer from module_FindName().
+ * module_Put: release a module_t pointer from module_Find().
*****************************************************************************/
void module_Put ( module_t *module )
{
*****************************************************************************/
vlc_bool_t __module_Exists( vlc_object_t *p_this, const char * psz_name )
{
- module_t *p_module = __module_FindName( p_this, psz_name );
+ module_t *p_module = __module_Find( p_this, psz_name );
if( p_module )
{
module_Put( p_module );