]> git.sesse.net Git - vlc/commitdiff
The vlc now compiles when cross-compiling with Mingw32. It segfaults
authorXavier Marchesini <xav@videolan.org>
Wed, 3 Oct 2001 03:32:05 +0000 (03:32 +0000)
committerXavier Marchesini <xav@videolan.org>
Wed, 3 Oct 2001 03:32:05 +0000 (03:32 +0000)
while browsing plugins (modules.o, it seems).

Oh, btw, stats won't work under win32, since <sys/times.h> and the
function times don't seem to exist.

Sam, may I speak with you tomorrow about modules.c ?

src/input/input.c
src/video_decoder/video_parser.c
src/video_output/video_output.c

index 45b70e7dbe632cf29e10ec5d25f47651ee732d21..3443730a7eb9cab698b5a3982b1bf5d9fffb42a0 100644 (file)
@@ -4,7 +4,7 @@
  * decoders.
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input.c,v 1.136 2001/10/03 02:19:21 tcastley Exp $
+ * $Id: input.c,v 1.137 2001/10/03 03:32:05 xav Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
 #   include <sys/socket.h>
 #endif
 
+#ifdef WIN32
+#else
 #include <sys/times.h>
+#endif
 
 #include "config.h"
 #include "common.h"
@@ -492,6 +495,7 @@ static void EndThread( input_thread_t * p_input )
     if( p_main->b_stats )
     {
         /* Display statistics */
+        #ifndef WIN32
         struct tms  cpu_usage;
         times( &cpu_usage );
 
@@ -500,6 +504,7 @@ static void EndThread( input_thread_t * p_input )
                       cpu_usage.tms_utime, cpu_usage.tms_stime );
 
         input_DumpStream( p_input );
+        #endif
     }
 
     /* Free all ES and destroy all decoder threads */
index af4817c71993a188e36dbace3204c2aedd89a5ce..9b939066b8e4acc1ce1473334f5abbb4a26b5170 100644 (file)
@@ -2,7 +2,7 @@
  * video_parser.c : video parser thread
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_parser.c,v 1.6 2001/10/01 16:18:49 massiot Exp $
+ * $Id: video_parser.c,v 1.7 2001/10/03 03:32:05 xav Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -36,7 +36,9 @@
 #include <errno.h>
 #include <string.h>
 
+#ifndef WIN32
 #include <sys/times.h>
+#endif
 
 #include "config.h"
 #include "common.h"
@@ -316,6 +318,7 @@ static void EndThread( vpar_thread_t *p_vpar )
 
     if( p_main->b_stats )
     {
+        #ifndef WIN32
         struct tms cpu_usage;
         times( &cpu_usage );
 
@@ -356,6 +359,7 @@ static void EndThread( vpar_thread_t *p_vpar )
                       S.i_scalable_mode ? "scalable" : "non-scalable",
                       S.i_matrix_coefficients );
 #undef S
+        #endif
     }
 
     /* Dispose of matrices if they have been allocated. */
index 8623c003e23a27abdc65ea372e8b9ce6aec7f5b7..ff49f65834a9e1bc8ea7fc5b5b8dfd9532d76fda 100644 (file)
@@ -5,7 +5,7 @@
  * thread, and destroy a previously oppened video output thread.
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: video_output.c,v 1.141 2001/10/01 16:18:49 massiot Exp $
+ * $Id: video_output.c,v 1.142 2001/10/03 03:32:05 xav Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -34,7 +34,9 @@
 #include <stdio.h>                                              /* sprintf() */
 #include <string.h>                                            /* strerror() */
 
+#ifndef WIN32
 #include <sys/times.h>
+#endif
 
 #include "config.h"
 #include "common.h"
@@ -1358,6 +1360,7 @@ static void EndThread( vout_thread_t *p_vout )
 
     if( p_main->b_stats )
     {
+        #ifndef WIN32
         struct tms cpu_usage;
         times( &cpu_usage );
 
@@ -1367,6 +1370,7 @@ static void EndThread( vout_thread_t *p_vout )
                       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 */