diff options
author | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2013-03-03 01:23:38 +0000 |
---|---|---|
committer | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2013-03-03 01:23:38 +0000 |
commit | 2d2e572302584588bc6a05fb33efec13e37d7a7a (patch) | |
tree | 98927be6a89122e98830abe6a843ccbcbef85ea4 /src | |
parent | 3ded59d2e48c665cd7566a39efa8de9829510c45 (diff) | |
download | usdx-2d2e572302584588bc6a05fb33efec13e37d7a7a.tar.gz usdx-2d2e572302584588bc6a05fb33efec13e37d7a7a.tar.xz usdx-2d2e572302584588bc6a05fb33efec13e37d7a7a.zip |
first fix of ffmpeg-1.0
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2973 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ffmpeg-0.11/libavutil/cpu.pas | 2 | ||||
-rw-r--r-- | src/lib/ffmpeg-1.0/avcodec.pas | 273 | ||||
-rw-r--r-- | src/lib/ffmpeg-1.0/avformat.pas | 30 | ||||
-rw-r--r-- | src/lib/ffmpeg-1.0/avio.pas | 4 | ||||
-rw-r--r-- | src/lib/ffmpeg-1.0/avutil.pas | 8 | ||||
-rw-r--r-- | src/lib/ffmpeg-1.0/libavutil/cpu.pas | 2 | ||||
-rw-r--r-- | src/lib/ffmpeg-1.0/libavutil/log.pas | 84 | ||||
-rw-r--r-- | src/lib/ffmpeg-1.0/libavutil/opt.pas | 90 | ||||
-rw-r--r-- | src/lib/ffmpeg-1.1/libavutil/cpu.pas | 2 | ||||
-rw-r--r-- | src/lib/ffmpeg-1.1/libavutil/log.pas | 2 |
10 files changed, 249 insertions, 248 deletions
diff --git a/src/lib/ffmpeg-0.11/libavutil/cpu.pas b/src/lib/ffmpeg-0.11/libavutil/cpu.pas index d4bed00f..5495e421 100644 --- a/src/lib/ffmpeg-0.11/libavutil/cpu.pas +++ b/src/lib/ffmpeg-0.11/libavutil/cpu.pas @@ -99,7 +99,7 @@ function av_parse_cpu_flags(s: {const} PAnsiChar): cint; * * @return negative on error. *) -function av_parse_cpu_caps(flags: Pcuint, s: {const} PAnsiChar): cint; +function av_parse_cpu_caps(flags: Pcuint; s: {const} PAnsiChar): cint; cdecl; external av__util; (* The following CPU-specific functions shall not be called directly. *) diff --git a/src/lib/ffmpeg-1.0/avcodec.pas b/src/lib/ffmpeg-1.0/avcodec.pas index 8b06fb28..1254b997 100644 --- a/src/lib/ffmpeg-1.0/avcodec.pas +++ b/src/lib/ffmpeg-1.0/avcodec.pas @@ -633,7 +633,8 @@ const * @see avcodec_get_descriptor() *) type - record AVCodecDescriptor = + PAVCodecDescriptor = ^TAVCodecDescriptor; + TAVCodecDescriptor = record id: TAVCodecID; type_: TAVMediaType; (** @@ -1405,6 +1406,7 @@ type * a major version bump. * sizeof(AVFrame) must not be used outside libavcodec. *) + PPAVFrame = ^PAVFrame; PAVFrame = ^TAVFrame; TAVFrame = record (** @@ -1444,7 +1446,7 @@ type * encoding: unused * decoding: set by AVCodecContext.get_buffer() *) - extended_data: pointer of pbyte; + extended_data: ^pbyte; (** * width and height of the video frame @@ -1462,7 +1464,7 @@ type (** * format of the frame, -1 if unknown or unset - * Values correspond to enum PixelFormat for video frames, + * Values correspond to enum TAVPixelFormat for video frames, * enum AVSampleFormat for audio) * - encoding: unused * - decoding: Read by user. @@ -1797,45 +1799,6 @@ type channels: cint64; end; {TAVFrame} -(** - * Accessors for some AVFrame fields. - * The position of these field in the structure is not part of the ABI, - * they should not be accessed directly outside libavcodec. - *) -function av_frame_get_best_effort_timestamp(frame: {const} PAVFrame): cint64; - cdecl; external av__codec; -procedure av_frame_set_best_effort_timestamp(frame: PAVFrame; val: cint64); - cdecl; external av__codec; -function av_frame_get_pkt_duration (frame: {const} PAVFrame): cint64; - cdecl; external av__codec; -procedure av_frame_get_pkt_duration (frame: PAVFrame; val: cint64); - cdecl; external av__codec; -function av_frame_get_pkt_pos (frame: {const} PAVFrame): cint64; - cdecl; external av__codec; -procedure av_frame_get_pkt_pos (frame: PAVFrame; val: cint64); - cdecl; external av__codec; -function av_frame_get_channel_layout (frame: {const} PAVFrame): cint64; - cdecl; external av__codec; -procedure av_frame_get_channel_layout (frame: PAVFrame; val: cint64); - cdecl; external av__codec; -function av_frame_get_channels (frame: {const} PAVFrame): cint; - cdecl; external av__codec; -procedure av_frame_set_channels (frame: PAVFrame; val: cint); - cdecl; external av__codec; -function av_frame_get_sample_rate (frame: {const} PAVFrame): cint; - cdecl; external av__codec; -procedure av_frame_set_sample_rate (frame: PAVFrame; val: cint); - cdecl; external av__codec; -function av_frame_get_metadata (frame: {const} PAVFrame): PAVDictionary; - cdecl; external av__codec; -procedure av_frame_set_metadata (frame: PAVFrame; val: PAVDictionary); - cdecl; external av__codec; -function av_frame_get_decode_error_flags (frame: {const} PAVFrame): cint; - cdecl; external av__codec; -procedure av_frame_set_decode_error_flags (frame: PAVFrame; val: cint); - cdecl; external av__codec; - -type TAVCodecInternal = record end; PAVCodecInternal = ^TAVCodecInternal; @@ -1865,6 +1828,16 @@ type ); (** + * four components are given, that's all. + * the last component is alpha + *) + PAVPicture = ^TAVPicture; + TAVPicture = record + data: array [0..AV_NUM_DATA_POINTERS - 1] of PByteArray; + linesize: array [0..AV_NUM_DATA_POINTERS - 1] of cint; ///< number of bytes per line + end; {TAVPicture} + +(** * main external API structure. * New fields can be added to the end with minor version bumps. * Removal, reordering and changes to existing fields require a major @@ -2098,7 +2071,7 @@ type y: cint; type_: cint; height: cint); cdecl; (** - * callback to negotiate the pixelFormat + * callback to negotiate the TAVPixelFormat * @param fmt is the list of formats which are supported by the codec, * it is terminated by -1 as 0 is a valid format, the formats are ordered by quality. * The first is always the native one. @@ -3306,13 +3279,6 @@ type end; {TAVCodecContext} - function av_codec_get_pkt_timebase(avctx: {const} PAVCodecContext): TAVRational; - procedure av_codec_set_pkt_timebase(avctx: {const} PAVCodecContext; val: TAVRational); - - function av_codec_get_codec_descriptor(avctx: {const} PAVCodecContext): PAVCodecDescriptor; - procedure av_codec_set_codec_descriptor(avctx: {const} PAVCodecContext; desc: {const} PAVCodecDescriptor); - -type (** * AVProfile. *) @@ -3322,8 +3288,66 @@ type name: {const} PAnsiChar; ///< short name for the profile end; {TAVProfile} + TAVSubtitleType = ( + SUBTITLE_NONE, + + SUBTITLE_BITMAP, ///< A bitmap, pict will be set + + (** + * Plain text, the text field must be set by the decoder and is + * authoritative. ass and pict fields may contain approximations. + *) + SUBTITLE_TEXT, + + (** + * Formatted text, the ass field must be set by the decoder and is + * authoritative. pict and text fields may contain approximations. + *) + SUBTITLE_ASS + ); {TAVSubtitleType} + + PPAVSubtitleRect = ^PAVSubtitleRect; + PAVSubtitleRect = ^TAVSubtitleRect; + TAVSubtitleRect = record + x: cint; ///< top left corner of pict, undefined when pict is not set + y: cint; ///< top left corner of pict, undefined when pict is not set + w: cint; ///< width of pict, undefined when pict is not set + h: cint; ///< height of pict, undefined when pict is not set + nb_colors: cint; ///< number of colors in pict, undefined when pict is not set + + (** + * data+linesize for the bitmap of this subtitle. + * can be set for text/ass as well once they where rendered + *) + pict: TAVPicture; + type_: TAVSubtitleType; + + text: PAnsiChar; ///< 0 terminated plain UTF-8 text + + (** + * 0 terminated ASS/SSA compatible event line. + * The presentation of this is unaffected by the other values in this + * struct. + *) + ass: PAnsiChar; + + (** + * 1 indicates this subtitle is a forced subtitle. + * A forced subtitle should be displayed even when subtitles are hidden. + *) + forced: cint; + end; {TAVSubtitleRect} + + PPAVSubtitle = ^PAVSubtitle; + PAVSubtitle = ^TAVSubtitle; TAVSubtitle = record - end; + format: cuint16; (* 0 = graphics *) + start_display_time: cuint32; (* relative to packet pts, in ms *) + end_display_time: cuint32; (* relative to packet pts, in ms *) + num_rects: cuint; + rects: PPAVSubtitleRect; + pts: cint64; ///< Same as packet pts, in AV_TIME_BASE + end; {TAVSubtitle} (** * AVCodec. @@ -3522,79 +3546,52 @@ type *) (** - * four components are given, that's all. - * the last component is alpha + * Accessors for some AVFrame fields. + * The position of these field in the structure is not part of the ABI, + * they should not be accessed directly outside libavcodec. *) - PAVPicture = ^TAVPicture; - TAVPicture = record - data: array [0..AV_NUM_DATA_POINTERS - 1] of PByteArray; - linesize: array [0..AV_NUM_DATA_POINTERS - 1] of cint; ///< number of bytes per line - end; {TAVPicture} - -/** - * @} - */ - - TAVSubtitleType = ( - SUBTITLE_NONE, - - SUBTITLE_BITMAP, ///< A bitmap, pict will be set - - (** - * Plain text, the text field must be set by the decoder and is - * authoritative. ass and pict fields may contain approximations. - *) - SUBTITLE_TEXT, - - (** - * Formatted text, the ass field must be set by the decoder and is - * authoritative. pict and text fields may contain approximations. - *) - SUBTITLE_ASS - ); {TAVSubtitleType} - - PPAVSubtitleRect = ^PAVSubtitleRect; - PAVSubtitleRect = ^TAVSubtitleRect; - TAVSubtitleRect = record - x: cint; ///< top left corner of pict, undefined when pict is not set - y: cint; ///< top left corner of pict, undefined when pict is not set - w: cint; ///< width of pict, undefined when pict is not set - h: cint; ///< height of pict, undefined when pict is not set - nb_colors: cint; ///< number of colors in pict, undefined when pict is not set - - (** - * data+linesize for the bitmap of this subtitle. - * can be set for text/ass as well once they where rendered - *) - pict: TAVPicture; - type_: TAVSubtitleType; - - text: PAnsiChar; ///< 0 terminated plain UTF-8 text - - (** - * 0 terminated ASS/SSA compatible event line. - * The presentation of this is unaffected by the other values in this - * struct. - *) - ass: PAnsiChar; +function av_frame_get_best_effort_timestamp(frame: {const} PAVFrame): cint64; + cdecl; external av__codec; overload; +procedure av_frame_set_best_effort_timestamp(frame: PAVFrame; val: cint64); + cdecl; external av__codec; overload; +function av_frame_get_pkt_duration (frame: {const} PAVFrame): cint64; + cdecl; external av__codec; overload; +procedure av_frame_get_pkt_duration (frame: PAVFrame; val: cint64); + cdecl; external av__codec; overload; +function av_frame_get_pkt_pos (frame: {const} PAVFrame): cint64; + cdecl; external av__codec; overload; +procedure av_frame_get_pkt_pos (frame: PAVFrame; val: cint64); + cdecl; external av__codec; overload; +function av_frame_get_channel_layout (frame: {const} PAVFrame): cint64; + cdecl; external av__codec; overload; +procedure av_frame_get_channel_layout (frame: PAVFrame; val: cint64); + cdecl; external av__codec; overload; +function av_frame_get_channels (frame: {const} PAVFrame): cint; + cdecl; external av__codec; +procedure av_frame_set_channels (frame: PAVFrame; val: cint); + cdecl; external av__codec; +function av_frame_get_sample_rate (frame: {const} PAVFrame): cint; + cdecl; external av__codec; +procedure av_frame_set_sample_rate (frame: PAVFrame; val: cint); + cdecl; external av__codec; +function av_frame_get_metadata (frame: {const} PAVFrame): PAVDictionary; + cdecl; external av__codec; +procedure av_frame_set_metadata (frame: PAVFrame; val: PAVDictionary); + cdecl; external av__codec; +function av_frame_get_decode_error_flags (frame: {const} PAVFrame): cint; + cdecl; external av__codec; +procedure av_frame_set_decode_error_flags (frame: PAVFrame; val: cint); + cdecl; external av__codec; - (** - * 1 indicates this subtitle is a forced subtitle. - * A forced subtitle should be displayed even when subtitles are hidden. - *) - forced: cint; - end; {TAVSubtitleRect} +function av_codec_get_pkt_timebase(avctx: {const} PAVCodecContext): TAVRational; + cdecl; external av__codec; +procedure av_codec_set_pkt_timebase(avctx: {const} PAVCodecContext; val: TAVRational); + cdecl; external av__codec; - PPAVSubtitle = ^PAVSubtitle; - PAVSubtitle = ^TAVSubtitle; - TAVSubtitle = record - format: cuint16; (* 0 = graphics *) - start_display_time: cuint32; (* relative to packet pts, in ms *) - end_display_time: cuint32; (* relative to packet pts, in ms *) - num_rects: cuint; - rects: PPAVSubtitleRect; - pts: cint64; ///< Same as packet pts, in AV_TIME_BASE - end; {TAVSubtitle} +function av_codec_get_codec_descriptor(avctx: {const} PAVCodecContext): PAVCodecDescriptor; + cdecl; external av__codec; +procedure av_codec_set_codec_descriptor(avctx: {const} PAVCodecContext; desc: {const} PAVCodecDescriptor); + cdecl; external av__codec; (** * If c is NULL, returns the first registered codec, @@ -3992,15 +3989,6 @@ function av_packet_merge_side_data(pkt: PAVPacket): cint; function av_packet_split_side_data(pkt: PAVPacket): cint; cdecl; external av__codec; -/** - * @} - */ - -/** - * @addtogroup lavc_decoding - * @{ - */ - (** * Find a registered decoder with a matching codec ID. * @@ -4218,10 +4206,10 @@ function avcodec_decode_subtitle2(avctx: PAVCodecContext; sub: PAVSubtitle; avpkt: PAVPacket): cint; cdecl; external av__codec; -/** +(** * @defgroup lavc_parsing Frame parsing * @{ - */ + *) const AV_PARSER_PTS_NB = 4; @@ -4600,7 +4588,7 @@ function avcodec_encode_subtitle(avctx: PAVCodecContext; buf: PByteArray; * @defgroup lavc_resample Audio resampling * @ingroup libavc * - * @{ + * @ *) type PReSampleContext = pointer; @@ -4694,7 +4682,7 @@ procedure av_resample_close (c: PAVResampleContext); (** * @addtogroup lavc_picture - * @{ + * @ *) (** @@ -4752,7 +4740,7 @@ function avpicture_get_size (pix_fmt: TAVPixelFormat; width: cint; height: cint) cdecl; external av__codec; (** - * deinterlace - if not supported return -1 *) + * deinterlace - if not supported return -1 *) function avpicture_deinterlace (dst: PAVPicture; src: {const} PAVPicture; pix_fmt: TAVPixelFormat; width: cint; height: cint): cint; @@ -4791,14 +4779,14 @@ function av_picture_pad(dst: PAVPicture; src: {const} PAVPicture; * * Miscellaneous utility functions related to both encoding and decoding * (or neither). - * @{ + * @ *) (** * @defgroup lavc_misc_pixfmt Pixel formats * * Functions for working with pixel formats. - * @{ + * @ *) procedure avcodec_get_chroma_sub_sample (pix_fmt: TAVPixelFormat; var h_shift: cint; var v_shift: cint); @@ -4891,9 +4879,9 @@ function avcodec_find_best_pix_fmt(pix_fmt_mask: cint64; src_pix_fmt: TAVPixelFo * @param[out] loss_ptr Combination of flags informing you what kind of losses will occur. * @return The best pixel format to convert to or -1 if none was found. *) -function avcodec_find_best_pix_fmt_of_list(pix_fmt_list: PPixelFormat; - src_pix_fmt: TPixelFormat; - has_alpha: cint; loss_ptr: Pcint): TPixelFormat; +function avcodec_find_best_pix_fmt_of_list(pix_fmt_list: PAVPixelFormat; + src_pix_fmt: TAVPixelFormat; + has_alpha: cint; loss_ptr: Pcint): TAVPixelFormat; cdecl; external av__codec; (** @@ -4927,7 +4915,7 @@ function avcodec_find_best_pix_fmt_of_list(pix_fmt_list: PPixelFormat; * @return The best pixel format to convert to or -1 if none was found. *) function avcodec_find_best_pix_fmt_of_2(dst_pix_fmt1: TAVPixelFormat; dst_pix_fmt2: TAVPixelFormat; - src_pix_fmt: TAVPixelFormat; has_alpha: cint; loss_ptr: Pcint)): TAVPixelFormat; + src_pix_fmt: TAVPixelFormat; has_alpha: cint; loss_ptr: Pcint): TAVPixelFormat; cdecl; external av__codec; {$IFDEF AV_HAVE_INCOMPATIBLE_FORK_ABI} @@ -4951,6 +4939,7 @@ function avcodec_default_get_format(s: PAVCodecContext; fmt: {const} PAVPixelFor procedure avcodec_set_dimensions(s: PAVCodecContext; width: cint; height: cint); cdecl; external av__codec; +(** * Put a string representing the codec tag codec_tag in buf. * * @param buf_size size in bytes of buf @@ -5047,7 +5036,7 @@ function av_get_exact_bits_per_sample(codec_id: TAVCodecID): cint; * @return frame duration, in samples, if known. 0 if not able to * determine. *) -function av_get_audio_frame_duration(avctx: PAVCodecContext, frame_bytes: cint): cint; +function av_get_audio_frame_duration(avctx: PAVCodecContext; frame_bytes: cint): cint; cdecl; external av__codec; type diff --git a/src/lib/ffmpeg-1.0/avformat.pas b/src/lib/ffmpeg-1.0/avformat.pas index 105cc2b6..1cddea38 100644 --- a/src/lib/ffmpeg-1.0/avformat.pas +++ b/src/lib/ffmpeg-1.0/avformat.pas @@ -458,7 +458,7 @@ const increasing timestamps, but they must still be monotonic *) - AVFMT_SEEK_TO_PTS = $4000000 (**< Seeking is based on PTS *) + AVFMT_SEEK_TO_PTS = $4000000; (**< Seeking is based on PTS *) // used by AVIndexEntry AVINDEX_KEYFRAME = $0001; @@ -504,9 +504,9 @@ const * even when user did not explicitly ask for subtitles. *) AV_DISPOSITION_FORCED = $0040; - AV_DISPOSITION_HEARING_IMPAIRED = $0080; /**< stream for hearing impaired audiences */ - AV_DISPOSITION_VISUAL_IMPAIRED = $0100; /**< stream for visual impaired audiences */ - AV_DISPOSITION_CLEAN_EFFECTS = $0200; /**< stream without voice */ + AV_DISPOSITION_HEARING_IMPAIRED = $0080; (**< stream for hearing impaired audiences *) + AV_DISPOSITION_VISUAL_IMPAIRED = $0100; (**< stream for visual impaired audiences *) + AV_DISPOSITION_CLEAN_EFFECTS = $0200; (**< stream without voice *) (** * The stream is stored in the file as an attached picture/"cover art" (e.g. * APIC frame in ID3v2). The single packet associated with it will be returned @@ -533,7 +533,12 @@ type PPAVStream = ^PAVStream; PAVStream = ^TAVStream; + PAVPacketList = ^TAVPacketList; + TAVPacketList = record + pkt: TAVPacket; + next: PAVPacketList; + end; (*AVPacketList*) PPAVProgram = ^PAVProgram; PAVProgram = ^TAVProgram; @@ -761,17 +766,14 @@ type max_ts: cint64; flags: cint): cint; cdecl; end; -(** - * @} - *) TAVStreamParseType = ( AVSTREAM_PARSE_NONE, AVSTREAM_PARSE_FULL, (**< full parsing and repack *) AVSTREAM_PARSE_HEADERS, (**< Only parse headers, do not repack. *) AVSTREAM_PARSE_TIMESTAMPS, (**< full parsing and interpolation of timestamps for frames not starting on a packet boundary *) - AVSTREAM_PARSE_FULL_ONCE (**< full parsing and repack of the first frame only, only implemented for H.264 currently *) - AVSTREAM_PARSE_FULL_RAW = $57415230; // MKTAG(0,'R','A','W'), + AVSTREAM_PARSE_FULL_ONCE, (**< full parsing and repack of the first frame only, only implemented for H.264 currently *) + AVSTREAM_PARSE_FULL_RAW = $57415230 // MKTAG(0,'R','A','W'), (**< full parsing and repack with timestamp and position generation by parser for raw this assumes that each packet in the file contains no demuxer level headers and just codec level data, otherwise position generaion would fail *) @@ -1092,7 +1094,7 @@ type * iformat/oformat.flags. In such a case, the (de)muxer will handle * I/O in some other way and this field will be NULL. *) - pb: PByteIOContext; + pb: PByteIOContext; (* stream info *) ctx_flags: cint; (**< Format-specific flags, see AVFMTCTX_xx *) @@ -1344,11 +1346,6 @@ type function av_fmt_ctx_get_duration_estimation_method(ctx: {const} PAVFormatContext): TAVDurationEstimationMethod; cdecl; external av__format; - TAVPacketList = record - pkt: TAVPacket; - next: PAVPacketList; - end; (*AVPacketList*) - (** * @defgroup lavf_core Core functions * @ingroup libavf @@ -1572,7 +1569,8 @@ function av_probe_input_format3(pd: PAVProbeData; is_opened: cint; score_ret: Pc *) function av_probe_input_buffer(pb: PAVIOContext; var fmt: PAVInputFormat; filename: {const} PAnsiChar; logctx: pointer; - offset: cuint; max_probe_size: cuint); + offset: cuint; max_probe_size: cuint): cint; + cdecl; external av__format; (** * Open an input stream and read the header. The codecs are not opened. diff --git a/src/lib/ffmpeg-1.0/avio.pas b/src/lib/ffmpeg-1.0/avio.pas index 66c0d259..5053cc5b 100644 --- a/src/lib/ffmpeg-1.0/avio.pas +++ b/src/lib/ffmpeg-1.0/avio.pas @@ -179,6 +179,10 @@ type seek_count: cint; end; +type + PByteIOContext = PAVIOContext; { deprecated } + TByteIOContext = TAVIOContext; { deprecated } + (* unbuffered I/O *) (** diff --git a/src/lib/ffmpeg-1.0/avutil.pas b/src/lib/ffmpeg-1.0/avutil.pas index d6152707..49d543cc 100644 --- a/src/lib/ffmpeg-1.0/avutil.pas +++ b/src/lib/ffmpeg-1.0/avutil.pas @@ -202,10 +202,10 @@ function av_x_if_null(p: {const} pointer; x: {const} pointer): pointer; {$IFDEF {$INCLUDE libavutil/mem.pas} -{$INCLUDE libavutil/opt.pas} - {$INCLUDE libavutil/log.pas} +{$INCLUDE libavutil/opt.pas} + {$INCLUDE libavutil/pixfmt.pas} {$INCLUDE libavutil/samplefmt.pas} @@ -222,6 +222,9 @@ function MKBETAG(a, b, c, d: AnsiChar): integer; {$IFDEF HasInline}inline;{$ENDI implementation +uses + SysUtils; + function av_x_if_null(p: {const} pointer; x: {const} pointer): pointer; {$IFDEF HasInline}inline;{$ENDIF} begin if p = nil then @@ -272,6 +275,7 @@ var begin errbuf := stralloc(AV_ERROR_MAX_STRING_SIZE); av_make_error_string(errbuf, AV_ERROR_MAX_STRING_SIZE, errnum); + av_err2str := errbuf end; (* libavutil/mem.h *) diff --git a/src/lib/ffmpeg-1.0/libavutil/cpu.pas b/src/lib/ffmpeg-1.0/libavutil/cpu.pas index 6491cea6..ab0a7d10 100644 --- a/src/lib/ffmpeg-1.0/libavutil/cpu.pas +++ b/src/lib/ffmpeg-1.0/libavutil/cpu.pas @@ -102,7 +102,7 @@ function av_parse_cpu_flags(s: {const} PAnsiChar): cint; * * @return negative on error. *) -function av_parse_cpu_caps(flags: Pcuint, s: {const} PAnsiChar): cint; +function av_parse_cpu_caps(flags: Pcuint; s: {const} PAnsiChar): cint; cdecl; external av__util; (* The following CPU-specific functions shall not be called directly. *) diff --git a/src/lib/ffmpeg-1.0/libavutil/log.pas b/src/lib/ffmpeg-1.0/libavutil/log.pas index 86434b12..6ad9a02f 100644 --- a/src/lib/ffmpeg-1.0/libavutil/log.pas +++ b/src/lib/ffmpeg-1.0/libavutil/log.pas @@ -29,7 +29,89 @@ *) type - PAVClassCategory = TAVClassCategory; + TAVOptionType = ( +{$IFDEF FF_API_OLD_AVOPTIONS} + FF_OPT_TYPE_FLAGS = 0, + FF_OPT_TYPE_INT, + FF_OPT_TYPE_INT64, + FF_OPT_TYPE_DOUBLE, + FF_OPT_TYPE_FLOAT, + FF_OPT_TYPE_STRING, + FF_OPT_TYPE_RATIONAL, + FF_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length + FF_OPT_TYPE_CONST = 128 +{$ELSE} + AV_OPT_TYPE_FLAGS, + AV_OPT_TYPE_INT, + AV_OPT_TYPE_INT64, + AV_OPT_TYPE_DOUBLE, + AV_OPT_TYPE_FLOAT, + AV_OPT_TYPE_STRING, + AV_OPT_TYPE_RATIONAL, + AV_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length + AV_OPT_TYPE_CONST = 128, + AV_OPT_TYPE_PIXEL_FMT = $50464D54, ///< MKBETAG('P','F','M','T'), + AV_OPT_TYPE_IMAGE_SIZE = $53495A45 ///< MKBETAG('S','I','Z','E'), offset must point to two consecutive integers +{$ENDIF} + ); + +const + AV_OPT_FLAG_ENCODING_PARAM = 1; ///< a generic parameter which can be set by the user for muxing or encoding + AV_OPT_FLAG_DECODING_PARAM = 2; ///< a generic parameter which can be set by the user for demuxing or decoding + AV_OPT_FLAG_METADATA = 4; ///< some data extracted or inserted into the file like title, comment, ... + AV_OPT_FLAG_AUDIO_PARAM = 8; + AV_OPT_FLAG_VIDEO_PARAM = 16; + AV_OPT_FLAG_SUBTITLE_PARAM = 32; + AV_OPT_FLAG_FILTERING_PARAM = 1 shl 16; ///< a generic parameter which can be set by the user for filtering + +type + (** + * AVOption + *) + PAVOption = ^TAVOption; + TAVOption = record + name: {const} PAnsiChar; + + (** + * short English help text + * @todo What about other languages? + *) + help: {const} PAnsiChar; + + (** + * The offset relative to the context structure where the option + * value is stored. It should be 0 for named constants. + *) + offset: cint; + type_: TAVOptionType; + + (** + * the default value for scalar options + *) + default_val: record + case cint of + 0: (i64: cint64); + 1: (dbl: cdouble); + 2: (str: PAnsiChar); + (* TODO those are unused now *) + 3: (q: TAVRational); + end; + min: cdouble; ///< minimum valid value for the option + max: cdouble; ///< maximum valid value for the option + + flags: cint; +//FIXME think about enc-audio, ... style flags + + (** + * The logical unit to which the option belongs. Non-constant + * options and corresponding named constants share the same + * unit. May be NULL. + *) + unit_: {const} PAnsiChar; + end; + +type + PAVClassCategory = ^TAVClassCategory; TAVClassCategory = ( AV_CLASS_CATEGORY_NA = 0, AV_CLASS_CATEGORY_INPUT, diff --git a/src/lib/ffmpeg-1.0/libavutil/opt.pas b/src/lib/ffmpeg-1.0/libavutil/opt.pas index 7e755942..a7a6f83d 100644 --- a/src/lib/ffmpeg-1.0/libavutil/opt.pas +++ b/src/lib/ffmpeg-1.0/libavutil/opt.pas @@ -27,88 +27,6 @@ * *) -type - TAVOptionType = ( -{$IFDEF FF_API_OLD_AVOPTIONS} - FF_OPT_TYPE_FLAGS = 0, - FF_OPT_TYPE_INT, - FF_OPT_TYPE_INT64, - FF_OPT_TYPE_DOUBLE, - FF_OPT_TYPE_FLOAT, - FF_OPT_TYPE_STRING, - FF_OPT_TYPE_RATIONAL, - FF_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length - FF_OPT_TYPE_CONST = 128 -{$ELSE} - AV_OPT_TYPE_FLAGS, - AV_OPT_TYPE_INT, - AV_OPT_TYPE_INT64, - AV_OPT_TYPE_DOUBLE, - AV_OPT_TYPE_FLOAT, - AV_OPT_TYPE_STRING, - AV_OPT_TYPE_RATIONAL, - AV_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length - AV_OPT_TYPE_CONST = 128, - AV_OPT_TYPE_PIXEL_FMT = $50464D54, ///< MKBETAG('P','F','M','T'), - AV_OPT_TYPE_IMAGE_SIZE = $53495A45 ///< MKBETAG('S','I','Z','E'), offset must point to two consecutive integers -{$ENDIF} - ); - -const - AV_OPT_FLAG_ENCODING_PARAM = 1; ///< a generic parameter which can be set by the user for muxing or encoding - AV_OPT_FLAG_DECODING_PARAM = 2; ///< a generic parameter which can be set by the user for demuxing or decoding - AV_OPT_FLAG_METADATA = 4; ///< some data extracted or inserted into the file like title, comment, ... - AV_OPT_FLAG_AUDIO_PARAM = 8; - AV_OPT_FLAG_VIDEO_PARAM = 16; - AV_OPT_FLAG_SUBTITLE_PARAM = 32; - AV_OPT_FLAG_FILTERING_PARAM = 1 shl 16; ///< a generic parameter which can be set by the user for filtering - -type - (** - * AVOption - *) - PAVOption = ^TAVOption; - TAVOption = record - name: {const} PAnsiChar; - - (** - * short English help text - * @todo What about other languages? - *) - help: {const} PAnsiChar; - - (** - * The offset relative to the context structure where the option - * value is stored. It should be 0 for named constants. - *) - offset: cint; - type_: TAVOptionType; - - (** - * the default value for scalar options - *) - default_val: record - case cint of - 0: (i64: cint64); - 1: (dbl: cdouble); - 2: (str: PAnsiChar); - (* TODO those are unused now *) - 3: (q: TAVRational); - end; - min: cdouble; ///< minimum valid value for the option - max: cdouble; ///< maximum valid value for the option - - flags: cint; -//FIXME think about enc-audio, ... style flags - - (** - * The logical unit to which the option belongs. Non-constant - * options and corresponding named constants share the same - * unit. May be NULL. - *) - unit_: {const} PAnsiChar; - end; - {$IFDEF FF_API_FIND_OPT} (** * Look for an option in obj. Look only for the options which @@ -267,16 +185,22 @@ function av_opt_set_dict(obj: pointer; var options: PAVDictionary): cint; * @return 0 on success, a negative number on failure. *) function av_opt_eval_flags (obj: pointer; o: {const} PAVOption; val: {const} PAnsiChar; flags_out: Pcint): cint; + cdecl; external av__util; function av_opt_eval_int (obj: pointer; o: {const} PAVOption; val: {const} PAnsiChar; int_out: Pcint): cint; + cdecl; external av__util; function av_opt_eval_int64 (obj: pointer; o: {const} PAVOption; val: {const} PAnsiChar; int64_out: Pcint64): cint; + cdecl; external av__util; function av_opt_eval_float (obj: pointer; o: {const} PAVOption; val: {const} PAnsiChar; float_out: Pcfloat): cint; + cdecl; external av__util; function av_opt_eval_double(obj: pointer; o: {const} PAVOption; val: {const} PAnsiChar; double_out: Pcdouble): cint; + cdecl; external av__util; function av_opt_eval_q (obj: pointer; o: {const} PAVOption; val: {const} PAnsiChar; q_out: PAVRational): cint; + cdecl; external av__util; (** * @} *) - const +const AV_OPT_SEARCH_CHILDREN = 0001; (**< Search in possible children of the given object first.*) (** diff --git a/src/lib/ffmpeg-1.1/libavutil/cpu.pas b/src/lib/ffmpeg-1.1/libavutil/cpu.pas index 7667a57e..409f62c8 100644 --- a/src/lib/ffmpeg-1.1/libavutil/cpu.pas +++ b/src/lib/ffmpeg-1.1/libavutil/cpu.pas @@ -105,7 +105,7 @@ function av_parse_cpu_flags(s: {const} PAnsiChar): cint; * * @return negative on error. *) -function av_parse_cpu_caps(flags: Pcuint, s: {const} PAnsiChar): cint; +function av_parse_cpu_caps(flags: Pcuint; s: {const} PAnsiChar): cint; cdecl; external av__util; (* The following CPU-specific functions shall not be called directly. *) diff --git a/src/lib/ffmpeg-1.1/libavutil/log.pas b/src/lib/ffmpeg-1.1/libavutil/log.pas index 41479150..2f27394d 100644 --- a/src/lib/ffmpeg-1.1/libavutil/log.pas +++ b/src/lib/ffmpeg-1.1/libavutil/log.pas @@ -29,7 +29,7 @@ *) type - PAVClassCategory = TAVClassCategory; + PAVClassCategory = ^TAVClassCategory; TAVClassCategory = ( AV_CLASS_CATEGORY_NA = 0, AV_CLASS_CATEGORY_INPUT, |