diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-05-13 17:22:10 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-05-13 17:22:10 +0000 |
commit | 287886e656bab13d801def158b202dcf5d3081b7 (patch) | |
tree | 101b704f5cb99859f90d1e15bb94b6f3ba4f946d /Game/Code/lib/ffmpeg | |
parent | c7aa1aec5328e8e2c5d42f9b34567cc6c4eadc03 (diff) | |
download | usdx-287886e656bab13d801def158b202dcf5d3081b7.tar.gz usdx-287886e656bab13d801def158b202dcf5d3081b7.tar.xz usdx-287886e656bab13d801def158b202dcf5d3081b7.zip |
corrected ffmpeg error-codes
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1083 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/lib/ffmpeg')
-rw-r--r-- | Game/Code/lib/ffmpeg/avcodec.pas | 56 | ||||
-rw-r--r-- | Game/Code/lib/ffmpeg/swscale.pas | 6 |
2 files changed, 37 insertions, 25 deletions
diff --git a/Game/Code/lib/ffmpeg/avcodec.pas b/Game/Code/lib/ffmpeg/avcodec.pas index 79bfa0b1..277d76b9 100644 --- a/Game/Code/lib/ffmpeg/avcodec.pas +++ b/Game/Code/lib/ffmpeg/avcodec.pas @@ -42,6 +42,9 @@ uses avutil, rational, opt, + {$IFDEF UNIX} + BaseUnix, + {$ENDIF} UConfig; const @@ -3223,8 +3226,32 @@ function av_parse_video_frame_rate(frame_rate: PAVRational; {const} str: PChar): cdecl; external av__codec; {$IFEND} -(* {* error handling *} + +{$IFNDEF UNIX} +const + ENOENT = 2; + EIO = 5; + ENOMEM = 12; + EINVAL = 22; + EDOM = 33; + {$IFDEF MSWINDOWS} + // Note: we assume that ffmpeg was compiled with MinGW. + // This must be changed if DLLs were compiled with cygwin. + ENOSYS = 40; // MSVC/MINGW: 40, CYGWIN: 88, LINUX/FPC: 38 + EILSEQ = 42; // MSVC/MINGW: 42, CYGWIN: 138, LINUX/FPC: 84 + {$ENDIF} +{$ENDIF} + +const +{$IF EINVAL > 0} + AVERROR_SIGN = -1; +{$ELSE} + {* Some platforms have E* and errno already negated. *} + AVERROR_SIGN = 1; +{$IFEND} + +(* #if EINVAL > 0 #define AVERROR(e) (-(e)) {**< Returns a negative error code from a POSIX error code, to return from library functions. *} #define AVUNERROR(e) (-(e)) {**< Returns a POSIX error code from a library function error return value. *} @@ -3233,27 +3260,18 @@ function av_parse_video_frame_rate(frame_rate: PAVRational; {const} str: PChar): #define AVERROR(e) (e) #define AVUNERROR(e) (e) #endif - -const - AVERROR_UNKNOWN AVERROR(EINVAL) {**< unknown error *} - AVERROR_IO AVERROR(EIO) {**< I/O error *} - AVERROR_NUMEXPECTED AVERROR(EDOM) {**< Number syntax expected in filename. *} - AVERROR_INVALIDDATA AVERROR(EINVAL) {**< invalid data found *} - AVERROR_NOMEM AVERROR(ENOMEM) {**< not enough memory *} - AVERROR_NOFMT AVERROR(EILSEQ) {**< unknown format *} - AVERROR_NOTSUPP AVERROR(ENOSYS) {**< Operation not supported. *} - AVERROR_NOENT AVERROR(ENOENT) {**< No such file or directory. *} - AVERROR_PATCHWELCOME -MKTAG('P','A','W','E') {**< Not yet implemented in FFmpeg. Patches welcome. *} *) const - AVERROR_UNKNOWN =(-1); (* unknown error *) - AVERROR_IO =(-2); (* i/o error *) - AVERROR_NUMEXPECTED =(-3); (* number syntax expected in filename *) - AVERROR_INVALIDDATA =(-4); (* invalid data found *) - AVERROR_NOMEM =(-5); (* not enough memory *) - AVERROR_NOFMT =(-6); (* unknown format *) - AVERROR_NOTSUPP =(-7); (* operation not supported *) + AVERROR_UNKNOWN = AVERROR_SIGN * EINVAL; (**< unknown error *) + AVERROR_IO = AVERROR_SIGN * EIO; (**< I/O error *) + AVERROR_NUMEXPECTED = AVERROR_SIGN * EDOM; (**< Number syntax expected in filename. *) + AVERROR_INVALIDDATA = AVERROR_SIGN * EINVAL; (**< invalid data found *) + AVERROR_NOMEM = AVERROR_SIGN * ENOMEM; (**< not enough memory *) + AVERROR_NOFMT = AVERROR_SIGN * EILSEQ; (**< unknown format *) + AVERROR_NOTSUPP = AVERROR_SIGN * ENOSYS; (**< Operation not supported. *) + AVERROR_NOENT = AVERROR_SIGN * ENOENT; {**< No such file or directory. *} + //AVERROR_PATCHWELCOME -MKTAG('P','A','W','E') {**< Not yet implemented in FFmpeg. Patches welcome. *} implementation diff --git a/Game/Code/lib/ffmpeg/swscale.pas b/Game/Code/lib/ffmpeg/swscale.pas index bad870b7..56228c1b 100644 --- a/Game/Code/lib/ffmpeg/swscale.pas +++ b/Game/Code/lib/ffmpeg/swscale.pas @@ -66,12 +66,6 @@ type PPByteArray = ^TPByteArray; const - LIBSWSCALE_VERSION_INT = ((0 shl 16)+(5 shl 8))+0; - LIBSWSCALE_VERSION = '0.5.0'; - LIBSWSCALE_BUILD = LIBSWSCALE_VERSION_INT; - - LIBSWSCALE_IDENT = 'SwS'+LIBSWSCALE_VERSION; - {* values for the flags, the stuff on the command line is different *} SWS_FAST_BILINEAR = 1; SWS_BILINEAR = 2; |