aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/ffmpeg-2.2/avformat.pas52
-rw-r--r--src/lib/ffmpeg-2.2/avutil.pas81
-rw-r--r--src/lib/ffmpeg-2.2/rational.pas4
-rw-r--r--src/lib/ffmpeg-2.2/swscale.pas6
4 files changed, 116 insertions, 27 deletions
diff --git a/src/lib/ffmpeg-2.2/avformat.pas b/src/lib/ffmpeg-2.2/avformat.pas
index 79ea4775..d98e08fe 100644
--- a/src/lib/ffmpeg-2.2/avformat.pas
+++ b/src/lib/ffmpeg-2.2/avformat.pas
@@ -49,6 +49,9 @@ uses
avio,
avutil,
rational,
+ {$IFDEF UNIX}
+ BaseUnix,
+ {$ENDIF}
SysUtils,
UConfig;
@@ -351,8 +354,9 @@ const
*
*)
-type
- PAVFile = Pointer;
+//type
+
+
(*
* @defgroup metadata_api Public Metadata API
@@ -471,6 +475,11 @@ type
val, num, den: cint64;
end;
+{$IFNDEF FPC}
+ //defines for delphi
+ size_t = cardinal;
+{$ENDIF}
+
(*************************************************)
(* input/output formats *)
@@ -485,10 +494,10 @@ type
end;
const
+ AVPROBE_SCORE_MAX = 100; ///< maximum score
AVPROBE_SCORE_RETRY = (AVPROBE_SCORE_MAX DIV 4);
AVPROBE_SCORE_STREAM_RETRY = (AVPROBE_SCORE_MAX DIV 4-1);
AVPROBE_SCORE_EXTENSION = 50; ///< score for file extension
- AVPROBE_SCORE_MAX = 100; ///< maximum score
AVPROBE_PADDING_SIZE = 32; ///< extra allocated bytes at the end of the probe buffer
@@ -641,6 +650,21 @@ type
s_conv: {const} PAVMetadataConv;
end;
+ (** From libavdevice/avdevice.h **)
+ PPAVDeviceInfo = ^PAVDeviceInfo;
+ PAVDeviceInfo = ^TAVDeviceInfo;
+ TAVDeviceInfo = record
+ device_name: PAnsiChar; (**< device name, format depends on device *)
+ device_description: PAnsiChar; (**< human friendly name *)
+ end; {TAVDeviceInfo}
+
+ PAVDeviceInfoList = ^TAVDeviceInfoList;
+ TAVDeviceInfoList = record
+ devices: PPAVDeviceInfo; (**< list of autodetected devices *)
+ nb_devices: cint; (**< number of autodetected devices *)
+ default_device: cint; (**< index of default device or -1 if no default *)
+ end; {TAVDeviceInfoList}
+
(**
* @addtogroup lavf_encoding
* @{
@@ -730,7 +754,7 @@ type
* by setting the pointer to NULL.
*)
write_uncodec_frame: function(s: PAVFormatContext; stream_index: cint;
- frame: ^PAVFrame; flags: cuint): cint; cdecl;
+ frame: PPAVFrame; flags: cuint): cint; cdecl;
(**
* Returns device list with it properties.
@@ -1712,21 +1736,6 @@ type
procedure av_format_set_control_message_cb(s: PAVFormatContext; callback: TAv_format_control_message);
cdecl; external av__format;
- (** From libavdevice/avdevice.h **)
- PPAVDeviceInfo = ^PAVDeviceInfo;
- PAVDeviceInfo = ^TAVDeviceInfo;
- TAVDeviceInfo = record
- device_name: PAnsiChar; (**< device name, format depends on device *)
- device_description: PAnsiChar; (**< human friendly name *)
- end; {TAVDeviceInfo}
-
- PAVDeviceInfoList = ^TAVDeviceInfoList;
- TAVDeviceInfoList = record
- devices: PPAVDeviceInfo; (**< list of autodetected devices *)
- nb_devices: cint; (**< number of autodetected devices *)
- default_device: cint; (**< index of default device or -1 if no default *)
- end; {TAVDeviceInfoList}
-
function av_stream_get_r_frame_rate({const} s: PAVStream): TAVRational;
cdecl; external av__format;
procedure av_stream_set_r_frame_rate(s: PAVStream; r: TAVRational);
@@ -2688,11 +2697,14 @@ function avformat_get_riff_audio_tags(): {const} PAVCodecTag;
* @return the table mapping MOV FourCCs for video to libavcodec AVCodecID.
*)
function avformat_get_mov_video_tags(): {const} PAVCodecTag;
+ cdecl; external av__format;
+
(**
* @return the table mapping MOV FourCCs for audio to AVCodecID.
*)
function avformat_get_mov_audio_tags(): {const} PAVCodecTag;
-
+ cdecl; external av__format;
+
(**
* Guess the sample aspect ratio of a frame, based on both the stream and the
* frame aspect ratio.
diff --git a/src/lib/ffmpeg-2.2/avutil.pas b/src/lib/ffmpeg-2.2/avutil.pas
index 10523b6f..33511b60 100644
--- a/src/lib/ffmpeg-2.2/avutil.pas
+++ b/src/lib/ffmpeg-2.2/avutil.pas
@@ -34,6 +34,7 @@ unit avutil;
{$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}
@@ -55,15 +56,15 @@ uses
const
(* Max. supported version by this header *)
LIBAVUTIL_MAX_VERSION_MAJOR = 52;
- LIBAVUTIL_MAX_VERSION_MINOR = 48;
- LIBAVUTIL_MAX_VERSION_RELEASE = 101;
+ LIBAVUTIL_MAX_VERSION_MINOR = 66;
+ LIBAVUTIL_MAX_VERSION_RELEASE = 100;
LIBAVUTIL_MAX_VERSION = (LIBAVUTIL_MAX_VERSION_MAJOR * VERSION_MAJOR) +
(LIBAVUTIL_MAX_VERSION_MINOR * VERSION_MINOR) +
(LIBAVUTIL_MAX_VERSION_RELEASE * VERSION_RELEASE);
(* Min. supported version by this header *)
LIBAVUTIL_MIN_VERSION_MAJOR = 52;
- LIBAVUTIL_MIN_VERSION_MINOR = 48;
+ LIBAVUTIL_MIN_VERSION_MINOR = 66;
LIBAVUTIL_MIN_VERSION_RELEASE = 100;
LIBAVUTIL_MIN_VERSION = (LIBAVUTIL_MIN_VERSION_MAJOR * VERSION_MAJOR) +
(LIBAVUTIL_MIN_VERSION_MINOR * VERSION_MINOR) +
@@ -78,6 +79,76 @@ const
{$MESSAGE Error 'Linked version of libavutil is not yet supported!'}
{$IFEND}
+
+(**
+ * @}
+ *
+ * @defgroup depr_guards Deprecation guards
+ * 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_GET_BITS_PER_SAMPLE_FMT}
+{$define FF_API_GET_BITS_PER_SAMPLE_FMT := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_FIND_OPT}
+{$define FF_API_FIND_OPT := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_OLD_AVOPTIONS}
+{$define FF_API_OLD_AVOPTIONS := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_PIX_FMT}
+{$define FF_API_PIX_FMT := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_CONTEXT_SIZE}
+{$define FF_API_CONTEXT_SIZE := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_PIX_FMT_DESC}
+{$define FF_API_PIX_FMT_DESC := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_AV_REVERSE}
+{$define FF_API_AV_REVERSE := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_AUDIOCONVERT}
+{$define FF_API_AUDIOCONVERT := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_CPU_FLAG_MMX2}
+{$define FF_API_CPU_FLAG_MMX2 := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_SAMPLES_UTILS_RETURN_ZERO}
+{$define FF_API_SAMPLES_UTILS_RETURN_ZERO := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_LLS_PRIVATE}
+{$define FF_API_LLS_PRIVATE := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_LLS1}
+{$define FF_API_LLS1 :=(LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_AVFRAME_LAVC}
+{$define FF_API_AVFRAME_LAVC := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_VDPAU}
+{$define FF_API_VDPAU := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_GET_CHANNEL_LAYOUT_COMPAT}
+{$define FF_API_GET_CHANNEL_LAYOUT_COMPAT := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_OLD_OPENCL}
+{$define FF_API_OLD_OPENCL := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_XVMC}
+{$define FF_API_XVMC := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_INTFLOAT
+{$define FF_API_INTFLOAT := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+{$ifndef FF_API_OPT_TYPE_METADATA}
+{$define FF_API_OPT_TYPE_METADATA := (LIBAVUTIL_VERSION_MAJOR < 54)}
+{$endif}
+
type
{$IFNDEF FPC}
// defines for Delphi
@@ -109,6 +180,9 @@ function avutil_license(): PAnsiChar;
*)
type
+
+ PAVFile = pointer;
+
TAVMediaType = (
AVMEDIA_TYPE_UNKNOWN = -1, ///< Usually treated as AVMEDIA_TYPE_DATA
AVMEDIA_TYPE_VIDEO,
@@ -301,6 +375,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-2.2/rational.pas b/src/lib/ffmpeg-2.2/rational.pas
index 5795b81f..d6f63749 100644
--- a/src/lib/ffmpeg-2.2/rational.pas
+++ b/src/lib/ffmpeg-2.2/rational.pas
@@ -226,8 +226,8 @@ end;
function av_make_q(num, den: cint): TAVRational; {$IFDEF HasInline}inline;{$ENDIF}
begin
- Result.num := q.num;
- Result.den := q.den;
+ Result.num := num;
+ Result.den := den;
end;
end.
diff --git a/src/lib/ffmpeg-2.2/swscale.pas b/src/lib/ffmpeg-2.2/swscale.pas
index 0a107c1d..11b81014 100644
--- a/src/lib/ffmpeg-2.2/swscale.pas
+++ b/src/lib/ffmpeg-2.2/swscale.pas
@@ -74,10 +74,12 @@ const
(* Max. supported version by this header *)
LIBSWSCALE_MAX_VERSION_MAJOR = 2;
LIBSWSCALE_MAX_VERSION_MINOR = 5;
- LIBSWSCALE_MAX_VERSION_RELEASE = 101;
+ LIBSWSCALE_MAX_VERSION_RELEASE = 102;
LIBSWSCALE_MAX_VERSION = (LIBSWSCALE_MAX_VERSION_MAJOR * VERSION_MAJOR) +
(LIBSWSCALE_MAX_VERSION_MINOR * VERSION_MINOR) +
- (LIBSWSCALE_MAX_VERSION_RELEASE * VERSION_RELEASE);
+ (LIBSWSCALE_MAX_VERSION_RELEASE * VERSION_RELEASE);
+
+
(* Check if linked versions are supported *)
{$IF (LIBSWSCALE_VERSION > LIBSWSCALE_MAX_VERSION)}