]> git.sesse.net Git - ffmpeg/commitdiff
cygwin patch by (Felix Buenemann <atmosfear at users dot sourceforge dot net>)
authorFelix Bünemann <atmosfear@users.sourceforge.net>
Fri, 30 Aug 2002 19:34:55 +0000 (19:34 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 30 Aug 2002 19:34:55 +0000 (19:34 +0000)
Originally committed as revision 883 to svn://svn.ffmpeg.org/ffmpeg/trunk

configure
cygwin_inttypes.h [new file with mode: 0644]
ffmpeg.c
tests/regression.sh

index 41856b6681c61564a4c10f8898e6eff4bc836fce..a9bd98b15590bd157b4e0843e00146f6dd447f37 100755 (executable)
--- a/configure
+++ b/configure
@@ -51,6 +51,7 @@ mp3lame="no"
 a52="yes"
 a52bin="no"
 win32="no"
+cygwin="no"
 lshared="no"
 extralibs="-lm"
 simpleidct="yes"
@@ -93,6 +94,16 @@ SHFLAGS="-dynamiclib"
 extralibs=""
 darwin="yes"
 ;;
+CYGWIN*)
+v4l="no"
+audio_oss="yes"
+extralibs=""
+cygwin="yes"
+test -f /usr/include/inttypes.h || \
+test -f /usr/local/include/inttypes.h || \
+echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
+     "/usr/include/inttypes.h !!!"
+;;
 *) ;;
 esac
 
@@ -454,6 +465,11 @@ if test "$win32" = "yes" ; then
   echo "CONFIG_WIN32=yes" >> config.mak
 fi
 
+if test "$cygwin" = "yes" ; then
+  # setup correct exesuffix
+  echo "CONFIG_WIN32=yes" >> config.mak
+fi
+
 if test "$darwin" = "yes"; then
   echo "#define CONFIG_DARWIN 1"  >> $TMPH
   echo "CONFIG_DARWIN=yes" >> config.mak
diff --git a/cygwin_inttypes.h b/cygwin_inttypes.h
new file mode 100644 (file)
index 0000000..0c17b1d
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef _CYGWIN_INTTYPES_H
+#define _CYGWIN_INTTYPES_H
+/* /usr/include/inttypes.h for CYGWIN
+ * Copyleft 2001-2002 by Felix Buenemann
+ * <atmosfear at users.sourceforge.net>
+ *
+ * Should be installed into /usr/include
+ * as inttypes.h
+ */
+#if 0
+typedef char *  caddr_t;
+typedef char int8_t;
+typedef unsigned char u_int8_t;
+typedef short int16_t;
+typedef unsigned short u_int16_t;
+typedef int int32_t;
+typedef unsigned int u_int32_t;
+typedef long long int64_t;
+typedef unsigned long long u_int64_t;
+typedef int32_t register_t;
+#else
+#include <sys/types.h>
+#endif /* 0/1 */
+typedef u_int8_t uint8_t;
+typedef u_int16_t uint16_t;
+typedef u_int32_t uint32_t;
+typedef u_int64_t uint64_t;
+#endif /* _CYGWIN_INTTYPES_H */
+
index 7816da9391a7847ce7173e1bb0955335f5343c1e..d95bb1813bd2d7c7e42da6c04abe5386291563af 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -943,15 +943,17 @@ static int av_encode(AVFormatContext **output_files,
         /* if none, if is finished */
         if (file_index < 0) {
             if (stream_no_data) {
-#ifndef CONFIG_WIN32
-#ifndef __BEOS__
+#ifndef CONFIG_WIN32 /* no usleep in VisualC ? */
+#ifdef __BEOS__
+                snooze(10 * 1000); /* mmu_man */ /* in microsec */
+#elif defined(__CYGWIN__)
+                usleep(10 * 1000); 
+#else
                 struct timespec ts;
 
                 ts.tv_sec = 0;
                 ts.tv_nsec = 1000 * 1000 * 10;
                 nanosleep(&ts, 0);
-#else
-               snooze(10 * 1000); /* mmu_man */ /* in microsec */
 #endif
 #endif
                 stream_no_data = 0;
index b122629c16b6550904d6df745602e494d9057f5f..923f57c927e160a5c9fa54415362a0ccad9b8ee4 100755 (executable)
@@ -43,18 +43,18 @@ pcm_dst="$datadir/out.wav"
 # create the data directory if it does not exists
 mkdir -p $datadir
 
-function do_ffmpeg ()
+do_ffmpeg()
 {
     f="$1"
     shift
     echo $ffmpeg -bitexact $*
     $ffmpeg -bitexact -benchmark $* > $datadir/bench.tmp
-    md5sum $f >> $logfile
+    md5sum -b $f >> $logfile
     expr "`cat $datadir/bench.tmp`" : '.*utime=\(.*s\)' > $datadir/bench2.tmp
     echo `cat $datadir/bench2.tmp` $f >> $benchfile
 }
 
-function do_ffmpeg_crc ()
+do_ffmpeg_crc()
 {
     f="$1"
     shift