From 6e576ac0b30bd645078bcb16426d413b01fa49e1 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sun, 18 Mar 2012 22:54:03 +0000 Subject: start of update for ffmpeg7 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2838 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/error.pas | 43 ++++++++++++++++++++++++++----------------- src/lib/ffmpeg/rational.pas | 6 +++--- 2 files changed, 29 insertions(+), 20 deletions(-) (limited to 'src/lib/ffmpeg') diff --git a/src/lib/ffmpeg/error.pas b/src/lib/ffmpeg/error.pas index 720005b6..382f40bf 100644 --- a/src/lib/ffmpeg/error.pas +++ b/src/lib/ffmpeg/error.pas @@ -19,11 +19,14 @@ * - Changes and updates by the UltraStar Deluxe Team * * Conversion of libavutil/error.h - * Max. avutil version: 50.21.0, revision 24190, Wed Jul 21 01:00:00 2010 CET + * avutil version 50.43.0 * *) -{$IF LIBAVUTIL_VERSION >= 50012000} // >= 50.12.0 +(** + * @file + * error code definitions + *) {* error handling *} @@ -62,14 +65,13 @@ const * 1) shr 30: shifts the sign bit to bit position 2 * 2) and $00000002: sets all other bits to zero * positive EINVAL gives 0, negative gives 2 - * 3) not: inverts all bits. This gives -1 and -3 * 3) - 1: positive EINVAL gives -1, negative 1 *) const AVERROR_SIGN = (EINVAL shr 30) and $00000002 - 1; (* -#if EINVAL > 0 +#if EDOM > 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. *} #else @@ -80,23 +82,31 @@ const *) const - AVERROR_UNKNOWN = AVERROR_SIGN * EINVAL; (**< unknown error *) + AVERROR_INVALIDDATA = AVERROR_SIGN * EINVAL; (**< Invalid data found when processing input *) 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_NOENT = AVERROR_SIGN * ENOENT; (**< No such file or directory. *) AVERROR_NOFMT = AVERROR_SIGN * EILSEQ; (**< unknown format *) + AVERROR_NOMEM = AVERROR_SIGN * ENOMEM; (**< not enough memory *) AVERROR_NOTSUPP = AVERROR_SIGN * ENOSYS; (**< Operation not supported. *) - AVERROR_NOENT = AVERROR_SIGN * ENOENT; (**< No such file or directory. *) -{$IF LIBAVCODEC_VERSION >= 52017000} // 52.17.0 + AVERROR_NUMEXPECTED = AVERROR_SIGN * EDOM; (**< Number syntax expected in filename. *) + AVERROR_UNKNOWN = AVERROR_SIGN * EINVAL; (**< Unknown error *) + AVERROR_EOF = AVERROR_SIGN * EPIPE; (**< End of file. *) -{$IFEND} + // Note: function calls as constant-initializers are invalid - //AVERROR_PATCHWELCOME = -MKTAG('P','A','W','E'); {**< Not yet implemented in FFmpeg. Patches welcome. *} - AVERROR_PATCHWELCOME = -(ord('P') or (ord('A') shl 8) or (ord('W') shl 16) or (ord('E') shl 24)); -{$IFEND} + AVERROR_PATCHWELCOME = -(ord('P') or (ord('A') shl 8) or (ord('W') shl 16) or (ord('E') shl 24)); ///< Not yet implemented in Libav, patches welcome + + AVERROR_BSF_NOT_FOUND = -(ord($F8) or (ord('B') shl 8) or (ord('S') shl 16) or (ord('F') shl 24)); ///< Bitstream filter not found + AVERROR_DECODER_NOT_FOUND = -(ord($F8) or (ord('D') shl 8) or (ord('E') shl 16) or (ord('C') shl 24)); ///< Decoder not found + AVERROR_DEMUXER_NOT_FOUND = -(ord($F8) or (ord('D') shl 8) or (ord('E') shl 16) or (ord('M') shl 24)); ///< Demuxer not found + AVERROR_ENCODER_NOT_FOUND = -(ord($F8) or (ord('E') shl 8) or (ord('N') shl 16) or (ord('C') shl 24)); ///< Encoder not found + AVERROR_EXIT = -(ord('E') or (ord('X') shl 8) or (ord('I') shl 16) or (ord('T') shl 24)); ///< Immediate exit was requested; the called function should not be restarted + AVERROR_FILTER_NOT_FOUND = -(ord($F8) or (ord('F') shl 8) or (ord('I') shl 16) or (ord('L') shl 24)); ///< Filter not found + AVERROR_MUXER_NOT_FOUND = -(ord($F8) or (ord('M') shl 8) or (ord('U') shl 16) or (ord('X') shl 24)); ///< Muxer not found + AVERROR_OPTION_NOT_FOUND = -(ord($F8) or (ord('O') shl 8) or (ord('P') shl 16) or (ord('T') shl 24)); ///< Option not found + AVERROR_PROTOCOL_NOT_FOUND = -(ord($F8) or (ord('P') shl 8) or (ord('R') shl 16) or (ord('O') shl 24)); ///< Protocol not found + AVERROR_STREAM_NOT_FOUND = -(ord($F8) or (ord('S') shl 8) or (ord('T') shl 16) or (ord('R') shl 24)); ///< Stream not found -{$IF LIBAVUTIL_VERSION >= 50013000} // >= 50.13.0 (* * Put a description of the AVERROR code errnum in errbuf. * In case of failure the global variable errno is set to indicate the @@ -110,6 +120,5 @@ const * cannot be found *) -function av_strerror(errnum: cint; errbuf: Pchar; errbuf_size: cint): cint; +function av_strerror(errnum: cint; errbuf: PAnsiChar; errbuf_size: size_t): cint; cdecl; external av__util; -{$IFEND} diff --git a/src/lib/ffmpeg/rational.pas b/src/lib/ffmpeg/rational.pas index 323d7937..45ca8b87 100644 --- a/src/lib/ffmpeg/rational.pas +++ b/src/lib/ffmpeg/rational.pas @@ -23,7 +23,7 @@ * - Changes and updates by the UltraStar Deluxe Team * * Conversion of libavutil/rational.h - * avutil max. version 50.21.0, revision 24190, Wed Jul 21 01:00:00 2010 CET + * avutil version 50.43.0 * *) @@ -124,6 +124,8 @@ function av_sub_q(b: TAVRational; c: TAVRational): TAVRational; (** * Convert a double precision floating point number to a rational. + * inf is expressed as {1,0} or {-1,0} depending on the sign. + * * @param d double to convert * @param max the maximum allowed numerator and denominator * @return (AVRational) d @@ -131,7 +133,6 @@ function av_sub_q(b: TAVRational; c: TAVRational): TAVRational; function av_d2q(d: cdouble; max: cint): TAVRational; cdecl; external av__util; {av_const} -{$IF LIBAVUTIL_VERSION >= 49011000} // 49.11.0 (** * @return 1 if q1 is nearer to q than q2, -1 if q2 is nearer * than q1, 0 if they have the same distance. @@ -146,7 +147,6 @@ function av_nearer_q(q, q1, q2: TAVRational): cint; *) function av_find_nearest_q_idx(q: TAVRational; q_list: {const} PAVRationalArray): cint; cdecl; external av__util; -{$IFEND} implementation -- cgit v1.2.3