From 0331a3797a3394ad03c8d7b40992b63f98018334 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Wed, 25 Dec 2013 00:37:48 +0000 Subject: fix compilation of avutil git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3051 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg-2.0/avutil.pas | 3 + src/lib/ffmpeg-2.0/libavutil/log.pas | 108 ++++++++++++++++++++++++++++++++++ src/lib/ffmpeg-2.0/libavutil/opt.pas | 108 ---------------------------------- src/lib/ffmpeg-2.1/avutil.pas | 11 ++-- src/lib/ffmpeg-2.1/libavutil/log.pas | 109 +++++++++++++++++++++++++++++++++++ src/lib/ffmpeg-2.1/libavutil/opt.pas | 109 ----------------------------------- 6 files changed, 227 insertions(+), 221 deletions(-) (limited to 'src') diff --git a/src/lib/ffmpeg-2.0/avutil.pas b/src/lib/ffmpeg-2.0/avutil.pas index 4383797d..d305e031 100644 --- a/src/lib/ffmpeg-2.0/avutil.pas +++ b/src/lib/ffmpeg-2.0/avutil.pas @@ -243,6 +243,9 @@ function MKBETAG(a, b, c, d: AnsiChar): integer; {$IFDEF HasInline}inline;{$ENDI implementation +uses + SysUtils; + function av_x_if_null(p: {const} pointer; x: {const} pointer): pointer; {$IFDEF HasInline}inline;{$ENDIF} begin if p = nil then diff --git a/src/lib/ffmpeg-2.0/libavutil/log.pas b/src/lib/ffmpeg-2.0/libavutil/log.pas index 73057a36..1ce782ff 100644 --- a/src/lib/ffmpeg-2.0/libavutil/log.pas +++ b/src/lib/ffmpeg-2.0/libavutil/log.pas @@ -28,6 +28,92 @@ * log *) +type + TAVOptionType = ( +{$IFDEF FF_API_OLD_AVOPTIONS} + FF_OPT_TYPE_FLAGS = 0, + FF_OPT_TYPE_INT, + FF_OPT_TYPE_INT64, + FF_OPT_TYPE_DOUBLE, + FF_OPT_TYPE_FLOAT, + FF_OPT_TYPE_STRING, + FF_OPT_TYPE_RATIONAL, + FF_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length + FF_OPT_TYPE_CONST = 128 +{$ELSE} + AV_OPT_TYPE_FLAGS, + AV_OPT_TYPE_INT, + AV_OPT_TYPE_INT64, + AV_OPT_TYPE_DOUBLE, + AV_OPT_TYPE_FLOAT, + AV_OPT_TYPE_STRING, + AV_OPT_TYPE_RATIONAL, + AV_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length + AV_OPT_TYPE_CONST = 128, + AV_OPT_TYPE_COLOR = $434F4C52 ///< MKBETAG('C','O','L','R'), + AV_OPT_TYPE_DURATION = $44555220 ///< MKBETAG('D','U','R',' '), + AV_OPT_TYPE_PIXEL_FMT = $50464D54, ///< MKBETAG('P','F','M','T') + AV_OPT_TYPE_SAMPLE_FMT = $53464D54, ///< MKBETAG('S','F','M','T') + AV_OPT_TYPE_IMAGE_SIZE = $53495A45 ///< MKBETAG('S','I','Z','E'), offset must point to two consecutive integers + AV_OPT_TYPE_VIDEO_RATE = $56524154 ///< MKBETAG('V','R','A','T'), offset must point to AVRational +{$ENDIF} + ); + +const + AV_OPT_FLAG_ENCODING_PARAM = 1; ///< a generic parameter which can be set by the user for muxing or encoding + AV_OPT_FLAG_DECODING_PARAM = 2; ///< a generic parameter which can be set by the user for demuxing or decoding + AV_OPT_FLAG_METADATA = 4; ///< some data extracted or inserted into the file like title, comment, ... + AV_OPT_FLAG_AUDIO_PARAM = 8; + AV_OPT_FLAG_VIDEO_PARAM = 16; + AV_OPT_FLAG_SUBTITLE_PARAM = 32; + AV_OPT_FLAG_FILTERING_PARAM = 1 shl 16; ///< a generic parameter which can be set by the user for filtering + +type + (** + * AVOption + *) + PAVOption = ^TAVOption; + TAVOption = record + name: {const} PAnsiChar; + + (** + * short English help text + * @todo What about other languages? + *) + help: {const} PAnsiChar; + + (** + * The offset relative to the context structure where the option + * value is stored. It should be 0 for named constants. + *) + offset: cint; + type_: TAVOptionType; + + (** + * the default value for scalar options + *) + default_val: record + case cint of + 0: (i64: cint64); + 1: (dbl: cdouble); + 2: (str: PAnsiChar); + (* TODO those are unused now *) + 3: (q: TAVRational); + end; + min: cdouble; ///< minimum valid value for the option + max: cdouble; ///< maximum valid value for the option + + flags: cint; +//FIXME think about enc-audio, ... style flags + + (** + * The logical unit to which the option belongs. Non-constant + * options and corresponding named constants share the same + * unit. May be NULL. + *) + unit_: {const} PAnsiChar; + end; + type PAVClassCategory = ^TAVClassCategory; TAVClassCategory = ( @@ -47,6 +133,28 @@ type // struct AVOptionRanges; + (** + * A single allowed range of values, or a single allowed value. + *) + PAVOptionRange = ^TAVOptionRange; + PPAVOptionRange = ^PAVOptionRange; + TAVOptionRange = record + str: {const} PAnsiChar; + value_min, value_max: cdouble; ///< For string ranges this represents the min/max length, for dimensions this represents the min/max pixel count + component_min, component_max: cdouble; ///< For string this represents the unicode range for chars, 0-127 limits to ASCII + is_range: cint; ///< if set to 1 the struct encodes a range, if set to 0 a single value + end; + + (** + * List of AVOptionRange structs + *) + PAVOptionRanges = ^TAVOptionRanges; + PPAVOptionRanges = ^PAVOptionRanges; + TAVOptionRanges = record + range: PPAVOptionRange; + nb_ranges: cint; + end; + (** * Describe the class of an AVClass context structure. That is an * arbitrary struct of which the first field is a pointer to an diff --git a/src/lib/ffmpeg-2.0/libavutil/opt.pas b/src/lib/ffmpeg-2.0/libavutil/opt.pas index 983e923b..862e202a 100644 --- a/src/lib/ffmpeg-2.0/libavutil/opt.pas +++ b/src/lib/ffmpeg-2.0/libavutil/opt.pas @@ -27,114 +27,6 @@ * *) -type - TAVOptionType = ( -{$IFDEF FF_API_OLD_AVOPTIONS} - FF_OPT_TYPE_FLAGS = 0, - FF_OPT_TYPE_INT, - FF_OPT_TYPE_INT64, - FF_OPT_TYPE_DOUBLE, - FF_OPT_TYPE_FLOAT, - FF_OPT_TYPE_STRING, - FF_OPT_TYPE_RATIONAL, - FF_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length - FF_OPT_TYPE_CONST = 128 -{$ELSE} - AV_OPT_TYPE_FLAGS, - AV_OPT_TYPE_INT, - AV_OPT_TYPE_INT64, - AV_OPT_TYPE_DOUBLE, - AV_OPT_TYPE_FLOAT, - AV_OPT_TYPE_STRING, - AV_OPT_TYPE_RATIONAL, - AV_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length - AV_OPT_TYPE_CONST = 128, - AV_OPT_TYPE_COLOR = $434F4C52 ///< MKBETAG('C','O','L','R'), - AV_OPT_TYPE_DURATION = $44555220 ///< MKBETAG('D','U','R',' '), - AV_OPT_TYPE_PIXEL_FMT = $50464D54, ///< MKBETAG('P','F','M','T') - AV_OPT_TYPE_SAMPLE_FMT = $53464D54, ///< MKBETAG('S','F','M','T') - AV_OPT_TYPE_IMAGE_SIZE = $53495A45 ///< MKBETAG('S','I','Z','E'), offset must point to two consecutive integers - AV_OPT_TYPE_VIDEO_RATE = $56524154 ///< MKBETAG('V','R','A','T'), offset must point to AVRational -{$ENDIF} - ); - -const - AV_OPT_FLAG_ENCODING_PARAM = 1; ///< a generic parameter which can be set by the user for muxing or encoding - AV_OPT_FLAG_DECODING_PARAM = 2; ///< a generic parameter which can be set by the user for demuxing or decoding - AV_OPT_FLAG_METADATA = 4; ///< some data extracted or inserted into the file like title, comment, ... - AV_OPT_FLAG_AUDIO_PARAM = 8; - AV_OPT_FLAG_VIDEO_PARAM = 16; - AV_OPT_FLAG_SUBTITLE_PARAM = 32; - AV_OPT_FLAG_FILTERING_PARAM = 1 shl 16; ///< a generic parameter which can be set by the user for filtering - -type - (** - * AVOption - *) - PAVOption = ^TAVOption; - TAVOption = record - name: {const} PAnsiChar; - - (** - * short English help text - * @todo What about other languages? - *) - help: {const} PAnsiChar; - - (** - * The offset relative to the context structure where the option - * value is stored. It should be 0 for named constants. - *) - offset: cint; - type_: TAVOptionType; - - (** - * the default value for scalar options - *) - default_val: record - case cint of - 0: (i64: cint64); - 1: (dbl: cdouble); - 2: (str: PAnsiChar); - (* TODO those are unused now *) - 3: (q: TAVRational); - end; - min: cdouble; ///< minimum valid value for the option - max: cdouble; ///< maximum valid value for the option - - flags: cint; -//FIXME think about enc-audio, ... style flags - - (** - * The logical unit to which the option belongs. Non-constant - * options and corresponding named constants share the same - * unit. May be NULL. - *) - unit_: {const} PAnsiChar; - end; - - (** - * A single allowed range of values, or a single allowed value. - *) - PAVOptionRange = ^TAVOptionRange; - PPAVOptionRange = ^PAVOptionRange; - TAVOptionRange = record - str: {const} PAnsiChar; - value_min, value_max: cdouble; ///< For string ranges this represents the min/max length, for dimensions this represents the min/max pixel count - component_min, component_max: cdouble; ///< For string this represents the unicode range for chars, 0-127 limits to ASCII - is_range: cint; ///< if set to 1 the struct encodes a range, if set to 0 a single value - end; - - (** - * List of AVOptionRange structs - *) - PAVOptionRanges = ^TAVOptionRanges; - PPAVOptionRanges = ^PAVOptionRanges; - TAVOptionRanges = record - range: PPAVOptionRange; - nb_ranges: cint; - end; - {$IFDEF FF_API_FIND_OPT} (** * Look for an option in obj. Look only for the options which diff --git a/src/lib/ffmpeg-2.1/avutil.pas b/src/lib/ffmpeg-2.1/avutil.pas index eca5bf04..9be506f8 100644 --- a/src/lib/ffmpeg-2.1/avutil.pas +++ b/src/lib/ffmpeg-2.1/avutil.pas @@ -24,7 +24,7 @@ * Conversions of * * libavutil/avutil.h: - * version: 52.38.100 + * version: 52.48.100 * *) @@ -162,7 +162,7 @@ const * * AVPicture types, pixel formats and basic image planes manipulation. * - * @{ + * @ *) type @@ -223,12 +223,12 @@ function av_int_list_length({const} list: pointer; term: cuint64): cuint; {$INCLUDE libavutil/mem.pas} -{$INCLUDE libavutil/opt.pas} - {$INCLUDE libavutil/log.pas} {$INCLUDE libavutil/pixfmt.pas} +{$INCLUDE libavutil/opt.pas} + {$INCLUDE libavutil/samplefmt.pas} (* libavutil/common.h *) // until now MKTAG and MKBETAG is all from common.h KMS 19/5/2010 @@ -243,6 +243,9 @@ function MKBETAG(a, b, c, d: AnsiChar): integer; {$IFDEF HasInline}inline;{$ENDI implementation +uses + SysUtils; + function av_x_if_null(p: {const} pointer; x: {const} pointer): pointer; {$IFDEF HasInline}inline;{$ENDIF} begin if p = nil then diff --git a/src/lib/ffmpeg-2.1/libavutil/log.pas b/src/lib/ffmpeg-2.1/libavutil/log.pas index ebbc2f3a..8bcc95bf 100644 --- a/src/lib/ffmpeg-2.1/libavutil/log.pas +++ b/src/lib/ffmpeg-2.1/libavutil/log.pas @@ -28,6 +28,93 @@ * log *) +type + TAVOptionType = ( +{$IFDEF FF_API_OLD_AVOPTIONS} + FF_OPT_TYPE_FLAGS = 0, + FF_OPT_TYPE_INT, + FF_OPT_TYPE_INT64, + FF_OPT_TYPE_DOUBLE, + FF_OPT_TYPE_FLOAT, + FF_OPT_TYPE_STRING, + FF_OPT_TYPE_RATIONAL, + FF_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length + FF_OPT_TYPE_CONST = 128 +{$ELSE} + AV_OPT_TYPE_FLAGS, + AV_OPT_TYPE_INT, + AV_OPT_TYPE_INT64, + AV_OPT_TYPE_DOUBLE, + AV_OPT_TYPE_FLOAT, + AV_OPT_TYPE_STRING, + AV_OPT_TYPE_RATIONAL, + AV_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length + AV_OPT_TYPE_CONST = 128, + AV_OPT_TYPE_CHANNEL_LAYOUT = $43484C41, ///< MKBETAG('C','H','L','A'), + AV_OPT_TYPE_COLOR = $434F4C52, ///< MKBETAG('C','O','L','R'), + AV_OPT_TYPE_DURATION = $44555220, ///< MKBETAG('D','U','R',' '), + AV_OPT_TYPE_PIXEL_FMT = $50464D54, ///< MKBETAG('P','F','M','T') + AV_OPT_TYPE_SAMPLE_FMT = $53464D54, ///< MKBETAG('S','F','M','T') + AV_OPT_TYPE_IMAGE_SIZE = $53495A45, ///< MKBETAG('S','I','Z','E'), offset must point to two consecutive integers + AV_OPT_TYPE_VIDEO_RATE = $56524154 ///< MKBETAG('V','R','A','T'), offset must point to TAVRational +{$ENDIF} + ); + +const + AV_OPT_FLAG_ENCODING_PARAM = 1; ///< a generic parameter which can be set by the user for muxing or encoding + AV_OPT_FLAG_DECODING_PARAM = 2; ///< a generic parameter which can be set by the user for demuxing or decoding + AV_OPT_FLAG_METADATA = 4; ///< some data extracted or inserted into the file like title, comment, ... + AV_OPT_FLAG_AUDIO_PARAM = 8; + AV_OPT_FLAG_VIDEO_PARAM = 16; + AV_OPT_FLAG_SUBTITLE_PARAM = 32; + AV_OPT_FLAG_FILTERING_PARAM = 1 shl 16; ///< a generic parameter which can be set by the user for filtering + +type + (** + * AVOption + *) + PAVOption = ^TAVOption; + TAVOption = record + name: {const} PAnsiChar; + + (** + * short English help text + * @todo What about other languages? + *) + help: {const} PAnsiChar; + + (** + * The offset relative to the context structure where the option + * value is stored. It should be 0 for named constants. + *) + offset: cint; + type_: TAVOptionType; + + (** + * the default value for scalar options + *) + default_val: record + case cint of + 0: (i64: cint64); + 1: (dbl: cdouble); + 2: (str: PAnsiChar); + (* TODO those are unused now *) + 3: (q: TAVRational); + end; + min: cdouble; ///< minimum valid value for the option + max: cdouble; ///< maximum valid value for the option + + flags: cint; +//FIXME think about enc-audio, ... style flags + + (** + * The logical unit to which the option belongs. Non-constant + * options and corresponding named constants share the same + * unit. May be NULL. + *) + unit_: {const} PAnsiChar; + end; + type PAVClassCategory = ^TAVClassCategory; TAVClassCategory = ( @@ -47,6 +134,28 @@ type // struct AVOptionRanges; + (** + * A single allowed range of values, or a single allowed value. + *) + PAVOptionRange = ^TAVOptionRange; + PPAVOptionRange = ^PAVOptionRange; + TAVOptionRange = record + str: {const} PAnsiChar; + value_min, value_max: cdouble; ///< For string ranges this represents the min/max length, for dimensions this represents the min/max pixel count + component_min, component_max: cdouble; ///< For string this represents the unicode range for chars, 0-127 limits to ASCII + is_range: cint; ///< if set to 1 the struct encodes a range, if set to 0 a single value + end; + + (** + * List of AVOptionRange structs + *) + PAVOptionRanges = ^TAVOptionRanges; + PPAVOptionRanges = ^PAVOptionRanges; + TAVOptionRanges = record + range: PPAVOptionRange; + nb_ranges: cint; + end; + (** * Describe the class of an AVClass context structure. That is an * arbitrary struct of which the first field is a pointer to an diff --git a/src/lib/ffmpeg-2.1/libavutil/opt.pas b/src/lib/ffmpeg-2.1/libavutil/opt.pas index 7abf0a2a..8fb80b79 100644 --- a/src/lib/ffmpeg-2.1/libavutil/opt.pas +++ b/src/lib/ffmpeg-2.1/libavutil/opt.pas @@ -27,115 +27,6 @@ * *) -type - TAVOptionType = ( -{$IFDEF FF_API_OLD_AVOPTIONS} - FF_OPT_TYPE_FLAGS = 0, - FF_OPT_TYPE_INT, - FF_OPT_TYPE_INT64, - FF_OPT_TYPE_DOUBLE, - FF_OPT_TYPE_FLOAT, - FF_OPT_TYPE_STRING, - FF_OPT_TYPE_RATIONAL, - FF_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length - FF_OPT_TYPE_CONST = 128 -{$ELSE} - AV_OPT_TYPE_FLAGS, - AV_OPT_TYPE_INT, - AV_OPT_TYPE_INT64, - AV_OPT_TYPE_DOUBLE, - AV_OPT_TYPE_FLOAT, - AV_OPT_TYPE_STRING, - AV_OPT_TYPE_RATIONAL, - AV_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length - AV_OPT_TYPE_CONST = 128, - AV_OPT_TYPE_CHANNEL_LAYOUT = $43484C41, ///< MKBETAG('C','H','L','A'), - AV_OPT_TYPE_COLOR = $434F4C52, ///< MKBETAG('C','O','L','R'), - AV_OPT_TYPE_DURATION = $44555220, ///< MKBETAG('D','U','R',' '), - AV_OPT_TYPE_PIXEL_FMT = $50464D54, ///< MKBETAG('P','F','M','T') - AV_OPT_TYPE_SAMPLE_FMT = $53464D54, ///< MKBETAG('S','F','M','T') - AV_OPT_TYPE_IMAGE_SIZE = $53495A45, ///< MKBETAG('S','I','Z','E'), offset must point to two consecutive integers - AV_OPT_TYPE_VIDEO_RATE = $56524154 ///< MKBETAG('V','R','A','T'), offset must point to TAVRational -{$ENDIF} - ); - -const - AV_OPT_FLAG_ENCODING_PARAM = 1; ///< a generic parameter which can be set by the user for muxing or encoding - AV_OPT_FLAG_DECODING_PARAM = 2; ///< a generic parameter which can be set by the user for demuxing or decoding - AV_OPT_FLAG_METADATA = 4; ///< some data extracted or inserted into the file like title, comment, ... - AV_OPT_FLAG_AUDIO_PARAM = 8; - AV_OPT_FLAG_VIDEO_PARAM = 16; - AV_OPT_FLAG_SUBTITLE_PARAM = 32; - AV_OPT_FLAG_FILTERING_PARAM = 1 shl 16; ///< a generic parameter which can be set by the user for filtering - -type - (** - * AVOption - *) - PAVOption = ^TAVOption; - TAVOption = record - name: {const} PAnsiChar; - - (** - * short English help text - * @todo What about other languages? - *) - help: {const} PAnsiChar; - - (** - * The offset relative to the context structure where the option - * value is stored. It should be 0 for named constants. - *) - offset: cint; - type_: TAVOptionType; - - (** - * the default value for scalar options - *) - default_val: record - case cint of - 0: (i64: cint64); - 1: (dbl: cdouble); - 2: (str: PAnsiChar); - (* TODO those are unused now *) - 3: (q: TAVRational); - end; - min: cdouble; ///< minimum valid value for the option - max: cdouble; ///< maximum valid value for the option - - flags: cint; -//FIXME think about enc-audio, ... style flags - - (** - * The logical unit to which the option belongs. Non-constant - * options and corresponding named constants share the same - * unit. May be NULL. - *) - unit_: {const} PAnsiChar; - end; - - (** - * A single allowed range of values, or a single allowed value. - *) - PAVOptionRange = ^TAVOptionRange; - PPAVOptionRange = ^PAVOptionRange; - TAVOptionRange = record - str: {const} PAnsiChar; - value_min, value_max: cdouble; ///< For string ranges this represents the min/max length, for dimensions this represents the min/max pixel count - component_min, component_max: cdouble; ///< For string this represents the unicode range for chars, 0-127 limits to ASCII - is_range: cint; ///< if set to 1 the struct encodes a range, if set to 0 a single value - end; - - (** - * List of AVOptionRange structs - *) - PAVOptionRanges = ^TAVOptionRanges; - PPAVOptionRanges = ^PAVOptionRanges; - TAVOptionRanges = record - range: PPAVOptionRange; - nb_ranges: cint; - end; - {$IFDEF FF_API_FIND_OPT} (** * Look for an option in obj. Look only for the options which -- cgit v1.2.3