lower case the module_* functions

This commit is contained in:
Rémi Denis-Courmont 2008-09-21 14:58:57 +03:00
parent d72063d609
commit acbad93b8b
61 changed files with 349 additions and 349 deletions

View File

@ -533,7 +533,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
/* Object properties */ \
volatile bool b_error; /**< set by the object */ \
volatile bool b_die; /**< set by the outside */ \
bool b_force; /**< set by the outside (eg. module_Need()) */ \
bool b_force; /**< set by the outside (eg. module_need()) */ \
\
/** Just a reminder so that people don't cast garbage */ \
bool be_sure_to_add_VLC_COMMON_MEMBERS_to_struct; \

View File

@ -30,18 +30,18 @@
* Exported functions.
*****************************************************************************/
#define module_Need(a,b,c,d) __module_Need(VLC_OBJECT(a),b,c,d)
VLC_EXPORT( module_t *, __module_Need, ( vlc_object_t *, const char *, const char *, bool ) );
#define module_Unneed(a,b) __module_Unneed(VLC_OBJECT(a),b)
VLC_EXPORT( void, __module_Unneed, ( vlc_object_t *, module_t * ) );
#define module_Exists(a,b) __module_Exists(VLC_OBJECT(a),b)
VLC_EXPORT( bool, __module_Exists, ( vlc_object_t *, const char * ) );
#define module_need(a,b,c,d) __module_need(VLC_OBJECT(a),b,c,d)
VLC_EXPORT( module_t *, __module_need, ( vlc_object_t *, const char *, const char *, bool ) );
#define module_unneed(a,b) __module_unneed(VLC_OBJECT(a),b)
VLC_EXPORT( void, __module_unneed, ( vlc_object_t *, module_t * ) );
#define module_exists(a,b) __module_exists(VLC_OBJECT(a),b)
VLC_EXPORT( bool, __module_exists, ( 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 * ) );
#define module_find(a,b) __module_find(VLC_OBJECT(a),b)
VLC_EXPORT( module_t *, __module_find, ( vlc_object_t *, const char * ) );
VLC_EXPORT( module_config_t *, module_GetConfig, ( const module_t *, unsigned * ) );
VLC_EXPORT( void, module_PutConfig, ( module_config_t * ) );
VLC_EXPORT( module_config_t *, module_config_get, ( const module_t *, unsigned * ) );
VLC_EXPORT( void, module_config_free, ( module_config_t * ) );
VLC_EXPORT( module_t *, module_hold, (module_t *module) );
VLC_EXPORT( void, module_release, (module_t *module) );
@ -57,20 +57,20 @@ VLC_EXPORT(char **, __module_GetModulesNamesForCapability,
( vlc_object_t *p_this, const char * psz_capability,
char ***psz_longname ) );
VLC_EXPORT( bool, module_IsCapable, ( const module_t *m, const char *cap ) );
VLC_EXPORT( const char *, module_GetObjName, ( const module_t *m ) );
VLC_EXPORT( const char *, module_GetName, ( const module_t *m, bool long_name ) );
#define module_GetLongName( m ) module_GetName( m, true )
VLC_EXPORT( const char *, module_GetHelp, ( const module_t *m ) );
VLC_EXPORT( bool, module_provides, ( const module_t *m, const char *cap ) );
VLC_EXPORT( const char *, module_get_object, ( const module_t *m ) );
VLC_EXPORT( const char *, module_get_name, ( const module_t *m, bool long_name ) );
#define module_GetLongName( m ) module_get_name( m, true )
VLC_EXPORT( const char *, module_get_help, ( const module_t *m ) );
#define module_GetMainModule(a) __module_GetMainModule(VLC_OBJECT(a))
static inline module_t * __module_GetMainModule( vlc_object_t * p_this )
#define module_get_main(a) __module_get_main(VLC_OBJECT(a))
static inline module_t * __module_get_main( vlc_object_t * p_this )
{
return module_Find( p_this, "main" );
return module_find( p_this, "main" );
}
static inline bool module_IsMainModule( const module_t * p_module )
static inline bool module_is_main( const module_t * p_module )
{
return !strcmp( module_GetObjName( p_module ), "main" );
return !strcmp( module_get_object( p_module ), "main" );
}

View File

@ -350,7 +350,7 @@ void RenderCursor( demux_t *p_demux, int i_x, int i_y,
p_sys->p_blend->fmt_in.video = p_sys->p_mouse->format;
p_sys->p_blend->fmt_out = p_sys->fmt;
p_sys->p_blend->p_module =
module_Need( p_sys->p_blend, "video blending", 0, 0 );
module_need( p_sys->p_blend, "video blending", 0, 0 );
if( !p_sys->p_blend->p_module )
{
msg_Err( p_demux, "Could not load video blending module" );

View File

@ -108,7 +108,7 @@ int screen_CloseCapture( demux_t *p_demux )
XCloseDisplay( p_display );
if( p_sys->p_blend )
{
module_Unneed( p_sys->p_blend, p_sys->p_blend->p_module );
module_unneed( p_sys->p_blend, p_sys->p_blend->p_module );
vlc_object_detach( p_sys->p_blend );
vlc_object_release( p_sys->p_blend );
}

View File

@ -95,7 +95,7 @@ int VCDInit ( vlc_object_t *p_this )
}
p_input->p_private = (void*)&p_demux->mpeg;
p_demux->p_module = module_Need( p_input, "mpeg-system", NULL, 0 );
p_demux->p_module = module_need( p_input, "mpeg-system", NULL, 0 );
if( p_demux->p_module == NULL )
{
free( p_input->p_demux_data );
@ -134,7 +134,7 @@ void VCDEnd ( vlc_object_t *p_this )
p_vcd->p_intf = NULL;
module_Unneed( p_input, p_input->p_demux_data->p_module );
module_unneed( p_input, p_input->p_demux_data->p_module );
free( p_input->p_demux_data );
}

View File

@ -144,7 +144,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* HACK: Don't use this codec if we don't have an mpga audio filter */
if( p_dec->i_object_type == VLC_OBJECT_DECODER &&
!module_Exists( p_this, "mpgatofixed32" ) )
!module_exists( p_this, "mpgatofixed32" ) )
{
return VLC_EGENERIC;
}

View File

