From 1ba91d5a0e1df7419a561f6dcf16a0839509a5e7 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Wed, 27 Aug 2008 13:28:57 +0000 Subject: Reordering of the directories[1]: moving Game/Code to src git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1302 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 538 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 538 insertions(+) create mode 100644 src/lib/ffmpeg/avio.pas (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas new file mode 100644 index 00000000..70912e60 --- /dev/null +++ b/src/lib/ffmpeg/avio.pas @@ -0,0 +1,538 @@ +(* + * unbuffered io for ffmpeg system + * copyright (c) 2001 Fabrice Bellard + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +(* + * This is a part of Pascal porting of ffmpeg. + * - Originally by Victor Zinetz for Delphi and Free Pascal on Windows. + * - For Mac OS X, some modifications were made by The Creative CAT, denoted as CAT + * in the source codes. + * - Changes and updates by the UltraStar Deluxe Team + *) + +(* + * Conversion of libavformat/avio.h + * revision 12658, Mon Mar 31 17:31:11 2008 UTC + *) + +unit avio; + +{$IFDEF FPC} + {$MODE DELPHI } + {$PACKENUM 4} (* use 4-byte enums *) + {$PACKRECORDS C} (* C/C++-compatible record packing *) +{$ELSE} + {$MINENUMSIZE 4} (* use 4-byte enums *) +{$ENDIF} + +{$I switches.inc} + +interface + +uses + ctypes, + avutil, + avcodec, + UConfig; + +(* output byte stream handling *) + +type + TOffset = cint64; + +(* unbuffered I/O *) + +const + URL_RDONLY = 0; + URL_WRONLY = 1; + URL_RDWR = 2; + + (** + * Passing this as the "whence" parameter to a seek function causes it to + * return the filesize without seeking anywhere. Supporting this is optional. + * If it is not supported then the seek function will return <0. + *) + AVSEEK_SIZE = $10000; + +type + TURLInterruptCB = function (): cint; cdecl; + +type + PURLProtocol = ^TURLProtocol; + + (** + * URL Context. + * New fields can be added to the end with minor version bumps. + * Removal, reordering and changes to existing fields require a major + * version bump. + * sizeof(URLContext) must not be used outside libav*. + *) + PURLContext = ^TURLContext; + TURLContext = record + {$IF LIBAVFORMAT_VERSION_MAJOR >= 53} + av_class: {const} PAVClass; ///< information for av_log(). Set by url_open(). + {$IFEND} + prot: PURLProtocol; + flags: cint; + is_streamed: cint; (**< true if streamed (no seek possible), default = false *) + max_packet_size: cint; (**< if non zero, the stream is packetized with this max packet size *) + priv_data: pointer; + filename: PChar; (**< specified filename *) + end; + + PURLPollEntry = ^TURLPollEntry; + TURLPollEntry = record + handle: PURLContext; + events: cint; + revents: cint; + end; + + TURLProtocol = record + name: PChar; + url_open: function (h: PURLContext; filename: {const} PChar; flags: cint): cint; cdecl; + url_read: function (h: PURLContext; buf: PChar; size: cint): cint; cdecl; + url_write: function (h: PURLContext; buf: PChar; size: cint): cint; cdecl; + url_seek: function (h: PURLContext; pos: TOffset; whence: cint): TOffset; cdecl; + url_close: function (h: PURLContext): cint; cdecl; + next: PURLProtocol; + {$IF (LIBAVFORMAT_VERSION >= 52001000) and (LIBAVFORMAT_VERSION < 52004000)} // 52.1.0 .. 52.4.0 + url_read_play: function (h: PURLContext): cint; + url_read_pause: function (h: PURLContext): cint; + {$IFEND} + {$IF LIBAVFORMAT_VERSION >= 52004000} // 52.4.0 + url_read_pause: function (h: PURLContext; pause: cint): cint; cdecl; + {$IFEND} + {$IF LIBAVFORMAT_VERSION >= 52001000} // 52.1.0 + url_read_seek: function (h: PURLContext; + stream_index: cint; timestamp: cint64; flags: cint): TOffset; cdecl; + {$IFEND} + end; + + (** + * Bytestream IO Context. + * New fields can be added to the end with minor version bumps. + * Removal, reordering and changes to existing fields require a major + * version bump. + * sizeof(ByteIOContext) must not be used outside libav*. + *) + PByteIOContext = ^TByteIOContext; + TByteIOContext = record + buffer: PChar; + buffer_size: cint; + buf_ptr: PChar; + buf_end: PChar; + opaque: pointer; + read_packet: function (opaque: pointer; buf: PChar; buf_size: cint): cint; cdecl; + write_packet: function (opaque: pointer; buf: PChar; buf_size: cint): cint; cdecl; + seek: function (opaque: pointer; offset: TOffset; whence: cint): TOffset; cdecl; + pos: TOffset; (* position in the file of the current buffer *) + must_flush: cint; (* true if the next seek should flush *) + eof_reached: cint; (* true if eof reached *) + write_flag: cint; (* true if open for writing *) + is_streamed: cint; + max_packet_size: cint; + checksum: culong; + checksum_ptr: PCuchar; + update_checksum: function (checksum: culong; buf: {const} PChar; size: cuint): culong; cdecl; + error: cint; ///< contains the error code or 0 if no error happened + {$IF (LIBAVFORMAT_VERSION >= 52001000) and (LIBAVFORMAT_VERSION < 52004000)} // 52.1.0 .. 52.4.0 + read_play: function(opaque: Pointer): cint; cdecl; + read_pause: function(opaque: Pointer): cint; cdecl; + {$IFEND} + {$IF LIBAVFORMAT_VERSION >= 52004000} // 52.4.0 + read_pause: function(opaque: Pointer; pause: cint): cint; cdecl; + {$IFEND} + {$IF LIBAVFORMAT_VERSION >= 52001000} // 52.1.0 + read_seek: function(opaque: Pointer; + stream_index: cint; timestamp: cint64; flags: cint): TOffset; cdecl; + {$IFEND} + end; + +function url_open(h: PPointer; filename: {const} PChar; flags: cint): cint; + cdecl; external av__format; +function url_read (h: PURLContext; buf: PChar; size: cint): cint; + cdecl; external av__format; +function url_write (h: PURLContext; buf: PChar; size: cint): cint; + cdecl; external av__format; +function url_seek (h: PURLContext; pos: TOffset; whence: cint): TOffset; + cdecl; external av__format; +function url_close (h: PURLContext): cint; + cdecl; external av__format; +function url_exist(filename: {const} PChar): cint; + cdecl; external av__format; +function url_filesize (h: PURLContext): TOffset; + cdecl; external av__format; + +(** + * Return the maximum packet size associated to packetized file + * handle. If the file is not packetized (stream like HTTP or file on + * disk), then 0 is returned. + * + * @param h file handle + * @return maximum packet size in bytes + *) +function url_get_max_packet_size(h: PURLContext): cint; + cdecl; external av__format; +procedure url_get_filename(h: PURLContext; buf: PChar; buf_size: cint); + cdecl; external av__format; + +(** + * The callback is called in blocking functions to test regulary if + * asynchronous interruption is needed. AVERROR(EINTR) is returned + * in this case by the interrupted function. 'NULL' means no interrupt + * callback is given. + *) +procedure url_set_interrupt_cb (interrupt_cb: TURLInterruptCB); + cdecl; external av__format; + +(* not implemented *) +function url_poll(poll_table: PURLPollEntry; n: cint; timeout: cint): cint; + cdecl; external av__format; + +{$IF LIBAVFORMAT_VERSION >= 52004000} // 52.4.0 +(** + * Pause and resume playing - only meaningful if using a network streaming + * protocol (e.g. MMS). + * @param pause 1 for pause, 0 for resume + *) +function av_url_read_pause(h: PURLContext; pause: cint): cint; + cdecl; external av__format; +{$IFEND} + +{$IF LIBAVFORMAT_VERSION >= 52001000} // 52.1.0 +(** + * Seek to a given timestamp relative to some component stream. + * Only meaningful if using a network streaming protocol (e.g. MMS.). + * @param stream_index The stream index that the timestamp is relative to. + * If stream_index is (-1) the timestamp should be in AV_TIME_BASE + * units from the beginning of the presentation. + * If a stream_index >= 0 is used and the protocol does not support + * seeking based on component streams, the call will fail with ENOTSUP. + * @param timestamp timestamp in AVStream.time_base units + * or if there is no stream specified then in AV_TIME_BASE units. + * @param flags Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE + * and AVSEEK_FLAG_ANY. The protocol may silently ignore + * AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will + * fail with ENOTSUP if used and not supported. + * @return >= 0 on success + * @see AVInputFormat::read_seek + *) +function av_url_read_seek(h: PURLContext; + stream_index: cint; timestamp: cint64; flags: cint): TOffset; + cdecl; external av__format; +{$IFEND} + +{ +var + first_protocol: PURLProtocol; external av__format; + url_interrupt_cb: PURLInterruptCB; external av__format; +} + +{$IF LIBAVFORMAT_VERSION >= 52002000} // 52.2.0 +function av_protocol_next(p: PURLProtocol): PURLProtocol; + cdecl; external av__format; +{$IFEND} + +function register_protocol (protocol: PURLProtocol): cint; + cdecl; external av__format; + +type + TReadWriteFunc = function (opaque: Pointer; buf: PChar; buf_size: cint): cint; cdecl; + TSeekFunc = function (opaque: Pointer; offset: TOffset; whence: cint): TOffset; cdecl; + +function init_put_byte(s: PByteIOContext; + buffer: PChar; + buffer_size: cint; write_flag: cint; + opaque: pointer; + read_packet: TReadWriteFunc; + write_packet: TReadWriteFunc; + seek: TSeekFunc): cint; + cdecl; external av__format; +{$IF LIBAVFORMAT_VERSION >= 52004000} // 52.4.0 +function av_alloc_put_byte( + buffer: PChar; + buffer_size: cint; + write_flag: cint; + opaque: Pointer; + read_packet: TReadWriteFunc; + write_packet: TReadWriteFunc; + seek: TSeekFunc): PByteIOContext; + cdecl; external av__format; +{$IFEND} + +procedure put_byte(s: PByteIOContext; b: cint); + cdecl; external av__format; +procedure put_buffer (s: PByteIOContext; buf: {const} PChar; size: cint); + cdecl; external av__format; +procedure put_le64(s: PByteIOContext; val: cuint64); + cdecl; external av__format; +procedure put_be64(s: PByteIOContext; val: cuint64); + cdecl; external av__format; +procedure put_le32(s: PByteIOContext; val: cuint); + cdecl; external av__format; +procedure put_be32(s: PByteIOContext; val: cuint); + cdecl; external av__format; +procedure put_le24(s: PByteIOContext; val: cuint); + cdecl; external av__format; +procedure put_be24(s: PByteIOContext; val: cuint); + cdecl; external av__format; +procedure put_le16(s: PByteIOContext; val: cuint); + cdecl; external av__format; +procedure put_be16(s: PByteIOContext; val: cuint); + cdecl; external av__format; +procedure put_tag(s: PByteIOContext; tag: {const} PChar); + cdecl; external av__format; + +procedure put_strz(s: PByteIOContext; buf: {const} PChar); + cdecl; external av__format; + +(** + * fseek() equivalent for ByteIOContext. + * @return new position or AVERROR. + *) +function url_fseek(s: PByteIOContext; offset: TOffset; whence: cint): TOffset; + cdecl; external av__format; + +(** + * Skip given number of bytes forward. + * @param offset number of bytes + *) +procedure url_fskip(s: PByteIOContext; offset: TOffset); + cdecl; external av__format; + +(** + * ftell() equivalent for ByteIOContext. + * @return position or AVERROR. + *) +function url_ftell(s: PByteIOContext): TOffset; + cdecl; external av__format; + +(** + * Gets the filesize. + * @return filesize or AVERROR + *) +function url_fsize(s: PByteIOContext): TOffset; + cdecl; external av__format; + +(** + * feof() equivalent for ByteIOContext. + * @return non zero if and only if end of file + *) +function url_feof(s: PByteIOContext): cint; + cdecl; external av__format; + +function url_ferror(s: PByteIOContext): cint; + cdecl; external av__format; + +{$IF LIBAVFORMAT_VERSION >= 52004000} // 52.4.0 +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): TOffset; + cdecl; external av__format; +{$IFEND} + +const + URL_EOF = -1; +(** @note return URL_EOF (-1) if EOF *) +function url_fgetc(s: PByteIOContext): cint; + cdecl; external av__format; + +(** @warning currently size is limited *) +function url_fprintf(s: PByteIOContext; fmt: {const} PChar; args: array of const): cint; + cdecl; external av__format; + +(** @note unlike fgets, the EOL character is not returned and a whole + line is parsed. return NULL if first char read was EOF *) +function url_fgets(s: PByteIOContext; buf: PChar; buf_size: cint): PChar; + cdecl; external av__format; + +procedure put_flush_packet (s: PByteIOContext); + cdecl; external av__format; + + +(** + * Reads size bytes from ByteIOContext into buf. + * @returns number of bytes read or AVERROR + *) +function get_buffer(s: PByteIOContext; buf: PChar; size: cint): cint; + cdecl; external av__format; + +(** + * Reads size bytes from ByteIOContext into buf. + * This reads at most 1 packet. If that is not enough fewer bytes will be + * returned. + * @returns number of bytes read or AVERROR + *) +function get_partial_buffer(s: PByteIOContext; buf: PChar; size: cint): cint; + cdecl; external av__format; + +(** @note return 0 if EOF, so you cannot use it if EOF handling is + necessary *) +function get_byte(s: PByteIOContext): cint; + cdecl; external av__format; +function get_le24(s: PByteIOContext): cuint; + cdecl; external av__format; +function get_le32(s: PByteIOContext): cuint; + cdecl; external av__format; +function get_le64(s: PByteIOContext): cuint64; + cdecl; external av__format; +function get_le16(s: PByteIOContext): cuint; + cdecl; external av__format; + +function get_strz(s: PByteIOContext; buf: PChar; maxlen: cint): PChar; + cdecl; external av__format; +function get_be16(s: PByteIOContext): cuint; + cdecl; external av__format; +function get_be24(s: PByteIOContext): cuint; + cdecl; external av__format; +function get_be32(s: PByteIOContext): cuint; + cdecl; external av__format; +function get_be64(s: PByteIOContext): cuint64; + cdecl; external av__format; + +{$IF LIBAVFORMAT_VERSION >= 51017001} // 51.17.1 +function ff_get_v(bc: PByteIOContext): cuint64; + cdecl; external av__format; +{$IFEND} + +function url_is_streamed(s: PByteIOContext): cint; {$IFDEF HasInline}inline;{$ENDIF} + +(** @note when opened as read/write, the buffers are only used for + writing *) +{$IF LIBAVFORMAT_VERSION >= 52000000} // 52.0.0 +function url_fdopen (var s: PByteIOContext; h: PURLContext): cint; +{$ELSE} +function url_fdopen (s: PByteIOContext; h: PURLContext): cint; +{$IFEND} + cdecl; external av__format; + +(** @warning must be called before any I/O *) +function url_setbufsize (s: PByteIOContext; buf_size: cint): cint; + cdecl; external av__format; + +{$IF LIBAVFORMAT_VERSION >= 51015000} // 51.15.0 +(** Reset the buffer for reading or writing. + * @note Will drop any data currently in the buffer without transmitting it. + * @param flags URL_RDONLY to set up the buffer for reading, or URL_WRONLY + * to set up the buffer for writing. *) +function url_resetbuf(s: PByteIOContext; flags: cint): cint; + cdecl; external av__format; +{$IFEND} + +(** @note when opened as read/write, the buffers are only used for + writing *) +{$IF LIBAVFORMAT_VERSION >= 52000000} // 52.0.0 +function url_fopen(var s: PByteIOContext; filename: {const} PChar; flags: cint): cint; +{$ELSE} +function url_fopen(s: PByteIOContext; filename: {const} PChar; flags: cint): cint; +{$IFEND} + cdecl; external av__format; +function url_fclose(s: PByteIOContext): cint; + cdecl; external av__format; +function url_fileno(s: PByteIOContext): PURLContext; + cdecl; external av__format; + +(** + * Return the maximum packet size associated to packetized buffered file + * handle. If the file is not packetized (stream like http or file on + * disk), then 0 is returned. + * + * @param s buffered file handle + * @return maximum packet size in bytes + *) +function url_fget_max_packet_size (s: PByteIOContext): cint; + cdecl; external av__format; + +{$IF LIBAVFORMAT_VERSION >= 52000000} // 52.0.0 +function url_open_buf(var s: PByteIOContext; buf: PChar; buf_size: cint; flags: cint): cint; +{$ELSE} +function url_open_buf(s: PByteIOContext; buf: PChar; buf_size: cint; flags: cint): cint; +{$IFEND} + cdecl; external av__format; + +(** return the written or read size *) +function url_close_buf(s: PByteIOContext): cint; + cdecl; external av__format; + +(** + * Open a write only memory stream. + * + * @param s new IO context + * @return zero if no error. + *) +{$IF LIBAVFORMAT_VERSION >= 52000000} // 52.0.0 +function url_open_dyn_buf(var s: PByteIOContext): cint; +{$ELSE} +function url_open_dyn_buf(s: PByteIOContext): cint; +{$IFEND} + cdecl; external av__format; + +(** + * Open a write only packetized memory stream with a maximum packet + * size of 'max_packet_size'. The stream is stored in a memory buffer + * with a big endian 4 byte header giving the packet size in bytes. + * + * @param s new IO context + * @param max_packet_size maximum packet size (must be > 0) + * @return zero if no error. + *) +{$IF LIBAVFORMAT_VERSION >= 52000000} // 52.0.0 +function url_open_dyn_packet_buf(var s: PByteIOContext; max_packet_size: cint): cint; +{$ELSE} +function url_open_dyn_packet_buf(s: PByteIOContext; max_packet_size: cint): cint; +{$IFEND} + cdecl; external av__format; + +(** + * Return the written size and a pointer to the buffer. The buffer + * must be freed with av_free(). + * @param s IO context + * @param pbuffer pointer to a byte buffer + * @return the length of the byte buffer + *) +function url_close_dyn_buf(s: PByteIOContext; pbuffer:PPointer): cint; + cdecl; external av__format; + +{$IF LIBAVFORMAT_VERSION >= 51017001} // 51.17.1 +function ff_crc04C11DB7_update(checksum: culong; buf: {const} PChar; len: cuint): culong; + cdecl; external av__format; +{$IFEND} +function get_checksum(s: PByteIOContext): culong; + cdecl; external av__format; +procedure init_checksum (s: PByteIOContext; update_checksum: pointer; checksum: culong); + cdecl; external av__format; + +(* udp.c *) +function udp_set_remote_url(h: PURLContext; uri: {const} PChar): cint; + cdecl; external av__format; +function udp_get_local_port(h: PURLContext): cint; + cdecl; external av__format; +function udp_get_file_handle(h: PURLContext): cint; + cdecl; external av__format; + +implementation + +function url_is_streamed(s: PByteIOContext): cint; +begin + Result := s^.is_streamed; +end; + +end. -- cgit v1.2.3 From 08a0ddf3d8f9eb819e03d9cd6c8d79bd8634fec6 Mon Sep 17 00:00:00 2001 From: tobigun Date: Wed, 1 Oct 2008 12:28:15 +0000 Subject: - FFmpeg header update - update to newest revision - if linked libs are too new, USDX will not compile anymore and display an error message (to avoid mysterious crashes if an unsupported version of FFmpeg is used) - comment change in UVisualizer.pas git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1428 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 70912e60..5107a9fb 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -27,7 +27,7 @@ (* * Conversion of libavformat/avio.h - * revision 12658, Mon Mar 31 17:31:11 2008 UTC + * revision 15120, Sun Aug 31 07:39:47 2008 UTC *) unit avio; @@ -94,6 +94,7 @@ type priv_data: pointer; filename: PChar; (**< specified filename *) end; + PPURLContext = ^PURLContext; PURLPollEntry = ^TURLPollEntry; TURLPollEntry = record @@ -163,6 +164,12 @@ type {$IFEND} end; + +{$IF LIBAVFORMAT_VERSION >= 52021000} // 52.21.0 +function url_open_protocol(puc: PPURLContext; up: PURLProtocol; + filename: {const} PChar; flags: cint): cint; + cdecl; external av__format; +{$IFEND} function url_open(h: PPointer; filename: {const} PChar; flags: cint): cint; cdecl; external av__format; function url_read (h: PURLContext; buf: PChar; size: cint): cint; -- cgit v1.2.3 From e24412a795e205494d0a7420fd582841c1fc1dd4 Mon Sep 17 00:00:00 2001 From: tobigun Date: Wed, 4 Feb 2009 17:17:51 +0000 Subject: ffmpeg header update git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1581 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 119 ++++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 60 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 5107a9fb..33778206 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -27,7 +27,7 @@ (* * Conversion of libavformat/avio.h - * revision 15120, Sun Aug 31 07:39:47 2008 UTC + * revision 16100, Sat Dec 13 13:39:13 2008 UTC *) unit avio; @@ -48,13 +48,9 @@ uses ctypes, avutil, avcodec, + SysUtils, UConfig; -(* output byte stream handling *) - -type - TOffset = cint64; - (* unbuffered I/O *) const @@ -92,7 +88,7 @@ type is_streamed: cint; (**< true if streamed (no seek possible), default = false *) max_packet_size: cint; (**< if non zero, the stream is packetized with this max packet size *) priv_data: pointer; - filename: PChar; (**< specified filename *) + filename: PAnsiChar; (**< specified filename *) end; PPURLContext = ^PURLContext; @@ -104,11 +100,11 @@ type end; TURLProtocol = record - name: PChar; - url_open: function (h: PURLContext; filename: {const} PChar; flags: cint): cint; cdecl; - url_read: function (h: PURLContext; buf: PChar; size: cint): cint; cdecl; - url_write: function (h: PURLContext; buf: PChar; size: cint): cint; cdecl; - url_seek: function (h: PURLContext; pos: TOffset; whence: cint): TOffset; cdecl; + name: PAnsiChar; + url_open: function (h: PURLContext; filename: {const} PAnsiChar; flags: cint): cint; cdecl; + url_read: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; + url_write: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; + url_seek: function (h: PURLContext; pos: cint64; whence: cint): cint64; cdecl; url_close: function (h: PURLContext): cint; cdecl; next: PURLProtocol; {$IF (LIBAVFORMAT_VERSION >= 52001000) and (LIBAVFORMAT_VERSION < 52004000)} // 52.1.0 .. 52.4.0 @@ -119,8 +115,8 @@ type url_read_pause: function (h: PURLContext; pause: cint): cint; cdecl; {$IFEND} {$IF LIBAVFORMAT_VERSION >= 52001000} // 52.1.0 - url_read_seek: function (h: PURLContext; - stream_index: cint; timestamp: cint64; flags: cint): TOffset; cdecl; + url_read_seek: function (h: PURLContext; stream_index: cint; + timestamp: cint64; flags: cint): cint64; cdecl; {$IFEND} end; @@ -133,23 +129,23 @@ type *) PByteIOContext = ^TByteIOContext; TByteIOContext = record - buffer: PChar; + buffer: PByteArray; buffer_size: cint; - buf_ptr: PChar; - buf_end: PChar; + buf_ptr: PByteArray; + buf_end: PByteArray; opaque: pointer; - read_packet: function (opaque: pointer; buf: PChar; buf_size: cint): cint; cdecl; - write_packet: function (opaque: pointer; buf: PChar; buf_size: cint): cint; cdecl; - seek: function (opaque: pointer; offset: TOffset; whence: cint): TOffset; cdecl; - pos: TOffset; (* position in the file of the current buffer *) + read_packet: function (opaque: pointer; buf: PByteArray; buf_size: cint): cint; cdecl; + write_packet: function (opaque: pointer; buf: PByteArray; buf_size: cint): cint; cdecl; + seek: function (opaque: pointer; offset: cint64; whence: cint): cint64; cdecl; + pos: cint64; (* position in the file of the current buffer *) must_flush: cint; (* true if the next seek should flush *) eof_reached: cint; (* true if eof reached *) write_flag: cint; (* true if open for writing *) is_streamed: cint; max_packet_size: cint; checksum: culong; - checksum_ptr: PCuchar; - update_checksum: function (checksum: culong; buf: {const} PChar; size: cuint): culong; cdecl; + checksum_ptr: PByteArray; + update_checksum: function (checksum: culong; buf: {const} PByteArray; size: cuint): culong; cdecl; error: cint; ///< contains the error code or 0 if no error happened {$IF (LIBAVFORMAT_VERSION >= 52001000) and (LIBAVFORMAT_VERSION < 52004000)} // 52.1.0 .. 52.4.0 read_play: function(opaque: Pointer): cint; cdecl; @@ -159,30 +155,30 @@ type read_pause: function(opaque: Pointer; pause: cint): cint; cdecl; {$IFEND} {$IF LIBAVFORMAT_VERSION >= 52001000} // 52.1.0 - read_seek: function(opaque: Pointer; - stream_index: cint; timestamp: cint64; flags: cint): TOffset; cdecl; + read_seek: function(opaque: Pointer; stream_index: cint; + timestamp: cint64; flags: cint): cint64; cdecl; {$IFEND} end; {$IF LIBAVFORMAT_VERSION >= 52021000} // 52.21.0 function url_open_protocol(puc: PPURLContext; up: PURLProtocol; - filename: {const} PChar; flags: cint): cint; + filename: {const} PAnsiChar; flags: cint): cint; cdecl; external av__format; {$IFEND} -function url_open(h: PPointer; filename: {const} PChar; flags: cint): cint; +function url_open(h: PPointer; filename: {const} PAnsiChar; flags: cint): cint; cdecl; external av__format; -function url_read (h: PURLContext; buf: PChar; size: cint): cint; +function url_read (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; external av__format; -function url_write (h: PURLContext; buf: PChar; size: cint): cint; +function url_write (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; external av__format; -function url_seek (h: PURLContext; pos: TOffset; whence: cint): TOffset; +function url_seek (h: PURLContext; pos: cint64; whence: cint): cint64; cdecl; external av__format; function url_close (h: PURLContext): cint; cdecl; external av__format; -function url_exist(filename: {const} PChar): cint; +function url_exist(filename: {const} PAnsiChar): cint; cdecl; external av__format; -function url_filesize (h: PURLContext): TOffset; +function url_filesize (h: PURLContext): cint64; cdecl; external av__format; (** @@ -195,7 +191,7 @@ function url_filesize (h: PURLContext): TOffset; *) function url_get_max_packet_size(h: PURLContext): cint; cdecl; external av__format; -procedure url_get_filename(h: PURLContext; buf: PChar; buf_size: cint); +procedure url_get_filename(h: PURLContext; buf: PAnsiChar; buf_size: cint); cdecl; external av__format; (** @@ -239,8 +235,8 @@ function av_url_read_pause(h: PURLContext; pause: cint): cint; * @return >= 0 on success * @see AVInputFormat::read_seek *) -function av_url_read_seek(h: PURLContext; - stream_index: cint; timestamp: cint64; flags: cint): TOffset; +function av_url_read_seek(h: PURLContext; stream_index: cint; + timestamp: cint64; flags: cint): cint64; cdecl; external av__format; {$IFEND} @@ -259,11 +255,11 @@ function register_protocol (protocol: PURLProtocol): cint; cdecl; external av__format; type - TReadWriteFunc = function (opaque: Pointer; buf: PChar; buf_size: cint): cint; cdecl; - TSeekFunc = function (opaque: Pointer; offset: TOffset; whence: cint): TOffset; cdecl; + TReadWriteFunc = function (opaque: Pointer; buf: PByteArray; buf_size: cint): cint; cdecl; + TSeekFunc = function (opaque: Pointer; offset: cint64; whence: cint): cint64; cdecl; function init_put_byte(s: PByteIOContext; - buffer: PChar; + buffer: PByteArray; buffer_size: cint; write_flag: cint; opaque: pointer; read_packet: TReadWriteFunc; @@ -272,7 +268,7 @@ function init_put_byte(s: PByteIOContext; cdecl; external av__format; {$IF LIBAVFORMAT_VERSION >= 52004000} // 52.4.0 function av_alloc_put_byte( - buffer: PChar; + buffer: PByteArray; buffer_size: cint; write_flag: cint; opaque: Pointer; @@ -284,7 +280,7 @@ function av_alloc_put_byte( procedure put_byte(s: PByteIOContext; b: cint); cdecl; external av__format; -procedure put_buffer (s: PByteIOContext; buf: {const} PChar; size: cint); +procedure put_buffer (s: PByteIOContext; buf: {const} PByteArray; size: cint); cdecl; external av__format; procedure put_le64(s: PByteIOContext; val: cuint64); cdecl; external av__format; @@ -302,38 +298,38 @@ procedure put_le16(s: PByteIOContext; val: cuint); cdecl; external av__format; procedure put_be16(s: PByteIOContext; val: cuint); cdecl; external av__format; -procedure put_tag(s: PByteIOContext; tag: {const} PChar); +procedure put_tag(s: PByteIOContext; tag: {const} PAnsiChar); cdecl; external av__format; -procedure put_strz(s: PByteIOContext; buf: {const} PChar); +procedure put_strz(s: PByteIOContext; buf: {const} PAnsiChar); cdecl; external av__format; (** * fseek() equivalent for ByteIOContext. * @return new position or AVERROR. *) -function url_fseek(s: PByteIOContext; offset: TOffset; whence: cint): TOffset; +function url_fseek(s: PByteIOContext; offset: cint64; whence: cint): cint64; cdecl; external av__format; (** * Skip given number of bytes forward. * @param offset number of bytes *) -procedure url_fskip(s: PByteIOContext; offset: TOffset); +procedure url_fskip(s: PByteIOContext; offset: cint64); cdecl; external av__format; (** * ftell() equivalent for ByteIOContext. * @return position or AVERROR. *) -function url_ftell(s: PByteIOContext): TOffset; +function url_ftell(s: PByteIOContext): cint64; cdecl; external av__format; (** * Gets the filesize. * @return filesize or AVERROR *) -function url_fsize(s: PByteIOContext): TOffset; +function url_fsize(s: PByteIOContext): cint64; cdecl; external av__format; (** @@ -351,8 +347,8 @@ 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): TOffset; +function av_url_read_fseek(h: PByteIOContext; stream_index: cint; + timestamp: cint64; flags: cint): cint64; cdecl; external av__format; {$IFEND} @@ -363,12 +359,12 @@ function url_fgetc(s: PByteIOContext): cint; cdecl; external av__format; (** @warning currently size is limited *) -function url_fprintf(s: PByteIOContext; fmt: {const} PChar; args: array of const): cint; +function url_fprintf(s: PByteIOContext; fmt: {const} PAnsiChar; args: array of const): cint; cdecl; external av__format; (** @note unlike fgets, the EOL character is not returned and a whole line is parsed. return NULL if first char read was EOF *) -function url_fgets(s: PByteIOContext; buf: PChar; buf_size: cint): PChar; +function url_fgets(s: PByteIOContext; buf: PAnsiChar; buf_size: cint): PAnsiChar; cdecl; external av__format; procedure put_flush_packet (s: PByteIOContext); @@ -379,7 +375,7 @@ procedure put_flush_packet (s: PByteIOContext); * Reads size bytes from ByteIOContext into buf. * @returns number of bytes read or AVERROR *) -function get_buffer(s: PByteIOContext; buf: PChar; size: cint): cint; +function get_buffer(s: PByteIOContext; buf: PByteArray; size: cint): cint; cdecl; external av__format; (** @@ -388,7 +384,7 @@ function get_buffer(s: PByteIOContext; buf: PChar; size: cint): cint; * returned. * @returns number of bytes read or AVERROR *) -function get_partial_buffer(s: PByteIOContext; buf: PChar; size: cint): cint; +function get_partial_buffer(s: PByteIOContext; buf: PByteArray; size: cint): cint; cdecl; external av__format; (** @note return 0 if EOF, so you cannot use it if EOF handling is @@ -404,7 +400,7 @@ function get_le64(s: PByteIOContext): cuint64; function get_le16(s: PByteIOContext): cuint; cdecl; external av__format; -function get_strz(s: PByteIOContext; buf: PChar; maxlen: cint): PChar; +function get_strz(s: PByteIOContext; buf: PAnsiChar; maxlen: cint): PAnsiChar; cdecl; external av__format; function get_be16(s: PByteIOContext): cuint; cdecl; external av__format; @@ -447,9 +443,9 @@ function url_resetbuf(s: PByteIOContext; flags: cint): cint; (** @note when opened as read/write, the buffers are only used for writing *) {$IF LIBAVFORMAT_VERSION >= 52000000} // 52.0.0 -function url_fopen(var s: PByteIOContext; filename: {const} PChar; flags: cint): cint; +function url_fopen(var s: PByteIOContext; filename: {const} PAnsiChar; flags: cint): cint; {$ELSE} -function url_fopen(s: PByteIOContext; filename: {const} PChar; flags: cint): cint; +function url_fopen(s: PByteIOContext; filename: {const} PAnsiChar; flags: cint): cint; {$IFEND} cdecl; external av__format; function url_fclose(s: PByteIOContext): cint; @@ -469,9 +465,9 @@ function url_fget_max_packet_size (s: PByteIOContext): cint; cdecl; external av__format; {$IF LIBAVFORMAT_VERSION >= 52000000} // 52.0.0 -function url_open_buf(var s: PByteIOContext; buf: PChar; buf_size: cint; flags: cint): cint; +function url_open_buf(var s: PByteIOContext; buf: PAnsiChar; buf_size: cint; flags: cint): cint; {$ELSE} -function url_open_buf(s: PByteIOContext; buf: PChar; buf_size: cint; flags: cint): cint; +function url_open_buf(s: PByteIOContext; buf: PAnsiChar; buf_size: cint; flags: cint): cint; {$IFEND} cdecl; external av__format; @@ -519,16 +515,19 @@ function url_close_dyn_buf(s: PByteIOContext; pbuffer:PPointer): cint; cdecl; external av__format; {$IF LIBAVFORMAT_VERSION >= 51017001} // 51.17.1 -function ff_crc04C11DB7_update(checksum: culong; buf: {const} PChar; len: cuint): culong; +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_checksum (s: PByteIOContext; update_checksum: pointer; checksum: culong); +procedure init_checksum(s: PByteIOContext; + update_checksum: pointer; + checksum: culong); cdecl; external av__format; (* udp.c *) -function udp_set_remote_url(h: PURLContext; uri: {const} PChar): cint; +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; -- cgit v1.2.3 From d5c37124567bb67fcef16348dc7ad67c4aff9e59 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Wed, 10 Jun 2009 11:04:33 +0000 Subject: part 1 of ffmpeg update. several are still missing git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1807 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 33778206..898c29cf 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -27,7 +27,12 @@ (* * Conversion of libavformat/avio.h - * revision 16100, Sat Dec 13 13:39:13 2008 UTC + * unbuffered I/O operations + * revision 16100, Sat Dec 13 13:39:13 2008 UTC + * update Tue, Jun 10 01:00:00 2009 UTC + * + * @warning This file has to be considered an internal but installed + * header, so it should not be directly included in your projects. *) unit avio; @@ -103,6 +108,7 @@ type name: PAnsiChar; url_open: function (h: PURLContext; filename: {const} PAnsiChar; flags: cint): cint; cdecl; url_read: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; + url_read_complete: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; url_write: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; url_seek: function (h: PURLContext; pos: cint64; whence: cint): cint64; cdecl; url_close: function (h: PURLContext): cint; cdecl; @@ -180,6 +186,16 @@ function url_exist(filename: {const} PAnsiChar): cint; cdecl; external av__format; function url_filesize (h: PURLContext): cint64; cdecl; external av__format; +{ + * Return the file descriptor associated with this URL. For RTP, this + * will return only the RTP file descriptor, not the RTCP file descriptor. + * To get both, use rtp_get_file_handles(). + * + * @return the file descriptor associated with this URL, or <0 on error. +} +(* not implemented *) +function url_get_file_handle(h: PURLContext): cint; + cdecl; external av__format; (** * Return the maximum packet size associated to packetized file @@ -242,17 +258,32 @@ function av_url_read_seek(h: PURLContext; stream_index: cint; { var +{$IF LIBAVFORMAT_VERSION_MAJOR < 53} first_protocol: PURLProtocol; external av__format; +{$IFEND} url_interrupt_cb: PURLInterruptCB; external av__format; } +{ +* If protocol is NULL, returns the first registered protocol, +* if protocol is non-NULL, returns the next registered protocol after protocol, +* or NULL if protocol is the last one. +} {$IF LIBAVFORMAT_VERSION >= 52002000} // 52.2.0 function av_protocol_next(p: PURLProtocol): PURLProtocol; cdecl; external av__format; {$IFEND} +{$IF LIBAVFORMAT_VERSION < = 52028000} // 52.28.0 +(** + * @deprecated Use av_register_protocol() instead. + *) function register_protocol (protocol: PURLProtocol): cint; cdecl; external av__format; +{$ELSE} +function av_register_protocol (protocol: PURLProtocol): cint; + cdecl; external av__format; +{$IFEND} type TReadWriteFunc = function (opaque: Pointer; buf: PByteArray; buf_size: cint): cint; cdecl; @@ -521,7 +552,7 @@ function ff_crc04C11DB7_update(checksum: culong; buf: {const} PByteArray; {$IFEND} function get_checksum(s: PByteIOContext): culong; cdecl; external av__format; -procedure init_checksum(s: PByteIOContext; +procedure init_gsum(s: PByteIOContext; update_checksum: pointer; checksum: culong); cdecl; external av__format; @@ -531,9 +562,11 @@ 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; - +{$IFEND} + implementation function url_is_streamed(s: PByteIOContext): cint; -- cgit v1.2.3 From f946fb104ac54e5ece8576321843ae7f3ba007c9 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Wed, 10 Jun 2009 11:29:31 +0000 Subject: fix typos in previous submission. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1809 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 898c29cf..dc0a330b 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -256,13 +256,13 @@ function av_url_read_seek(h: PURLContext; stream_index: cint; cdecl; external av__format; {$IFEND} -{ +(** var {$IF LIBAVFORMAT_VERSION_MAJOR < 53} first_protocol: PURLProtocol; external av__format; {$IFEND} url_interrupt_cb: PURLInterruptCB; external av__format; -} +**) { * If protocol is NULL, returns the first registered protocol, @@ -274,7 +274,7 @@ function av_protocol_next(p: PURLProtocol): PURLProtocol; cdecl; external av__format; {$IFEND} -{$IF LIBAVFORMAT_VERSION < = 52028000} // 52.28.0 +{$IF LIBAVFORMAT_VERSION <= 52028000} // 52.28.0 (** * @deprecated Use av_register_protocol() instead. *) -- cgit v1.2.3 From 917901e8e33438c425aef50a0a7417f32d77b760 Mon Sep 17 00:00:00 2001 From: s_alexander Date: Mon, 9 Nov 2009 00:27:55 +0000 Subject: merged unicode branch (r1931) into trunk git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1939 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index dc0a330b..c47bb618 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -108,14 +108,16 @@ type name: PAnsiChar; url_open: function (h: PURLContext; filename: {const} PAnsiChar; flags: cint): cint; cdecl; url_read: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; + {$IF LIBAVFORMAT_VERSION >= 52034001} // 52.34.1 url_read_complete: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; + {$IFEND} url_write: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; url_seek: function (h: PURLContext; pos: cint64; whence: cint): cint64; cdecl; url_close: function (h: PURLContext): cint; cdecl; next: PURLProtocol; {$IF (LIBAVFORMAT_VERSION >= 52001000) and (LIBAVFORMAT_VERSION < 52004000)} // 52.1.0 .. 52.4.0 - url_read_play: function (h: PURLContext): cint; - url_read_pause: function (h: PURLContext): cint; + url_read_play: function (h: PURLContext): cint; cdecl; + url_read_pause: function (h: PURLContext): cint; cdecl; {$IFEND} {$IF LIBAVFORMAT_VERSION >= 52004000} // 52.4.0 url_read_pause: function (h: PURLContext; pause: cint): cint; cdecl; @@ -278,16 +280,19 @@ function av_protocol_next(p: PURLProtocol): PURLProtocol; (** * @deprecated Use av_register_protocol() instead. *) -function register_protocol (protocol: PURLProtocol): cint; +function register_protocol(protocol: PURLProtocol): cint; cdecl; external av__format; +(** Alias for register_protocol() *) +function av_register_protocol(protocol: PURLProtocol): cint; + cdecl; external av__format name 'register_protocol'; {$ELSE} -function av_register_protocol (protocol: PURLProtocol): cint; +function av_register_protocol(protocol: PURLProtocol): cint; cdecl; external av__format; {$IFEND} type - TReadWriteFunc = function (opaque: Pointer; buf: PByteArray; buf_size: cint): cint; cdecl; - TSeekFunc = function (opaque: Pointer; offset: cint64; whence: cint): cint64; cdecl; + TReadWriteFunc = function(opaque: Pointer; buf: PByteArray; buf_size: cint): cint; cdecl; + TSeekFunc = function(opaque: Pointer; offset: cint64; whence: cint): cint64; cdecl; function init_put_byte(s: PByteIOContext; buffer: PByteArray; -- cgit v1.2.3 From 17caa61ec8e40acf24b0482b04a5ed24c5f0a73f Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sun, 6 Dec 2009 19:23:50 +0000 Subject: update to version 52.41.0. Only a IFDEF change, no code change. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1993 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index c47bb618..73c90b69 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -35,6 +35,12 @@ * header, so it should not be directly included in your projects. *) +{ + * update to + * Max. avformat version: 52.41.0, Sun Dec 6 20:15:00 2009 CET + * MiSchi +} + unit avio; {$IFDEF FPC} @@ -467,6 +473,7 @@ function url_fdopen (s: PByteIOContext; h: PURLContext): cint; function url_setbufsize (s: PByteIOContext; buf_size: cint): cint; cdecl; external av__format; +{$IF LIBAVFORMAT_VERSION_MAJOR < 53} {$IF LIBAVFORMAT_VERSION >= 51015000} // 51.15.0 (** Reset the buffer for reading or writing. * @note Will drop any data currently in the buffer without transmitting it. @@ -475,6 +482,7 @@ function url_setbufsize (s: PByteIOContext; buf_size: cint): cint; function url_resetbuf(s: PByteIOContext; flags: cint): cint; cdecl; external av__format; {$IFEND} +{$IFEND} (** @note when opened as read/write, the buffers are only used for writing *) -- cgit v1.2.3 From e22d981dcb8f0014ce28fdc07b59248d87376fad Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Mon, 28 Dec 2009 23:54:22 +0000 Subject: update of the headers. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2054 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 73c90b69..faa6c24f 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -37,7 +37,7 @@ { * update to - * Max. avformat version: 52.41.0, Sun Dec 6 20:15:00 2009 CET + * Max. avformat version: 52.44.0, Tue Dec 29 0:40:00 2009 CET * MiSchi } -- cgit v1.2.3 From 202c4c9cfed7031834dd9fe6d2de3499315fa5ee Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Mon, 4 Jan 2010 13:52:41 +0000 Subject: correction of version git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2065 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index faa6c24f..b10121ab 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -114,7 +114,7 @@ type name: PAnsiChar; url_open: function (h: PURLContext; filename: {const} PAnsiChar; flags: cint): cint; cdecl; url_read: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; - {$IF LIBAVFORMAT_VERSION >= 52034001} // 52.34.1 + {$IF LIBAVFORMAT_VERSION >= 52034000} // 52.34.0 url_read_complete: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; {$IFEND} url_write: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; -- cgit v1.2.3 From 18ec26284cfe8ebc0864bb5107deb52ee0660e3f Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Mon, 4 Jan 2010 14:18:08 +0000 Subject: major correction of wronge placed and missing fields. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2066 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index b10121ab..fe55fa0e 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -114,9 +114,6 @@ type name: PAnsiChar; url_open: function (h: PURLContext; filename: {const} PAnsiChar; flags: cint): cint; cdecl; url_read: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; - {$IF LIBAVFORMAT_VERSION >= 52034000} // 52.34.0 - url_read_complete: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; - {$IFEND} url_write: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; url_seek: function (h: PURLContext; pos: cint64; whence: cint): cint64; cdecl; url_close: function (h: PURLContext): cint; cdecl; @@ -132,6 +129,9 @@ type url_read_seek: function (h: PURLContext; stream_index: cint; timestamp: cint64; flags: cint): cint64; cdecl; {$IFEND} + {$IF LIBAVFORMAT_VERSION >= 52031000} // 52.31.0 + url_get_file_handle: function (h: PURLContext): cint; cdecl; + {$IFEND} end; (** @@ -184,6 +184,10 @@ function url_open(h: PPointer; filename: {const} PAnsiChar; flags: cint): cint; cdecl; external av__format; function url_read (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; external av__format; +{$IF LIBAVFORMAT_VERSION >= 52034000} // 52.34.0 +function url_read_complete (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; + cdecl; external av__format; +{$IFEND} function url_write (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; external av__format; function url_seek (h: PURLContext; pos: cint64; whence: cint): cint64; -- cgit v1.2.3 From d35aae71ead05b26b5e00b25de4f6ed11f11ad13 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Mon, 4 Jan 2010 23:51:10 +0000 Subject: correction of some misplaced fields + some editorial changes + update to current git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2067 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index fe55fa0e..1a37e556 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -33,13 +33,11 @@ * * @warning This file has to be considered an internal but installed * header, so it should not be directly included in your projects. - *) - -{ + * * update to - * Max. avformat version: 52.44.0, Tue Dec 29 0:40:00 2009 CET + * Max. avformat version: 52.46.0, Mon Jan 4 2010 0:40:00 CET * MiSchi -} + *) unit avio; -- cgit v1.2.3 From 3ccc3c3e111ca6657bca149a88e0c68a71312a69 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sat, 20 Feb 2010 23:46:32 +0000 Subject: update of avio.pas to 52.47.0 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2122 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 116 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 104 insertions(+), 12 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 1a37e556..ba717c1a 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -97,7 +97,7 @@ type is_streamed: cint; (**< true if streamed (no seek possible), default = false *) max_packet_size: cint; (**< if non zero, the stream is packetized with this max packet size *) priv_data: pointer; - filename: PAnsiChar; (**< specified filename *) + filename: PAnsiChar; (**< specified URL *) end; PPURLContext = ^PURLContext; @@ -110,8 +110,29 @@ type TURLProtocol = record name: PAnsiChar; +{$IF LIBAVFORMAT_VERSION < 52047000} // 52.47.0 url_open: function (h: PURLContext; filename: {const} PAnsiChar; flags: cint): cint; cdecl; +{$ELSE} + url_open: function (h: PURLContext; url: {const} PAnsiChar; flags: cint): cint; cdecl; +{$IFEND} +(** + * Reads up to size bytes from the resource accessed by h, and stores + * the read bytes in buf. + * + * @return The number of bytes actually read, or a negative value + * corresponding to an AVERROR code in case of error. A value of zero + * indicates that it is not possible to read more from the accessed + * resource (except if the value of the size argument is also zero). + *) url_read: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; +(** + * Read as many bytes as possible (up to size), calling the + * read function multiple times if necessary. + * Will also retry if the read function returns AVERROR(EAGAIN). + * This makes special short-read handling in applications + * unnecessary, if the return value is < size then it is + * certain there was either an error or the end of file was reached. + *) url_write: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; url_seek: function (h: PURLContext; pos: cint64; whence: cint): cint64; cdecl; url_close: function (h: PURLContext): cint; cdecl; @@ -174,11 +195,42 @@ type {$IF LIBAVFORMAT_VERSION >= 52021000} // 52.21.0 +(** + * Creates an URLContext for accessing to the resource indicated by + * URL, and opens it using the URLProtocol up. + * + * @param puc pointer to the location where, in case of success, the + * function puts the pointer to the created URLContext + * @param flags flags which control how the resource indicated by URL + * is to be opened + * @return 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + *) function url_open_protocol(puc: PPURLContext; up: PURLProtocol; +{$IF LIBAVFORMAT_VERSION < 52047000} // 52.47.0 filename: {const} PAnsiChar; flags: cint): cint; +{$ELSE} + url: {const} PAnsiChar; flags: cint): cint; +{$IFEND} cdecl; external av__format; {$IFEND} + +(** + * Creates an URLContext for accessing to the resource indicated by + * url, and opens it. + * + * @param puc pointer to the location where, in case of success, the + * function puts the pointer to the created URLContext + * @param flags flags which control how the resource indicated by url + * is to be opened + * @return 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + *) +{$IF LIBAVFORMAT_VERSION < 52047000} // 52.47.0 function url_open(h: PPointer; filename: {const} PAnsiChar; flags: cint): cint; +{$ELSE} +function url_open(h: PPointer; url: {const} PAnsiChar; flags: cint): cint; +{$IFEND} cdecl; external av__format; function url_read (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; external av__format; @@ -190,19 +242,30 @@ function url_write (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; external av__format; function url_seek (h: PURLContext; pos: cint64; whence: cint): cint64; cdecl; external av__format; +(** + * Closes the resource accessed by the URLContext h, and frees the + * memory used by it. + * + * @return a negative value if an error condition occurred, 0 + * otherwise + *) function url_close (h: PURLContext): cint; cdecl; external av__format; +{$IF LIBAVFORMAT_VERSION < 52047000} // 52.47.0 function url_exist(filename: {const} PAnsiChar): cint; +{$ELSE} +function url_exist(url: {const} PAnsiChar): cint; +{$IFEND} cdecl; external av__format; function url_filesize (h: PURLContext): cint64; cdecl; external av__format; -{ +(** * Return the file descriptor associated with this URL. For RTP, this * will return only the RTP file descriptor, not the RTCP file descriptor. * To get both, use rtp_get_file_handles(). * * @return the file descriptor associated with this URL, or <0 on error. -} + *) (* not implemented *) function url_get_file_handle(h: PURLContext): cint; cdecl; external av__format; @@ -274,16 +337,19 @@ var url_interrupt_cb: PURLInterruptCB; external av__format; **) -{ -* If protocol is NULL, returns the first registered protocol, -* if protocol is non-NULL, returns the next registered protocol after protocol, -* or NULL if protocol is the last one. -} +(** + * If protocol is NULL, returns the first registered protocol, + * if protocol is non-NULL, returns the next registered protocol after protocol, + * or NULL if protocol is the last one. + *) {$IF LIBAVFORMAT_VERSION >= 52002000} // 52.2.0 function av_protocol_next(p: PURLProtocol): PURLProtocol; cdecl; external av__format; {$IFEND} +(** + * Registers the URLProtocol protocol. + *) {$IF LIBAVFORMAT_VERSION <= 52028000} // 52.28.0 (** * @deprecated Use av_register_protocol() instead. @@ -462,8 +528,18 @@ function ff_get_v(bc: PByteIOContext): cuint64; function url_is_streamed(s: PByteIOContext): cint; {$IFDEF HasInline}inline;{$ENDIF} -(** @note when opened as read/write, the buffers are only used for - writing *) + +(** + * Creates and initializes a ByteIOContext for accessing the + * resource referenced by the URLContext h. + * @note When the URLContext h has been opened in read+write mode, the + * ByteIOContext can be used only for writing. + * + * @param s Used to return the pointer to the created ByteIOContext. + * In case of failure the pointed to value is set to NULL. + * @return 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + *) {$IF LIBAVFORMAT_VERSION >= 52000000} // 52.0.0 function url_fdopen (var s: PByteIOContext; h: PURLContext): cint; {$ELSE} @@ -486,12 +562,28 @@ function url_resetbuf(s: PByteIOContext; flags: cint): cint; {$IFEND} {$IFEND} -(** @note when opened as read/write, the buffers are only used for - writing *) + +(** + * Creates and initializes a ByteIOContext for accessing the + * resource indicated by url. + * @note When the resource indicated by url has been opened in + * read+write mode, the ByteIOContext can be used only for writing. + * + * @param s Used to return the pointer to the created ByteIOContext. + * In case of failure the pointed to value is set to NULL. + * @param flags flags which control how the resource indicated by url + * is to be opened + * @return 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + *) +{$IF LIBAVFORMAT_VERSION < 52047000} // 52.47.0 {$IF LIBAVFORMAT_VERSION >= 52000000} // 52.0.0 function url_fopen(var s: PByteIOContext; filename: {const} PAnsiChar; flags: cint): cint; {$ELSE} function url_fopen(s: PByteIOContext; filename: {const} PAnsiChar; flags: cint): cint; +{$IFEND} +{$ELSE} +function url_fopen(var s: PByteIOContext; url: {const} PAnsiChar; flags: cint): cint; {$IFEND} cdecl; external av__format; function url_fclose(s: PByteIOContext): cint; -- cgit v1.2.3 From b65843b47751a6aed95f5f67536b5b912ab0108e Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Tue, 11 May 2010 16:59:53 +0000 Subject: update avio.h to avformat 52.56.0 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2349 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index ba717c1a..171fe5bd 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -74,6 +74,16 @@ const *) AVSEEK_SIZE = $10000; +{$IF LIBAVFORMAT_VERSION >= 52056000} // 52.56.0 + (** + * Oring this flag as into the "whence" parameter to a seek function causes it to + * seek by any means (like reopening and linear reading) or other normally unreasonble + * means that can be extreemly slow. + * This may be ignored by the seek code. + *) + AVSEEK_FORCE = $20000; +{$IFEND} + type TURLInterruptCB = function (): cint; cdecl; @@ -115,6 +125,7 @@ type {$ELSE} url_open: function (h: PURLContext; url: {const} PAnsiChar; flags: cint): cint; cdecl; {$IFEND} + (** * Reads up to size bytes from the resource accessed by h, and stores * the read bytes in buf. @@ -125,6 +136,7 @@ type * resource (except if the value of the size argument is also zero). *) url_read: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; + (** * Read as many bytes as possible (up to size), calling the * read function multiple times if necessary. @@ -242,6 +254,7 @@ function url_write (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; external av__format; function url_seek (h: PURLContext; pos: cint64; whence: cint): cint64; cdecl; external av__format; + (** * Closes the resource accessed by the URLContext h, and frees the * memory used by it. @@ -259,6 +272,7 @@ function url_exist(url: {const} PAnsiChar): cint; cdecl; external av__format; function url_filesize (h: PURLContext): cint64; cdecl; external av__format; + (** * Return the file descriptor associated with this URL. For RTP, this * will return only the RTP file descriptor, not the RTCP file descriptor. @@ -337,20 +351,20 @@ var url_interrupt_cb: PURLInterruptCB; external av__format; **) +{$IF LIBAVFORMAT_VERSION >= 52002000} // 52.2.0 (** * If protocol is NULL, returns the first registered protocol, * if protocol is non-NULL, returns the next registered protocol after protocol, * or NULL if protocol is the last one. *) -{$IF LIBAVFORMAT_VERSION >= 52002000} // 52.2.0 function av_protocol_next(p: PURLProtocol): PURLProtocol; cdecl; external av__format; {$IFEND} +{$IF LIBAVFORMAT_VERSION <= 52028000} // 52.28.0 (** * Registers the URLProtocol protocol. *) -{$IF LIBAVFORMAT_VERSION <= 52028000} // 52.28.0 (** * @deprecated Use av_register_protocol() instead. *) @@ -479,7 +493,6 @@ function url_fgets(s: PByteIOContext; buf: PAnsiChar; buf_size: cint): PAnsiChar procedure put_flush_packet (s: PByteIOContext); cdecl; external av__format; - (** * Reads size bytes from ByteIOContext into buf. @@ -528,7 +541,6 @@ function ff_get_v(bc: PByteIOContext): cuint64; function url_is_streamed(s: PByteIOContext): cint; {$IFDEF HasInline}inline;{$ENDIF} - (** * Creates and initializes a ByteIOContext for accessing the * resource referenced by the URLContext h. @@ -562,7 +574,6 @@ function url_resetbuf(s: PByteIOContext; flags: cint): cint; {$IFEND} {$IFEND} - (** * Creates and initializes a ByteIOContext for accessing the * resource indicated by url. -- cgit v1.2.3 From b605e0688ded7a3120be0e7110dfeb1d3806bcb8 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Tue, 11 May 2010 17:09:40 +0000 Subject: update avio.h to avformat 52.61.0 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2350 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 171fe5bd..25c28ef5 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -146,7 +146,23 @@ type * certain there was either an error or the end of file was reached. *) url_write: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; + +(** + * Changes the position that will be used by the next read/write + * operation on the resource accessed by h. + * + * @param pos specifies the new position to set + * @param whence specifies how pos should be interpreted, it must be + * one of SEEK_SET (seek from the beginning), SEEK_CUR (seek from the + * current position), SEEK_END (seek from the end), or AVSEEK_SIZE + * (return the filesize of the requested resource, pos is ignored). + * @return a negative value corresponding to an AVERROR code in case + * of failure, or the resulting file position, measured in bytes from + * the beginning of the file. You can use this feature together with + * SEEK_CUR to read the current file position. + *) url_seek: function (h: PURLContext; pos: cint64; whence: cint): cint64; cdecl; + url_close: function (h: PURLContext): cint; cdecl; next: PURLProtocol; {$IF (LIBAVFORMAT_VERSION >= 52001000) and (LIBAVFORMAT_VERSION < 52004000)} // 52.1.0 .. 52.4.0 @@ -264,12 +280,18 @@ function url_seek (h: PURLContext; pos: cint64; whence: cint): cint64; *) function url_close (h: PURLContext): cint; cdecl; external av__format; + +(** + * Returns a non-zero value if the resource indicated by url + * exists, 0 otherwise. + *) {$IF LIBAVFORMAT_VERSION < 52047000} // 52.47.0 function url_exist(filename: {const} PAnsiChar): cint; {$ELSE} function url_exist(url: {const} PAnsiChar): cint; {$IFEND} cdecl; external av__format; + function url_filesize (h: PURLContext): cint64; cdecl; external av__format; @@ -496,7 +518,7 @@ procedure put_flush_packet (s: PByteIOContext); (** * Reads size bytes from ByteIOContext into buf. - * @returns number of bytes read or AVERROR + * @return number of bytes read or AVERROR *) function get_buffer(s: PByteIOContext; buf: PByteArray; size: cint): cint; cdecl; external av__format; @@ -505,7 +527,7 @@ function get_buffer(s: PByteIOContext; buf: PByteArray; size: cint): cint; * Reads size bytes from ByteIOContext into buf. * This reads at most 1 packet. If that is not enough fewer bytes will be * returned. - * @returns number of bytes read or AVERROR + * @return number of bytes read or AVERROR *) function get_partial_buffer(s: PByteIOContext; buf: PByteArray; size: cint): cint; cdecl; external av__format; @@ -574,6 +596,24 @@ function url_resetbuf(s: PByteIOContext; flags: cint): cint; {$IFEND} {$IFEND} +{$IF LIBAVFORMAT_VERSION >= 52061000} // 52.61.0 +(** + * Rewinds the ByteIOContext using the specified buffer containing the first buf_size bytes of the file. + * Used after probing to avoid seeking. + * Joins buf and s->buffer, taking any overlap into consideration. + * @note s->buffer must overlap with buf or they can't be joined and the function fails + * @note This function is NOT part of the public API + * + * @param s The read-only ByteIOContext to rewind + * @param buf The probe buffer containing the first buf_size bytes of the file + * @param buf_size The size of buf + * @return 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + *) +function ff_rewind_with_probe_data(s: PByteIOContext; buf: PAnsiChar; buf_size: cint): cint; + cdecl; external av__format; +{$IFEND} + (** * Creates and initializes a ByteIOContext for accessing the * resource indicated by url. -- cgit v1.2.3 From d7255c72875a1ccfee5db9debd4fcc5a9f363886 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Tue, 11 May 2010 17:19:27 +0000 Subject: avformat to 52.61.0 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2351 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 25c28ef5..6d1a44f0 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -28,15 +28,11 @@ (* * Conversion of libavformat/avio.h * unbuffered I/O operations - * revision 16100, Sat Dec 13 13:39:13 2008 UTC - * update Tue, Jun 10 01:00:00 2009 UTC - * * @warning This file has to be considered an internal but installed * header, so it should not be directly included in your projects. * * update to - * Max. avformat version: 52.46.0, Mon Jan 4 2010 0:40:00 CET - * MiSchi + * Max. avformat version: 52.61.0, revision 22921, Tue May 11 2010 19:12 CET *) unit avio; -- cgit v1.2.3 From cffe33baf336287778e3bbe1585ae087b0b0f6e0 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Tue, 11 May 2010 17:30:21 +0000 Subject: avformat and avio.pas to 52.62.0 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2352 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 6d1a44f0..4863ee39 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -32,7 +32,7 @@ * header, so it should not be directly included in your projects. * * update to - * Max. avformat version: 52.61.0, revision 22921, Tue May 11 2010 19:12 CET + * Max. avformat version: 52.62.0, revision 23004, Tue May 11 19:29:00 2010 CET *) unit avio; -- cgit v1.2.3 From 80b73d81dd1ec60bd60b153c0aebf6141aac3a06 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sun, 30 May 2010 19:33:10 +0000 Subject: Update to 52.67.0 and avio.pas cosmetics git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2431 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 4863ee39..0ebca5fa 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -15,24 +15,20 @@ * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - *) - -(* + * * This is a part of Pascal porting of ffmpeg. * - Originally by Victor Zinetz for Delphi and Free Pascal on Windows. * - For Mac OS X, some modifications were made by The Creative CAT, denoted as CAT * in the source codes. * - Changes and updates by the UltraStar Deluxe Team - *) - -(* + * * Conversion of libavformat/avio.h * unbuffered I/O operations * @warning This file has to be considered an internal but installed * header, so it should not be directly included in your projects. * * update to - * Max. avformat version: 52.62.0, revision 23004, Tue May 11 19:29:00 2010 CET + * Max. avformat version: 52.67.0, revision 23357, Sun May 30 21:30:00 2010 CET *) unit avio; -- cgit v1.2.3 From 8ba7eab8d58733b17e41d03ac237e7ff813ff4b0 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Tue, 20 Jul 2010 18:53:45 +0000 Subject: update avformat to 52.68.0 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2584 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 0ebca5fa..1965e037 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -258,7 +258,7 @@ function url_read (h: PURLContext; buf: PByteArray; size: cint): cint; function url_read_complete (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; cdecl; external av__format; {$IFEND} -function url_write (h: PURLContext; buf: PByteArray; size: cint): cint; +function url_write (h: PURLContext; {const} buf: PByteArray; size: cint): cint; cdecl; external av__format; function url_seek (h: PURLContext; pos: cint64; whence: cint): cint64; cdecl; external av__format; -- cgit v1.2.3 From eb4e04eeb81f4821c0cdcf909113a49d081ff19e Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Tue, 20 Jul 2010 19:03:41 +0000 Subject: update avformat to 52.69.0 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2585 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 1965e037..12e9847f 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -137,7 +137,7 @@ type * unnecessary, if the return value is < size then it is * certain there was either an error or the end of file was reached. *) - url_write: function (h: PURLContext; buf: PByteArray; size: cint): cint; cdecl; + url_write: function (h: PURLContext; {const} buf: PByteArray; size: cint): cint; cdecl; (** * Changes the position that will be used by the next read/write @@ -378,19 +378,26 @@ function av_protocol_next(p: PURLProtocol): PURLProtocol; {$IF LIBAVFORMAT_VERSION <= 52028000} // 52.28.0 (** * Registers the URLProtocol protocol. - *) -(** + * + * * @deprecated Use av_register_protocol() instead. *) function register_protocol(protocol: PURLProtocol): cint; cdecl; external av__format; -(** Alias for register_protocol() *) +(** Alias for register_protocol() + * + * @deprecated Use av_register_protocol2() instead. + *) function av_register_protocol(protocol: PURLProtocol): cint; cdecl; external av__format name 'register_protocol'; {$ELSE} function av_register_protocol(protocol: PURLProtocol): cint; cdecl; external av__format; {$IFEND} +{$IF LIBAVFORMAT_VERSION >= 52069000} // 52.69.0 +{$IFEND} +function av_register_protocol2(protocol: PURLProtocol; size: cint): cint; + cdecl; external av__format; type TReadWriteFunc = function(opaque: Pointer; buf: PByteArray; buf_size: cint): cint; cdecl; -- cgit v1.2.3 From 9006de111c4f56259f90e9c3ebfae720ce650969 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Tue, 20 Jul 2010 19:13:11 +0000 Subject: update avformat to 52.70.0 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2586 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 12e9847f..4c2c08d6 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -100,6 +100,9 @@ type max_packet_size: cint; (**< if non zero, the stream is packetized with this max packet size *) priv_data: pointer; filename: PAnsiChar; (**< specified URL *) +{$IF LIBAVFORMAT_VERSION >= 52070000} // 52.70.0 +{$IFEND} + is_connected: cint; end; PPURLContext = ^PURLContext; @@ -213,6 +216,27 @@ type {$IFEND} end; +{$IF LIBAVFORMAT_VERSION >= 52070000} // 52.70.0 +(** + * Creates an URLContext for accessing to the resource indicated by + * url, but doesn't initiate the connection yet. + * + * @param puc pointer to the location where, in case of success, the + * function puts the pointer to the created URLContext + * @param flags flags which control how the resource indicated by url + * is to be opened + * @return 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + *) +function url_alloc(h: PPURLContext; {const} url: PAnsiChar; flags: cint): cint; + cdecl; external av__format; + +(** + * Connect an URLContext that has been allocated by url_alloc + *) +function url_connect(h: PURLContext): cint; + cdecl; external av__format; +{$IFEND} {$IF LIBAVFORMAT_VERSION >= 52021000} // 52.21.0 (** @@ -395,9 +419,9 @@ function av_register_protocol(protocol: PURLProtocol): cint; cdecl; external av__format; {$IFEND} {$IF LIBAVFORMAT_VERSION >= 52069000} // 52.69.0 -{$IFEND} function av_register_protocol2(protocol: PURLProtocol; size: cint): cint; cdecl; external av__format; +{$IFEND} type TReadWriteFunc = function(opaque: Pointer; buf: PByteArray; buf_size: cint): cint; cdecl; -- cgit v1.2.3 From 145aa4960ddf6cb96f0dd6eb86177cbb89b0161c Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Tue, 20 Jul 2010 19:26:14 +0000 Subject: update avformat to 52.71.0 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2587 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 4c2c08d6..517c02ec 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -174,6 +174,11 @@ type {$IF LIBAVFORMAT_VERSION >= 52031000} // 52.31.0 url_get_file_handle: function (h: PURLContext): cint; cdecl; {$IFEND} + + {$IF LIBAVFORMAT_VERSION >= 52071000} // 52.71.0 + priv_data_size: cint; + {const} priv_data_class: PAVClass; + {$IFEND} end; (** -- cgit v1.2.3 From 522a36656fa8eb4a69d945376350b569ec8701a5 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Tue, 20 Jul 2010 20:41:33 +0000 Subject: update avformat to 52.72.0 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2588 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 517c02ec..0a024ad5 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -122,7 +122,7 @@ type {$IFEND} (** - * Reads up to size bytes from the resource accessed by h, and stores + * Read up to size bytes from the resource accessed by h, and store * the read bytes in buf. * * @return The number of bytes actually read, or a negative value @@ -143,7 +143,7 @@ type url_write: function (h: PURLContext; {const} buf: PByteArray; size: cint): cint; cdecl; (** - * Changes the position that will be used by the next read/write + * Change the position that will be used by the next read/write * operation on the resource accessed by h. * * @param pos specifies the new position to set @@ -223,8 +223,8 @@ type {$IF LIBAVFORMAT_VERSION >= 52070000} // 52.70.0 (** - * Creates an URLContext for accessing to the resource indicated by - * url, but doesn't initiate the connection yet. + * Create a URLContext for accessing to the resource indicated by + * url, but do not initiate the connection yet. * * @param puc pointer to the location where, in case of success, the * function puts the pointer to the created URLContext @@ -245,8 +245,8 @@ function url_connect(h: PURLContext): cint; {$IF LIBAVFORMAT_VERSION >= 52021000} // 52.21.0 (** - * Creates an URLContext for accessing to the resource indicated by - * URL, and opens it using the URLProtocol up. + * Create a URLContext for accessing to the resource indicated by + * URL, and open it using the URLProtocol up. * * @param puc pointer to the location where, in case of success, the * function puts the pointer to the created URLContext @@ -265,8 +265,8 @@ function url_open_protocol(puc: PPURLContext; up: PURLProtocol; {$IFEND} (** - * Creates an URLContext for accessing to the resource indicated by - * url, and opens it. + * Create a URLContext for accessing to the resource indicated by + * url, and open it. * * @param puc pointer to the location where, in case of success, the * function puts the pointer to the created URLContext @@ -293,7 +293,7 @@ function url_seek (h: PURLContext; pos: cint64; whence: cint): cint64; cdecl; external av__format; (** - * Closes the resource accessed by the URLContext h, and frees the + * Close the resource accessed by the URLContext h, and free the * memory used by it. * * @return a negative value if an error condition occurred, 0 @@ -303,7 +303,7 @@ function url_close (h: PURLContext): cint; cdecl; external av__format; (** - * Returns a non-zero value if the resource indicated by url + * Return a non-zero value if the resource indicated by url * exists, 0 otherwise. *) {$IF LIBAVFORMAT_VERSION < 52047000} // 52.47.0 @@ -406,7 +406,7 @@ function av_protocol_next(p: PURLProtocol): PURLProtocol; {$IF LIBAVFORMAT_VERSION <= 52028000} // 52.28.0 (** - * Registers the URLProtocol protocol. + * Register the URLProtocol protocol. * * * @deprecated Use av_register_protocol() instead. @@ -500,7 +500,7 @@ function url_ftell(s: PByteIOContext): cint64; cdecl; external av__format; (** - * Gets the filesize. + * Get the filesize. * @return filesize or AVERROR *) function url_fsize(s: PByteIOContext): cint64; @@ -545,14 +545,14 @@ procedure put_flush_packet (s: PByteIOContext); cdecl; external av__format; (** - * Reads size bytes from ByteIOContext into buf. + * Read size bytes from ByteIOContext into buf. * @return number of bytes read or AVERROR *) function get_buffer(s: PByteIOContext; buf: PByteArray; size: cint): cint; cdecl; external av__format; (** - * Reads size bytes from ByteIOContext into buf. + * Read size bytes from ByteIOContext into buf. * This reads at most 1 packet. If that is not enough fewer bytes will be * returned. * @return number of bytes read or AVERROR @@ -592,7 +592,7 @@ function ff_get_v(bc: PByteIOContext): cuint64; function url_is_streamed(s: PByteIOContext): cint; {$IFDEF HasInline}inline;{$ENDIF} (** - * Creates and initializes a ByteIOContext for accessing the + * Create and initialize a ByteIOContext for accessing the * resource referenced by the URLContext h. * @note When the URLContext h has been opened in read+write mode, the * ByteIOContext can be used only for writing. @@ -626,7 +626,7 @@ function url_resetbuf(s: PByteIOContext; flags: cint): cint; {$IF LIBAVFORMAT_VERSION >= 52061000} // 52.61.0 (** - * Rewinds the ByteIOContext using the specified buffer containing the first buf_size bytes of the file. + * Rewind the ByteIOContext using the specified buffer containing the first buf_size bytes of the file. * Used after probing to avoid seeking. * Joins buf and s->buffer, taking any overlap into consideration. * @note s->buffer must overlap with buf or they can't be joined and the function fails @@ -643,7 +643,7 @@ function ff_rewind_with_probe_data(s: PByteIOContext; buf: PAnsiChar; buf_size: {$IFEND} (** - * Creates and initializes a ByteIOContext for accessing the + * Create and initialize a ByteIOContext for accessing the * resource indicated by url. * @note When the resource indicated by url has been opened in * read+write mode, the ByteIOContext can be used only for writing. @@ -723,7 +723,9 @@ function url_open_dyn_packet_buf(s: PByteIOContext; max_packet_size: cint): cint (** * Return the written size and a pointer to the buffer. The buffer - * must be freed with av_free(). + * must be freed with av_free(). If the buffer is opened with + * url_open_dyn_buf, then padding of FF_INPUT_BUFFER_PADDING_SIZE is + * added; if opened with url_open_dyn_packet_buf, no padding is added. * @param s IO context * @param pbuffer pointer to a byte buffer * @return the length of the byte buffer -- cgit v1.2.3 From 5d82dc076def1f149382adc096388fe24a38e2b3 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Tue, 20 Jul 2010 20:56:22 +0000 Subject: update avformat to 52.74.0 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2590 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 0a024ad5..c32b86be 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -488,9 +488,15 @@ function url_fseek(s: PByteIOContext; offset: cint64; whence: cint): cint64; (** * Skip given number of bytes forward. * @param offset number of bytes + * @return 0 on success, <0 on error *) +{$IF LIBAVFORMAT_VERSION < 52074000} // 52.74.0 procedure url_fskip(s: PByteIOContext; offset: cint64); cdecl; external av__format; +{$ELSE} +function url_fskip(s: PByteIOContext; offset: cint64): cint; + cdecl; external av__format; +{$IFEND} (** * ftell() equivalent for ByteIOContext. -- cgit v1.2.3 From bb47f56a41521dfd9e00201eca4ff39aff765695 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Thu, 26 Aug 2010 00:15:13 +0000 Subject: 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 --- src/lib/ffmpeg/avio.pas | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') 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; -- cgit v1.2.3 From 2dbe8ada0bca2dd2d85957ca301ef4f9ae313669 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Thu, 26 Aug 2010 00:42:16 +0000 Subject: fix compilation on windows. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2624 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index 1eccd6b1..ecba6323 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -96,7 +96,7 @@ type {$ELSE} {$IFDEF FF_API_URL_CLASS} av_class: {const} PAVClass; ///< information for av_log(). Set by url_open(). - {$IFEND} + {$ENDIF} {$IFEND} prot: PURLProtocol; flags: cint; @@ -431,7 +431,7 @@ function av_register_protocol(protocol: PURLProtocol): cint; {$IFDEF FF_API_REGISTER_PROTOCOL} function av_register_protocol(protocol: PURLProtocol): cint; cdecl; external av__format; - {$IFEND} + {$ENDIF} {$IFEND} {$IF LIBAVFORMAT_VERSION >= 52069000} // 52.69.0 function av_register_protocol2(protocol: PURLProtocol; size: cint): cint; @@ -609,7 +609,7 @@ function ff_get_v(bc: PByteIOContext): cuint64; {$IFDEF FF_API_URL_RESETBUF} function ff_get_v(bc: PByteIOContext): cuint64; cdecl; external av__format; - {$IFEND} + {$ENDIF} {$IFEND} {$IFEND} -- cgit v1.2.3 From 7a0975b9bf286de05b63c24dc310bee1f244b9c5 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Thu, 26 Aug 2010 00:49:53 +0000 Subject: another try to fix compilation on linux. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2626 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avio.pas | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lib/ffmpeg/avio.pas') diff --git a/src/lib/ffmpeg/avio.pas b/src/lib/ffmpeg/avio.pas index ecba6323..adb59a44 100644 --- a/src/lib/ffmpeg/avio.pas +++ b/src/lib/ffmpeg/avio.pas @@ -427,12 +427,17 @@ function register_protocol(protocol: PURLProtocol): cint; *) function av_register_protocol(protocol: PURLProtocol): cint; cdecl; external av__format name 'register_protocol'; +{$ELSE} +{$IF LIBAVFORMAT_VERSION < 52078003} // < 52.78.3 +function av_register_protocol(protocol: PURLProtocol): cint; + cdecl; external av__format; {$ELSE} {$IFDEF FF_API_REGISTER_PROTOCOL} function av_register_protocol(protocol: PURLProtocol): cint; cdecl; external av__format; {$ENDIF} {$IFEND} +{$IFEND} {$IF LIBAVFORMAT_VERSION >= 52069000} // 52.69.0 function av_register_protocol2(protocol: PURLProtocol; size: cint): cint; cdecl; external av__format; -- cgit v1.2.3