aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffmpeg
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-08-26 00:15:13 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-08-26 00:15:13 +0000
commitbb47f56a41521dfd9e00201eca4ff39aff765695 (patch)
tree627abea7adc53cd4ed591881e5172c169e3867a8 /src/lib/ffmpeg
parent18a13231776d913f803efbc7d081963d78674cc9 (diff)
downloadusdx-bb47f56a41521dfd9e00201eca4ff39aff765695.tar.gz
usdx-bb47f56a41521dfd9e00201eca4ff39aff765695.tar.xz
usdx-bb47f56a41521dfd9e00201eca4ff39aff765695.zip
update avformat.h and avio.h to 52.78.3. Addition of FF_API constants and new IFDEFs. Also error correction in avio.h (see is_connected).
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2622 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/lib/ffmpeg')
-rw-r--r--src/lib/ffmpeg/avformat.pas95
-rw-r--r--src/lib/ffmpeg/avio.pas28
2 files changed, 105 insertions, 18 deletions
diff --git a/src/lib/ffmpeg/avformat.pas b/src/lib/ffmpeg/avformat.pas
index 6a3530c8..aba64565 100644
--- a/src/lib/ffmpeg/avformat.pas
+++ b/src/lib/ffmpeg/avformat.pas
@@ -23,7 +23,7 @@
*
* Conversion of libavformat/avformat.h
* Min. version: 50.5.0 , revision 6577, Sat Oct 7 15:30:46 2006 UTC
- * Max. version: 52.78.2, revision 24790, Wed Aug 25 23:00:00 2010 CET
+ * Max. version: 52.78.3, revision 24841, Thu Aug 26 02:00:00 2010 CET
*)
unit avformat;
@@ -82,7 +82,7 @@ const
(* Max. supported version by this header *)
LIBAVFORMAT_MAX_VERSION_MAJOR = 52;
LIBAVFORMAT_MAX_VERSION_MINOR = 78;
- LIBAVFORMAT_MAX_VERSION_RELEASE = 2;
+ LIBAVFORMAT_MAX_VERSION_RELEASE = 3;
LIBAVFORMAT_MAX_VERSION = (LIBAVFORMAT_MAX_VERSION_MAJOR * VERSION_MAJOR) +
(LIBAVFORMAT_MAX_VERSION_MINOR * VERSION_MINOR) +
(LIBAVFORMAT_MAX_VERSION_RELEASE * VERSION_RELEASE);
@@ -105,6 +105,22 @@ const
{$MESSAGE Error 'Linked version of libavformat is not yet supported!'}
{$IFEND}
+{$IF LIBAVFORMAT_VERSION >= 52078003} // >= 52.78.3
+(**
+ * Those FF_API_* defines are not part of public API.
+ * They may change, break or disappear at any time.
+ *)
+const
+ {$IF LIBAVFORMAT_VERSION_MAJOR < 53}
+ FF_API_MAX_STREAMS = (LIBAVFORMAT_VERSION_MAJOR < 53);
+ FF_API_OLD_METADATA = (LIBAVFORMAT_VERSION_MAJOR < 53);
+ FF_API_REGISTER_PROTOCOL = (LIBAVFORMAT_VERSION_MAJOR < 53);
+ FF_API_URL_RESETBUF = (LIBAVFORMAT_VERSION_MAJOR < 53);
+ {$ELSE}
+ FF_API_URL_CLASS = (LIBAVFORMAT_VERSION_MAJOR >= 53);
+ {$IFEND}
+{$IFEND}
+
{$IF LIBAVFORMAT_VERSION >= 52020000} // 52.20.0
(**
* I return the LIBAVFORMAT_VERSION_INT constant. You got
@@ -173,7 +189,6 @@ type
PAVMetadata = Pointer;
{$IF LIBAVFORMAT_VERSION > 52024001} // > 52.24.1
-{$IF LIBAVFORMAT_VERSION_MAJOR = 52}
(**
* Get a metadata element with matching key.
*
@@ -186,6 +201,7 @@ function av_metadata_get(m: PAVMetadata; key: {const} PAnsiChar;
prev: {const} PAVMetadataTag ; flags: cint): PAVMetadataTag;
cdecl; external av__format;
+{$IF LIBAVFORMAT_VERSION < 52078003} // < 52.78.3
(**
* Set the given tag in *pm, overwriting an existing tag.
*
@@ -198,9 +214,24 @@ function av_metadata_get(m: PAVMetadata; key: {const} PAnsiChar;
*)
function av_metadata_set(var pm: PAVMetadata; key: {const} PAnsiChar; value: {const} PAnsiChar): cint;
cdecl; external av__format;
-{$IF LIBAVFORMAT_VERSION >= 52061000} // >= 52.61.0
+ {$IF LIBAVFORMAT_VERSION >= 52061000} // >= 52.61.0
deprecated;
-{$IFEND}
+ {$IFEND}
+{$ELSE}
+ {$IFDEF FF_API_OLD_METADATA}
+(**
+ * Set the given tag in *pm, overwriting an existing tag.
+ *
+ * @param pm pointer to a pointer to a metadata struct. If *pm is NULL
+ * a metadata struct is allocated and put in *pm.
+ * @param key tag key to add to *pm (will be av_strduped)
+ * @param value tag value to add to *pm (will be av_strduped)
+ * @return >= 0 on success otherwise an error code <0
+ * @deprecated Use av_metadata_set2() instead.
+ *)
+function av_metadata_set(var pm: PAVMetadata; key: {const} PAnsiChar; value: {const} PAnsiChar): cint;
+ cdecl; external av__format; deprecated;
+ {$IFEND}
{$IFEND}
{$IF LIBAVFORMAT_VERSION >= 52043000} // >= 52.43.0
@@ -407,13 +438,21 @@ const
AVFMTCTX_NOHEADER = $0001; (**< signal that no header is present
(streams are added dynamically) *)
-{$IF LIBAVFORMAT_VERSION_MAJOR < 53}
+
+{$IF LIBAVFORMAT_VERSION < 52078003} // < 52.78.3
+ {$IF LIBAVFORMAT_VERSION_MAJOR < 53}
MAX_STREAMS = 20;
-{$ELSE}
-{$IF LIBAVFORMAT_VERSION < 52068000} // < 52.68.0
+ {$ELSE}
+ {$IF LIBAVFORMAT_VERSION < 52068000} // < 52.68.0
MAX_STREAMS = 100;
+ {$IFEND}
+ {$IFEND}
+{$ELSE}
+ {$IFDEF FF_API_MAX_STREAMS}
+ MAX_STREAMS = 20;
+ {$IFEND}
{$IFEND}
-{$IFEND}
+
AVFMT_NOOUTPUTLOOP = -1;
AVFMT_INFINITEOUTPUTLOOP = 0;
@@ -520,8 +559,12 @@ type
id: cint; ///< unique ID to identify the chapter
time_base: TAVRational; ///< time base in which the start/end timestamps are specified
start, end_: cint64; ///< chapter start/end time in time_base units
- {$IF LIBAVFORMAT_VERSION < 53000000} // 53.00.0
+ {$IF LIBAVFORMAT_VERSION < 52078003} // < 52.78.3
title: PAnsiChar; ///< chapter title
+ {$ELSE}
+ {$IFDEF FF_API_OLD_METADATA}
+ title: PAnsiChar; ///< chapter title
+ {$IFEND}
{$IFEND}
{$IF LIBAVFORMAT_VERSION >= 52024001} // 52.24.1
metadata: PAVMetadata;
@@ -825,8 +868,12 @@ type
*)
duration: cint64;
- {$IF LIBAVFORMAT_VERSION_MAJOR < 53}
+ {$IF LIBAVFORMAT_VERSION < 52078003} // < 52.78.3
language: array [0..3] of PAnsiChar; (**< ISO 639-2/B 3-letter language code (empty string if undefined) *)
+ {$ELSE}
+ {$IFDEF FF_API_OLD_METADATA}
+ language: array [0..3] of PAnsiChar; (**< ISO 639-2/B 3-letter language code (empty string if undefined) *)
+ {$IFEND}
{$IFEND}
(* av_read_frame() support *)
@@ -848,8 +895,12 @@ type
unused: array [0..4] of cint64;
{$IFEND}
- {$IF (LIBAVFORMAT_VERSION >= 52006000) and (LIBAVFORMAT_VERSION_MAJOR < 53)} // 52.6.0 - 53.0.0
+ {$IF (LIBAVFORMAT_VERSION >= 52006000) and (LIBAVFORMAT_VERSION < 52078003)} // 52.6.0 - 52.78.2
filename: PAnsiChar; (**< source filename of the stream *)
+ {$ELSE}
+ {$IFDEF FF_API_OLD_METADATA}
+ filename: PAnsiChar; (**< source filename of the stream *)
+ {$IFEND}
{$IFEND}
{$IF LIBAVFORMAT_VERSION >= 52008000} // 52.8.0
@@ -947,7 +998,17 @@ type
filename: array [0..1023] of AnsiChar; (* input or output filename *)
(* stream info *)
timestamp: cint64;
- {$IF LIBAVFORMAT_VERSION < 53000000} // 53.00.0
+ {$IF LIBAVFORMAT_VERSION < 52078003} // < 52.78.3
+ title: array [0..511] of AnsiChar;
+ author: array [0..511] of AnsiChar;
+ copyright: array [0..511] of AnsiChar;
+ comment: array [0..511] of AnsiChar;
+ album: array [0..511] of AnsiChar;
+ year: cint; (**< ID3 year, 0 if none *)
+ track: cint; (**< track number, 0 if none *)
+ genre: array [0..31] of AnsiChar; (**< ID3 genre *)
+ {$ELSE}
+ {$IFDEF FF_API_OLD_METADATA}
title: array [0..511] of AnsiChar;
author: array [0..511] of AnsiChar;
copyright: array [0..511] of AnsiChar;
@@ -956,6 +1017,7 @@ type
year: cint; (**< ID3 year, 0 if none *)
track: cint; (**< track number, 0 if none *)
genre: array [0..31] of AnsiChar; (**< ID3 genre *)
+ {$IFEND}
{$IFEND}
ctx_flags: cint; (**< Format-specific flags, see AVFMTCTX_xx *)
@@ -1143,9 +1205,14 @@ type
*)
TAVProgram = record
id : cint;
- {$IF LIBAVFORMAT_VERSION < 53000000} // 53.00.0
+ {$IF LIBAVFORMAT_VERSION < 52078003} // < 52.78.3
+ provider_name : PAnsiChar; ///< network name for DVB streams
+ name : PAnsiChar; ///< service name for DVB streams
+ {$ELSE}
+ {$IFDEF FF_API_OLD_METADATA}
provider_name : PAnsiChar; ///< network name for DVB streams
name : PAnsiChar; ///< service name for DVB streams
+ {$IFEND}
{$IFEND}
flags : cint;
discard : TAVDiscard; ///< selects which program to discard and which to feed to the caller
diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas
index c32b86be..1eccd6b1 100644
--- a/src/lib/ffmpeg/avio.pas
+++ b/src/lib/ffmpeg/avio.pas
@@ -28,7 +28,7 @@
* header, so it should not be directly included in your projects.
*
* update to
- * Max. avformat version: 52.67.0, revision 23357, Sun May 30 21:30:00 2010 CET
+ * Max. avformat version: 52.78.3, revision 24841, Thu Aug 26 02:00:00 2010 CET
*)
unit avio;
@@ -91,8 +91,12 @@ type
*)
PURLContext = ^TURLContext;
TURLContext = record
- {$IF LIBAVFORMAT_VERSION_MAJOR >= 53}
+ {$IF LIBAVFORMAT_VERSION < 52078003} // < 52.78.3
av_class: {const} PAVClass; ///< information for av_log(). Set by url_open().
+ {$ELSE}
+ {$IFDEF FF_API_URL_CLASS}
+ av_class: {const} PAVClass; ///< information for av_log(). Set by url_open().
+ {$IFEND}
{$IFEND}
prot: PURLProtocol;
flags: cint;
@@ -101,8 +105,8 @@ type
priv_data: pointer;
filename: PAnsiChar; (**< specified URL *)
{$IF LIBAVFORMAT_VERSION >= 52070000} // 52.70.0
-{$IFEND}
is_connected: cint;
+{$IFEND}
end;
PPURLContext = ^PURLContext;
@@ -388,8 +392,12 @@ function av_url_read_seek(h: PURLContext; stream_index: cint;
(**
var
-{$IF LIBAVFORMAT_VERSION_MAJOR < 53}
+{$IF LIBAVFORMAT_VERSION < 52078003} // < 52.78.3
+ first_protocol: PURLProtocol; external av__format;
+{$ELSE}
+ {$IFDEF FF_API_REGISTER_PROTOCOL}
first_protocol: PURLProtocol; external av__format;
+ {$IFEND}
{$IFEND}
url_interrupt_cb: PURLInterruptCB; external av__format;
**)
@@ -420,8 +428,10 @@ function register_protocol(protocol: PURLProtocol): cint;
function av_register_protocol(protocol: PURLProtocol): cint;
cdecl; external av__format name 'register_protocol';
{$ELSE}
+ {$IFDEF FF_API_REGISTER_PROTOCOL}
function av_register_protocol(protocol: PURLProtocol): cint;
cdecl; external av__format;
+ {$IFEND}
{$IFEND}
{$IF LIBAVFORMAT_VERSION >= 52069000} // 52.69.0
function av_register_protocol2(protocol: PURLProtocol; size: cint): cint;
@@ -526,6 +536,7 @@ function url_ferror(s: PByteIOContext): cint;
function av_url_read_fpause(h: PByteIOContext; pause: cint): cint;
cdecl; external av__format;
{$IFEND}
+
{$IF LIBAVFORMAT_VERSION >= 52001000} // 52.1.0
function av_url_read_fseek(h: PByteIOContext; stream_index: cint;
timestamp: cint64; flags: cint): cint64;
@@ -591,8 +602,15 @@ function get_be64(s: PByteIOContext): cuint64;
cdecl; external av__format;
{$IF LIBAVFORMAT_VERSION >= 51017001} // 51.17.1
+ {$IF LIBAVFORMAT_VERSION < 52078003} // < 52.78.3
+function ff_get_v(bc: PByteIOContext): cuint64;
+ cdecl; external av__format;
+ {$ELSE}
+ {$IFDEF FF_API_URL_RESETBUF}
function ff_get_v(bc: PByteIOContext): cuint64;
cdecl; external av__format;
+ {$IFEND}
+ {$IFEND}
{$IFEND}
function url_is_streamed(s: PByteIOContext): cint; {$IFDEF HasInline}inline;{$ENDIF}
@@ -744,6 +762,7 @@ function ff_crc04C11DB7_update(checksum: culong; buf: {const} PByteArray;
len: cuint): culong;
cdecl; external av__format;
{$IFEND}
+
function get_checksum(s: PByteIOContext): culong;
cdecl; external av__format;
procedure init_gsum(s: PByteIOContext;
@@ -756,6 +775,7 @@ function udp_set_remote_url(h: PURLContext; uri: {const} PAnsiChar): cint;
cdecl; external av__format;
function udp_get_local_port(h: PURLContext): cint;
cdecl; external av__format;
+
{$IF LIBAVFORMAT_VERSION_MAJOR <= 52}
function udp_get_file_handle(h: PURLContext): cint;
cdecl; external av__format;