* This header provides portable declarations for mutexes & conditions
*****************************************************************************
* Copyright (C) 1999, 2002 VideoLAN
- * $Id: vlc_threads.h,v 1.10 2002/08/29 23:53:22 massiot Exp $
+ * $Id: vlc_threads.h,v 1.17 2002/11/10 18:04:22 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
#include <stdio.h>
#if defined(GPROF) || defined(DEBUG)
-# include <sys/time.h>
+# ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+# endif
#endif
#if defined( PTH_INIT_IN_PTH_H ) /* GNU Pth */
#elif defined( ST_INIT_IN_ST_H ) /* State threads */
# include <st.h>
-#elif defined( WIN32 ) /* Win32 API */
-# include <process.h>
+#elif defined( WIN32 )
+# if defined( UNDER_CE )
+ /* WinCE API */
+# else
+# include <process.h> /* Win32 API */
+# endif
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) /* pthreads (like Linux & BSD) */
# include <pthread.h>
/* Thread priorities */
#ifdef SYS_DARWIN
-# define VLC_THREAD_PRIORITY_LOW 10
+# define VLC_THREAD_PRIORITY_LOW 31
# define VLC_THREAD_PRIORITY_INPUT 37
# define VLC_THREAD_PRIORITY_AUDIO 38
-# define VLC_THREAD_PRIORITY_OUTPUT 38
+# define VLC_THREAD_PRIORITY_VIDEO 31
+# define VLC_THREAD_PRIORITY_OUTPUT 31
#elif defined(WIN32)
# define VLC_THREAD_PRIORITY_LOW 0
-# define VLC_THREAD_PRIORITY_INPUT THREAD_PRIORITY_ABOVE_NORMAL
-# define VLC_THREAD_PRIORITY_AUDIO THREAD_PRIORITY_ABOVE_NORMAL
+# define VLC_THREAD_PRIORITY_INPUT THREAD_PRIORITY_TIME_CRITICAL
+# define VLC_THREAD_PRIORITY_AUDIO THREAD_PRIORITY_HIGHEST
+# define VLC_THREAD_PRIORITY_VIDEO 0
# define VLC_THREAD_PRIORITY_OUTPUT THREAD_PRIORITY_ABOVE_NORMAL
#else
# define VLC_THREAD_PRIORITY_LOW 0
# define VLC_THREAD_PRIORITY_INPUT 0
# define VLC_THREAD_PRIORITY_AUDIO 0
+# define VLC_THREAD_PRIORITY_VIDEO 0
# define VLC_THREAD_PRIORITY_OUTPUT 0
#endif
} vlc_cond_t;
#elif defined( ST_INIT_IN_ST_H )
-typedef st_thread_t * vlc_thread_t;
+typedef st_thread_t vlc_thread_t;
typedef struct
{
- st_mutex_t * mutex;
+ st_mutex_t mutex;
vlc_object_t * p_this;
} vlc_mutex_t;
typedef struct
{
- st_cond_t * cond;
+ st_cond_t cond;
vlc_object_t * p_this;
} vlc_cond_t;