diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 12:34:07 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 12:34:07 +0000 |
commit | 94cefdb78044e0f9996e3032de34b690de98b708 (patch) | |
tree | b858a502ed5f12a02e18c2299e045eb0a757a8b7 /unicode/src/lib/ffmpeg/avformat.pas | |
parent | d1538b5a15a47b54a53e42d1cc7117780ffafd43 (diff) | |
download | usdx-94cefdb78044e0f9996e3032de34b690de98b708.tar.gz usdx-94cefdb78044e0f9996e3032de34b690de98b708.tar.xz usdx-94cefdb78044e0f9996e3032de34b690de98b708.zip |
- revert to 1777
- Ocean.ini and SVN properties are not reverted
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1854 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | unicode/src/lib/ffmpeg/avformat.pas | 288 |
1 files changed, 63 insertions, 225 deletions
diff --git a/unicode/src/lib/ffmpeg/avformat.pas b/unicode/src/lib/ffmpeg/avformat.pas index 0ec2c118..62df8a83 100644 --- a/unicode/src/lib/ffmpeg/avformat.pas +++ b/unicode/src/lib/ffmpeg/avformat.pas @@ -29,11 +29,6 @@ * Min. version: 50.5.0 , revision 6577, Sat Oct 7 15:30:46 2006 UTC * Max. version: 52.25.0, revision 16986, Wed Feb 4 05:56:39 2009 UTC *) -{ - * update to - * Max. version: 52.34.0, Sat Jun 13 00:37:00 2009 UTC - * MiSchi -} unit avformat; @@ -65,7 +60,7 @@ uses const (* Max. supported version by this header *) LIBAVFORMAT_MAX_VERSION_MAJOR = 52; - LIBAVFORMAT_MAX_VERSION_MINOR = 34; + LIBAVFORMAT_MAX_VERSION_MINOR = 25; LIBAVFORMAT_MAX_VERSION_RELEASE = 0; LIBAVFORMAT_MAX_VERSION = (LIBAVFORMAT_MAX_VERSION_MAJOR * VERSION_MAJOR) + (LIBAVFORMAT_MAX_VERSION_MINOR * VERSION_MINOR) + @@ -97,11 +92,13 @@ function avformat_version(): cuint; cdecl; external av__format; {$IFEND} + type PAVFile = Pointer; (* * Public Metadata API. + * !!WARNING!! This is a work in progress. Don't use outside FFmpeg for now. * The metadata API allows libavformat to export metadata tags to a client * application using a sequence of key/value pairs. * Important concepts to keep in mind: @@ -114,7 +111,7 @@ type * want to store, e.g., the email address of the child of producer Alice * and actor Bob, that could have key=alice_and_bobs_childs_email_address. * 3. A tag whose value is localized for a particular language is appended - * with a dash character ('-') and the ISO 639-2/B 3-letter language code. + * with a dash character ('-') and the ISO 639 3-letter language code. * For example: Author-ger=Michael, Author-eng=Mike * The original/default language is in the unqualified "Author" tag. * A demuxer should set a default if it sets any translated tag. @@ -133,51 +130,53 @@ type PAVMetadata = Pointer; {$IF LIBAVFORMAT_VERSION > 52024001} // > 52.24.1 + (** - * Gets a metadata element with matching key. - * @param prev Set to the previous matching element to find the next. - * @param flags Allows case as well as suffix-insensitive comparisons. - * @return Found tag or NULL, changing key or value leads to undefined behavior. + * gets a metadata element with matching key. + * @param prev set to the previous matching element to find the next. + * @param flags allows case as well as suffix insensitive comparisons. + * @return found tag or NULL, changing key or value leads to undefined behavior. *) function av_metadata_get(m: PAVMetadata; key: {const} PAnsiChar; prev: {const} PAVMetadataTag ; flags: cint): PAVMetadataTag; cdecl; external av__format; (** - * Sets the given tag in m, overwriting an existing tag. - * @param key tag key to add to m (will be av_strduped) - * @param value tag value to add to m (will be av_strduped) - * @return >= 0 on success otherwise an error code <0 + * sets the given tag in m, overwriting an existing tag. + * @param key tag key to add to m (will be av_strduped). + * @param value tag value to add to m (will be av_strduped). + * @return >= 0 if success otherwise error code that is <0. *) function av_metadata_set(var pm: PAVMetadata; key: {const} PAnsiChar; value: {const} PAnsiChar): cint; cdecl; external av__format; (** - * Frees all the memory allocated for an AVMetadata struct. + * Free all the memory allocated for an AVMetadata struct. *) procedure av_metadata_free(var m: PAVMetadata); cdecl; external av__format; + {$IFEND} (* packet functions *) -{$IF LIBAVCODEC_VERSION < 52032000} // < 52.32.0 type PAVPacket = ^TAVPacket; TAVPacket = record (** - * Presentation timestamp in time_base units; the time at which the - * decompressed packet will be presented to the user. + * Presentation time stamp in time_base units. + * This is the time at which the decompressed packet will be presented + * to the user. * Can be AV_NOPTS_VALUE if it is not stored in the file. * pts MUST be larger or equal to dts as presentation can not happen before * decompression, unless one wants to view hex dumps. Some formats misuse - * the terms dts and pts/cts to mean something different. Such timestamps + * the terms dts and pts/cts to mean something different, these timestamps * must be converted to true pts/dts before they are stored in AVPacket. *) pts: cint64; (** - * Decompression timestamp in time_base units; the time at which the - * packet is decompressed. + * Decompression time stamp in time_base units. + * This is the time at which the packet is decompressed. * Can be AV_NOPTS_VALUE if it is not stored in the file. *) dts: cint64; @@ -246,7 +245,6 @@ procedure av_init_packet(var pkt: TAVPacket); *) function av_new_packet(var pkt: TAVPacket; size: cint): cint; cdecl; external av__format; -{$IFEND} (** * Allocate and read the payload of a packet and initialize its fields with @@ -259,7 +257,6 @@ function av_new_packet(var pkt: TAVPacket; size: cint): cint; function av_get_packet(s: PByteIOContext; var pkt: TAVPacket; size: cint): cint; cdecl; external av__format; -{$IF LIBAVCODEC_VERSION < 52032000} // < 52.32.0 (** * @warning This is a hack - the packet memory allocation stuff is broken. The * packet is allocated if it was not really allocated. @@ -273,7 +270,6 @@ function av_dup_packet(pkt: PAVPacket): cint; * @param pkt packet to free *) procedure av_free_packet(pkt: PAVPacket); {$IFDEF HasInline}inline;{$ENDIF} -{$IFEND} (*************************************************) (* fractional numbers for exact pts handling *) @@ -282,6 +278,7 @@ type (** * The exact value of the fractional number is: 'val + num / den'. * num is assumed to be 0 <= num < den. + * @deprecated Use AVRational instead. *) PAVFrac = ^TAVFrac; TAVFrac = record @@ -300,7 +297,7 @@ type end; const - AVPROBE_SCORE_MAX = 100; ///< Maximum score, half of that is used for file-extension-based detection + AVPROBE_SCORE_MAX = 100; ///< Maximum score, half of that is used for file-extension-based detection. AVPROBE_PADDING_SIZE = 32; ///< extra allocated bytes at the end of the probe buffer //! Demuxer will use url_fopen, no opened file should be provided by the caller. @@ -313,9 +310,6 @@ const AVFMT_NOTIMESTAMPS = $0080; (**< Format does not need / have any timestamps. *) AVFMT_GENERIC_INDEX = $0100; (**< Use generic index building code. *) AVFMT_TS_DISCONT = $0200; (**< Format allows timestamp discontinuities. *) - {$IF LIBAVFORMAT_VERSION >= 52029002} // 52.29.2 - AVFMT_VARIABLE_FPS = $0400; (**< Format allows variable fps. *) - {$IFEND} // used by AVIndexEntry AVINDEX_KEYFRAME = $0001; @@ -326,7 +320,7 @@ const AVFMT_NOOUTPUTLOOP = -1; AVFMT_INFINITEOUTPUTLOOP = 0; - AVFMT_FLAG_GENPTS = $0001; ///< Generate missing pts even if it requires parsing future frames. + AVFMT_FLAG_GENPTS = $0001; ///< Generate pts if missing even if it requires parsing future frames. AVFMT_FLAG_IGNIDX = $0002; ///< Ignore index. AVFMT_FLAG_NONBLOCK = $0004; ///< Do not block when reading packets from input. @@ -345,11 +339,7 @@ const AV_DISPOSITION_KARAOKE = $0020; // used by TAVFormatContext.debug - FF_FDEBUG_TS = 0001; - - {$IF LIBAVFORMAT_VERSION >= 52034000} // > 52.34.0 - MAX_PROBE_PACKETS = 100; - {$IFEND} + FF_FDEBUG_TS = 0001; type PPAVCodecTag = ^PAVCodecTag; @@ -377,29 +367,12 @@ type PAVImageInfo = ^TAVImageInfo; {$IFEND} -{$IF LIBAVFORMAT_VERSION >= 52030001} // >= 52.30.1 -(** - * Convert all the metadata sets from ctx according to the source and - * destination conversion tables. - * @param d_conv destination tags format conversion table - * @param s_conv source tags format conversion table - *) - PAVMetadataConv = ^TAVMetadataConv; - TAVMetadataConv = record - ctx: PAVFormatContext; - d_conv: {const} PAVMetadataConv; - s_conv: {const} PAVMetadataConv; - end; -{$IFEND} - PAVChapter = ^TAVChapter; TAVChapter = record 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 title: PAnsiChar; ///< chapter title - {$IFEND} {$IF LIBAVFORMAT_VERSION >= 52024001} // 52.24.1 metadata: PAVMetadata; {$IFEND} @@ -442,13 +415,13 @@ type name: PAnsiChar; (** * Descriptive name for the format, meant to be more human-readable - * than name. You should use the NULL_IF_CONFIG_SMALL() macro + * than \p name. You \e should use the NULL_IF_CONFIG_SMALL() macro * to define it. *) long_name: PAnsiChar; mime_type: PAnsiChar; extensions: PAnsiChar; (**< comma-separated filename extensions *) - (** size of private data so that it can be allocated in the wrapper *) + (** Size of private data so that it can be allocated in the wrapper. *) priv_data_size: cint; (* output support *) audio_codec: TCodecID; (**< default audio codec *) @@ -466,7 +439,7 @@ type {$IF LIBAVFORMAT_VERSION >= 51008000} // 51.8.0 (** * List of supported codec_id-codec_tag pairs, ordered by "better - * choice first". The arrays are all terminated by CODEC_ID_NONE. + * choice first". The arrays are all CODEC_ID_NONE terminated. *) codec_tag: {const} PPAVCodecTag; {$IFEND} @@ -475,10 +448,6 @@ type subtitle_codec: TCodecID; (**< default subtitle codec *) {$IFEND} - {$IF LIBAVFORMAT_VERSION >= 52030001} // 52.30.1 - {const} metadata_conv: PAVMetadataConv; - {$IFEND} - (* private fields *) next: PAVOutputFormat; end; @@ -487,14 +456,14 @@ type name: PAnsiChar; (** * Descriptive name for the format, meant to be more human-readable - * than name. You should use the NULL_IF_CONFIG_SMALL() macro + * than \p name. You \e should use the NULL_IF_CONFIG_SMALL() macro * to define it. *) long_name: PAnsiChar; (** Size of private data so that it can be allocated in the wrapper. *) priv_data_size: cint; (** - * Tell if a given file has a chance of being parsed as this format. + * Tell if a given file has a chance of being parsed by this format. * The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes * big so you do not have to check for that unless you need more. *) @@ -506,28 +475,21 @@ type read_header: function (c: PAVFormatContext; ap: PAVFormatParameters): cint; cdecl; (** Read one packet and put it in 'pkt'. pts and flags are also set. 'av_new_stream' can be called only if the flag - AVFMTCTX_NOHEADER is used. - @return 0 on success, < 0 on error. - When returning an error, pkt must not have been allocated - or must be freed before returning *) + AVFMTCTX_NOHEADER is used. *) read_packet: function (c: PAVFormatContext; var pkt: TAVPacket): cint; cdecl; (** Close the stream. The AVFormatContext and AVStreams are not freed by this function *) read_close: function (c: PAVFormatContext): cint; cdecl; - -{$IF LIBAVFORMAT_VERSION_MAJOR < 53} (** * Seek to a given timestamp relative to the frames in * stream component stream_index. - * @param stream_index Must not be -1. - * @param flags Selects which direction should be preferred if no exact - * match is available. + * @param stream_index must not be -1 + * @param flags selects which direction should be preferred if no exact + * match is available * @return >= 0 on success (but not necessarily the new offset) *) read_seek: function (c: PAVFormatContext; stream_index: cint; timestamp: cint64; flags: cint): cint; cdecl; -{$IFEND} - (** * Gets the next timestamp in stream[stream_index].time_base units. * @return the timestamp or AV_NOPTS_VALUE if an error occurred @@ -555,25 +517,6 @@ type codec_tag: {const} PPAVCodecTag; {$IFEND} - {$IF LIBAVFORMAT_VERSION >= 52030000} // 52.30.0 - (** - * Seek to timestamp ts. - * Seeking will be done so that the point from which all active streams - * can be presented successfully will be closest to ts and within min/max_ts. - * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL. - *) - read_seek2: function (s: PAVFormatContext; - stream_index: cint; - min_ts: cint64; - ts: cint64; - max_ts: cint64; - flags: cint): cint; cdecl; - {$IFEND} - - {$IF LIBAVFORMAT_VERSION >= 52030001} // 52.30.1 - {const} metadata_conv: PAVMetadataConv; - {$IFEND} - (* private fields *) next: PAVInputFormat; end; @@ -608,11 +551,11 @@ type id: cint; (**< format-specific stream ID *) codec: PAVCodecContext; (**< codec context *) (** - * Real base framerate of the stream. - * This is the lowest framerate with which all timestamps can be + * Real base frame rate of the stream. + * This is the lowest frame rate with which all timestamps can be * represented accurately (it is the least common multiple of all - * framerates in the stream). Note, this value is just a guess! - * For example, if the time base is 1/90000 and all frames have either + * frame rates in the stream). Note, this value is just a guess! + * For example if the timebase is 1/90000 and all frames have either * approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1. *) r_frame_rate: TAVRational; @@ -629,7 +572,7 @@ type (** * This is the fundamental unit of time (in seconds) in terms * of which frame timestamps are represented. For fixed-fps content, - * time base should be 1/framerate and timestamp increments should be 1. + * time base should be 1/frame rate and timestamp increments should be 1. *) time_base: TAVRational; pts_wrap_bits: cint; (* number of bits in pts (used for wrapping control) *) @@ -656,9 +599,7 @@ type *) duration: cint64; - {$IF LIBAVFORMAT_VERSION_MAJOR < 53} - language: array [0..3] of PAnsiChar; (* ISO 639-2/B 3-letter language code (empty string if undefined) *) - {$IFEND} + language: array [0..3] of PAnsiChar; (* ISO 639 3-letter language code (empty string if undefined) *) (* av_read_frame() support *) need_parsing: TAVStreamParseType; @@ -679,7 +620,7 @@ 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} // 52.6.0 filename: PAnsiChar; (**< source filename of the stream *) {$IFEND} @@ -712,25 +653,6 @@ type cur_len: cint; cur_pkt: TAVPacket; {$IFEND} - - {$IF LIBAVFORMAT_VERSION >= 52030000} // > 52.30.0 - // Timestamp generation support: - (** - * Timestamp corresponding to the last dts sync point. - * - * Initialized when AVCodecParserContext.dts_sync_point >= 0 and - * a DTS is received from the underlying container. Otherwise set to - * AV_NOPTS_VALUE by default. - *) - reference_dts: cint64; - {$IFEND} - {$IF LIBAVFORMAT_VERSION >= 52034000} // > 52.34.0 - (** - * Number of packets to buffer for codec probing - * NOT PART OF PUBLIC API - *) - probe_packets: cint; - {$IFEND} end; (** @@ -741,7 +663,7 @@ type * sizeof(AVFormatContext) must not be used outside libav*. *) TAVFormatContext = record - av_class: PAVClass; (**< Set by avformat_alloc_context. *) + av_class: PAVClass; (**< Set by av_alloc_format_context. *) (* Can only be iformat or oformat, not both at the same time. *) iformat: PAVInputFormat; oformat: PAVOutputFormat; @@ -758,7 +680,6 @@ type filename: array [0..1023] of AnsiChar; (* input or output filename *) (* stream info *) timestamp: cint64; - {$IF LIBAVFORMAT_VERSION < 53000000} // 53.00.0 title: array [0..511] of AnsiChar; author: array [0..511] of AnsiChar; copyright: array [0..511] of AnsiChar; @@ -767,7 +688,6 @@ type year: cint; (**< ID3 year, 0 if none *) track: cint; (**< track number, 0 if none *) genre: array [0..31] of AnsiChar; (**< ID3 genre *) - {$IFEND} ctx_flags: cint; (**< Format-specific flags, see AVFMTCTX_xx *) (* private data for pts handling (do not modify directly). *) @@ -815,7 +735,7 @@ type loop_input: cint; {$IF LIBAVFORMAT_VERSION >= 50006000} // 50.6.0 - (** decoding: size of data to probe; encoding: unused. *) + (** Decoding: size of data to probe; encoding: unused. *) probesize: cuint; {$IFEND} @@ -855,8 +775,8 @@ type {$IF LIBAVFORMAT_VERSION >= 52004000} // 52.4.0 (** - * Maximum amount of memory in bytes to use for the index of each stream. - * If the index exceeds this size, entries will be discarded as + * Maximum amount of memory in bytes to use per stream for the index. + * If the needed index exceeds this size, entries will be discarded as * needed to maintain a smaller size. This can lead to slower or less * accurate seeking (depends on demuxer). * Demuxers for which a full in-memory index is mandatory will ignore @@ -913,10 +833,8 @@ type *) TAVProgram = record id : cint; - {$IF LIBAVFORMAT_VERSION < 53000000} // 53.00.0 provider_name : PAnsiChar; ///< network name for DVB streams name : PAnsiChar; ///< service name for DVB streams - {$IFEND} flags : cint; discard : TAVDiscard; ///< selects which program to discard and which to feed to the caller {$IF LIBAVFORMAT_VERSION >= 51016000} // 51.16.0 @@ -990,18 +908,8 @@ var {$IFEND} {$IF LIBAVFORMAT_VERSION >= 52003000} // 52.3.0 -(** - * If f is NULL, returns the first registered input format, - * if f is non-NULL, returns the next registered input format after f - * or NULL if f is the last one. - *) function av_iformat_next(f: PAVInputFormat): PAVInputFormat; cdecl; external av__format; -(** - * If f is NULL, returns the first registered output format, - * if f is non-NULL, returns the next registered input format after f - * or NULL if f is the last one. - *) function av_oformat_next(f: PAVOutputFormat): PAVOutputFormat; cdecl; external av__format; {$IFEND} @@ -1009,8 +917,8 @@ function av_oformat_next(f: PAVOutputFormat): PAVOutputFormat; function av_guess_image2_codec(filename: {const} PAnsiChar): TCodecID; cdecl; external av__format; -(* XXX: Use automatic init with either ELF sections or C file parser *) -(* modules. *) +(* XXX: use automatic init with either ELF sections or C file parser *) +(* modules *) (* utils.c *) procedure av_register_input_format(format: PAVInputFormat); @@ -1098,7 +1006,7 @@ procedure av_pkt_dump_log(avcl: Pointer; level: cint; pkt: PAVPacket; dump_paylo * * @see av_register_input_format() * @see av_register_output_format() - * @see av_register_protocol() + * @see register_protocol() *) procedure av_register_all(); cdecl; external av__format; @@ -1154,28 +1062,18 @@ function av_open_input_file(var ic_ptr: PAVFormatContext; filename: PAnsiChar; ap: PAVFormatParameters): cint; cdecl; external av__format; -{$IF LIBAVFORMAT_VERSION >= 52026000} // 52.26.0 (** * Allocate an AVFormatContext. * Can be freed with av_free() but do not forget to free everything you * explicitly allocated as well! *) -function avformat_alloc_context(): PAVFormatContext; - cdecl; external av__format; -{$ELSE} - {$IF LIBAVFORMAT_VERSION_MAJOR < 53} -(** - * @deprecated Use avformat_alloc_context() instead. - *) function av_alloc_format_context(): PAVFormatContext; cdecl; external av__format; - {$IFEND} -{$IFEND} (** * Read packets of a media file to get stream information. This * is useful for file formats with no headers such as MPEG. This - * function also computes the real framerate in case of MPEG-2 repeat + * function also computes the real frame rate in case of MPEG-2 repeat * frame mode. * The logical file position is not changed by this function; * examined packets may be buffered for later processing. @@ -1213,7 +1111,7 @@ function av_read_packet(s: PAVFormatContext; var pkt: TAVPacket): cint; * then it contains one frame. * * pkt->pts, pkt->dts and pkt->duration are always set to correct - * values in AVStream.time_base units (and guessed if the format cannot + * values in AVStream.timebase units (and guessed if the format cannot * provide them). pkt->pts can be AV_NOPTS_VALUE if the video format * has B-frames, so it is better to rely on pkt->dts if you do not * decompress the payload. @@ -1224,7 +1122,7 @@ function av_read_frame(s: PAVFormatContext; var pkt: TAVPacket): cint; cdecl; external av__format; (** - * Seek to the keyframe at timestamp. + * Seek to the key frame at timestamp. * 'timestamp' in 'stream_index'. * @param stream_index If stream_index is (-1), a default * stream is selected, and timestamp is automatically converted @@ -1238,51 +1136,15 @@ function av_seek_frame(s: PAVFormatContext; stream_index: cint; timestamp: cint6 flags: cint): cint; cdecl; external av__format; -{$IF LIBAVFORMAT_VERSION >= 52026000} // 52.26.0 (** - * Seek to timestamp ts. - * Seeking will be done so that the point from which all active streams - * can be presented successfully will be closest to ts and within min/max_ts. - * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL. - * - * If flags contain AVSEEK_FLAG_BYTE, then all timestamps are in byte and - * are the file position (this may not be supported by all demuxers). - * If flags contain AVSEEK_FLAG_FRAME then all timestamps are in frames - * in the stream with stream_index (this may not be supported by all demuxers). - * Otherwise all timestamps are in units of the stream selected by stream_index - * or if stream_index is -1, in AV_TIME_BASE units. - * If flags contain AVSEEK_FLAG_ANY, then non-keyframes are treated as - * keyframes (this may not be supported by all demuxers). - * - * @param stream_index index of the stream which is used as time base reference. - * @param min_ts smallest acceptable timestamp - * @param ts target timestamp - * @param max_ts largest acceptable timestamp - * @param flags flags - * @returns >=0 on success, error code otherwise - * - * @NOTE This is part of the new seek API which is still under construction. - * Thus do not use this yet. It may change at any time, do not expect - * ABI compatibility yet! - *) -function avformat_seek_file(s: PAVFormatContext; - stream_index: cint; - min_ts: cint64; - ts: cint64; - max_ts: cint64; - flags: cint): cint; - cdecl; external av__format; -{$IFEND} - -(** - * Start playing a network-based stream (e.g. RTSP stream) at the + * Start playing a network based stream (e.g. RTSP stream) at the * current position. *) function av_read_play(s: PAVFormatContext): cint; cdecl; external av__format; (** - * Pause a network-based stream (e.g. RTSP stream). + * Pause a network based stream (e.g. RTSP stream). * * Use av_read_play() to resume it. *) @@ -1377,7 +1239,7 @@ function av_index_search_timestamp(st: PAVStream; timestamp: cint64; flags: cint {$IF LIBAVFORMAT_VERSION >= 52004000} // 52.4.0 (** * Ensures the index uses less memory than the maximum specified in - * AVFormatContext.max_index_size by discarding entries if it grows + * AVFormatContext.max_index_size, by discarding entries if it grows * too large. * This function is not part of the public API and should only be called * by demuxers. @@ -1475,7 +1337,7 @@ function av_write_frame(s: PAVFormatContext; var pkt: TAVPacket): cint; * Writes a packet to an output media file ensuring correct interleaving. * * The packet must contain one audio or video frame. - * If the packets are already correctly interleaved, the application should + * If the packets are already correctly interleaved the application should * call av_write_frame() instead as it is slightly faster. It is also important * to keep in mind that completely non-interleaved input will need huge amounts * of memory to interleave with this, so it is preferable to interleave at the @@ -1493,7 +1355,7 @@ function av_interleaved_write_frame(s: PAVFormatContext; var pkt: TAVPacket): ci * Interleave a packet per dts in an output media file. * * Packets with pkt->destruct == av_destruct_packet will be freed inside this - * function, so they cannot be used after it. Note that calling av_free_packet() + * function, so they cannot be used after it, note calling av_free_packet() * on them is still safe. * * @param s media file handle @@ -1508,24 +1370,6 @@ function av_interleave_packet_per_dts(s: PAVFormatContext; _out: PAVPacket; pkt: PAVPacket; flush: cint): cint; cdecl; external av__format; -{$IF LIBAVFORMAT_VERSION >= 52025000} // 52.25.0 -(** - * Add packet to AVFormatContext->packet_buffer list, determining its - * interleaved position using compare() function argument. - * - * This function is not part of the public API and should only be called - * by muxers using their own interleave function. - *) -{ -procedure ff_interleave_add_packet(s: PAVFormatContext; - pkt: PAVPacket; - compare: function(para1: PAVFormatContext; - para2: PAVPacket; - para3: PAVPacket): cint); - cdecl; external av__format; -} -{$IFEND} - (** * @brief Write the stream trailer to an output media file and * free the file private data. @@ -1552,7 +1396,7 @@ function parse_image_size(width_ptr: PCint; height_ptr: PCint; {$IF LIBAVFORMAT_VERSION_MAJOR < 53} (** - * Converts framerate from a string to a fraction. + * Converts frame rate from string to a fraction. * @deprecated Use av_parse_video_frame_rate instead. *) function parse_frame_rate(frame_rate: PCint; frame_rate_base: PCint; @@ -1561,7 +1405,7 @@ function parse_frame_rate(frame_rate: PCint; frame_rate_base: PCint; {$IFEND} (** - * Parses datestr and returns a corresponding number of microseconds. + * Parses \p datestr and returns a corresponding number of microseconds. * @param datestr String representing a date or a duration. * - If a date the syntax is: * @code @@ -1572,7 +1416,7 @@ function parse_frame_rate(frame_rate: PCint; frame_rate_base: PCint; * If the year-month-day part is not specified it takes the current * year-month-day. * Returns the number of microseconds since 1st of January, 1970 up to - * the time of the parsed date or INT64_MIN if datestr cannot be + * the time of the parsed date or INT64_MIN if \p datestr cannot be * successfully parsed. * - If a duration the syntax is: * @code @@ -1580,10 +1424,10 @@ function parse_frame_rate(frame_rate: PCint; frame_rate_base: PCint; * [-]S+[.m...] * @endcode * Returns the number of microseconds contained in a time interval - * with the specified duration or INT64_MIN if datestr cannot be + * with the specified duration or INT64_MIN if \p datestr cannot be * successfully parsed. - * @param duration Flag which tells how to interpret datestr, if - * not zero datestr is interpreted as a duration, otherwise as a + * @param duration Flag which tells how to interpret \p datestr, if + * not zero \p datestr is interpreted as a duration, otherwise as a * date. *) function parse_date(datestr: PAnsiChar; duration: cint): cint64; @@ -1600,11 +1444,7 @@ const function ffm_read_write_index(fd: cint): cint64; cdecl; external av__format; -{$IF LIBAVFORMAT_VERSION < 52027000} // 52.27.0 procedure ffm_write_write_index(fd: cint; pos: cint64); -{$ELSE} -function ffm_write_write_index(fd: cint; pos: cint64): cint; -{$IFEND} cdecl; external av__format; procedure ffm_set_write_index(s: PAVFormatContext; pos: cint64; file_size: cint64); @@ -1620,7 +1460,7 @@ function find_info_tag(arg: PAnsiChar; arg_size: cint; tag1: PAnsiChar; info: PA cdecl; external av__format; (** - * Returns in 'buf' the path with '%d' replaced by a number. + * Returns in 'buf' the path with '%d' replaced by number. * * Also handles the '%0nd' format where 'n' is the total number * of digits and '%%'. @@ -1686,12 +1526,10 @@ begin end; {$IFEND} -{$IF LIBAVCODEC_VERSION < 52032000} // < 52.32.0 procedure av_free_packet(pkt: PAVPacket); begin if ((pkt <> nil) and (@pkt^.destruct <> nil)) then pkt^.destruct(pkt); end; -{$IFEND} end. |