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 * ) );
+VLC_EXPORT( bool, module_exists, (const char *) );
+VLC_EXPORT( module_t *, module_find, (const char *) );
VLC_EXPORT( module_config_t *, module_config_get, ( const module_t *, unsigned * ) );
VLC_EXPORT( void, module_config_free, ( module_config_t * ) );
#define module_GetLongName( m ) module_get_name( m, true )
VLC_EXPORT( const char *, module_get_help, ( const module_t *m ) );
-
-#define module_get_main(a) __module_get_main(VLC_OBJECT(a))
-static inline module_t * __module_get_main( vlc_object_t * p_this )
+static inline module_t *module_get_main (void)
{
- return module_find( p_this, "main" );
+ return module_find ("main");
}
+#define module_get_main(a) module_get_main()
static inline bool module_is_main( const module_t * p_module )
{
/* 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( "mpgatofixed32" ) )
{
return VLC_EGENERIC;
}
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( "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 */
[self setupButton: o_audio_visual_pop forModuleList: "audio-visual"];
/* Last.FM is optional */
- if( module_exists( p_intf, "audioscrobbler" ) )
+ if( module_exists( "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" ) ?: ""]];
int i_cache = config_GetInt( p_intf, "file-caching");
TestCaC( "udp-caching" );
- if( module_exists (p_intf, "dvdread") )
+ if( module_exists ("dvdread") )
TestCaC( "dvdread-caching" );
- if( module_exists (p_intf, "dvdnav") )
+ if( module_exists ("dvdnav") )
TestCaC( "dvdnav-caching" );
TestCaC( "tcp-caching" );
TestCaC( "fake-caching" );
TestCaCi( "rtsp-caching", 4 );
TestCaCi( "ftp-caching", 2 );
TestCaCi( "http-caching", 4 );
- if(module_exists (p_intf, "access_realrtsp"))
+ if(module_exists ("access_realrtsp"))
TestCaCi( "realrtsp-caching", 10 );
TestCaCi( "mms-caching", 19 );
if( b_cache_equal )
SaveModuleList( o_audio_visual_pop, "audio-visual" );
/* Last.FM is optional */
- if( module_exists( p_intf, "audioscrobbler" ) )
+ if( module_exists( "audioscrobbler" ) )
{
[o_audio_last_ckb setEnabled: YES];
if( [o_audio_last_ckb state] == NSOnState )
#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 ( "dvdread" ) )
{
CaC( "dvdread-caching" );
i = i + config_SaveConfigFile( p_intf, "dvdread" );
}
- if( module_exists (p_intf, "dvdnav" ) )
+ if( module_exists ( "dvdnav" ) )
{
CaC( "dvdnav-caching" );
i = i + config_SaveConfigFile( p_intf, "dvdnav" );
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 ( "access_realrtsp" ) )
{
CaCi( "realrtsp-caching", 10 );
i = i + config_SaveConfigFile( p_intf, "access_realrtsp" );
#undef BI
/* Build the tree for the main module */
- module_t *p_module = module_get_main( p_intf );
+ module_t *p_module = module_get_main();
/* Initialisation and get the confsize */
PrefsItemData *data = NULL;
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( data->psz_name );
else
{
- p_module = module_get_main( p_intf );
+ p_module = module_get_main();
assert( p_module );
}
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( psz_name );
if( !p_obj )
{
msg_Err( p_intf, "Unable to find filter module \"%s\n.", psz_name );
/*********************
* DirectShow Stuffs *
*********************/
- if( module_exists( p_intf, "dshow" ) ){
+ if( module_exists( "dshow" ) ){
addModuleAndLayouts( DSHOW_DEVICE, dshow, "DirectShow" );
/* dshow Main */
/**************
* BDA Stuffs *
**************/
- if( module_exists( p_intf, "bda" ) ){
+ if( module_exists( "bda" ) ){
addModuleAndLayouts( BDA_DEVICE, bda, "DVB DirectShow" );
/* bda Main */
/*******
* V4L2*
*******/
- if( module_exists( p_intf, "v4l2" ) ){
+ if( module_exists( "v4l2" ) ){
addModuleAndLayouts( V4L2_DEVICE, v4l2, "Video for Linux 2" );
/* V4l Main panel */
/*******
* V4L *
*******/
- if( module_exists( p_intf, "v4l" ) ){
+ if( module_exists( "v4l" ) ){
addModuleAndLayouts( V4L_DEVICE, v4l, "Video for Linux" );
/* V4l Main panel */
/*******
* JACK *
*******/
- if( module_exists( p_intf, "jack" ) ){
+ if( module_exists( "jack" ) ){
addModuleAndLayouts( JACK_DEVICE, jack, "JACK Audio Connection Kit" );
/* Jack Main panel */
/************
* PVR *
************/
- if( module_exists( p_intf, "pvr" ) ){
+ if( module_exists( "pvr" ) ){
addModuleAndLayouts( PVR_DEVICE, pvr, "PVR" );
/* PVR Main panel */
/**************
* DVB Stuffs *
**************/
- if( module_exists( p_intf, "dvb" ) ){
+ if( module_exists( "dvb" ) ){
addModuleAndLayouts( DVB_DEVICE, dvb, "DVB" );
/* DVB Main */
/* Get the corresponding module */
module_t *p_module =
- module_find( VLC_OBJECT(p_intf), psz_devModule[i_devicetype] );
+ module_find( psz_devModule[i_devicetype] );
if( NULL == p_module ) return;
/* Init */
table->setAlternatingRowColors( true );
/* Get the main Module */
- module_t *p_main = module_find( p_this, "main" );
+ module_t *p_main = module_get_main();
assert( p_main );
/* Access to the module_config_t */
CONFIG_GENERIC2( "directx-audio-device", IntegerList,
DirectXLabel, DirectXDevice );
#else
- if( module_exists( p_intf, "alsa" ) )
+ if( module_exists( "alsa" ) )
{
audioControl( alsa );
optionWidgets.append( alsaControl );
}
else
optionWidgets.append( NULL );
- if( module_exists( p_intf, "oss" ) )
+ if( module_exists( "oss" ) )
{
audioControl2( OSS );
optionWidgets.append( OSSControl );
updateAudioOptions( ui.outputModule->currentIndex() );
/* LastFM */
- if( module_exists( p_intf, "audioscrobbler" ) )
+ if( module_exists( "audioscrobbler" ) )
{
CONFIG_GENERIC( "lastfm-username", String, ui.lastfm_user_label,
lastfm_user_edit );
int i_cache = config_GetInt( p_intf, "file-caching");
TestCaC( "udp-caching" );
- if (module_exists (p_intf, "dvdread"))
+ if (module_exists ("dvdread"))
TestCaC( "dvdread-caching" );
- if (module_exists (p_intf, "dvdnav"))
+ if (module_exists ("dvdnav"))
TestCaC( "dvdnav-caching" );
TestCaC( "tcp-caching" );
TestCaC( "fake-caching" ); TestCaC( "cdda-caching" );
#ifdef WIN32
TestCaC( "dshow-caching" );
#else
- if (module_exists (p_intf, "v4l"))
+ if (module_exists ("v4l"))
TestCaC( "v4l-caching" );
- if (module_exists (p_intf, "access_jack"))
+ if (module_exists ("access_jack"))
TestCaC( "jack-input-caching" );
- if (module_exists (p_intf, "v4l2"))
+ if (module_exists ("v4l2"))
TestCaC( "v4l2-caching" );
- if (module_exists (p_intf, "pvr"))
+ if (module_exists ("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 ("access_realrtsp"))
TestCaCi( "realrtsp-caching", 10 );
TestCaCi( "mms-caching", 19 );
if( b_cache_equal ) ui.cachingCombo->setCurrentIndex(
if( i_comboValue )
{
CaC( "udp-caching" );
- if (module_exists (p_intf, "dvdread" ))
+ if (module_exists ("dvdread" ))
CaC( "dvdread-caching" );
- if (module_exists (p_intf, "dvdnav" ))
+ if (module_exists ("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 ("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 ( "v4l" ))
CaC( "v4l-caching" );
- if (module_exists (p_intf, "access_jack" ))
+ if (module_exists ( "access_jack" ))
CaC( "jack-input-caching" );
- if (module_exists (p_intf, "v4l2" ))
+ if (module_exists ( "v4l2" ))
CaC( "v4l2-caching" );
- if (module_exists (p_intf, "pvr" ))
+ if (module_exists ( "pvr" ))
CaC( "pvr-caching" );
#endif
//CaCi( "dv-caching" ) too short...
syncW = new SyncControls( p_intf, videoTab );
mainTabW->addTab( syncW, qtr( "Synchronization" ) );
- if( module_exists( p_intf, "v4l2" ) )
+ if( module_exists( "v4l2" ) )
{
ExtV4l2 *v4l2 = new ExtV4l2( p_intf, mainTabW );
mainTabW->addTab( v4l2, qtr( "v4l2 controls" ) );
notebook->AddPage( NetPanel( notebook ), wxU(_("Network")),
i_access_method == NET_ACCESS );
- module_t *p_module = module_find( VLC_OBJECT(p_intf), "v4l" );
- if( p_module )
+ if( module_exists( "v4l" ) )
{
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
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" );
- if( p_module )
+ if( module_exists( "pvr" ) )
{
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
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" );
- if( p_module )
+ if( module_exists( "dvb" ) )
{
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
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" );
- if( p_module )
+ if( module_exists( "dshow" ) )
{
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
notebook->AddPage( autopanel, wxU( module_get_name(p_module, 0) ),
i_access_method == CAPTURE_ACCESS );
- module_release (p_module);
}
/* Update Disc panel */
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( "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( "galaktos" ) )
{
val.psz_string = (char*)"galaktos"; text.psz_string = (char*)"GaLaktos";
var_Change( p_aout, "visual", VLC_VAR_ADDCHOICE, &val, &text );
mdate
module_config_free
module_config_get
-__module_exists
-__module_find
+module_exists
+module_find
module_get_help
__module_GetModulesNamesForCapability
module_get_name
* \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( const char * psz_name )
{
module_t **list, *module;
* \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 (const char * psz_name)
{
- module_t *p_module = __module_find( p_this, psz_name );
+ module_t *p_module = module_find (psz_name);
if( p_module )
module_release (p_module);
return p_module != NULL;