[vlc-devel] commit: libvlc_run_interface: start and wait for an interface ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu May 15 20:24:44 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Thu May 15 20:50:40 2008 +0300| [2a227b41898fb77ce4c7f57af144834c54bd740d]
libvlc_run_interface: start and wait for an interface
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2a227b41898fb77ce4c7f57af144834c54bd740d
---
include/vlc/libvlc.h | 12 ++++++++++++
src/control/core.c | 7 +++++++
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h
index 87501a4..9d5a3db 100644
--- a/include/vlc/libvlc.h
+++ b/include/vlc/libvlc.h
@@ -146,6 +146,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.
*
* Example: "0.9.0-git Grishenko"
diff --git a/src/control/core.c b/src/control/core.c
index 6f05deb..0daa8af 100644
--- a/src/control/core.c
+++ b/src/control/core.c
@@ -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;
More information about the vlc-devel
mailing list