]> git.sesse.net Git - vlc/blobdiff - include/vlc/libvlc.h
libvlc_media_player_set_pause: race-free pause/resume function
[vlc] / include / vlc / libvlc.h
index 480774e1949b640b9a1e3b2c43f53a4c8bbd52f1..eb6414aafce228716eb07cc09a7bdb24ba8f71f7 100644 (file)
@@ -73,7 +73,6 @@ extern "C" {
  */
 
 /** \defgroup libvlc_error LibVLC error handling
- * \ingroup libvlc_error
  * @{
  */
 
@@ -97,14 +96,14 @@ VLC_PUBLIC_API void libvlc_clearerr (void);
 /**
  * Sets the LibVLC error status and message for the current thread.
  * Any previous error is overriden.
- * @return a nul terminated string in any case
+ * \return a nul terminated string in any case
  */
 const char *libvlc_vprinterr (const char *fmt, va_list ap);
 
 /**
  * Sets the LibVLC error status and message for the current thread.
  * Any previous error is overriden.
- * @return a nul terminated string in any case
+ * \return a nul terminated string in any case
  */
 const char *libvlc_printerr (const char *fmt, ...);
 
@@ -146,6 +145,22 @@ VLC_PUBLIC_API void libvlc_retain( libvlc_instance_t *p_instance );
 VLC_PUBLIC_API
 int libvlc_add_intf( libvlc_instance_t *p_instance, const char *name );
 
+/**
+ * Registers a callback for the LibVLC exit event. This is mostly useful if
+ * you have started at least one interface with libvlc_add_intf().
+ * Typically, this function will wake up your application main loop (from
+ * another thread).
+ *
+ * \param p_instance LibVLC instance
+ * \param cb callback to invoke when LibVLC wants to exit
+ * \param opaque data pointer for the callback
+ * \warning This function and libvlc_wait() cannot be used at the same time.
+ * Use either or none of them but not both.
+ */
+VLC_PUBLIC_API
+void libvlc_set_exit_handler( libvlc_instance_t *p_instance,
+                              void (*cb) (void *), void *opaque );
+
 /**
  * Waits until an interface causes the instance to exit.
  * You should start at least one interface first, using libvlc_add_intf().