]> git.sesse.net Git - vlc/commitdiff
libvlc_run_interface: start and wait for an interface
authorRémi Denis-Courmont <rem@videolan.org>
Thu, 15 May 2008 17:50:40 +0000 (20:50 +0300)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 15 May 2008 18:09:02 +0000 (21:09 +0300)
include/vlc/libvlc.h
src/control/core.c

index 87501a4842684c9bd737b5d85fcb39af514da58c..9d5a3db40b9155efb42852106f65bb8cd45f3900 100644 (file)
@@ -145,6 +145,18 @@ VLC_PUBLIC_API void libvlc_release( libvlc_instance_t * );
  */
 VLC_PUBLIC_API void libvlc_retain( libvlc_instance_t * );
 
+/**
+ * Try to start a user interface for the libvlc instance, and wait until the
+ * user exits.
+ *
+ * \param p_instance the instance
+ * \param name interface name, or NULL for default
+ * \param p_exception an initialized exception pointer
+ */
+VLC_PUBLIC_API
+void libvlc_run_interface( libvlc_instance_t *p_instance, const char *name,
+                           libvlc_exception_t *p_exception );
+
 /**
  * Retrieve libvlc version.
  *
index 6f05debe1d9316dde6c32caaf359f6eafb0e05e2..0daa8af5f55790298e06f268e39354fc03d6c609 100644 (file)
@@ -170,6 +170,13 @@ void libvlc_release( libvlc_instance_t *p_instance )
     }
 }
 
+void libvlc_run_interface( libvlc_instance_t *p_i, const char *name,
+                           libvlc_exception_t *p_e )
+{
+    if( libvlc_InternalAddIntf( p_i->p_libvlc_int, name, true, true, 0, NULL ) )
+        RAISEVOID( "Interface initialization failed" );
+}
+
 int libvlc_get_vlc_id( libvlc_instance_t *p_instance )
 {
     return p_instance->p_libvlc_int->i_object_id;