From: RĂ©mi Denis-Courmont Date: Thu, 15 May 2008 17:50:40 +0000 (+0300) Subject: libvlc_run_interface: start and wait for an interface X-Git-Tag: 0.9.0-test0~934 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=2a227b41898fb77ce4c7f57af144834c54bd740d;p=vlc libvlc_run_interface: start and wait for an interface --- 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;