diff options
author | Felix Bünemann <atmosfear@users.sourceforge.net> | 2002-08-30 19:34:55 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-08-30 19:34:55 +0000 |
commit | 3f027ca76cb1424fa1c80bf76499e089921f537b (patch) | |
tree | 427dd2163284f0783208fb6eb457051fedf693c7 | |
parent | c7e079314bc47ed09826ec343f4582226c6ed296 (diff) | |
download | ffmpeg-3f027ca76cb1424fa1c80bf76499e089921f537b.tar.gz |
cygwin patch by (Felix Buenemann <atmosfear at users dot sourceforge dot net>)
Originally committed as revision 883 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-x | configure | 16 | ||||
-rw-r--r-- | cygwin_inttypes.h | 29 | ||||
-rw-r--r-- | ffmpeg.c | 10 | ||||
-rwxr-xr-x | tests/regression.sh | 6 |
4 files changed, 54 insertions, 7 deletions
@@ -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 index 0000000000..0c17b1d1d1 --- /dev/null +++ b/cygwin_inttypes.h @@ -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 */ + @@ -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; diff --git a/tests/regression.sh b/tests/regression.sh index b122629c16..923f57c927 100755 --- a/tests/regression.sh +++ b/tests/regression.sh @@ -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 |