]> git.sesse.net Git - vlc/commitdiff
* src/misc/messages.c: don't try to decorate logs on win32.
authorGildas Bazin <gbazin@videolan.org>
Mon, 30 Dec 2002 17:36:01 +0000 (17:36 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 30 Dec 2002 17:36:01 +0000 (17:36 +0000)
* include/vlc_common.h, include/vlc_threads.h: we now use different
thread priorities for WinNT/2k/XP or Win9x/Me.

include/vlc_common.h
include/vlc_threads.h
src/misc/messages.c

index e431f660781818d992d196fdfb335ca8f9f6588b..e4eaff3931ff4c22913b07c1f632a7583d844bbe 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.46 2002/12/27 15:31:55 sam Exp $
+ * $Id: vlc_common.h,v 1.47 2002/12/30 17:36:01 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -283,6 +283,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
 #if defined( WIN32 ) || defined( UNDER_CE )
 #   define WIN32_LEAN_AND_MEAN
 #   include <windows.h>
+#   define IS_WINNT ( GetVersion() < 0x80000000 )
 #endif
 
 #include "vlc_threads.h"
@@ -578,6 +579,9 @@ typedef long long _off_t;
 typedef _off_t off_t;
 #           define _OFF_T_
 #       else
+#           ifdef off_t
+#               undef off_t
+#           endif
 #           define off_t long long
 #       endif
 #   endif
index 255eec6fc605de735065121cb58f32cc591165b8..4c908e218db678214fc146304f2100b36259ccab 100644 (file)
@@ -3,7 +3,7 @@
  * This header provides portable declarations for mutexes & conditions
  *****************************************************************************
  * Copyright (C) 1999, 2002 VideoLAN
- * $Id: vlc_threads.h,v 1.18 2002/11/11 14:39:11 sam Exp $
+ * $Id: vlc_threads.h,v 1.19 2002/12/30 17:36:01 gbazin Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
 #   define VLC_THREAD_PRIORITY_OUTPUT 31
 
 #elif defined(WIN32) || defined(UNDER_CE)
+/* Define different priorities for WinNT/2K/XP and Win9x/Me */
 #   define VLC_THREAD_PRIORITY_LOW 0
-#   define VLC_THREAD_PRIORITY_INPUT THREAD_PRIORITY_TIME_CRITICAL
-#   define VLC_THREAD_PRIORITY_AUDIO THREAD_PRIORITY_HIGHEST
+#   define VLC_THREAD_PRIORITY_INPUT \
+        (IS_WINNT ? THREAD_PRIORITY_TIME_CRITICAL : 0)
+#   define VLC_THREAD_PRIORITY_AUDIO \
+        (IS_WINNT ? THREAD_PRIORITY_HIGHEST : 0)
 #   define VLC_THREAD_PRIORITY_VIDEO 0
-#   define VLC_THREAD_PRIORITY_OUTPUT THREAD_PRIORITY_ABOVE_NORMAL
+#   define VLC_THREAD_PRIORITY_OUTPUT \
+        (IS_WINNT ? THREAD_PRIORITY_ABOVE_NORMAL : 0)
+#   define VLC_THREAD_PRIORITY_HIGHEST \
+        (IS_WINNT ? THREAD_PRIORITY_TIME_CRITICAL : 0)
 
 #else
 #   define VLC_THREAD_PRIORITY_LOW 0
index 50f17a0fca5f1c6ac350ce47efe5eaa941a2c8a2..40660fd4ffb0b2e01c7bc83238eed8f92202961a 100644 (file)
@@ -4,7 +4,7 @@
  * modules, especially intf modules. See config.h for output configuration.
  *****************************************************************************
  * Copyright (C) 1998-2002 VideoLAN
- * $Id: messages.c,v 1.27 2002/12/18 12:18:06 sam Exp $
+ * $Id: messages.c,v 1.28 2002/12/30 17:36:01 gbazin Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -408,12 +408,20 @@ static void FlushMsg ( msg_bank_t *p_bank )
  *****************************************************************************/
 static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item )
 {
+#ifndef WIN32
 #   define COL(x)  "\033[" #x ";1m"
 #   define RED     COL(31)
 #   define GREEN   COL(32)
 #   define YELLOW  COL(33)
 #   define WHITE   COL(37)
 #   define GRAY    "\033[0m"
+#else
+#   define RED     ""
+#   define GREEN   ""
+#   define YELLOW  ""
+#   define WHITE   ""
+#   define GRAY    ""
+#endif
 
 #ifdef UNDER_CE
     int i_dummy;