aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-12-07 08:51:28 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-12-07 08:51:28 +0000
commit19c1f1a71da3ffa5ab36af92eab1462f5f227bd6 (patch)
treee96b868d4dc2d5f992e8098bde83e0ec78c170ff /src/lib
parent7e3c91751340995157ee8a88f98a9bb823b93956 (diff)
downloadusdx-19c1f1a71da3ffa5ab36af92eab1462f5f227bd6.tar.gz
usdx-19c1f1a71da3ffa5ab36af92eab1462f5f227bd6.tar.xz
usdx-19c1f1a71da3ffa5ab36af92eab1462f5f227bd6.zip
Fixing ffmpeg-1.2, part 1
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3019 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ffmpeg-1.2/avutil.pas8
-rw-r--r--src/lib/ffmpeg-1.2/libavutil/log.pas107
-rw-r--r--src/lib/ffmpeg-1.2/libavutil/opt.pas111
-rw-r--r--src/lib/ffmpeg-1.2/libavutil/pixfmt.pas4
4 files changed, 121 insertions, 109 deletions
diff --git a/src/lib/ffmpeg-1.2/avutil.pas b/src/lib/ffmpeg-1.2/avutil.pas
index b8440752..b3883ffa 100644
--- a/src/lib/ffmpeg-1.2/avutil.pas
+++ b/src/lib/ffmpeg-1.2/avutil.pas
@@ -202,12 +202,12 @@ function av_x_if_null(p: {const} pointer; x: {const} pointer): pointer; {$IFDEF
{$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
@@ -222,6 +222,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
@@ -256,6 +259,7 @@ var
begin
errbuf := stralloc(AV_ERROR_MAX_STRING_SIZE);
av_make_error_string(errbuf, AV_ERROR_MAX_STRING_SIZE, errnum);
+ av_err2str := errbuf
end;
(* libavutil/mem.h *)
diff --git a/src/lib/ffmpeg-1.2/libavutil/log.pas b/src/lib/ffmpeg-1.2/libavutil/log.pas
index a5964ac7..5adb0ec8 100644
--- a/src/lib/ffmpeg-1.2/libavutil/log.pas
+++ b/src/lib/ffmpeg-1.2/libavutil/log.pas
@@ -29,6 +29,89 @@
*)
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_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
+{$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 = (
AV_CLASS_CATEGORY_NA = 0,
@@ -45,8 +128,32 @@ type
AV_CLASS_CATEGORY_NB ///< not part of ABI/API
);
+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-1.2/libavutil/opt.pas b/src/lib/ffmpeg-1.2/libavutil/opt.pas
index 693e9da5..b477cb50 100644
--- a/src/lib/ffmpeg-1.2/libavutil/opt.pas
+++ b/src/lib/ffmpeg-1.2/libavutil/opt.pas
@@ -27,111 +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_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
-{$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
@@ -359,11 +254,17 @@ const
* @return 0 on success, a negative number on failure.
*)
function av_opt_eval_flags (obj: pointer; o: {const} PAVOption; val: {const} PAnsiChar; flags_out: Pcint): cint;
+ cdecl; external av__util;
function av_opt_eval_int (obj: pointer; o: {const} PAVOption; val: {const} PAnsiChar; int_out: Pcint): cint;
+ cdecl; external av__util;
function av_opt_eval_int64 (obj: pointer; o: {const} PAVOption; val: {const} PAnsiChar; int64_out: Pcint64): cint;
+ cdecl; external av__util;
function av_opt_eval_float (obj: pointer; o: {const} PAVOption; val: {const} PAnsiChar; float_out: Pcfloat): cint;
+ cdecl; external av__util;
function av_opt_eval_double(obj: pointer; o: {const} PAVOption; val: {const} PAnsiChar; double_out: Pcdouble): cint;
+ cdecl; external av__util;
function av_opt_eval_q (obj: pointer; o: {const} PAVOption; val: {const} PAnsiChar; q_out: PAVRational): cint;
+ cdecl; external av__util;
(**
* @}
*)
diff --git a/src/lib/ffmpeg-1.2/libavutil/pixfmt.pas b/src/lib/ffmpeg-1.2/libavutil/pixfmt.pas
index 9333510c..8e1c87d4 100644
--- a/src/lib/ffmpeg-1.2/libavutil/pixfmt.pas
+++ b/src/lib/ffmpeg-1.2/libavutil/pixfmt.pas
@@ -175,11 +175,11 @@ type
AV_PIX_FMT_GBRP16BE, ///< planar GBR 4:4:4 48bpp, big-endian
AV_PIX_FMT_GBRP16LE, ///< planar GBR 4:4:4 48bpp, little-endian
- /**
+ {**
* duplicated pixel formats for compatibility with libav.
* FFmpeg supports these formats since May 8 2012 and Jan 28 2012 (commits f9ca1ac7 and 143a5c55)
* Libav added them Oct 12 2012 with incompatible values (commit 6d5600e85)
- */
+ *}
AV_PIX_FMT_YUVA422P_LIBAV, ///< planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
AV_PIX_FMT_YUVA444P_LIBAV, ///< planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)