]> git.sesse.net Git - vlc/blobdiff - src/video_output/video_output.c
* Added error checking in pthread wrapper ; as a result, intf_msg.h must
[vlc] / src / video_output / video_output.c
index ff49f65834a9e1bc8ea7fc5b5b8dfd9532d76fda..8629902b8acde418a3d2ee1361080acb91221a38 100644 (file)
@@ -4,8 +4,8 @@
  * It includes functions allowing to open a new thread, send pictures to a
  * thread, and destroy a previously oppened video output thread.
  *****************************************************************************
- * Copyright (C) 2000 VideoLAN
- * $Id: video_output.c,v 1.142 2001/10/03 03:32:05 xav Exp $
+ * Copyright (C) 2000-2001 VideoLAN
+ * $Id: video_output.c,v 1.144 2001/11/28 15:08:06 massiot Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
 #include <stdio.h>                                              /* sprintf() */
 #include <string.h>                                            /* strerror() */
 
-#ifndef WIN32
-#include <sys/times.h>
+#ifdef HAVE_SYS_TIMES_H
+#   include <sys/times.h>
 #endif
 
 #include "config.h"
 #include "common.h"
+#include "intf_msg.h"
 #include "threads.h"
 #include "mtime.h"
 #include "modules.h"
@@ -50,8 +51,6 @@
 #include "video_spu.h"
 #include "video_yuv.h"
 
-#include "intf_msg.h"
-
 #include "main.h"
 
 /*****************************************************************************
@@ -1360,17 +1359,20 @@ static void EndThread( vout_thread_t *p_vout )
 
     if( p_main->b_stats )
     {
-        #ifndef WIN32
+#ifdef HAVE_SYS_TIMES_H
         struct tms cpu_usage;
         times( &cpu_usage );
 
         intf_StatMsg( "vout info: %d loops consuming user: %d, system: %d",
                       p_vout->c_loops, cpu_usage.tms_utime, cpu_usage.tms_stime );
+#else
+        intf_StatMsg( "vout info: %d loops", p_vout->c_loops );
+#endif
+
         intf_StatMsg( "vout info: %d pictures received, discarded %d",
                       p_vout->c_pictures, p_vout->c_late_pictures );
         intf_StatMsg( "vout info: average display jitter of %lld µs",
                       p_vout->display_jitter );
-        #endif
     }
 
     /* Destroy all remaining pictures and subpictures */