]> git.sesse.net Git - vlc/blobdiff - src/modules/modules.c
More access functions around module_t
[vlc] / src / modules / modules.c
index fdf123683371be952f0d51c70fcf6461585e64c9..767b537e6cb4235a0379d8553004b2dac053bdac 100644 (file)
@@ -391,6 +391,25 @@ 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;
+}
+
 /*****************************************************************************
  * module_Need: return the best module function, given a capability list.
  *****************************************************************************