X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcontrol%2Flibvlc_internal.h;h=c079f8dba9f7fe5787d477ed12752259c32f4cc0;hb=31150350679286f873c94fc670ddbafddaed7163;hp=ef97eff54f8f0a022941ea68f02b2d0a7af39674;hpb=5995f330ba3032e8b3fa70dcb8d1a1648b68f3db;p=vlc diff --git a/src/control/libvlc_internal.h b/src/control/libvlc_internal.h index ef97eff54f..c079f8dba9 100644 --- a/src/control/libvlc_internal.h +++ b/src/control/libvlc_internal.h @@ -36,6 +36,10 @@ #include +/* Note well: this header is included from LibVLC core. + * Therefore, static inline functions MUST NOT call LibVLC functions here + * (this can cause linkage failure on some platforms). */ + /*************************************************************************** * Internal creation and destruction functions ***************************************************************************/ @@ -46,6 +50,7 @@ VLC_EXPORT (void, libvlc_InternalDestroy, ( libvlc_int_t * ) ); VLC_EXPORT (int, libvlc_InternalAddIntf, ( libvlc_int_t *, const char * ) ); VLC_EXPORT (void, libvlc_InternalWait, ( libvlc_int_t * ) ); +VLC_EXPORT (void, libvlc_SetExitHandler, ( libvlc_int_t *, void (*) (void *), void * ) ); typedef void (*libvlc_vlm_release_func_t)( libvlc_instance_t * ) ; @@ -81,16 +86,14 @@ void libvlc_deinit_threads (void); /* Events */ libvlc_event_manager_t * libvlc_event_manager_new( - void * p_obj, libvlc_instance_t * p_libvlc_inst, - libvlc_exception_t *p_e ); + void * p_obj, libvlc_instance_t * p_libvlc_inst ); void libvlc_event_manager_release( libvlc_event_manager_t * p_em ); void libvlc_event_manager_register_event_type( libvlc_event_manager_t * p_em, - libvlc_event_type_t event_type, - libvlc_exception_t * p_e ); + libvlc_event_type_t event_type ); void libvlc_event_send( libvlc_event_manager_t * p_em, @@ -99,14 +102,16 @@ void libvlc_event_send( void libvlc_event_attach_async( libvlc_event_manager_t * p_event_manager, libvlc_event_type_t event_type, libvlc_callback_t pf_callback, - void *p_user_data, - libvlc_exception_t *p_e ); + void *p_user_data ); -/* Exception shorcuts */ +static inline libvlc_time_t from_mtime(mtime_t time) +{ + return (time + 500ULL)/ 1000ULL; +} -#define RAISENULL( ... ) { libvlc_exception_raise( p_e, __VA_ARGS__ ); \ - return NULL; } -#define RAISEZERO( ... ) { libvlc_exception_raise( p_e, __VA_ARGS__ ); \ - return 0; } +static inline mtime_t to_mtime(libvlc_time_t time) +{ + return time * 1000ULL; +} #endif