+int libvlc_add_intf( libvlc_instance_t *p_i, const char *name )
+{
+ if( libvlc_InternalAddIntf( p_i->p_libvlc_int, name ))
+ {
+ if( name )
+ {
+ libvlc_printerr("interface \"%s\" initialization failed",
+ name );
+ }
+ else
+ {
+ libvlc_printerr("default interface initialization failed");
+ }
+ return -1;
+ }
+ return 0;
+}
+
+void libvlc_set_exit_handler( libvlc_instance_t *p_i, void (*cb) (void *),
+ void *data )
+{
+ libvlc_int_t *p_libvlc = p_i->p_libvlc_int;
+ libvlc_SetExitHandler( p_libvlc, cb, data );
+}
+
+void libvlc_wait( libvlc_instance_t *p_i )
+{
+ libvlc_int_t *p_libvlc = p_i->p_libvlc_int;
+ libvlc_InternalWait( p_libvlc );
+}
+
+void libvlc_set_user_agent (libvlc_instance_t *p_i,
+ const char *name, const char *http)
+{
+ libvlc_int_t *p_libvlc = p_i->p_libvlc_int;
+ char *str;
+
+ var_SetString (p_libvlc, "user-agent", name);
+ if ((http != NULL)
+ && (asprintf (&str, "%s LibVLC/"PACKAGE_VERSION, http) != -1))
+ {
+ var_SetString (p_libvlc, "http-user-agent", str);
+ free (str);
+ }
+}
+
+const char * libvlc_get_version(void)
+{
+ return VERSION_MESSAGE;
+}
+
+const char * libvlc_get_compiler(void)
+{
+ return VLC_Compiler();
+}
+
+const char * libvlc_get_changeset(void)
+{
+ extern const char psz_vlc_changeset[];
+ return psz_vlc_changeset;
+}
+
+void libvlc_free( void *ptr )
+{
+ free( ptr );
+}
+
+static libvlc_module_description_t *module_description_list_get(
+ libvlc_instance_t *p_instance, const char *capability )
+{
+ VLC_UNUSED( p_instance );
+ libvlc_module_description_t *p_list = NULL,
+ *p_actual = NULL,
+ *p_previous = NULL;
+ module_t **module_list = module_list_get( NULL );
+
+ for (size_t i = 0; module_list[i]; i++)
+ {
+ module_t *p_module = module_list[i];
+
+ if ( !module_provides( p_module, capability ) )
+ continue;
+
+ p_actual = ( libvlc_module_description_t * ) malloc( sizeof( libvlc_module_description_t ) );
+ if ( p_actual == NULL )
+ {
+ libvlc_printerr( "Not enough memory" );
+ libvlc_module_description_list_release( p_list );
+ module_list_free( module_list );
+ return NULL;
+ }
+
+ if ( p_list == NULL )
+ p_list = p_actual;
+
+ const char* name = module_get_object( p_module );
+ const char* shortname = module_get_name( p_module, false );
+ const char* longname = module_get_name( p_module, true );
+ const char* help = module_get_help( p_module );
+ p_actual->psz_name = name ? strdup( name ) : NULL;
+ p_actual->psz_shortname = shortname ? strdup( shortname ) : NULL;
+ p_actual->psz_longname = longname ? strdup( longname ) : NULL;
+ p_actual->psz_help = help ? strdup( help ) : NULL;
+
+ p_actual->p_next = NULL;
+ if ( p_previous )
+ p_previous->p_next = p_actual;
+ p_previous = p_actual;
+ }
+
+ module_list_free( module_list );
+ return p_list;
+}
+
+void libvlc_module_description_list_release( libvlc_module_description_t *p_list )
+{
+ libvlc_module_description_t *p_actual, *p_before;
+ p_actual = p_list;
+
+ while ( p_actual )
+ {
+ free( p_actual->psz_name );
+ free( p_actual->psz_shortname );
+ free( p_actual->psz_longname );
+ free( p_actual->psz_help );
+ p_before = p_actual;
+ p_actual = p_before->p_next;
+ free( p_before );
+ }
+}
+
+libvlc_module_description_t *libvlc_audio_filter_list_get( libvlc_instance_t *p_instance )
+{
+ return module_description_list_get( p_instance, "audio filter" );
+}
+
+libvlc_module_description_t *libvlc_video_filter_list_get( libvlc_instance_t *p_instance )
+{
+ return module_description_list_get( p_instance, "video filter2" );
+}
+
+int64_t libvlc_clock(void)