[vlc-devel] commit: libvlc_add_intf: return a value ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Aug 9 17:37:21 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Aug 9 18:15:54 2009 +0300| [77806e29067877041d1ffba0d1ce1e9db94e6f9a] | committer: Rémi Denis-Courmont
libvlc_add_intf: return a value
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=77806e29067877041d1ffba0d1ce1e9db94e6f9a
---
include/vlc/libvlc.h | 5 +++--
src/control/core.c | 7 +++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h
index 3d81e21..431b801 100644
--- a/include/vlc/libvlc.h
+++ b/include/vlc/libvlc.h
@@ -161,10 +161,11 @@ VLC_PUBLIC_API void libvlc_retain( libvlc_instance_t * );
* \param p_instance the instance
* \param name interface name, or NULL for default
* \param p_exception an initialized exception pointer
+ * \return 0 on success, -1 on error.
*/
VLC_PUBLIC_API
-void libvlc_add_intf( libvlc_instance_t *p_instance, const char *name,
- libvlc_exception_t *p_exception );
+int libvlc_add_intf( libvlc_instance_t *p_instance, const char *name,
+ libvlc_exception_t *p_exception );
/**
* Waits until an interface causes the instance to exit.
diff --git a/src/control/core.c b/src/control/core.c
index 9aece4a..e21dc97 100644
--- a/src/control/core.c
+++ b/src/control/core.c
@@ -184,11 +184,14 @@ void libvlc_release( libvlc_instance_t *p_instance )
}
}
-void libvlc_add_intf( libvlc_instance_t *p_i, const char *name,
+int libvlc_add_intf( libvlc_instance_t *p_i, const char *name,
libvlc_exception_t *p_e )
{
if( libvlc_InternalAddIntf( p_i->p_libvlc_int, name ) )
- RAISEVOID( "Interface initialization failed" );
+ {
+ libvlc_exception_raise( p_e, "Interface initialization failed" );
+ return -1;
+ }
}
void libvlc_wait( libvlc_instance_t *p_i )
More information about the vlc-devel
mailing list