X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc%2Flibvlc.h;h=eb6414aafce228716eb07cc09a7bdb24ba8f71f7;hb=f331c5a219d5dcd9edeeeecf52643e9cda7c2e37;hp=cd48aaa2eca58be2ec4b554ab24affd7caabf860;hpb=2c4f04e29d3dc5f0dbeac845f5b2fb71a1f775c8;p=vlc diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h index cd48aaa2ec..eb6414aafc 100644 --- a/include/vlc/libvlc.h +++ b/include/vlc/libvlc.h @@ -145,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().