1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

cygwin patch by (Felix Buenemann <atmosfear at users dot sourceforge dot net>)

Originally committed as revision 883 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Felix Bünemann 2002-08-30 19:34:55 +00:00 committed by Michael Niedermayer
parent c7e079314b
commit 3f027ca76c
4 changed files with 54 additions and 7 deletions

16
configure vendored
View File

@ -51,6 +51,7 @@ mp3lame="no"
a52="yes" a52="yes"
a52bin="no" a52bin="no"
win32="no" win32="no"
cygwin="no"
lshared="no" lshared="no"
extralibs="-lm" extralibs="-lm"
simpleidct="yes" simpleidct="yes"
@ -93,6 +94,16 @@ SHFLAGS="-dynamiclib"
extralibs="" extralibs=""
darwin="yes" 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 esac
@ -454,6 +465,11 @@ if test "$win32" = "yes" ; then
echo "CONFIG_WIN32=yes" >> config.mak echo "CONFIG_WIN32=yes" >> config.mak
fi fi
if test "$cygwin" = "yes" ; then
# setup correct exesuffix
echo "CONFIG_WIN32=yes" >> config.mak
fi
if test "$darwin" = "yes"; then if test "$darwin" = "yes"; then
echo "#define CONFIG_DARWIN 1" >> $TMPH echo "#define CONFIG_DARWIN 1" >> $TMPH
echo "CONFIG_DARWIN=yes" >> config.mak echo "CONFIG_DARWIN=yes" >> config.mak

29
cygwin_inttypes.h Normal file
View File

@ -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 */

View File

@ -943,15 +943,17 @@ static int av_encode(AVFormatContext **output_files,
/* if none, if is finished */ /* if none, if is finished */
if (file_index < 0) { if (file_index < 0) {
if (stream_no_data) { if (stream_no_data) {
#ifndef CONFIG_WIN32 #ifndef CONFIG_WIN32 /* no usleep in VisualC ? */
#ifndef __BEOS__ #ifdef __BEOS__
snooze(10 * 1000); /* mmu_man */ /* in microsec */
#elif defined(__CYGWIN__)
usleep(10 * 1000);
#else
struct timespec ts; struct timespec ts;
ts.tv_sec = 0; ts.tv_sec = 0;
ts.tv_nsec = 1000 * 1000 * 10; ts.tv_nsec = 1000 * 1000 * 10;
nanosleep(&ts, 0); nanosleep(&ts, 0);
#else
snooze(10 * 1000); /* mmu_man */ /* in microsec */
#endif #endif
#endif #endif
stream_no_data = 0; stream_no_data = 0;

View File

@ -43,18 +43,18 @@ pcm_dst="$datadir/out.wav"
# create the data directory if it does not exists # create the data directory if it does not exists
mkdir -p $datadir mkdir -p $datadir
function do_ffmpeg () do_ffmpeg()
{ {
f="$1" f="$1"
shift shift
echo $ffmpeg -bitexact $* echo $ffmpeg -bitexact $*
$ffmpeg -bitexact -benchmark $* > $datadir/bench.tmp $ffmpeg -bitexact -benchmark $* > $datadir/bench.tmp
md5sum $f >> $logfile md5sum -b $f >> $logfile
expr "`cat $datadir/bench.tmp`" : '.*utime=\(.*s\)' > $datadir/bench2.tmp expr "`cat $datadir/bench.tmp`" : '.*utime=\(.*s\)' > $datadir/bench2.tmp
echo `cat $datadir/bench2.tmp` $f >> $benchfile echo `cat $datadir/bench2.tmp` $f >> $benchfile
} }
function do_ffmpeg_crc () do_ffmpeg_crc()
{ {
f="$1" f="$1"
shift shift