*****************************************************************************/
#include <vlc/vlc.h>
+#include "../libvlc.h"
/* Some faulty libcs have a broken struct dirent when _FILE_OFFSET_BITS
* is set to 64. Don't try to be cleverer. */
#include "vlc_stream.h"
#include "vlc_access.h"
#include "vlc_demux.h"
+#include "vlc_codec.h"
#include "vlc_vout.h"
#include "vlc_vout_synchro.h"
p_bank->b_cache = p_bank->b_cache_dirty =
p_bank->b_cache_delete = VLC_FALSE;
- /*
- * Store the symbols to be exported
- */
-#if defined (HAVE_DYNAMIC_PLUGINS) && !defined (HAVE_SHARED_LIBVLC)
- STORE_SYMBOLS( &p_bank->symbols );
-#endif
-
/* Everything worked, attach the object */
p_libvlc_global->p_module_bank = p_bank;
vlc_object_attach( p_bank, p_libvlc_global );
#endif
}
+/*****************************************************************************
+ * module_IsCapable: checks whether a module implements a capability.
+ *****************************************************************************/
+vlc_bool_t module_IsCapable( const module_t *m, const char *cap )
+{
+ return !strcmp( m->psz_capability, cap );
+}
+
+/*****************************************************************************
+ * module_GetObjName: internal name of a module.
+ *****************************************************************************/
+const char *module_GetObjName( const module_t *m )
+{
+ return m->psz_object_name;
+}
+
+/*****************************************************************************
+ * module_GetName: human-friendly name of a module.
+ *****************************************************************************/
+const char *module_GetName( const module_t *m, vlc_bool_t long_name )
+{
+ if( long_name && ( m->psz_longname != NULL) )
+ return m->psz_longname;
+
+ return m->psz_shortname ?: m->psz_object_name;
+}
+
+const char *module_GetHelp( const module_t *m )
+{
+ return m->psz_help;
+}
+
/*****************************************************************************
* module_Need: return the best module function, given a capability list.
*****************************************************************************
p_module = (module_t *)p_all->p_values[i_which_module].p_object;
/* Test that this module can do what we need */
- if( strcmp( p_module->psz_capability, psz_capability ) )
+ if( !module_IsCapable( p_module, psz_capability ) )
{
/* Don't recurse through the sub-modules because vlc_list_find()
* will list them anyway. */
}
free( (void*)p_module->psz_object_name );
- free( (void*)p_module->psz_capability );
+ free( p_module->psz_capability );
free( (void*)p_module->psz_shortname );
free( (void*)p_module->psz_longname );
free( (void*)p_module->psz_help );
p_cache->pf_activate = p_module->pf_activate;
p_cache->pf_deactivate = p_module->pf_deactivate;
-#ifndef HAVE_SHARED_LIBVLC
- p_cache->p_symbols = p_module->p_symbols;
-#endif
p_cache->handle = p_module->handle;
for( i_submodule = 0; i_submodule < p_module->i_children; i_submodule++ )
module_t *p_cchild = (module_t*)p_cache->pp_children[i_submodule];
p_cchild->pf_activate = p_child->pf_activate;
p_cchild->pf_deactivate = p_child->pf_deactivate;
-#ifndef HAVE_SHARED_LIBVLC
- p_cchild->p_symbols = p_child->p_symbols;
-#endif
}
p_cache->b_loaded = VLC_TRUE;