From 2a227b41898fb77ce4c7f57af144834c54bd740d Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 15 May 2008 20:50:40 +0300 Subject: [PATCH] libvlc_run_interface: start and wait for an interface --- include/vlc/libvlc.h | 12 ++++++++++++ src/control/core.c | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h index 87501a4842..9d5a3db40b 100644 --- a/include/vlc/libvlc.h +++ b/include/vlc/libvlc.h @@ -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. * diff --git a/src/control/core.c b/src/control/core.c index 6f05debe1d..0daa8af5f5 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; -- 2.39.2