@ -519,7 +519,7 @@ static int ParseImageAttachments( decoder_t *p_dec )
fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
/* Find a suitable decoder module */
if( module_Exists( p_dec, "sdl_image" ) )
if( module_exists( p_dec, "sdl_image" ) )
{
/* ffmpeg thinks it can handle bmp properly but it can't (at least
* not all of them), so use sdl_image if it is available */

View File

@ -344,11 +344,11 @@ mvar_t *mvar_ObjectSetNew( intf_thread_t *p_intf, char *psz_name,
for( i = 0; i < p_list->i_count; i++ )
{
module_t *p_parser = (module_t *)p_list->p_values[i].p_object;
if( module_IsCapable( p_parser, psz_capability ) )
if( module_provides( p_parser, psz_capability ) )
{
mvar_t *sd = mvar_New( "sd", module_GetObjName( p_parser ) );
mvar_t *sd = mvar_New( "sd", module_get_object( p_parser ) );
mvar_AppendNewVar( sd, "name",
module_GetName( p_parser, true ) );
module_get_name( p_parser, true ) );
mvar_AppendVar( s, sd );
}
}

View File

@ -547,7 +547,7 @@ static int OpenBlending( intf_thread_t *p_intf )
VLC_FOURCC('Y','U','V','A');
p_intf->p_sys->p_blend->p_module =
module_Need( p_intf->p_sys->p_blend, "video blending", 0, 0 );
module_need( p_intf->p_sys->p_blend, "video blending", 0, 0 );
if( !p_intf->p_sys->p_blend->p_module )
return VLC_EGENERIC;
@ -560,7 +560,7 @@ static void CloseBlending( intf_thread_t *p_intf )
if( p_intf->p_sys->p_blend )
{
if( p_intf->p_sys->p_blend->p_module )
module_Unneed( p_intf->p_sys->p_blend,
module_unneed( p_intf->p_sys->p_blend,
p_intf->p_sys->p_blend->p_module );
vlc_object_detach( p_intf->p_sys->p_blend );
@ -590,13 +590,13 @@ static int OpenTextRenderer( intf_thread_t *p_intf )
if( psz_modulename && *psz_modulename )
{
p_intf->p_sys->p_text->p_module =
module_Need( p_intf->p_sys->p_text, "text renderer",
module_need( p_intf->p_sys->p_text, "text renderer",
psz_modulename, true );
}
if( !p_intf->p_sys->p_text->p_module )
{
p_intf->p_sys->p_text->p_module =
module_Need( p_intf->p_sys->p_text, "text renderer", 0, 0 );
module_need( p_intf->p_sys->p_text, "text renderer", 0, 0 );
}
free( psz_modulename );
@ -611,7 +611,7 @@ static void CloseTextRenderer( intf_thread_t *p_intf )
if( p_intf->p_sys->p_text )
{
if( p_intf->p_sys->p_text->p_module )
module_Unneed( p_intf->p_sys->p_text,
module_unneed( p_intf->p_sys->p_text,
p_intf->p_sys->p_text->p_module );
vlc_object_detach( p_intf->p_sys->p_text );

View File

@ -405,9 +405,9 @@ static VLCInfo *_o_sharedInstance = nil;
PL_LOCK;
p_playlist->p_private = &p_export;
module_t *p_mod = module_Need( p_playlist, "meta writer", NULL, 0 );
module_t *p_mod = module_need( p_playlist, "meta writer", NULL, 0 );
if( p_mod )
module_Unneed( p_playlist, p_mod );
module_unneed( p_playlist, p_mod );
PL_UNLOCK;
val.b_bool = true;

View File

@ -315,7 +315,7 @@ static VLCTreeItem *o_root_item = nil;
int i = 0;
if( [[self name] isEqualToString: @"main"] )
{
p_main_module = module_GetMainModule( p_intf );
p_main_module = module_get_main( p_intf );
assert( p_main_module );
/* We found the main module */
@ -323,7 +323,7 @@ static VLCTreeItem *o_root_item = nil;
* generate their config panel them when it is asked by the user. */
VLCTreeItem *p_last_category = NULL;
unsigned int i_confsize;
p_items = module_GetConfig( p_main_module, &i_confsize );
p_items = module_config_get( p_main_module, &i_confsize );
o_children = [[NSMutableArray alloc] initWithCapacity:10];
for( int i = 0; i < i_confsize; i++ )
{
@ -401,12 +401,12 @@ static VLCTreeItem *o_root_item = nil;
p_module = (module_t *)p_list->p_values[i].p_object;
/* Exclude the main module */
if( module_IsMainModule( p_module ) )
if( module_is_main( p_module ) )
continue;
/* Exclude empty plugins (submodules don't have config */
/* options, they are stored in the parent module) */
p_items = module_GetConfig( p_module, &confsize );
p_items = module_config_get( p_module, &confsize );
unsigned int j;
@ -465,7 +465,7 @@ static VLCTreeItem *o_root_item = nil;
[p_subcategory_item->o_children addObject:[[VLCTreeItem alloc]
initWithName:[[VLCMain sharedInstance]
localizedString: module_GetName( p_module, false ) ]
localizedString: module_get_name( p_module, false ) ]
withTitle:[[VLCMain sharedInstance]
localizedString: module_GetLongName( p_module ) ]
withHelp: @""
@ -527,10 +527,10 @@ static VLCTreeItem *o_root_item = nil;
{
p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !strcmp( module_GetObjName( p_parser ), psz_module_name ) )
if( !strcmp( module_get_object( p_parser ), psz_module_name ) )
{
unsigned int confsize;
module_GetConfig( p_parser, &confsize );
module_config_get( p_parser, &confsize );
BOOL b_has_prefs = confsize != 0;
vlc_list_release( p_list );
return( b_has_prefs );
@ -572,7 +572,7 @@ static VLCTreeItem *o_root_item = nil;
p_module = (module_t *) [self vlcObject];
assert( p_module );
p_items = module_GetConfig( p_module, &confsize );
p_items = module_config_get( p_module, &confsize );
for( unsigned int i = 0; i < confsize; i++ )
{
@ -602,12 +602,12 @@ static VLCTreeItem *o_root_item = nil;
}
else
{
p_main_module = module_GetMainModule( p_intf );
p_main_module = module_get_main( p_intf );
assert( p_main_module );
module_config_t *p_items;
unsigned int i, confsize;
p_items = module_GetConfig( p_main_module, &confsize );
p_items = module_config_get( p_main_module, &confsize );
/* We need to first, find the right (sub)category,
* and then abort when we find a new (sub)category. Part of the Ugliness. */

View File

@ -1289,14 +1289,14 @@
if( p_item->i_type == CONFIG_ITEM_MODULE )
{
if( module_IsCapable( p_parser, p_item->psz_type ) )
if( module_provides( p_parser, p_item->psz_type ) )
{
NSString *o_description = [[VLCMain sharedInstance]
localizedString: module_GetLongName( p_parser )];
[o_popup addItemWithTitle: o_description];
if( p_item->value.psz &&
!strcmp( p_item->value.psz, module_GetObjName( p_parser ) ) )
!strcmp( p_item->value.psz, module_get_object( p_parser ) ) )
[o_popup selectItem:[o_popup lastItem]];
}
}
@ -1304,14 +1304,14 @@
{
int i;
if( !strcmp( module_GetObjName( p_parser ), "main" ) )
if( !strcmp( module_get_object( p_parser ), "main" ) )
continue;
unsigned int confsize;
unsigned int unused;
module_GetConfig( p_parser, &confsize );
module_config_get( p_parser, &confsize );
for ( i = 0; i < confsize; i++ )
{
module_config_t *p_config = module_GetConfig( p_parser, &unused ) + i;
module_config_t *p_config = module_config_get( p_parser, &unused ) + i;
/* Hack: required subcategory is stored in i_min */
if( p_config->i_type == CONFIG_SUBCATEGORY &&
p_config->value.i == p_item->min.i )
@ -1321,7 +1321,7 @@
[o_popup addItemWithTitle: o_description];
if( p_item->value.psz && !strcmp(p_item->value.psz,
module_GetObjName( p_parser )) )
module_get_object( p_parser )) )
[o_popup selectItem:[o_popup lastItem]];
}
}
@ -1368,13 +1368,13 @@
if( p_item->i_type == CONFIG_ITEM_MODULE )
{
if( module_IsCapable( p_parser, p_item->psz_type ) )
if( module_provides( p_parser, p_item->psz_type ) )
{
NSString *o_description = [[VLCMain sharedInstance]
localizedString: module_GetLongName( p_parser )];
if( [newval isEqualToString: o_description] )
{
returnval = strdup( module_GetObjName( p_parser ));
returnval = strdup( module_get_object( p_parser ));
break;
}
}
@ -1383,13 +1383,13 @@
{
int i;
if( !strcmp( module_GetObjName( p_parser ), "main" ) )
if( !strcmp( module_get_object( p_parser ), "main" ) )
continue;
unsigned int confsize, unused;
module_GetConfig( p_parser, &confsize );
module_config_get( p_parser, &confsize );
for ( i = 0; i < confsize; i++ )
{
module_config_t *p_config = module_GetConfig( p_parser, &unused ) + i;
module_config_t *p_config = module_config_get( p_parser, &unused ) + i;
/* Hack: required subcategory is stored in i_min */
if( p_config->i_type == CONFIG_SUBCATEGORY &&
p_config->value.i == p_item->min.i )
@ -1398,7 +1398,7 @@
localizedString: module_GetLongName( p_parser )];
if( [newval isEqualToString: o_description] )
{
returnval = strdup(module_GetObjName( p_parser ));
returnval = strdup(module_get_object( p_parser ));
break;
}
}
@ -2057,16 +2057,16 @@ if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST )
int i;
p_parser = (module_t *)p_list->p_values[i_module_index].p_object;
if( !strcmp( module_GetObjName( p_parser ), "main" ) )
if( !strcmp( module_get_object( p_parser ), "main" ) )
continue;
unsigned int confsize;
module_GetConfig( p_parser, &confsize );
module_config_get( p_parser, &confsize );
for ( i = 0; i < confsize; i++ )
{
unsigned int unused;
module_config_t *p_config = module_GetConfig( p_parser, &unused ) + i;
module_config_t *p_config = module_config_get( p_parser, &unused ) + i;
NSString *o_modulelongname, *o_modulename;
NSNumber *o_moduleenabled = nil;
@ -2077,10 +2077,10 @@ if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST )
o_modulelongname = [NSString stringWithUTF8String:
module_GetLongName( p_parser )];
o_modulename = [NSString stringWithUTF8String:
module_GetObjName( p_parser )];
module_get_object( p_parser )];
if( _p_item->value.psz &&
strstr( _p_item->value.psz, module_GetObjName( p_parser ) ) )
strstr( _p_item->value.psz, module_get_object( p_parser ) ) )
o_moduleenabled = [NSNumber numberWithBool:YES];
else
o_moduleenabled = [NSNumber numberWithBool:NO];

View File

@ -382,10 +382,10 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
for( int i_index = 0; i_index < p_list->i_count; i_index++ )
{
p_parser = (module_t *)p_list->p_values[i_index].p_object;
if( p_parser && module_IsCapable( p_parser, p_item->psz_type ) )
if( p_parser && module_provides( p_parser, p_item->psz_type ) )
{
[object addItemWithTitle: [NSString stringWithUTF8String: module_GetLongName( p_parser ) ?: ""]];
if( p_item->value.psz && !strcmp( p_item->value.psz, module_GetObjName( p_parser ) ) )
if( p_item->value.psz && !strcmp( p_item->value.psz, module_get_object( p_parser ) ) )
[object selectItem: [object lastItem]];
}
}
@ -434,7 +434,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
[self setupButton: o_audio_visual_pop forModuleList: "audio-visual"];
/* Last.FM is optional */
if( module_Exists( p_intf, "audioscrobbler" ) )
if( module_exists( p_intf, "audioscrobbler" ) )
{
[o_audio_lastuser_fld setStringValue: [NSString stringWithUTF8String: config_GetPsz( p_intf, "lastfm-username" ) ?: ""]];
[o_audio_lastpwd_sfld setStringValue: [NSString stringWithUTF8String: config_GetPsz( p_intf, "lastfm-password" ) ?: ""]];
@ -535,9 +535,9 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
int i_cache = config_GetInt( p_intf, "file-caching");
TestCaC( "udp-caching" );
if( module_Exists (p_intf, "dvdread") )
if( module_exists (p_intf, "dvdread") )
TestCaC( "dvdread-caching" );
if( module_Exists (p_intf, "dvdnav") )
if( module_exists (p_intf, "dvdnav") )
TestCaC( "dvdnav-caching" );
TestCaC( "tcp-caching" );
TestCaC( "fake-caching" );
@ -547,7 +547,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
TestCaCi( "rtsp-caching", 4 );
TestCaCi( "ftp-caching", 2 );
TestCaCi( "http-caching", 4 );
if(module_Exists (p_intf, "access_realrtsp"))
if(module_exists (p_intf, "access_realrtsp"))
TestCaCi( "realrtsp-caching", 10 );
TestCaCi( "mms-caching", 19 );
if( b_cache_equal )
@ -685,11 +685,11 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
{
p_parser = (module_t *)p_list->p_values[i_module_index].p_object;
if( p_item->i_type == CONFIG_ITEM_MODULE && module_IsCapable( p_parser, p_item->psz_type ) )
if( p_item->i_type == CONFIG_ITEM_MODULE && module_provides( p_parser, p_item->psz_type ) )
{
if( [[[object selectedItem] title] isEqualToString: _NS( module_GetLongName( p_parser ) )] )
{
config_PutPsz( p_intf, name, strdup( module_GetObjName( p_parser )));
config_PutPsz( p_intf, name, strdup( module_get_object( p_parser )));
break;
}
}
@ -772,7 +772,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
SaveModuleList( o_audio_visual_pop, "audio-visual" );
/* Last.FM is optional */
if( module_Exists( p_intf, "audioscrobbler" ) )
if( module_exists( p_intf, "audioscrobbler" ) )
{
[o_audio_last_ckb setEnabled: YES];
if( [o_audio_last_ckb state] == NSOnState )
@ -852,12 +852,12 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
#define CaC( name ) CaCi( name, 1 )
msg_Dbg( p_intf, "Adjusting all cache values to: %i", [[o_input_cachelevel_pop selectedItem] tag] );
CaC( "udp-caching" );
if( module_Exists (p_intf, "dvdread" ) )
if( module_exists (p_intf, "dvdread" ) )
{
CaC( "dvdread-caching" );
i = i + config_SaveConfigFile( p_intf, "dvdread" );
}
if( module_Exists (p_intf, "dvdnav" ) )
if( module_exists (p_intf, "dvdnav" ) )
{
CaC( "dvdnav-caching" );
i = i + config_SaveConfigFile( p_intf, "dvdnav" );
@ -867,7 +867,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
CaC( "screen-caching" );
CaCi( "rtsp-caching", 4 ); CaCi( "ftp-caching", 2 );
CaCi( "http-caching", 4 );
if( module_Exists (p_intf, "access_realrtsp" ) )
if( module_exists (p_intf, "access_realrtsp" ) )
{
CaCi( "realrtsp-caching", 10 );
i = i + config_SaveConfigFile( p_intf, "access_realrtsp" );

View File

@ -94,7 +94,7 @@ static int Open( vlc_object_t *p_this )
#ifdef NEED_GTK2_MAIN
msg_Dbg( p_intf, "Using gui-helper" );
p_intf->p_sys->p_gtk_main =
module_Need( p_this, "gui-helper", "gtk2", true );
module_need( p_this, "gui-helper", "gtk2", true );
if( p_intf->p_sys->p_gtk_main == NULL )
{
free( p_intf->p_sys );
@ -128,7 +128,7 @@ static void Close( vlc_object_t *p_this )
#ifdef NEED_GTK2_MAIN
msg_Dbg( p_intf, "Releasing gui-helper" );
module_Unneed( p_intf, p_intf->p_sys->p_gtk_main );
module_unneed( p_intf, p_intf->p_sys->p_gtk_main );
#endif
/* Destroy structure */
@ -367,7 +367,7 @@ void GtkAutoPlayFile( vlc_object_t *p_this )
{
p_intf = (intf_thread_t *)p_list->p_values[i_index].p_object ;
if( strcmp( MODULE_STRING, module_GetObjName(p_intf->p_module) ) )
if( strcmp( MODULE_STRING, module_get_object(p_intf->p_module) ) )
{
continue;
}

View File

@ -75,14 +75,14 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
#undef BI
/* Build the tree for the main module */
module_t *p_module = module_GetMainModule( p_intf );
module_t *p_module = module_get_main( p_intf );
/* Initialisation and get the confsize */
PrefsItemData *data = NULL;
PrefsItemData *data_sub = NULL;
QTreeWidgetItem *current_item = NULL;
unsigned confsize;
module_config_t *const p_config = module_GetConfig (p_module, &confsize);
module_config_t *const p_config = module_config_get (p_module, &confsize);
/* Go through the list of conf */
for( size_t i = 0; i < confsize; i++ )
@ -190,7 +190,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
/* Other items don't need yet a place on the tree */
}
}
module_PutConfig( p_config );
module_config_free( p_config );
vlc_object_release( (vlc_object_t*)p_module );
@ -203,11 +203,11 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
p_module = (module_t *)p_list->p_values[i_index].p_object;
// Main module excluded
if( module_IsMainModule( p_module) ) continue;
if( module_is_main( p_module) ) continue;
unsigned i_subcategory = 0, i_category = 0, confsize;
bool b_options = false;
module_config_t *const p_config = module_GetConfig (p_module, &confsize);
module_config_t *const p_config = module_config_get (p_module, &confsize);
/* Loop through the configurations items */
for (size_t i = 0; i < confsize; i++)
@ -225,7 +225,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
if( b_options && i_category && i_subcategory )
break;
}
module_PutConfig (p_config);
module_config_free (p_config);
/* Dummy item, please proceed */
if( !b_options || i_category == 0 || i_subcategory == 0 ) continue;
@ -270,10 +270,10 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
PrefsItemData *module_data = new PrefsItemData();
module_data->i_type = TYPE_MODULE;
module_data->psz_name = strdup( module_GetObjName( p_module ) );
module_data->psz_name = strdup( module_get_object( p_module ) );
module_data->help.clear();
QTreeWidgetItem *module_item = new QTreeWidgetItem();
module_item->setText( 0, qtr( module_GetName( p_module, false ) ) );
module_item->setText( 0, qtr( module_get_name( p_module, false ) ) );
module_item->setData( 0, Qt::UserRole,
QVariant::fromValue( module_data) );
module_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) );
@ -358,15 +358,15 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
if( data->i_type == TYPE_CATEGORY )
return;
else if( data->i_type == TYPE_MODULE )
p_module = module_Find( p_intf, data->psz_name );
p_module = module_find( p_intf, data->psz_name );
else
{
p_module = module_GetMainModule( p_intf );
p_module = module_get_main( p_intf );
assert( p_module );
}
unsigned confsize;
module_config_t *const p_config = module_GetConfig (p_module, &confsize),
module_config_t *const p_config = module_config_get (p_module, &confsize),
*p_item = p_config,
*p_end = p_config + confsize;
@ -399,7 +399,7 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
}
else
{
const char *psz_help = module_GetHelp (p_module);
const char *psz_help = module_get_help (p_module);
head = QString( qtr( module_GetLongName( p_module ) ) );
if( psz_help )
{

View File

@ -250,22 +250,22 @@ void ExtVideo::ChangeVFiltersString( char *psz_name, bool b_add )
char *psz_parser, *psz_string;
const char *psz_filter_type;
module_t *p_obj = module_Find( 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 );
return;
}
if( module_IsCapable( p_obj, "video filter2" ) )
if( module_provides( p_obj, "video filter2" ) )
{
psz_filter_type = "video-filter";
}
else if( module_IsCapable( p_obj, "video filter" ) )
else if( module_provides( p_obj, "video filter" ) )
{
psz_filter_type = "vout-filter";
}
else if( module_IsCapable( p_obj, "sub filter" ) )
else if( module_provides( p_obj, "sub filter" ) )
{
psz_filter_type = "sub-filter";
}

View File

@ -272,9 +272,9 @@ void MetaPanel::saveMeta()
PL_LOCK;
p_playlist->p_private = &p_export;
module_t *p_mod = module_Need( p_playlist, "meta writer", NULL, 0 );
module_t *p_mod = module_need( p_playlist, "meta writer", NULL, 0 );
if( p_mod )
module_Unneed( p_playlist, p_mod );
module_unneed( p_playlist, p_mod );
PL_UNLOCK;
pl_Release( p_intf );

View File

@ -596,7 +596,7 @@ void CaptureOpenPanel::initialize()
/*********************
* DirectShow Stuffs *
*********************/
if( module_Exists( p_intf, "dshow" ) ){
if( module_exists( p_intf, "dshow" ) ){
addModuleAndLayouts( DSHOW_DEVICE, dshow, "DirectShow" );
/* dshow Main */
@ -630,7 +630,7 @@ void CaptureOpenPanel::initialize()
/**************
* BDA Stuffs *
**************/
if( module_Exists( p_intf, "bda" ) ){
if( module_exists( p_intf, "bda" ) ){
addModuleAndLayouts( BDA_DEVICE, bda, "DVB DirectShow" );
/* bda Main */
@ -695,7 +695,7 @@ void CaptureOpenPanel::initialize()
/*******
* V4L2*
*******/
if( module_Exists( p_intf, "v4l2" ) ){
if( module_exists( p_intf, "v4l2" ) ){
addModuleAndLayouts( V4L2_DEVICE, v4l2, "Video for Linux 2" );
/* V4l Main panel */
@ -730,7 +730,7 @@ void CaptureOpenPanel::initialize()
/*******
* V4L *
*******/
if( module_Exists( p_intf, "v4l" ) ){
if( module_exists( p_intf, "v4l" ) ){
addModuleAndLayouts( V4L_DEVICE, v4l, "Video for Linux" );
/* V4l Main panel */
@ -775,7 +775,7 @@ void CaptureOpenPanel::initialize()
/*******
* JACK *
*******/
if( module_Exists( p_intf, "jack" ) ){
if( module_exists( p_intf, "jack" ) ){
addModuleAndLayouts( JACK_DEVICE, jack, "JACK Audio Connection Kit" );
/* Jack Main panel */
@ -829,7 +829,7 @@ void CaptureOpenPanel::initialize()
/************
* PVR *
************/
if( module_Exists( p_intf, "pvr" ) ){
if( module_exists( p_intf, "pvr" ) ){
addModuleAndLayouts( PVR_DEVICE, pvr, "PVR" );
/* PVR Main panel */
@ -885,7 +885,7 @@ void CaptureOpenPanel::initialize()
/**************
* DVB Stuffs *
**************/
if( module_Exists( p_intf, "dvb" ) ){
if( module_exists( p_intf, "dvb" ) ){
addModuleAndLayouts( DVB_DEVICE, dvb, "DVB" );
/* DVB Main */
@ -1122,7 +1122,7 @@ void CaptureOpenPanel::advancedDialog()
/* Get the corresponding module */
module_t *p_module =
module_Find( VLC_OBJECT(p_intf), psz_devModule[i_devicetype] );
module_find( VLC_OBJECT(p_intf), psz_devModule[i_devicetype] );
if( NULL == p_module ) return;
/* Init */
@ -1131,7 +1131,7 @@ void CaptureOpenPanel::advancedDialog()
/* Get the confsize */
unsigned int i_confsize;
module_config_t *p_config;
p_config = module_GetConfig( p_module, &i_confsize );
p_config = module_config_get( p_module, &i_confsize );
/* New Adv Prop dialog */
adv = new QDialog( this );
@ -1213,7 +1213,7 @@ void CaptureOpenPanel::advancedDialog()
msg_Dbg( p_intf, "%s", qtu( advMRL ) );
}
delete adv;
module_PutConfig( p_config );
module_config_free( p_config );
module_release (p_module);
}

View File

@ -563,12 +563,12 @@ void ModuleConfigControl::finish( bool bycat )
if( bycat )
{
if( !strcmp( module_GetObjName( p_parser ), "main" ) ) continue;
if( !strcmp( module_get_object( p_parser ), "main" ) ) continue;
unsigned confsize;
module_config_t *p_config;
p_config = module_GetConfig (p_parser, &confsize);
p_config = module_config_get (p_parser, &confsize);
for (size_t i = 0; i < confsize; i++)
{
/* Hack: required subcategory is stored in i_min */
@ -576,19 +576,19 @@ void ModuleConfigControl::finish( bool bycat )
if( p_cfg->i_type == CONFIG_SUBCATEGORY &&
p_cfg->value.i == p_item->min.i )
combo->addItem( qtr( module_GetLongName( p_parser )),
QVariant( module_GetObjName( p_parser ) ) );
QVariant( module_get_object( p_parser ) ) );
if( p_item->value.psz && !strcmp( p_item->value.psz,
module_GetObjName( p_parser ) ) )
module_get_object( p_parser ) ) )
combo->setCurrentIndex( combo->count() - 1 );
}
module_PutConfig (p_config);
module_config_free (p_config);
}
else if( module_IsCapable( p_parser, p_item->psz_type ) )
else if( module_provides( p_parser, p_item->psz_type ) )
{
combo->addItem( qtr(module_GetLongName( p_parser ) ),
QVariant( module_GetObjName( p_parser ) ) );
QVariant( module_get_object( p_parser ) ) );
if( p_item->value.psz && !strcmp( p_item->value.psz,
module_GetObjName( p_parser ) ) )
module_get_object( p_parser ) ) )
combo->setCurrentIndex( combo->count() - 1 );
}
}
@ -657,10 +657,10 @@ ModuleListConfigControl::~ModuleListConfigControl()
checkBoxListItem *cbl = new checkBoxListItem; \
\
CONNECT( cb, stateChanged( int ), this, onUpdate( int ) );\
cb->setToolTip( formatTooltip( qtr( module_GetHelp( p_parser ))));\
cb->setToolTip( formatTooltip( qtr( module_get_help( p_parser ))));\
cbl->checkBox = cb; \
\
cbl->psz_module = strdup( module_GetObjName( p_parser ) ); \
cbl->psz_module = strdup( module_get_object( p_parser ) ); \
modules.push_back( cbl ); \
\
if( p_item->value.psz && strstr( p_item->value.psz, cbl->psz_module ) ) \
@ -681,10 +681,10 @@ void ModuleListConfigControl::finish( bool bycat )
if( bycat )
{
if( !strcmp( module_GetObjName( p_parser ), "main" ) ) continue;
if( !strcmp( module_get_object( p_parser ), "main" ) ) continue;
unsigned confsize;
module_config_t *p_config = module_GetConfig (p_parser, &confsize);
module_config_t *p_config = module_config_get (p_parser, &confsize);
for (size_t i = 0; i < confsize; i++)
{
@ -696,9 +696,9 @@ void ModuleListConfigControl::finish( bool bycat )
CHECKBOX_LISTS;
}
}
module_PutConfig (p_config);
module_config_free (p_config);
}
else if( module_IsCapable( p_parser, p_item->psz_type ) )
else if( module_provides( p_parser, p_item->psz_type ) )
{
CHECKBOX_LISTS;
}
@ -1161,14 +1161,14 @@ void KeySelectorControl::finish()
table->setAlternatingRowColors( true );
/* Get the main Module */
module_t *p_main = module_Find( p_this, "main" );
module_t *p_main = module_find( p_this, "main" );
assert( p_main );
/* Access to the module_config_t */
unsigned confsize;
module_config_t *p_config;
p_config = module_GetConfig (p_main, &confsize);
p_config = module_config_get (p_main, &confsize);
for (size_t i = 0; i < confsize; i++)
{
@ -1195,7 +1195,7 @@ void KeySelectorControl::finish()
table->addTopLevelItem( treeItem );
}
}
module_PutConfig (p_config);
module_config_free (p_config);
module_release (p_main);
table->resizeColumnToContents( 0 );

View File

@ -254,7 +254,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONFIG_GENERIC2( "directx-audio-device", IntegerList,
DirectXLabel, DirectXDevice );
#else
if( module_Exists( p_intf, "alsa" ) )
if( module_exists( p_intf, "alsa" ) )
{
audioControl( alsa );
optionWidgets.append( alsaControl );
@ -264,7 +264,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
}
else
optionWidgets.append( NULL );
if( module_Exists( p_intf, "oss" ) )
if( module_exists( p_intf, "oss" ) )
{
audioControl2( OSS );
optionWidgets.append( OSSControl );
@ -316,7 +316,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
updateAudioOptions( ui.outputModule->currentIndex() );
/* LastFM */
if( module_Exists( p_intf, "audioscrobbler" ) )
if( module_exists( p_intf, "audioscrobbler" ) )
{
CONFIG_GENERIC( "lastfm-username", String, ui.lastfm_user_label,
lastfm_user_edit );
@ -422,9 +422,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
int i_cache = config_GetInt( p_intf, "file-caching");
TestCaC( "udp-caching" );
if (module_Exists (p_intf, "dvdread"))
if (module_exists (p_intf, "dvdread"))
TestCaC( "dvdread-caching" );
if (module_Exists (p_intf, "dvdnav"))
if (module_exists (p_intf, "dvdnav"))
TestCaC( "dvdnav-caching" );
TestCaC( "tcp-caching" );
TestCaC( "fake-caching" ); TestCaC( "cdda-caching" );
@ -432,18 +432,18 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
#ifdef WIN32
TestCaC( "dshow-caching" );
#else
if (module_Exists (p_intf, "v4l"))
if (module_exists (p_intf, "v4l"))
TestCaC( "v4l-caching" );
if (module_Exists (p_intf, "access_jack"))
if (module_exists (p_intf, "access_jack"))
TestCaC( "jack-input-caching" );
if (module_Exists (p_intf, "v4l2"))
if (module_exists (p_intf, "v4l2"))
TestCaC( "v4l2-caching" );
if (module_Exists (p_intf, "pvr"))
if (module_exists (p_intf, "pvr"))
TestCaC( "pvr-caching" );
#endif
TestCaCi( "rtsp-caching", 4 ); TestCaCi( "ftp-caching", 2 );
TestCaCi( "http-caching", 4 );
if (module_Exists (p_intf, "access_realrtsp"))
if (module_exists (p_intf, "access_realrtsp"))
TestCaCi( "realrtsp-caching", 10 );
TestCaCi( "mms-caching", 19 );
if( b_cache_equal ) ui.cachingCombo->setCurrentIndex(
@ -633,28 +633,28 @@ void SPrefsPanel::apply()
if( i_comboValue )
{
CaC( "udp-caching" );
if (module_Exists (p_intf, "dvdread" ))
if (module_exists (p_intf, "dvdread" ))
CaC( "dvdread-caching" );
if (module_Exists (p_intf, "dvdnav" ))
if (module_exists (p_intf, "dvdnav" ))
CaC( "dvdnav-caching" );
CaC( "tcp-caching" ); CaC( "vcd-caching" );
CaC( "fake-caching" ); CaC( "cdda-caching" ); CaC( "file-caching" );
CaC( "screen-caching" );
CaCi( "rtsp-caching", 4 ); CaCi( "ftp-caching", 2 );
CaCi( "http-caching", 4 );
if (module_Exists (p_intf, "access_realrtsp" ))
if (module_exists (p_intf, "access_realrtsp" ))
CaCi( "realrtsp-caching", 10 );
CaCi( "mms-caching", 19 );
#ifdef WIN32
CaC( "dshow-caching" );
#else
if (module_Exists (p_intf, "v4l" ))
if (module_exists (p_intf, "v4l" ))
CaC( "v4l-caching" );
if (module_Exists (p_intf, "access_jack" ))
if (module_exists (p_intf, "access_jack" ))
CaC( "jack-input-caching" );
if (module_Exists (p_intf, "v4l2" ))
if (module_exists (p_intf, "v4l2" ))
CaC( "v4l2-caching" );
if (module_Exists (p_intf, "pvr" ))
if (module_exists (p_intf, "pvr" ))
CaC( "pvr-caching" );
#endif
//CaCi( "dv-caching" ) too short...

View File

@ -76,7 +76,7 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
syncW = new SyncControls( p_intf, videoTab );
mainTabW->addTab( syncW, qtr( "Synchronization" ) );
if( module_Exists( p_intf, "v4l2" ) )
if( module_exists( p_intf, "v4l2" ) )
{
ExtV4l2 *v4l2 = new ExtV4l2( p_intf, mainTabW );
mainTabW->addTab( v4l2, qtr( "v4l2 controls" ) );

View File

@ -115,7 +115,7 @@ Dialogs::~Dialogs()
// Detach the dialogs provider from its parent interface
vlc_object_detach( m_pProvider );
module_Unneed( m_pProvider, m_pModule );
module_unneed( m_pProvider, m_pModule );
vlc_object_release( m_pProvider );
}
@ -166,7 +166,7 @@ bool Dialogs::init()
return false;
}
m_pModule = module_Need( m_pProvider, "dialogs provider", NULL, 0 );
m_pModule = module_need( m_pProvider, "dialogs provider", NULL, 0 );
if( m_pModule == NULL )
{
msg_Err( getIntf(), "no suitable dialogs provider found (hint: compile the qt4 plugin, and make sure it is loaded properly)" );

View File

@ -388,11 +388,11 @@ PrefsTreeCtrl::PrefsTreeCtrl( intf_thread_t *_p_intf,
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( module_GetObjName( p_module ), "main" ) == 0 )
if( strcmp( module_get_object( p_module ), "main" ) == 0 )
break;
}
/* TODO replace by
* p_module = module_GetMainModule( p_intf );
* p_module = module_get_main( p_intf );
*/
if( i_index < p_list->i_count )
{
@ -404,7 +404,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( intf_thread_t *_p_intf,
/* Enumerate config categories and store a reference so we can
* generate their config panel them when it is asked by the user. */
p_config = module_GetConfig (p_module, &confsize);
p_config = module_config_get (p_module, &confsize);
for( size_t i = 0; i < confsize; i++ )
{
@ -503,7 +503,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( intf_thread_t *_p_intf,
}
}
TreeView_SortChildren( hwndTV, general_item, 0 );
module_PutConfig( p_config );
module_config_free( p_config );
}
@ -517,7 +517,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( intf_thread_t *_p_intf,
p_module = (module_t *)p_list->p_values[i_index].p_object;
/* Exclude the main module */
if( !strcmp( module_GetObjName( p_module ), "main" ) )
if( !strcmp( module_get_object( p_module ), "main" ) )
continue;
/* Exclude empty plugins (submodules don't have config options, they
@ -528,7 +528,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( intf_thread_t *_p_intf,
int i_category = 0, i_subcategory = 0, i_options = 0;
bool b_options = false;
p_config = module_GetConfig( (module_t *) p_module,&confsize);
p_config = module_config_get( (module_t *) p_module,&confsize);
/* Loop through the configurations items */
for( size_t i = 0; i < confsize; i++ )
@ -545,7 +545,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( intf_thread_t *_p_intf,
if( b_options && i_category && i_subcategory )
break;
}
module_PutConfig (p_config);
module_config_free (p_config);
//if( !i_options ) continue;
/* Dummy item, please proceed */
@ -582,13 +582,13 @@ PrefsTreeCtrl::PrefsTreeCtrl( intf_thread_t *_p_intf,
{
config_data = new ConfigTreeData;
config_data->psz_name = strdup( module_GetObjName( p_module ) );
config_data->psz_name = strdup( module_get_object( p_module ) );
config_data->psz_help = NULL;
config_data->i_type = TYPE_MODULE;
config_data->i_object_id = p_item->value.i;
config_data->p_module = p_module;
tvi.pszText = _FROMMB(module_GetName( p_module, false ));
tvi.pszText = _FROMMB(module_name( p_module, false ));
tvi.cchTextMax = _tcslen(tvi.pszText);
tvi.lParam = (long)config_data;
@ -794,7 +794,7 @@ PrefsPanel::PrefsPanel( HWND parent, HINSTANCE hInst, intf_thread_t *_p_intf,
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( module_GetObjName(p_module), "main" ) )
if( !strcmp( module_get_object(p_module), "main" ) )
{
b_found = true;
break;
@ -812,7 +812,7 @@ PrefsPanel::PrefsPanel( HWND parent, HINSTANCE hInst, intf_thread_t *_p_intf,
* (submodules don't have config options, they are stored in the
* parent module) */
unsigned confsize;
p_config = module_GetConfig( (module_t *) p_module,&confsize);
p_config = module_config_get( (module_t *) p_module,&confsize);
p_item = p_config;
p_end = p_config + confsize;

View File

@ -315,13 +315,13 @@ ModuleConfigControl::ModuleConfigControl( vlc_object_t *p_this,
{
p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( module_IsCapable( p_parser, p_item->psz_type ) )
if( module_provides( p_parser, p_item->psz_type ) )
{
ComboBox_AddString( combo, _FROMMB(module_GetLongName( p_parser ) ));
ComboBox_SetItemData( combo, i_index,
(void *) module_GetObjName( p_parser ) );
(void *) module_get_object( p_parser ) );
if( p_item->value.psz && !strcmp( p_item->value.psz,
module_GetObjName( p_parser )) )
module_get_object( p_parser )) )
{
ComboBox_SetCurSel( combo, i_index );
//ComboBox_SetText( combo, _FROMMB(p_parser->psz_longname) );

View File

@ -219,7 +219,7 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog,
intf_thread_t *_p_intf,
const module_t *p_module )
: wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize ),
name( wxU(module_GetObjName(p_module)) ),
name( wxU(module_get_object(p_module)) ),
p_advanced_mrl_combo( NULL ),
p_intf( _p_intf ), p_open_dialog( dialog ), p_advanced_dialog( NULL )
{
@ -229,7 +229,7 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog,
module_config_t *p_config;
int n;
p_config = module_GetConfig (p_module, &i_confsize);
p_config = module_config_get (p_module, &i_confsize);
for( n = 0; n < i_confsize; n++ )
{
module_config_t *p_item = p_config + n;
@ -330,7 +330,7 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog,
p_advanced_dialog->SetSizerAndFit( sizer );
}
module_PutConfig (p_config);
module_config_free (p_config);
this->SetSizerAndFit( sizer );
}
@ -507,46 +507,46 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
notebook->AddPage( NetPanel( notebook ), wxU(_("Network")),
i_access_method == NET_ACCESS );
module_t *p_module = module_Find( VLC_OBJECT(p_intf), "v4l" );
module_t *p_module = module_find( VLC_OBJECT(p_intf), "v4l" );
if( p_module )
{
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
notebook->AddPage( autopanel, wxU( module_GetName(p_module, 0) ),
notebook->AddPage( autopanel, wxU( module_get_name(p_module, 0) ),
i_access_method == CAPTURE_ACCESS );
module_release (p_module);
}
p_module = module_Find( VLC_OBJECT(p_intf), "pvr" );
p_module = module_find( VLC_OBJECT(p_intf), "pvr" );
if( p_module )
{
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
notebook->AddPage( autopanel, wxU( module_GetName(p_module, 0) ),
notebook->AddPage( autopanel, wxU( module_get_name(p_module, 0) ),
i_access_method == CAPTURE_ACCESS );
module_release (p_module);
}
p_module = module_Find( VLC_OBJECT(p_intf), "dvb" );
p_module = module_find( VLC_OBJECT(p_intf), "dvb" );
if( p_module )
{
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
notebook->AddPage( autopanel, wxU( module_GetName(p_module, 0) ),
notebook->AddPage( autopanel, wxU( module_get_name(p_module, 0) ),
i_access_method == CAPTURE_ACCESS );
module_release (p_module);
}
p_module = module_Find( VLC_OBJECT(p_intf), "dshow" );
p_module = module_find( VLC_OBJECT(p_intf), "dshow" );
if( p_module )
{
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
notebook->AddPage( autopanel, wxU( module_GetName(p_module, 0) ),
notebook->AddPage( autopanel, wxU( module_get_name(p_module, 0) ),
i_access_method == CAPTURE_ACCESS );
module_release (p_module);
}

View File

@ -357,7 +357,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
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( module_GetObjName(p_module), "main" ) )
if( !strcmp( module_get_object(p_module), "main" ) )
break;
}
if( i_index < p_list->i_count )
@ -372,7 +372,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
/* Enumerate config categories and store a reference so we can
* generate their config panel them when it is asked by the user. */
p_config = module_GetConfig( p_module, &i_confsize );
p_config = module_config_get( p_module, &i_confsize );
for( size_t i = 0; i < i_confsize; i++ )
{
module_config_t *p_item = p_config + i;
@ -495,7 +495,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
}
}
module_PutConfig( p_config );
module_config_free( p_config );
}
@ -511,7 +511,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
p_module = (module_t *)p_list->p_values[i_index].p_object;
/* Exclude the main module */
if( !strcmp( module_GetObjName(p_module), "main" ) )
if( !strcmp( module_get_object(p_module), "main" ) )
continue;
#if 0
/* Exclude empty plugins (submodules don't have config options, they
@ -519,7 +519,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
if( module_IsSubModule(p_module) )
continue;
#endif
p_config = module_GetConfig( p_module, &i_confsize );
p_config = module_config_get( p_module, &i_confsize );
for( size_t i = 0; i < i_confsize; i++ )
{
module_config_t *p_item = p_config + i;
@ -611,7 +611,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
#else
i_image = -1;
#endif
AppendItem( subcategory_item, wxU( module_GetName(p_module, 0) ),
AppendItem( subcategory_item, wxU( module_get_name(p_module, 0) ),
i_image, -1, config_data );
}
@ -912,7 +912,7 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
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( module_GetObjName(p_module), "main" ) )
if( !strcmp( module_get_object(p_module), "main" ) )
{
b_found = true;
break;
@ -931,10 +931,10 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
* parent module) */
#if 0
if( module_IsSubModule(p_module) )
p_start = module_GetConfig((module_t *)(((vlc_object_t *)p_module)->p_parent), &i_confsize);
p_start = module_config_get((module_t *)(((vlc_object_t *)p_module)->p_parent), &i_confsize);
else
#endif
p_start = module_GetConfig(p_module, &i_confsize);
p_start = module_config_get(p_module, &i_confsize);
p_item = p_start;
p_end = p_start + i_confsize;
@ -1009,7 +1009,7 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
config_sizer->Add( control, 0, wxEXPAND | wxALL, 2 );
}
module_PutConfig( p_start );
module_config_free( p_start );
config_sizer->Layout();
config_window->SetSizer( config_sizer );

View File

@ -272,12 +272,12 @@ ModuleConfigControl::ModuleConfigControl( vlc_object_t *p_this,
{
p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( module_IsCapable( p_parser, p_item->psz_type ) )
if( module_provides( p_parser, p_item->psz_type ) )
{
combo->Append( wxU(module_GetLongName(p_parser)),
(char *)module_GetObjName(p_parser) );
(char *)module_get_object(p_parser) );
if( p_item->value.psz && !strcmp(p_item->value.psz,
module_GetObjName(p_parser)) )
module_get_object(p_parser)) )
combo->SetValue( wxU(module_GetLongName(p_parser)) );
}
}
@ -325,12 +325,12 @@ ModuleCatConfigControl::ModuleCatConfigControl( vlc_object_t *p_this,
{
p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !strcmp( module_GetObjName(p_parser), "main" ) )
if( !strcmp( module_get_object(p_parser), "main" ) )
continue;
unsigned int i_confsize;
module_config_t *p_config, *p_start, *p_end;
p_start = module_GetConfig( p_parser, &i_confsize );
p_start = module_config_get( p_parser, &i_confsize );
p_end = p_start + i_confsize;
for( p_config = p_start; p_config < p_end; p_config++ )
@ -340,14 +340,14 @@ ModuleCatConfigControl::ModuleCatConfigControl( vlc_object_t *p_this,
p_config->value.i == p_item->min.i )
{
combo->Append( wxU(module_GetLongName(p_parser)),
(char *)module_GetObjName(p_parser) );
(char *)module_get_object(p_parser) );
if( p_item->value.psz &&
!strcmp(p_item->value.psz, module_GetObjName(p_parser)) )
!strcmp(p_item->value.psz, module_get_object(p_parser)) )
combo->SetValue( wxU(module_GetLongName(p_parser)) );
}
}
module_PutConfig( p_start );
module_config_free( p_start );
}
vlc_list_release( p_list );
@ -400,13 +400,13 @@ ModuleListCatConfigControl::ModuleListCatConfigControl( vlc_object_t *p_this,
{
p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !strcmp( module_GetObjName(p_parser), "main" ) )
if( !strcmp( module_get_object(p_parser), "main" ) )
continue;
unsigned int i_confsize;
module_config_t *p_config, *p_start, *p_end;
p_start = module_GetConfig( p_parser, &i_confsize );
p_start = module_config_get( p_parser, &i_confsize );
p_end = p_start + i_confsize;
for( p_config = p_start; p_config < p_end; p_config++ )
@ -420,7 +420,7 @@ ModuleListCatConfigControl::ModuleListCatConfigControl( vlc_object_t *p_this,
new wxCheckBox( this, wxID_HIGHEST,
wxU(module_GetLongName(p_parser)) );
mc->psz_module = strdup( module_GetObjName(p_parser) );
mc->psz_module = strdup( module_get_object(p_parser) );
pp_checkboxes.push_back( mc );
if( p_item->value.psz &&
@ -432,7 +432,7 @@ ModuleListCatConfigControl::ModuleListCatConfigControl( vlc_object_t *p_this,
}
}
module_PutConfig( p_start );
module_config_free( p_start );
}
vlc_list_release( p_list );

View File

@ -353,14 +353,14 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
//p_sys->p_decoder->p_cfg = p_sys->p_video_cfg;
p_sys->p_decoder->p_module =
module_Need( p_sys->p_decoder, "decoder", "$codec", 0 );
module_need( p_sys->p_decoder, "decoder", "$codec", 0 );
if( !p_sys->p_decoder->p_module || !p_sys->p_decoder->pf_decode_video )
{
if( p_sys->p_decoder->p_module )
{
msg_Err( p_stream, "instanciated a non video decoder" );
module_Unneed( p_sys->p_decoder, p_sys->p_decoder->p_module );
module_unneed( p_sys->p_decoder, p_sys->p_decoder->p_module );
}
else
{
@ -472,7 +472,7 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
decoder_owner_sys_t *p_owner = p_sys->p_decoder->p_owner;
if( p_sys->p_decoder->p_module )
module_Unneed( p_sys->p_decoder, p_sys->p_decoder->p_module );
module_unneed( p_sys->p_decoder, p_sys->p_decoder->p_module );
vlc_object_detach( p_sys->p_decoder );
vlc_object_release( p_sys->p_decoder );

View File

@ -1122,7 +1122,7 @@ static int transcode_audio_new( sout_stream_t *p_stream,
/* id->p_decoder->p_cfg = p_sys->p_audio_cfg; */
id->p_decoder->p_module =
module_Need( id->p_decoder, "decoder", "$codec", 0 );
module_need( id->p_decoder, "decoder", "$codec", 0 );
if( !id->p_decoder->p_module )
{
msg_Err( p_stream, "cannot find audio decoder" );
@ -1158,13 +1158,13 @@ static int transcode_audio_new( sout_stream_t *p_stream,
id->p_encoder->p_cfg = p_stream->p_sys->p_audio_cfg;
id->p_encoder->p_module =
module_Need( id->p_encoder, "encoder", p_sys->psz_aenc, true );
module_need( id->p_encoder, "encoder", p_sys->psz_aenc, true );
if( !id->p_encoder->p_module )
{
msg_Err( p_stream, "cannot find audio encoder (module:%s fourcc:%4.4s)",
p_sys->psz_aenc ? p_sys->psz_aenc : "any",
(char *)&p_sys->i_acodec );
module_Unneed( id->p_decoder, id->p_decoder->p_module );
module_unneed( id->p_decoder, id->p_decoder->p_module );
id->p_decoder->p_module = NULL;
return VLC_EGENERIC;
}
@ -1238,7 +1238,7 @@ static int transcode_audio_new( sout_stream_t *p_stream,
if( fmt_last.audio.i_channels != id->p_encoder->fmt_in.audio.i_channels )
{
#if 1
module_Unneed( id->p_encoder, id->p_encoder->p_module );
module_unneed( id->p_encoder, id->p_encoder->p_module );
id->p_encoder->p_module = NULL;
/* This might work, but only if the encoder is restarted */
@ -1260,14 +1260,14 @@ static int transcode_audio_new( sout_stream_t *p_stream,
/* reload encoder */
id->p_encoder->p_cfg = p_stream->p_sys->p_audio_cfg;
id->p_encoder->p_module =
module_Need( id->p_encoder, "encoder", p_sys->psz_aenc, true );
module_need( id->p_encoder, "encoder", p_sys->psz_aenc, true );
if( !id->p_encoder->p_module ||
fmt_last.audio.i_channels != id->p_encoder->fmt_in.audio.i_channels ||
fmt_last.i_codec != id->p_encoder->fmt_in.i_codec )
{
if( id->p_encoder->p_module )
{
module_Unneed( id->p_encoder, id->p_encoder->p_module );
module_unneed( id->p_encoder, id->p_encoder->p_module );
id->p_encoder->p_module = NULL;
}
msg_Err( p_stream, "cannot find audio encoder (module:%s fourcc:%4.4s)",
@ -1317,12 +1317,12 @@ static void transcode_audio_close( sout_stream_id_t *id )
/* Close decoder */
if( id->p_decoder->p_module )
module_Unneed( id->p_decoder, id->p_decoder->p_module );
module_unneed( id->p_decoder, id->p_decoder->p_module );
id->p_decoder->p_module = NULL;
/* Close encoder */
if( id->p_encoder->p_module )
module_Unneed( id->p_encoder, id->p_encoder->p_module );
module_unneed( id->p_encoder, id->p_encoder->p_module );
id->p_encoder->p_module = NULL;
/* Close filters */
@ -1508,7 +1508,7 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_t *id )
/* id->p_decoder->p_cfg = p_sys->p_video_cfg; */
id->p_decoder->p_module =
module_Need( id->p_decoder, "decoder", "$codec", 0 );
module_need( id->p_decoder, "decoder", "$codec", 0 );
if( !id->p_decoder->p_module )
{
@ -1544,13 +1544,13 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_t *id )
id->p_encoder->p_cfg = p_sys->p_video_cfg;
id->p_encoder->p_module =
module_Need( id->p_encoder, "encoder", p_sys->psz_venc, true );
module_need( id->p_encoder, "encoder", p_sys->psz_venc, true );
if( !id->p_encoder->p_module )
{
msg_Err( p_stream, "cannot find video encoder (module:%s fourcc:%4.4s)",
p_sys->psz_venc ? p_sys->psz_venc : "any",
(char *)&p_sys->i_vcodec );
module_Unneed( id->p_decoder, id->p_decoder->p_module );
module_unneed( id->p_decoder, id->p_decoder->p_module );
id->p_decoder->p_module = 0;
free( id->p_decoder->p_owner );
return VLC_EGENERIC;
@ -1558,7 +1558,7 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_t *id )
/* Close the encoder.
* We'll open it only when we have the first frame. */
module_Unneed( id->p_encoder, id->p_encoder->p_module );
module_unneed( id->p_encoder, id->p_encoder->p_module );
if( id->p_encoder->fmt_out.p_extra )
{
free( id->p_encoder->fmt_out.p_extra );
@ -1583,7 +1583,7 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_t *id )
false ) )
{
msg_Err( p_stream, "cannot spawn encoder thread" );
module_Unneed( id->p_decoder, id->p_decoder->p_module );
module_unneed( id->p_decoder, id->p_decoder->p_module );
id->p_decoder->p_module = 0;
free( id->p_decoder->p_owner );
return VLC_EGENERIC;
@ -1765,7 +1765,7 @@ static int transcode_video_encoder_open( sout_stream_t *p_stream,
id->p_encoder->fmt_in.video.i_height );
id->p_encoder->p_module =
module_Need( id->p_encoder, "encoder", p_sys->psz_venc, true );
module_need( id->p_encoder, "encoder", p_sys->psz_venc, true );
if( !id->p_encoder->p_module )
{
msg_Err( p_stream, "cannot find video encoder (module:%s fourcc:%4.4s)",
@ -1814,7 +1814,7 @@ static void transcode_video_close( sout_stream_t *p_stream,
/* Close decoder */
if( id->p_decoder->p_module )
module_Unneed( id->p_decoder, id->p_decoder->p_module );
module_unneed( id->p_decoder, id->p_decoder->p_module );
if( id->p_decoder->p_owner )
{
@ -1830,7 +1830,7 @@ static void transcode_video_close( sout_stream_t *p_stream,
/* Close encoder */
if( id->p_encoder->p_module )
module_Unneed( id->p_encoder, id->p_encoder->p_module );
module_unneed( id->p_encoder, id->p_encoder->p_module );
/* Close filters */
if( id->p_f_chain )
@ -2329,7 +2329,7 @@ static int transcode_spu_new( sout_stream_t *p_stream, sout_stream_id_t *id )
/* id->p_decoder->p_cfg = p_sys->p_spu_cfg; */
id->p_decoder->p_module =
module_Need( id->p_decoder, "decoder", "$codec", 0 );
module_need( id->p_decoder, "decoder", "$codec", 0 );
if( !id->p_decoder->p_module )
{
@ -2347,11 +2347,11 @@ static int transcode_spu_new( sout_stream_t *p_stream, sout_stream_id_t *id )
id->p_encoder->p_cfg = p_sys->p_spu_cfg;
id->p_encoder->p_module =
module_Need( id->p_encoder, "encoder", p_sys->psz_senc, true );
module_need( id->p_encoder, "encoder", p_sys->psz_senc, true );
if( !id->p_encoder->p_module )
{
module_Unneed( id->p_decoder, id->p_decoder->p_module );
module_unneed( id->p_decoder, id->p_decoder->p_module );
msg_Err( p_stream, "cannot find spu encoder (%s)", p_sys->psz_senc );
return VLC_EGENERIC;
}
@ -2370,11 +2370,11 @@ static void transcode_spu_close( sout_stream_id_t *id)
{
/* Close decoder */
if( id->p_decoder->p_module )
module_Unneed( id->p_decoder, id->p_decoder->p_module );
module_unneed( id->p_decoder, id->p_decoder->p_module );
/* Close encoder */
if( id->p_encoder->p_module )
module_Unneed( id->p_encoder, id->p_encoder->p_module );
module_unneed( id->p_encoder, id->p_encoder->p_module );
}
static int transcode_spu_process( sout_stream_t *p_stream,
@ -2456,7 +2456,7 @@ static int transcode_osd_new( sout_stream_t *p_stream, sout_stream_id_t *id )
id->p_encoder->p_cfg = p_sys->p_osd_cfg;
id->p_encoder->p_module =
module_Need( id->p_encoder, "encoder", p_sys->psz_osdenc, true );
module_need( id->p_encoder, "encoder", p_sys->psz_osdenc, true );
if( !id->p_encoder->p_module )
{
@ -2491,7 +2491,7 @@ static int transcode_osd_new( sout_stream_t *p_stream, sout_stream_id_t *id )
error:
msg_Err( p_stream, "starting osd encoding thread failed" );
if( id->p_encoder->p_module )
module_Unneed( id->p_encoder, id->p_encoder->p_module );
module_unneed( id->p_encoder, id->p_encoder->p_module );
p_sys->b_osd = false;
return VLC_EGENERIC;
}
@ -2504,7 +2504,7 @@ static void transcode_osd_close( sout_stream_t *p_stream, sout_stream_id_t *id)
if( id )
{
if( id->p_encoder->p_module )
module_Unneed( id->p_encoder, id->p_encoder->p_module );
module_unneed( id->p_encoder, id->p_encoder->p_module );
}
p_sys->b_osd = false;
}

View File

@ -228,7 +228,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
vlc_object_attach( p_blend, p_filter );
p_blend->fmt_out.video = p_sys->p_base_image->format;
p_blend->fmt_in.video = p_sys->p_blend_image->format;
p_blend->p_module = module_Need( p_blend, "video blending", 0, 0 );
p_blend->p_module = module_need( p_blend, "video blending", 0, 0 );
if( !p_blend->p_module )
{
picture_Release( p_pic );
@ -254,7 +254,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
p_sys->p_blend_image->p[Y_PLANE].i_visible_pitch *
p_sys->p_blend_image->p[Y_PLANE].i_visible_lines );
module_Unneed( p_blend, p_blend->p_module );
module_unneed( p_blend, p_blend->p_module );
vlc_object_detach( p_blend );
vlc_object_release( p_blend );

View File

@ -411,7 +411,7 @@ static int Init( vout_thread_t *p_vout )
p_vout->output.i_height;
p_sys->p_blend->p_module =
module_Need( p_sys->p_blend, "video blending", 0, 0 );
module_need( p_sys->p_blend, "video blending", 0, 0 );
if( !p_sys->p_blend->p_module )
{
msg_Err( p_vout, "can't open blending filter, aborting" );
@ -494,7 +494,7 @@ static void End( vout_thread_t *p_vout )
vout_CloseAndRelease( p_sys->p_vout );
if( p_sys->p_blend->p_module )
module_Unneed( p_sys->p_blend, p_sys->p_blend->p_module );
module_unneed( p_sys->p_blend, p_sys->p_blend->p_module );
vlc_object_detach( p_sys->p_blend );
vlc_object_release( p_sys->p_blend );
}

View File

@ -334,7 +334,7 @@ static int Init( vout_thread_t *p_vout )
if (p_vout->p_sys->psz_inner_name)
p_sys->p_opencv->p_module =
module_Need( p_sys->p_opencv, p_sys->psz_inner_name, 0, 0 );
module_need( p_sys->p_opencv, p_sys->psz_inner_name, 0, 0 );
if( !p_sys->p_opencv->p_module )
{
@ -389,7 +389,7 @@ static void End( vout_thread_t *p_vout )
{
//release the internal opencv filter
if( p_vout->p_sys->p_opencv->p_module )
module_Unneed( p_vout->p_sys->p_opencv, p_vout->p_sys->p_opencv->p_module );
module_unneed( p_vout->p_sys->p_opencv, p_vout->p_sys->p_opencv->p_module );
vlc_object_detach( p_vout->p_sys->p_opencv );
vlc_object_release( p_vout->p_sys->p_opencv );
p_vout->p_sys->p_opencv = NULL;

View File

@ -295,7 +295,7 @@ static int CreateVout( vlc_object_t *p_this )
psz ? psz : "default" );
p_sys->p_vout->p_module =
module_Need( p_sys->p_vout, "opengl provider", psz, 0 );
module_need( p_sys->p_vout, "opengl provider", psz, 0 );
free( psz );
if( p_sys->p_vout->p_module == NULL )
{
@ -569,7 +569,7 @@ static void DestroyVout( vlc_object_t *p_this )
vout_thread_t *p_vout = (vout_thread_t *)p_this;
vout_sys_t *p_sys = p_vout->p_sys;
module_Unneed( p_sys->p_vout, p_sys->p_vout->p_module );
module_unneed( p_sys->p_vout, p_sys->p_vout->p_module );
vlc_object_release( p_sys->p_vout );
free( p_sys );

View File

@ -153,7 +153,7 @@ static int Open( vlc_object_t *p_this )
#ifdef NEED_QTE_MAIN
p_vout->p_sys->p_qte_main =
module_Need( p_this, "gui-helper", "qte", true );
module_need( p_this, "gui-helper", "qte", true );
if( p_vout->p_sys->p_qte_main == NULL )
{
free( p_vout->p_sys );
@ -194,7 +194,7 @@ static void Close ( vlc_object_t *p_this )
#ifdef NEED_QTE_MAIN
msg_Dbg( p_vout, "releasing gui-helper" );
module_Unneed( p_vout, p_vout->p_sys->p_qte_main );
module_unneed( p_vout, p_vout->p_sys->p_qte_main );
#endif
if( p_vout->p_sys )

View File

@ -226,7 +226,7 @@ static void* Thread( vlc_object_t *p_this )
p_thread->p_opengl->fmt_render = p_thread->p_opengl->fmt_in;
p_thread->p_module =
module_Need( p_thread->p_opengl, "opengl provider", NULL, 0 );
module_need( p_thread->p_opengl, "opengl provider", NULL, 0 );
if( p_thread->p_module == NULL )
{
msg_Err( p_thread, "unable to initialize OpenGL" );
@ -269,7 +269,7 @@ static void* Thread( vlc_object_t *p_this )
}
/* Free the openGL provider */
module_Unneed( p_thread->p_opengl, p_thread->p_module );
module_unneed( p_thread->p_opengl, p_thread->p_module );
vlc_object_detach( p_thread->p_opengl );
vlc_object_release( p_thread->p_opengl );
vlc_restorecancel (canc);

View File

@ -58,7 +58,7 @@ static aout_filter_t * FindFilter( aout_instance_t * p_aout,
memcpy( &p_filter->input, p_input_format, sizeof(audio_sample_format_t) );
memcpy( &p_filter->output, p_output_format,
sizeof(audio_sample_format_t) );
p_filter->p_module = module_Need( p_filter, "audio filter", NULL, 0 );
p_filter->p_module = module_need( p_filter, "audio filter", NULL, 0 );
if ( p_filter->p_module == NULL )
{
vlc_object_detach( p_filter );
@ -124,7 +124,7 @@ static int SplitConversion( const audio_sample_format_t * p_input_format,
static void ReleaseFilter( aout_filter_t * p_filter )
{
module_Unneed( p_filter, p_filter->p_module );
module_unneed( p_filter, p_filter->p_module );
vlc_object_detach( p_filter );
vlc_object_release( p_filter );
}
@ -275,7 +275,7 @@ void aout_FiltersDestroyPipeline( aout_instance_t * p_aout,
for ( i = 0; i < i_nb_filters; i++ )
{
module_Unneed( pp_filters[i], pp_filters[i]->p_module );
module_unneed( pp_filters[i], pp_filters[i]->p_module );
vlc_object_detach( pp_filters[i] );
vlc_object_release( pp_filters[i] );
}

View File

@ -107,14 +107,14 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
var_Change( p_aout, "visual", VLC_VAR_ADDCHOICE, &val, &text );
/* Look for goom plugin */
if( module_Exists( VLC_OBJECT(p_aout), "goom" ) )
if( module_exists( VLC_OBJECT(p_aout), "goom" ) )
{
val.psz_string = (char*)"goom"; text.psz_string = (char*)"Goom";
var_Change( p_aout, "visual", VLC_VAR_ADDCHOICE, &val, &text );
}
/* Look for galaktos plugin */
if( module_Exists( VLC_OBJECT(p_aout), "galaktos" ) )
if( module_exists( VLC_OBJECT(p_aout), "galaktos" ) )
{
val.psz_string = (char*)"galaktos"; text.psz_string = (char*)"GaLaktos";
var_Change( p_aout, "visual", VLC_VAR_ADDCHOICE, &val, &text );
@ -280,7 +280,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
memcpy( &p_filter->output, &chain_output_format,
sizeof(audio_sample_format_t) );
p_filter->p_module = module_Need( p_filter, "visualization",
p_filter->p_module = module_need( p_filter, "visualization",
psz_parser, true );
}
else /* this can be a audio filter module as well as a visualization module */
@ -291,7 +291,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
memcpy( &p_filter->output, &chain_output_format,
sizeof(audio_sample_format_t) );
p_filter->p_module = module_Need( p_filter, "audio filter",
p_filter->p_module = module_need( p_filter, "audio filter",
psz_parser, true );
if ( p_filter->p_module == NULL )
@ -304,7 +304,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
{
aout_FormatPrepare( &p_filter->input );
aout_FormatPrepare( &p_filter->output );
p_filter->p_module = module_Need( p_filter,
p_filter->p_module = module_need( p_filter,
"audio filter",
psz_parser, true );
}
@ -315,7 +315,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
sizeof(audio_sample_format_t) );
memcpy( &p_filter->output, &chain_output_format,
sizeof(audio_sample_format_t) );
p_filter->p_module = module_Need( p_filter,
p_filter->p_module = module_need( p_filter,
"visualization",
psz_parser, true );
}
@ -346,7 +346,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
msg_Err( p_aout, "cannot add user filter %s (skipped)",
psz_parser );
module_Unneed( p_filter, p_filter->p_module );
module_unneed( p_filter, p_filter->p_module );
vlc_object_detach( p_filter );
vlc_object_release( p_filter );

View File

@ -43,7 +43,7 @@
*****************************************************************************/
int aout_MixerNew( aout_instance_t * p_aout )
{
p_aout->mixer.p_module = module_Need( p_aout, "audio mixer", NULL, 0 );
p_aout->mixer.p_module = module_need( p_aout, "audio mixer", NULL, 0 );
if ( p_aout->mixer.p_module == NULL )
{
msg_Err( p_aout, "no suitable audio mixer" );
@ -61,7 +61,7 @@ int aout_MixerNew( aout_instance_t * p_aout )
void aout_MixerDelete( aout_instance_t * p_aout )
{
if ( p_aout->mixer.b_error ) return;
module_Unneed( p_aout, p_aout->mixer.p_module );
module_unneed( p_aout, p_aout->mixer.p_module );
p_aout->mixer.b_error = 1;
}

View File

@ -54,7 +54,7 @@ int aout_OutputNew( aout_instance_t * p_aout,
aout_lock_output_fifo( p_aout );
/* Find the best output plug-in. */
p_aout->output.p_module = module_Need( p_aout, "audio output", "$aout", 0);
p_aout->output.p_module = module_need( p_aout, "audio output", "$aout", 0);
if ( p_aout->output.p_module == NULL )
{
msg_Err( p_aout, "no suitable audio output module" );
@ -196,7 +196,7 @@ int aout_OutputNew( aout_instance_t * p_aout,
&p_aout->output.output ) < 0 )
{
msg_Err( p_aout, "couldn't create audio output pipeline" );
module_Unneed( p_aout, p_aout->output.p_module );
module_unneed( p_aout, p_aout->output.p_module );
return -1;
}
@ -227,7 +227,7 @@ void aout_OutputDelete( aout_instance_t * p_aout )
return;
}
module_Unneed( p_aout, p_aout->output.p_module );
module_unneed( p_aout, p_aout->output.p_module );
aout_FiltersDestroyPipeline( p_aout, p_aout->output.pp_filters,
p_aout->output.i_nb_filters );

View File

@ -72,11 +72,11 @@ static access_t *access_InternalNew( vlc_object_t *p_obj, const char *psz_access
p_access->info.i_seekpoint = 0;
/* Before module_Need (for var_Create...) */
/* Before module_need (for var_Create...) */
vlc_object_attach( p_access, p_obj );
p_access->p_module =
module_Need( p_access, p_source ? "access_filter" : "access",
module_need( p_access, p_source ? "access_filter" : "access",
psz_access, true );
if( p_access->p_module == NULL )
@ -118,7 +118,7 @@ access_t *access_FilterNew( access_t *p_source, const char *psz_access_filter )
*****************************************************************************/
void access_Delete( access_t *p_access )
{
module_Unneed( p_access, p_access->p_module );
module_unneed( p_access, p_access->p_module );
vlc_object_detach( p_access );
free( p_access->psz_access );

View File

@ -216,7 +216,7 @@ decoder_t *input_DecoderNew( input_thread_t *p_input,
i_priority, false ) )
{
msg_Err( p_dec, "cannot spawn decoder thread" );
module_Unneed( p_dec, p_dec->p_module );
module_unneed( p_dec, p_dec->p_module );
DeleteDecoder( p_dec );
vlc_object_release( p_dec );
return NULL;
@ -246,7 +246,7 @@ void input_DecoderDelete( decoder_t *p_dec )
vlc_thread_join( p_dec );
/* Don't module_Unneed() here because of the dll loader that wants
/* Don't module_unneed() here because of the dll loader that wants
* close() in the same thread than open()/decode() */
}
else
@ -254,7 +254,7 @@ void input_DecoderDelete( decoder_t *p_dec )
/* Flush */
input_DecoderDecode( p_dec, NULL );
module_Unneed( p_dec, p_dec->p_module );
module_unneed( p_dec, p_dec->p_module );
}
/* */
@ -408,7 +408,7 @@ int input_DecoderSetCcState( decoder_t *p_dec, bool b_decode, int i_channel )
if( p_cc )
{
vlc_object_kill( p_cc );
module_Unneed( p_cc, p_cc->p_module );
module_unneed( p_cc, p_cc->p_module );
DeleteDecoder( p_cc );
vlc_object_release( p_cc );
}
@ -502,9 +502,9 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
/* Find a suitable decoder/packetizer module */
if( i_object_type == VLC_OBJECT_DECODER )
p_dec->p_module = module_Need( p_dec, "decoder", "$codec", 0 );
p_dec->p_module = module_need( p_dec, "decoder", "$codec", 0 );
else
p_dec->p_module = module_Need( p_dec, "packetizer", "$packetizer", 0 );
p_dec->p_module = module_need( p_dec, "packetizer", "$packetizer", 0 );
/* Check if decoder requires already packetized data */
if( i_object_type == VLC_OBJECT_DECODER &&
@ -523,7 +523,7 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
vlc_object_attach( p_dec->p_owner->p_packetizer, p_input );
p_dec->p_owner->p_packetizer->p_module =
module_Need( p_dec->p_owner->p_packetizer,
module_need( p_dec->p_owner->p_packetizer,
"packetizer", "$packetizer", 0 );
if( !p_dec->p_owner->p_packetizer->p_module )
@ -605,7 +605,7 @@ static void* DecoderThread( vlc_object_t *p_this )
/* We do it here because of the dll loader that wants close() in the
* same thread than open()/decode() */
module_Unneed( p_dec, p_dec->p_module );
module_unneed( p_dec, p_dec->p_module );
vlc_restorecancel (canc);
return NULL;
}
@ -1176,7 +1176,7 @@ static void DeleteDecoder( decoder_t * p_dec )
if( p_dec->p_owner->p_packetizer )
{
module_Unneed( p_dec->p_owner->p_packetizer,
module_unneed( p_dec->p_owner->p_packetizer,
p_dec->p_owner->p_packetizer->p_module );
es_format_Clean( &p_dec->p_owner->p_packetizer->fmt_in );
es_format_Clean( &p_dec->p_owner->p_packetizer->fmt_out );

View File

@ -147,7 +147,7 @@ demux_t *__demux_New( vlc_object_t *p_obj,
}
}
/* Before module_Need (for var_Create...) */
/* Before module_need (for var_Create...) */
vlc_object_attach( p_demux, p_obj );
if( s )
@ -159,14 +159,14 @@ demux_t *__demux_New( vlc_object_t *p_obj,
SkipAPETag( p_demux );
p_demux->p_module =
module_Need( p_demux, "demux", psz_module,
module_need( p_demux, "demux", psz_module,
!strcmp( psz_module, p_demux->psz_demux ) ?
true : false );
}
else
{
p_demux->p_module =
module_Need( p_demux, "access_demux", psz_module,
module_need( p_demux, "access_demux", psz_module,
!strcmp( psz_module, p_demux->psz_access ) ?
true : false );
}
@ -189,7 +189,7 @@ demux_t *__demux_New( vlc_object_t *p_obj,
*****************************************************************************/
void demux_Delete( demux_t *p_demux )
{
module_Unneed( p_demux, p_demux->p_module );
module_unneed( p_demux, p_demux->p_module );
vlc_object_detach( p_demux );
free( p_demux->psz_path );
@ -586,7 +586,7 @@ decoder_t *demux_PacketizerNew( demux_t *p_demux, es_format_t *p_fmt, const char
p_packetizer->fmt_in = *p_fmt;
es_format_Init( &p_packetizer->fmt_out, UNKNOWN_ES, 0 );
p_packetizer->p_module = module_Need( p_packetizer, "packetizer", NULL, 0 );
p_packetizer->p_module = module_need( p_packetizer, "packetizer", NULL, 0 );
if( !p_packetizer->p_module )
{
es_format_Clean( p_fmt );
@ -600,7 +600,7 @@ decoder_t *demux_PacketizerNew( demux_t *p_demux, es_format_t *p_fmt, const char
void demux_PacketizerDestroy( decoder_t *p_packetizer )
{
if( p_packetizer->p_module )
module_Unneed( p_packetizer, p_packetizer->p_module );
module_unneed( p_packetizer, p_packetizer->p_module );
es_format_Clean( &p_packetizer->fmt_in );
vlc_object_release( p_packetizer );
}

View File

@ -2814,7 +2814,7 @@ static void DemuxMeta( input_thread_t *p_input, vlc_meta_t *p_meta, demux_t *p_d
if(! p_demux->p_private )
return;
p_id3 = module_Need( p_demux, "meta reader", NULL, 0 );
p_id3 = module_need( p_demux, "meta reader", NULL, 0 );
if( p_id3 )
{
demux_meta_t *p_demux_meta = (demux_meta_t *)p_demux->p_private;
@ -2832,7 +2832,7 @@ static void DemuxMeta( input_thread_t *p_input, vlc_meta_t *p_meta, demux_t *p_d
p_demux_meta->i_attachments, p_demux_meta->attachments );
vlc_mutex_unlock( &p_input->p->input.p_item->lock );
}
module_Unneed( p_demux, p_id3 );
module_unneed( p_demux, p_id3 );
}
free( p_demux->p_private );
}

View File

@ -164,7 +164,7 @@ int input_ArtFind( playlist_t *p_playlist, input_item_t *p_item )
}
free( psz_title );
p_module = module_Need( p_playlist, "art finder", 0, false );
p_module = module_need( p_playlist, "art finder", 0, false );
if( p_module )
i_ret = 1;
@ -188,7 +188,7 @@ int input_ArtFind( playlist_t *p_playlist, input_item_t *p_item )
}
if( p_module )
module_Unneed( p_playlist, p_module );
module_unneed( p_playlist, p_module );
p_playlist->p_private = NULL;
PL_UNLOCK;

View File

@ -608,7 +608,7 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
p_vlm->p_vod = vlc_custom_create( VLC_OBJECT(p_vlm), sizeof( vod_t ),
VLC_OBJECT_GENERIC, "vod server" );
vlc_object_attach( p_vlm->p_vod, p_vlm );
p_vlm->p_vod->p_module = module_Need( p_vlm->p_vod, "vod server", 0, 0 );
p_vlm->p_vod->p_module = module_need( p_vlm->p_vod, "vod server", 0, 0 );
if( !p_vlm->p_vod->p_module )
{
msg_Err( p_vlm, "cannot find vod server" );
@ -676,7 +676,7 @@ static int vlm_ControlMediaDel( vlm_t *p_vlm, int64_t id )
/* Check if we need to unload the VOD server */
if( p_vlm->p_vod && p_vlm->i_vod <= 0 )
{
module_Unneed( p_vlm->p_vod, p_vlm->p_vod->p_module );
module_unneed( p_vlm->p_vod, p_vlm->p_vod->p_module );
vlc_object_detach( p_vlm->p_vod );
vlc_object_release( p_vlm->p_vod );
p_vlm->p_vod = NULL;

View File

@ -67,7 +67,7 @@ static void intf_Destroy( vlc_object_t *obj )
/* Unlock module if present (a switch may have failed) */
if( p_intf->p_module )
module_Unneed( p_intf, p_intf->p_module );
module_unneed( p_intf, p_intf->p_module );
free( p_intf->psz_intf );
vlc_mutex_destroy( &p_intf->change_lock );
@ -101,7 +101,7 @@ intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module )
/* Choose the best module */
p_intf->psz_intf = strdup( psz_module );
p_intf->p_module = module_Need( p_intf, "interface", psz_module, false );
p_intf->p_module = module_need( p_intf, "interface", psz_module, false );
if( p_intf->p_module == NULL )
{

View File

@ -797,7 +797,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
/*
* Choose the best memcpy module
*/
priv->p_memcpy_module = module_Need( p_libvlc, "memcpy", "$memcpy", 0 );
priv->p_memcpy_module = module_need( p_libvlc, "memcpy", "$memcpy", 0 );
priv->b_stats = config_GetInt( p_libvlc, "stats" ) > 0;
priv->i_timers = 0;
@ -834,7 +834,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
msg_Err( p_libvlc, "playlist initialization failed" );
if( priv->p_memcpy_module != NULL )
{
module_Unneed( p_libvlc, priv->p_memcpy_module );
module_unneed( p_libvlc, priv->p_memcpy_module );
}
module_EndBank( p_libvlc );
return VLC_EGENERIC;
@ -1121,7 +1121,7 @@ int libvlc_InternalDestroy( libvlc_int_t *p_libvlc )
if( priv->p_memcpy_module )
{
module_Unneed( p_libvlc, priv->p_memcpy_module );
module_unneed( p_libvlc, priv->p_memcpy_module );
priv->p_memcpy_module = NULL;
}

View File

@ -204,21 +204,21 @@ libvlc_InternalDestroy
libvlc_InternalInit
LocaleFree
mdate
__module_Exists
__module_Find
module_GetConfig
module_GetHelp
module_config_free
module_config_get
__module_exists
__module_find
module_get_help
__module_GetModulesNamesForCapability
module_GetName
module_GetObjName
module_get_name
module_get_object
module_hold
module_IsCapable
module_list_free
module_list_get
__module_Need
module_PutConfig
__module_need
module_provides
module_release
__module_Unneed
__module_unneed
__msg_Dbg
__msg_DisableObjectPrinting
__msg_EnableObjectPrinting

View File

@ -44,7 +44,7 @@ void devices_ProbeCreate( vlc_object_t *p_this )
p_probe = vlc_object_create( p_this, VLC_OBJECT_INTF );
if( !p_probe )
return;
p_probe->p_module = module_Need( p_probe, "devices probe", "", false );
p_probe->p_module = module_need( p_probe, "devices probe", "", false );
if( p_probe->p_module == NULL )
{
msg_Err( p_this, "no devices probing module could be loaded" );

View File

@ -158,7 +158,7 @@ static filter_t *filter_chain_AppendFilterInternal( filter_chain_t *p_chain,
p_filter->p_cfg = p_cfg;
p_filter->b_allow_fmt_out_change = p_chain->b_allow_fmt_out_change;
p_filter->p_module = module_Need( p_filter, p_chain->psz_capability,
p_filter->p_module = module_need( p_filter, p_chain->psz_capability,
psz_name, psz_name ? true : false );
if( !p_filter->p_module )
@ -188,7 +188,7 @@ static filter_t *filter_chain_AppendFilterInternal( filter_chain_t *p_chain,
else
msg_Err( p_chain->p_this, "Failed to create %s",
p_chain->psz_capability );
if( p_filter->p_module ) module_Unneed( p_filter,
if( p_filter->p_module ) module_unneed( p_filter,
p_filter->p_module );
es_format_Clean( &p_filter->fmt_in );
es_format_Clean( &p_filter->fmt_out );
@ -283,7 +283,7 @@ static int filter_chain_DeleteFilterInternal( filter_chain_t *p_chain,
p_chain->pf_buffer_allocation_clear( p_filter );
vlc_object_detach( p_filter );
if( p_filter->p_module )
module_Unneed( p_filter, p_filter->p_module );
module_unneed( p_filter, p_filter->p_module );
vlc_object_release( p_filter );
/* FIXME: check fmt_in/fmt_out consitency */

View File

@ -619,7 +619,7 @@ static decoder_t *CreateDecoder( vlc_object_t *p_this, video_format_t *fmt )
vlc_object_attach( p_dec, p_this );
/* Find a suitable decoder module */
p_dec->p_module = module_Need( p_dec, "decoder", "$codec", 0 );
p_dec->p_module = module_need( p_dec, "decoder", "$codec", 0 );
if( !p_dec->p_module )
{
msg_Err( p_dec, "no suitable decoder module for fourcc `%4.4s'.\n"
@ -637,7 +637,7 @@ static void DeleteDecoder( decoder_t * p_dec )
{
vlc_object_detach( p_dec );
if( p_dec->p_module ) module_Unneed( p_dec, p_dec->p_module );
if( p_dec->p_module ) module_unneed( p_dec, p_dec->p_module );
es_format_Clean( &p_dec->fmt_in );
es_format_Clean( &p_dec->fmt_out );
@ -698,7 +698,7 @@ static encoder_t *CreateEncoder( vlc_object_t *p_this, video_format_t *fmt_in,
vlc_object_attach( p_enc, p_this );
/* Find a suitable decoder module */
p_enc->p_module = module_Need( p_enc, "encoder", 0, 0 );
p_enc->p_module = module_need( p_enc, "encoder", 0, 0 );
if( !p_enc->p_module )
{
msg_Err( p_enc, "no suitable encoder module for fourcc `%4.4s'.\n"
@ -717,7 +717,7 @@ static void DeleteEncoder( encoder_t * p_enc )
{
vlc_object_detach( p_enc );
if( p_enc->p_module ) module_Unneed( p_enc, p_enc->p_module );
if( p_enc->p_module ) module_unneed( p_enc, p_enc->p_module );
es_format_Clean( &p_enc->fmt_in );
es_format_Clean( &p_enc->fmt_out );
@ -746,7 +746,7 @@ static filter_t *CreateFilter( vlc_object_t *p_this, es_format_t *p_fmt_in,
p_filter->fmt_out = *p_fmt_in;
p_filter->fmt_out.i_codec = p_fmt_out->i_chroma;
p_filter->fmt_out.video = *p_fmt_out;
p_filter->p_module = module_Need( p_filter, "video filter2",
p_filter->p_module = module_need( p_filter, "video filter2",
psz_module, 0 );
if( !p_filter->p_module )
@ -763,7 +763,7 @@ static void DeleteFilter( filter_t * p_filter )
{
vlc_object_detach( p_filter );
if( p_filter->p_module ) module_Unneed( p_filter, p_filter->p_module );
if( p_filter->p_module ) module_unneed( p_filter, p_filter->p_module );
es_format_Clean( &p_filter->fmt_in );
es_format_Clean( &p_filter->fmt_out );

View File

@ -43,7 +43,7 @@ xml_t *__xml_Create( vlc_object_t *p_this )
"xml" );
vlc_object_attach( p_xml, p_this );
p_xml->p_module = module_Need( p_xml, "xml", 0, 0 );
p_xml->p_module = module_need( p_xml, "xml", 0, 0 );
if( !p_xml->p_module )
{
vlc_object_detach( p_xml );
@ -60,7 +60,7 @@ xml_t *__xml_Create( vlc_object_t *p_this )
*****************************************************************************/
void xml_Delete( xml_t *p_xml )
{
module_Unneed( p_xml, p_xml->p_module );
module_unneed( p_xml, p_xml->p_module );
vlc_object_detach( p_xml );
vlc_object_release( p_xml );
}

View File

@ -283,7 +283,7 @@ void __module_LoadPlugins( vlc_object_t * p_this )
* \param cap the capability to check
* \return TRUE if the module have the capability
*/
bool module_IsCapable( const module_t *m, const char *cap )
bool module_provides( const module_t *m, const char *cap )
{
return !strcmp( m->psz_capability, cap );
}
@ -294,7 +294,7 @@ bool module_IsCapable( const module_t *m, const char *cap )
* \param m the module
* \return the module name
*/
const char *module_GetObjName( const module_t *m )
const char *module_get_object( const module_t *m )
{
return m->psz_object_name;
}
@ -306,7 +306,7 @@ const char *module_GetObjName( const module_t *m )
* \param long_name TRUE to have the long name of the module
* \return the short or long name of the module
*/
const char *module_GetName( const module_t *m, bool long_name )
const char *module_get_name( const module_t *m, bool long_name )
{
if( long_name && ( m->psz_longname != NULL) )
return m->psz_longname;
@ -320,7 +320,7 @@ const char *module_GetName( const module_t *m, bool long_name )
* \param m the module
* \return the help
*/
const char *module_GetHelp( const module_t *m )
const char *module_get_help( const module_t *m )
{
return m->psz_help;
}
@ -361,7 +361,7 @@ void module_list_free (module_t **list)
module_t **module_list_get (size_t *n)
{
/* TODO: this whole module lookup is quite inefficient */
/* Remove this and improve module_Need */
/* Remove this and improve module_need */
module_t **tab = NULL;
size_t i = 0;
@ -402,12 +402,12 @@ module_t **module_list_get (size_t *n)
* \param b_strict TRUE yto use the strict mode
* \return the module or NULL in case of a failure
*/
module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
module_t * __module_need( vlc_object_t *p_this, const char *psz_capability,
const char *psz_name, bool b_strict )
{
typedef struct module_list_t module_list_t;
stats_TimerStart( p_this, "module_Need()", STATS_TIMER_MODULE_NEED );
stats_TimerStart( p_this, "module_need()", STATS_TIMER_MODULE_NEED );
struct module_list_t
{
@ -492,7 +492,7 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
p_module = p_all[i_which_module];
/* Test that this module can do what we need */
if( !module_IsCapable( p_module, psz_capability ) )
if( !module_provides( p_module, psz_capability ) )
{
/* Don't recurse through the sub-modules because vlc_list_find()
* will list them anyway. */
@ -712,13 +712,13 @@ found_shortcut:
/**
* Module unneed
*
* This function must be called by the thread that called module_Need, to
* This function must be called by the thread that called module_need, to
* decrease the reference count and allow for hiding of modules.
* \param p_this vlc object structure
* \param p_module the module structure
* \return nothing
*/
void __module_Unneed( vlc_object_t * p_this, module_t * p_module )
void __module_unneed( vlc_object_t * p_this, module_t * p_module )
{
/* Use the close method */
if( p_module->pf_deactivate )
@ -738,7 +738,7 @@ void __module_Unneed( vlc_object_t * p_this, module_t * p_module )
* \param psz_name the name of the module
* \return a pointer to the module or NULL in case of a failure
*/
module_t *__module_Find( vlc_object_t *p_this, const char * psz_name )
module_t *__module_find( vlc_object_t *p_this, const char * psz_name )
{
module_t **list, *module;
@ -767,9 +767,9 @@ module_t *__module_Find( vlc_object_t *p_this, const char * psz_name )
* \param psz_name th name of the module
* \return TRUE if the module exists
*/
bool __module_Exists( vlc_object_t *p_this, const char * psz_name )
bool __module_exists( vlc_object_t *p_this, const char * psz_name )
{
module_t *p_module = __module_Find( p_this, psz_name );
module_t *p_module = __module_find( p_this, psz_name );
if( p_module )
module_release (p_module);
return true != NULL;
@ -834,7 +834,7 @@ char ** __module_GetModulesNamesForCapability( vlc_object_t *p_this,
psz_ret[j] = strdup( k>=0?p_module->pp_shortcuts[k]
:p_module->psz_object_name );
if( pppsz_longname )
(*pppsz_longname)[j] = strdup( module_GetName( p_module, true ) );
(*pppsz_longname)[j] = strdup( module_get_name( p_module, true ) );
j++;
}
}
@ -852,7 +852,7 @@ char ** __module_GetModulesNamesForCapability( vlc_object_t *p_this,
* \param psize the size of the configuration returned
* \return the configuration as an array
*/
module_config_t *module_GetConfig( const module_t *module, unsigned *restrict psize )
module_config_t *module_config_get( const module_t *module, unsigned *restrict psize )
{
unsigned i,j;
unsigned size = module->confsize;
@ -886,7 +886,7 @@ module_config_t *module_GetConfig( const module_t *module, unsigned *restrict ps
* \param the configuration
* \return nothing
*/
void module_PutConfig( module_config_t *config )
void module_config_free( module_config_t *config )
{
free( config );
}
@ -1178,8 +1178,8 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir,
* AllocatePluginFile: load a module into memory and initialize it.
*****************************************************************************
* This function loads a dynamically loadable module and allocates a structure
* for its information data. The module can then be handled by module_Need
* and module_Unneed. It can be removed by DeleteModule.
* for its information data. The module can then be handled by module_need
* and module_unneed. It can be removed by DeleteModule.
*****************************************************************************/
static int AllocatePluginFile( vlc_object_t * p_this, char * psz_file,
int64_t i_file_time, int64_t i_file_size )
@ -1266,8 +1266,8 @@ static int AllocatePluginFile( vlc_object_t * p_this, char * psz_file,
* AllocatePlugin: load a module into memory and initialize it.
*****************************************************************************
* This function loads a dynamically loadable module and allocates a structure
* for its information data. The module can then be handled by module_Need
* and module_Unneed. It can be removed by DeleteModule.
* for its information data. The module can then be handled by module_need
* and module_unneed. It can be removed by DeleteModule.
*****************************************************************************/
static module_t * AllocatePlugin( vlc_object_t * p_this, char * psz_file )
{
@ -1367,8 +1367,8 @@ static void UndupModule( module_t *p_module )
* AllocateBuiltinModule: initialize a builtin module.
*****************************************************************************
* This function registers a builtin module and allocates a structure
* for its information data. The module can then be handled by module_Need
* and module_Unneed. It can be removed by DeleteModule.
* for its information data. The module can then be handled by module_need
* and module_unneed. It can be removed by DeleteModule.
*****************************************************************************/
static int AllocateBuiltinModule( vlc_object_t * p_this,
int ( *pf_entry ) ( module_t * ) )

View File

@ -69,7 +69,7 @@ tls_ServerCreate (vlc_object_t *obj, const char *cert_path,
var_SetString (srv, "tls-x509-key", key_path);
}
srv->p_module = module_Need (srv, "tls server", 0, 0);
srv->p_module = module_need (srv, "tls server", 0, 0);
if (srv->p_module == NULL)
{
msg_Err (srv, "TLS server plugin not available");
@ -92,7 +92,7 @@ void tls_ServerDelete (tls_server_t *srv)
if (srv == NULL)
return;
module_Unneed (srv, srv->p_module);
module_unneed (srv, srv->p_module);
vlc_object_detach (srv);
vlc_object_release (srv);
}
@ -185,7 +185,7 @@ tls_ClientCreate (vlc_object_t *obj, int fd, const char *psz_hostname)
else
msg_Dbg (cl, "requested anonymous server");
cl->p_module = module_Need (cl, "tls client", 0, 0);
cl->p_module = module_need (cl, "tls client", 0, 0);
if (cl->p_module == NULL)
{
msg_Err (cl, "TLS client plugin not available");
@ -207,7 +207,7 @@ tls_ClientCreate (vlc_object_t *obj, int fd, const char *psz_hostname)
}
msg_Err (cl, "TLS client session handshake error");
module_Unneed (cl, cl->p_module);
module_unneed (cl, cl->p_module);
vlc_object_release (cl);
return NULL;
}
@ -222,7 +222,7 @@ void tls_ClientDelete (tls_session_t *cl)
if (cl == NULL)
return;
module_Unneed (cl, cl->p_module);
module_unneed (cl, cl->p_module);
vlc_object_detach (cl);
vlc_object_release (cl);
}

View File

@ -80,7 +80,7 @@ static bool osd_ParserLoad( osd_menu_t *p_menu, const char *psz_file )
else
psz_type = (char*)"import-osd-xml";
p_menu->p_parser = module_Need( p_menu, "osd parser",
p_menu->p_parser = module_need( p_menu, "osd parser",
psz_type, true );
if( !p_menu->p_parser )
{
@ -96,7 +96,7 @@ static void osd_ParserUnload( osd_menu_t *p_menu )
image_HandlerDelete( p_menu->p_image );
if( p_menu->p_parser )
module_Unneed( p_menu, p_menu->p_parser );
module_unneed( p_menu, p_menu->p_parser );
free( p_menu->psz_file );
}

View File

@ -69,14 +69,14 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
p_playlist->p_private = (void *)p_export;
/* And call the module ! All work is done now */
p_module = module_Need( p_playlist, "playlist export", psz_type, true);
p_module = module_need( p_playlist, "playlist export", psz_type, true);
if( !p_module )
{
msg_Warn( p_playlist, "exporting playlist failed" );
vlc_object_unlock( p_playlist );
return VLC_ENOOBJ;
}
module_Unneed( p_playlist , p_module );
module_unneed( p_playlist , p_module );
/* Clean up */
fclose( p_export->p_file );

View File

@ -101,7 +101,7 @@ bool services_discovery_Start ( services_discovery_t * p_sd )
{
assert(!p_sd->p_module);
p_sd->p_module = module_Need( p_sd, "services_discovery", p_sd->psz_module, true );
p_sd->p_module = module_need( p_sd, "services_discovery", p_sd->psz_module, true );
if( p_sd->p_module == NULL )
{
@ -129,7 +129,7 @@ void services_discovery_Stop ( services_discovery_t * p_sd )
vlc_event_send( &p_sd->event_manager, &event );
module_Unneed( p_sd, p_sd->p_module );
module_unneed( p_sd, p_sd->p_module );
p_sd->p_module = NULL;
}

View File

@ -321,7 +321,7 @@ sout_access_out_t *sout_AccessOutNew( vlc_object_t *p_sout,
vlc_object_attach( p_access, p_sout );
p_access->p_module =
module_Need( p_access, "sout access", p_access->psz_access, true );
module_need( p_access, "sout access", p_access->psz_access, true );
if( !p_access->p_module )
{
@ -342,7 +342,7 @@ void sout_AccessOutDelete( sout_access_out_t *p_access )
vlc_object_detach( p_access );
if( p_access->p_module )
{
module_Unneed( p_access, p_access->p_module );
module_unneed( p_access, p_access->p_module );
}
free( p_access->psz_access );
@ -443,7 +443,7 @@ sout_mux_t * sout_MuxNew( sout_instance_t *p_sout, char *psz_mux,
vlc_object_attach( p_mux, p_sout );
p_mux->p_module =
module_Need( p_mux, "sout mux", p_mux->psz_mux, true );
module_need( p_mux, "sout mux", p_mux->psz_mux, true );
if( p_mux->p_module == NULL )
{
@ -503,7 +503,7 @@ void sout_MuxDelete( sout_mux_t *p_mux )
vlc_object_detach( p_mux );
if( p_mux->p_module )
{
module_Unneed( p_mux, p_mux->p_module );
module_unneed( p_mux, p_mux->p_module );
}
free( p_mux->psz_mux );
@ -796,7 +796,7 @@ sout_stream_t *sout_StreamNew( sout_instance_t *p_sout, char *psz_chain )
vlc_object_attach( p_stream, p_sout );
p_stream->p_module =
module_Need( p_stream, "sout stream", p_stream->psz_name, true );
module_need( p_stream, "sout stream", p_stream->psz_name, true );
if( !p_stream->p_module )
{
@ -812,7 +812,7 @@ void sout_StreamDelete( sout_stream_t *p_stream )
msg_Dbg( p_stream, "destroying chain... (name=%s)", p_stream->psz_name );
vlc_object_detach( p_stream );
if( p_stream->p_module ) module_Unneed( p_stream, p_stream->p_module );
if( p_stream->p_module ) module_unneed( p_stream, p_stream->p_module );
FREENULL( p_stream->psz_name );
FREENULL( p_stream->psz_next );

View File

@ -441,7 +441,7 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
free( psz_parser );
free( psz_tmp );
p_vout->p_cfg = p_cfg;
p_vout->p_module = module_Need( p_vout,
p_vout->p_module = module_need( p_vout,
( p_vout->psz_filter_chain && *p_vout->psz_filter_chain ) ?
"video filter" : "video output", psz_name, p_vout->psz_filter_chain && *p_vout->psz_filter_chain );
free( psz_name );
@ -503,7 +503,7 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
if( vlc_thread_create( p_vout, "video output", RunThread,
VLC_THREAD_PRIORITY_OUTPUT, true ) )
{
module_Unneed( p_vout, p_vout->p_module );
module_unneed( p_vout, p_vout->p_module );
vlc_object_release( p_vout );
return NULL;
}
@ -534,7 +534,7 @@ void vout_Close( vout_thread_t *p_vout )
vlc_object_kill( p_vout );
vlc_thread_join( p_vout );
module_Unneed( p_vout, p_vout->p_module );
module_unneed( p_vout, p_vout->p_module );
p_vout->p_module = NULL;
}
@ -1290,7 +1290,7 @@ static int ChromaCreate( vout_thread_t *p_vout )
VideoFormatImportRgb( &p_chroma->fmt_in.video, &p_vout->render );
VideoFormatImportRgb( &p_chroma->fmt_out.video, &p_vout->output );
p_chroma->p_module = module_Need( p_chroma, "video filter2", NULL, 0 );
p_chroma->p_module = module_need( p_chroma, "video filter2", NULL, 0 );
if( p_chroma->p_module == NULL )
{
@ -1316,7 +1316,7 @@ static void ChromaDestroy( vout_thread_t *p_vout )
if( !p_vout->p_chroma )
return;
module_Unneed( p_vout->p_chroma, p_vout->p_chroma->p_module );
module_unneed( p_vout->p_chroma, p_vout->p_chroma->p_module );
vlc_object_release( p_vout->p_chroma );
p_vout->p_chroma = NULL;
}

View File

@ -115,7 +115,7 @@ void *vout_RequestWindow( vout_thread_t *p_vout,
wnd->pos_y = *pi_y_hint;
vlc_object_attach (wnd, p_vout);
wnd->module = module_Need (wnd, "vout window", 0, 0);
wnd->module = module_need (wnd, "vout window", 0, 0);
if (wnd->module == NULL)
{
msg_Dbg (wnd, "no window provider available");
@ -139,7 +139,7 @@ void vout_ReleaseWindow( vout_thread_t *p_vout, void *dummy )
p_vout->p_window = NULL;
assert (wnd->module);
module_Unneed (wnd, wnd->module);
module_unneed (wnd, wnd->module);
vlc_object_release (wnd);
(void)dummy;

View File

@ -491,7 +491,7 @@ void spu_DestroySubpicture( spu_t *p_spu, subpicture_t *p_subpic )
static void FilterRelease( filter_t *p_filter )
{
if( p_filter->p_module )
module_Unneed( p_filter, p_filter->p_module );
module_unneed( p_filter, p_filter->p_module );
vlc_object_detach( p_filter );
vlc_object_release( p_filter );
@ -536,7 +536,7 @@ static void SpuRenderUpdateBlend( spu_t *p_spu, int i_out_width, int i_out_heigh
{
/* The chroma is not the same, we need to reload the blend module
* XXX to match the old behaviour just test !p_blend->fmt_in.video.i_chroma */
module_Unneed( p_blend, p_blend->p_module );
module_unneed( p_blend, p_blend->p_module );
p_blend->p_module = NULL;
}
@ -551,7 +551,7 @@ static void SpuRenderUpdateBlend( spu_t *p_spu, int i_out_width, int i_out_heigh
/* */
if( !p_blend->p_module )
p_blend->p_module = module_Need( p_blend, "video blending", 0, 0 );
p_blend->p_module = module_need( p_blend, "video blending", 0, 0 );
}
static void SpuRenderCreateAndLoadText( spu_t *p_spu )
{
@ -578,18 +578,18 @@ static void SpuRenderCreateAndLoadText( spu_t *p_spu )
vlc_object_attach( p_text, p_spu );
/* FIXME TOCHECK shouldn't module_Need( , , psz_modulename, false ) do the
/* FIXME TOCHECK shouldn't module_need( , , psz_modulename, false ) do the
* same than these 2 calls ? */
char *psz_modulename = var_CreateGetString( p_spu, "text-renderer" );
if( psz_modulename && *psz_modulename )
{
p_text->p_module = module_Need( p_text, "text renderer",
p_text->p_module = module_need( p_text, "text renderer",
psz_modulename, true );
}
free( psz_modulename );
if( !p_text->p_module )
p_text->p_module = module_Need( p_text, "text renderer", NULL, false );
p_text->p_module = module_need( p_text, "text renderer", NULL, false );
}
static filter_t *CreateAndLoadScale( vlc_object_t *p_obj,
@ -617,7 +617,7 @@ static filter_t *CreateAndLoadScale( vlc_object_t *p_obj,
p_scale->pf_vout_buffer_del = spu_del_video_buffer;
vlc_object_attach( p_scale, p_obj );
p_scale->p_module = module_Need( p_scale, "video filter2", 0, 0 );
p_scale->p_module = module_need( p_scale, "video filter2", 0, 0 );
return p_scale;
}