#define VLC_STATIC_MUTEX PTHREAD_MUTEX_INITIALIZER
typedef pthread_cond_t vlc_cond_t;
typedef pthread_key_t vlc_threadvar_t;
+typedef struct vlc_timer_t vlc_timer_t;
+struct vlc_timer_t
+{
+ timer_t handle;
+ void (*func) (vlc_timer_t *, void *);
+ void *data;
+};
#elif defined( WIN32 )
typedef struct
typedef HANDLE vlc_cond_t;
typedef DWORD vlc_threadvar_t;
+typedef struct vlc_timer_t vlc_timer_t;
+struct vlc_timer_t
+{
+ HANDLE handle;
+ void (*func) (vlc_timer_t *, void *);
+ void *data;
+ unsigned overrun;
+ CRITICAL_SECTION serializer;
+ LONG volatile counter;
+};
#endif
VLC_EXPORT( void, vlc_join, (vlc_thread_t, void **) );
VLC_EXPORT (void, vlc_control_cancel, (int cmd, ...));
+VLC_EXPORT( int, vlc_timer_create, (vlc_timer_t *, void (*) (vlc_timer_t *, void *), void *) LIBVLC_USED );
+VLC_EXPORT( void, vlc_timer_destroy, (vlc_timer_t *) );
+VLC_EXPORT( void, vlc_timer_schedule, (vlc_timer_t *, bool, mtime_t, mtime_t) );
+VLC_EXPORT( unsigned, vlc_timer_getoverrun, (const vlc_timer_t *) );
+
#ifndef LIBVLC_USE_PTHREAD_CANCEL
enum {
VLC_DO_CANCEL,