aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/ffmpeg-2.2/avcodec.pas54
-rw-r--r--src/lib/ffmpeg-2.2/avformat.pas3
-rw-r--r--src/lib/ffmpeg-2.2/libavutil/frame.pas30
-rw-r--r--src/lib/ffmpeg-2.2/libavutil/pixfmt.pas2
-rw-r--r--src/lib/ffmpeg-2.2/swscale.pas14
5 files changed, 45 insertions, 58 deletions
diff --git a/src/lib/ffmpeg-2.2/avcodec.pas b/src/lib/ffmpeg-2.2/avcodec.pas
index d0c6bcca..700eee12 100644
--- a/src/lib/ffmpeg-2.2/avcodec.pas
+++ b/src/lib/ffmpeg-2.2/avcodec.pas
@@ -205,7 +205,8 @@ const
{$endif}
{$ifndef FF_API_EMU_EDGE}
{$define FF_API_EMU_EDGE := (LIBAVCODEC_VERSION_MAJOR < 56)}
-{$endif}
+{$endif}
+
{$IFNDEF FPC}
type
@@ -879,25 +880,6 @@ type
AVCOL_TRC_NB ///< Not part of ABI
);
- TAVColorSpace = (
- AVCOL_SPC_RGB = 0,
- AVCOL_SPC_BT709 = 1, ///< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
- AVCOL_SPC_UNSPECIFIED = 2,
- AVCOL_SPC_FCC = 4,
- AVCOL_SPC_BT470BG = 5, ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
- AVCOL_SPC_SMPTE170M = 6, ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
- AVCOL_SPC_SMPTE240M_ = 7,
- AVCOL_SPC_YCGCO = 8,
- AVCOL_SPC_NB ///< Not part of ABI
- );
-
- TAVColorRange = (
- AVCOL_RANGE_UNSPECIFIED = 0,
- AVCOL_RANGE_MPEG = 1, ///< the normal 219*2^(n-8) "MPEG" YUV ranges
- AVCOL_RANGE_JPEG = 2, ///< the normal 2^n-1 "JPEG" YUV ranges
- AVCOL_RANGE_NB ///< Not part of ABI
- );
-
(**
* X X 3 4 X X are luma samples,
* 1 2 1-6 are possible chroma positions
@@ -1152,33 +1134,9 @@ const
MB_TYPE_CBP = $0020000;
//Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...)
{$IFEND}
-
-type
-(**
- * Pan Scan area.
- * This specifies the area which should be displayed.
- * Note there may be multiple such areas for one frame.
- *)
- PAVPanScan = ^TAVPanScan;
- TAVPanScan = record {24}
- (*** id.
- * - encoding: set by user.
- * - decoding: set by libavcodec. *)
- id: cint;
-
- (*** width and height in 1/16 pel
- * - encoding: set by user.
- * - decoding: set by libavcodec. *)
- width: cint;
- height: cint;
- (*** position of the top left corner in 1/16 pel for up to 3 fields/frames.
- * - encoding: set by user.
- * - decoding: set by libavcodec. *)
- position: array [0..2] of array [0..1] of cint16;
- end; {TAVPanScan}
-
-const
+(** Note: AVPanScan is now (28/09/2014) defined in libavutil/frame.pas to workaround a reference problem *)
+
{$IFDEF FF_API_QSCALE_TYPE}
FF_QSCALE_TYPE_MPEG1 = 0;
FF_QSCALE_TYPE_MPEG2 = 1;
@@ -3915,7 +3873,7 @@ type
PMpegEncContext = ^TMpegEncContext;
// To be expanded if needed.
- TMpegEncContext = record;
+ TMpegEncContext = record
end;
(**
@@ -4022,7 +3980,7 @@ type
* @param s the mpeg context
*)
//void (*decode_mb)(struct MpegEncContext *s);
- decode_mb = function (s: PMpegEncContext); cdecl;
+ decode_mb: procedure(s: PMpegEncContext); cdecl;
end; {TAVHWAccel}
const
diff --git a/src/lib/ffmpeg-2.2/avformat.pas b/src/lib/ffmpeg-2.2/avformat.pas
index d98e08fe..a53e913e 100644
--- a/src/lib/ffmpeg-2.2/avformat.pas
+++ b/src/lib/ffmpeg-2.2/avformat.pas
@@ -106,6 +106,9 @@ const
{$define FF_API_PKT_DUMP := (LIBAVFORMAT_VERSION_MAJOR < 54)
{$endif}
*)
+{$ifndef FF_API_REFERENCE_DTS}
+{$define FF_API_REFERENCE_DTS := (LIBAVFORMAT_VERSION_MAJOR < 56)}
+{$endif}
{$ifndef FF_API_ALLOC_OUTPUT_CONTEXT}
{$define FF_API_ALLOC_OUTPUT_CONTEXT := (LIBAVFORMAT_VERSION_MAJOR < 56)}
{$endif}
diff --git a/src/lib/ffmpeg-2.2/libavutil/frame.pas b/src/lib/ffmpeg-2.2/libavutil/frame.pas
index f6b259ab..4a044ea3 100644
--- a/src/lib/ffmpeg-2.2/libavutil/frame.pas
+++ b/src/lib/ffmpeg-2.2/libavutil/frame.pas
@@ -56,7 +56,31 @@ type
AVCOL_RANGE_NB ///< Not part of ABI
);
-
+(* Note: AVPanScan is defined in avcodec.h but is here to avoid reference problems - Brian-ch 28/09/2014
+ *
+ * Pan Scan area.
+ * This specifies the area which should be displayed.
+ * Note there may be multiple such areas for one frame.
+ *)
+ PAVPanScan = ^TAVPanScan;
+ TAVPanScan = record {24}
+ (*** id.
+ * - encoding: set by user.
+ * - decoding: set by libavcodec. *)
+ id: cint;
+
+ (*** width and height in 1/16 pel
+ * - encoding: set by user.
+ * - decoding: set by libavcodec. *)
+ width: cint;
+ height: cint;
+
+ (*** position of the top left corner in 1/16 pel for up to 3 fields/frames.
+ * - encoding: set by user.
+ * - decoding: set by libavcodec. *)
+ position: array [0..2] of array [0..1] of cint16;
+ end; {TAVPanScan}
+
(**
* @defgroup lavu_frame AVFrame
* @ingroup lavu_data
@@ -398,7 +422,7 @@ type
* @deprecated this field is unused
*)
hwaccel_picture_private: pointer; {deprecated}
- owner: PAVCodecContext; {deprecated}
+ owner: pointer; {deprecated} (** Note: Should be a PAVCodecContext, but a type pointer is used to avoid a reference problem. *)
thread_opaque: pointer; {deprecated}
(**
@@ -746,7 +770,7 @@ function av_frame_make_writable(frame: PAVFrame): cint;
*
* @return >= 0 on success, a negative AVERROR on error.
*)
-function av_frame_copy(dst: PAVFrame, src: {const} PAVFrame): cint;
+function av_frame_copy(dst: PAVFrame; src: {const} PAVFrame): cint;
cdecl; external av__codec;
(**
diff --git a/src/lib/ffmpeg-2.2/libavutil/pixfmt.pas b/src/lib/ffmpeg-2.2/libavutil/pixfmt.pas
index bd3cba6e..6b100b14 100644
--- a/src/lib/ffmpeg-2.2/libavutil/pixfmt.pas
+++ b/src/lib/ffmpeg-2.2/libavutil/pixfmt.pas
@@ -407,7 +407,7 @@ const
{$IFDEF FF_API_PIX_FMT}
type
- PixelFormat = AVPixelFormat;
+ PixelFormat = TAVPixelFormat;
const
PIX_FMT_Y400A = AV_PIX_FMT_Y400A;
diff --git a/src/lib/ffmpeg-2.2/swscale.pas b/src/lib/ffmpeg-2.2/swscale.pas
index 11b81014..b22fc4db 100644
--- a/src/lib/ffmpeg-2.2/swscale.pas
+++ b/src/lib/ffmpeg-2.2/swscale.pas
@@ -28,10 +28,13 @@ unit swscale;
{$MODE DELPHI }
{$PACKENUM 4} (* use 4-byte enums *)
{$PACKRECORDS C} (* C/C++-compatible record packing *)
+ {$MACRO ON} (* Turn macro support on *)
{$ELSE}
{$MINENUMSIZE 4} (* use 4-byte enums *)
{$ENDIF}
+{$I switches.inc} (* for ffmpeg defines *)
+
{$IFDEF DARWIN}
{$linklib libswscale}
{$ENDIF}
@@ -96,20 +99,19 @@ type
(* libswscale/version.h start *)
-const
(**
* FF_API_* defines may be placed below to indicate public API that will be
* dropped at a future version bump. The defines themselves are not part of
* the public API and may change, break or disappear at any time.
*)
{$ifndef FF_API_SWS_GETCONTEXT}
- FF_API_SWS_GETCONTEXT = LIBSWSCALE_VERSION_MAJOR < 3;
+{$define FF_API_SWS_GETCONTEXT := (LIBSWSCALE_VERSION_MAJOR < 3)}
{$endif}
{$ifndef FF_API_SWS_CPU_CAPS}
- FF_API_SWS_CPU_CAPS = LIBSWSCALE_VERSION_MAJOR < 3;
+{$define FF_API_SWS_CPU_CAPS := (LIBSWSCALE_VERSION_MAJOR < 3)}
{$endif}
{$ifndef FF_API_SWS_FORMAT_NAME}
- FF_API_SWS_FORMAT_NAME = LIBSWSCALE_VERSION_MAJOR < 3;
+{$define FF_API_SWS_FORMAT_NAME := (LIBSWSCALE_VERSION_MAJOR < 3)}
{$endif}
(* libswscale/version.h end *)
@@ -162,7 +164,7 @@ const
SWS_ACCURATE_RND = $40000;
SWS_BITEXACT = $80000;
-{$IF FF_API_SWS_CPU_CAPS}
+{$IFDEF FF_API_SWS_CPU_CAPS}
(**
* CPU caps are autodetected now, those flags
* are only provided for API compatibility.
@@ -266,7 +268,7 @@ function sws_init_context(sws_context: PSwsContext; srcFilter: PSwsFilter; dstFi
procedure sws_freeContext(swsContext: PSwsContext);
cdecl; external sw__scale;
-{$IF FF_API_SWS_GETCONTEXT}
+{$IFDEF FF_API_SWS_GETCONTEXT}
(**
* Allocate and return a SwsContext. You need it to perform
* scaling/conversion operations using sws_scale().