diff options
Diffstat (limited to 'Lua/src/lib/ffmpeg')
-rw-r--r-- | Lua/src/lib/ffmpeg/avcodec.pas | 249 | ||||
-rw-r--r-- | Lua/src/lib/ffmpeg/avformat.pas | 41 | ||||
-rw-r--r-- | Lua/src/lib/ffmpeg/avio.pas | 18 | ||||
-rw-r--r-- | Lua/src/lib/ffmpeg/avutil.pas | 47 | ||||
-rw-r--r-- | Lua/src/lib/ffmpeg/mathematics.pas | 2 | ||||
-rw-r--r-- | Lua/src/lib/ffmpeg/opt.pas | 11 | ||||
-rw-r--r-- | Lua/src/lib/ffmpeg/rational.pas | 5 | ||||
-rw-r--r-- | Lua/src/lib/ffmpeg/swscale.pas | 2 |
8 files changed, 217 insertions, 158 deletions
diff --git a/Lua/src/lib/ffmpeg/avcodec.pas b/Lua/src/lib/ffmpeg/avcodec.pas index 3cbfc0df..3766ab1f 100644 --- a/Lua/src/lib/ffmpeg/avcodec.pas +++ b/Lua/src/lib/ffmpeg/avcodec.pas @@ -28,12 +28,11 @@ * Conversion of libavcodec/avcodec.h * Min. version: 51.16.0, revision 6577, Sat Oct 7 15:30:46 2006 UTC * Max. version: 52.11.0, revision 16912, Sun Feb 1 02:00:19 2009 UTC - *) -{ + * * update to - * Max. version: 52.45.0, Tue Dec 29 00:25:00 2009 CET + * Max. version: 52.45.0, Mon Jan 4 2010 00:25:00 CET * MiSchi -} + *) unit avcodec; @@ -494,6 +493,7 @@ const {$IF LIBAVCODEC_VERSION >= 52038001} // >= 52.38.1 CH_LAYOUT_NATIVE = $8000000000000000; {$IFEND} + {* Audio channel convenience macros *} CH_LAYOUT_MONO = (CH_FRONT_CENTER); CH_LAYOUT_STEREO = (CH_FRONT_LEFT or CH_FRONT_RIGHT); @@ -525,9 +525,7 @@ const CH_FRONT_RIGHT_OF_CENTER); CH_LAYOUT_STEREO_DOWNMIX = (CH_STEREO_LEFT or CH_STEREO_RIGHT); - -const - {* in bytes *} +{* in bytes *} AVCODEC_MAX_AUDIO_FRAME_SIZE = 192000; // 1 second of 48khz 32bit audio {** @@ -718,7 +716,6 @@ const (* /Fx *) (* codec capabilities *) -const CODEC_CAP_DRAW_HORIZ_BAND = $0001; ///< decoder can use draw_horiz_band callback (** * Codec uses get_buffer() for allocating buffers. @@ -1015,11 +1012,11 @@ const FF_COMPRESSION_DEFAULT = -1; +{$IF LIBAVCODEC_MAX_VERSION_MAJOR < 53} const AVPALETTE_SIZE = 1024; AVPALETTE_COUNT = 256; -{$IF LIBAVCODEC_MAX_VERSION_MAJOR < 53} type (** * AVPaletteControl @@ -1095,7 +1092,7 @@ type end; const - {$IF LIBAVCODEC_VERSION >= 52030002} // >= 52.30.2 + {$IF LIBAVCODEC_VERSION < 52030002} // < 52.30.2 PKT_FLAG_KEY = $0001; {$ELSE} AV_PKT_FLAG_KEY = $0001; @@ -1352,118 +1349,11 @@ type *) hwaccel_data_private: pointer; {$IFEND} + {$IF LIBAVCODEC_VERSION >= 52022000} // >= 52.22.0 hwaccel_picture_private: pointer; {$IFEND} - {$IF LIBAVCODEC_VERSION >= 51070000} // >= 51.70.0 - (** - * Bits per sample/pixel of internal libavcodec pixel/sample format. - * This field is applicable only when sample_fmt is SAMPLE_FMT_S32. - * - encoding: set by user. - * - decoding: set by libavcodec. - *) - bits_per_raw_sample: cint; - {$IFEND} - - {$IF LIBAVCODEC_VERSION >= 52002000} // >= 52.2.0 - (** - * Audio channel layout. - * - encoding: set by user. - * - decoding: set by libavcodec. - *) - channel_layout: cint64; - - (** - * Request decoder to use this channel layout if it can (0 for default) - * - encoding: unused - * - decoding: Set by user. - *) - request_channel_layout: cint64; - {$IFEND} - - {$IF LIBAVCODEC_VERSION >= 52004000} // >= 52.4.0 - (** - * Ratecontrol attempt to use, at maximum, <value> of what can be used without an underflow. - * - encoding: Set by user. - * - decoding: unused. - *) - rc_max_available_vbv_use: cfloat; - - (** - * Ratecontrol attempt to use, at least, <value> times the amount needed to prevent a vbv overflow. - * - encoding: Set by user. - * - decoding: unused. - *) - rc_min_vbv_overflow_use: cfloat; - {$IFEND} - {$IF LIBAVCODEC_VERSION >= 52018000} // >= 52.18.0 - (** - * Hardware accelerator in use - * - encoding: unused. - * - decoding: Set by libavcodec - *) - hwaccel: PAVHWAccel; - {$IFEND} - {$IF LIBAVCODEC_VERSION >= 52020000} // >= 52.20.0 - (** - * For some codecs, the time base is closer to the field rate than the frame rate. - * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration - * if no telecine is used ... - * - * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2. - *) - ticks_per_frame: cint; - {$IFEND} - {$IF LIBAVCODEC_VERSION >= 52021000} // >= 52.21.0 - (** - * Hardware accelerator context. - * For some hardware accelerators, a global context needs to be - * provided by the user. In that case, this holds display-dependent - * data FFmpeg cannot instantiate itself. Please refer to the - * FFmpeg HW accelerator documentation to know how to fill this - * is. e.g. for VA API, this is a struct vaapi_context. - * - encoding: unused - * - decoding: Set by user - *) - hwaccel_context: pointer; - {$IFEND} - {$IF LIBAVCODEC_VERSION >= 52028000} // >= 52.28.0 - (** - * Chromaticity coordinates of the source primaries. - * - encoding: Set by user - * - decoding: Set by libavcodec - *) - color_primaries: TAVColorPrimaries; - - (** - * Color Transfer Characteristic. - * - encoding: Set by user - * - decoding: Set by libavcodec - *) - color_trc: TAVColorTransferCharacteristic; - - (** - * YUV colorspace type. - * - encoding: Set by user - * - decoding: Set by libavcodec - *) - colorspace: TAVColorSpace; - - (** - * MPEG vs JPEG YUV range. - * - encoding: Set by user - * - decoding: Set by libavcodec - *) - color_range: TAVColorRange; - - (** - * This defines the location of chroma samples. - * - encoding: Set by user - * - decoding: Set by libavcodec - *) - chroma_sample_location: TAVChromaLocation; - {$IFEND} end; (** @@ -2790,7 +2680,111 @@ type reordered_opaque: cint64; {$IFEND} - {$IF LIBAVCODEC_VERSION >= 52028000} // 52.28.0 + {$IF LIBAVCODEC_VERSION >= 51069000} // 51.69.0 + (** + * Bits per sample/pixel of internal libavcodec pixel/sample format. + * This field is applicable only when sample_fmt is SAMPLE_FMT_S32. + * - encoding: set by user. + * - decoding: set by libavcodec. + *) + bits_per_raw_sample: cint; + {$IFEND} + + {$IF LIBAVCODEC_VERSION >= 52002000} // 52.2.0 + (** + * Audio channel layout. + * - encoding: set by user. + * - decoding: set by libavcodec. + *) + channel_layout: cint64; + + (** + * Request decoder to use this channel layout if it can (0 for default) + * - encoding: unused + * - decoding: Set by user. + *) + request_channel_layout: cint64; + {$IFEND} + + {$IF LIBAVCODEC_VERSION >= 52004000} // >= 52.4.0 + (** + * Ratecontrol attempt to use, at maximum, <value> of what can be used without an underflow. + * - encoding: Set by user. + * - decoding: unused. + *) + rc_max_available_vbv_use: cfloat; + + (** + * Ratecontrol attempt to use, at least, <value> times the amount needed to prevent a vbv overflow. + * - encoding: Set by user. + * - decoding: unused. + *) + rc_min_vbv_overflow_use: cfloat; + {$IFEND} + + {$IF LIBAVCODEC_VERSION >= 52018000} // >= 52.18.0 + (** + * Hardware accelerator in use + * - encoding: unused. + * - decoding: Set by libavcodec + *) + hwaccel: PAVHWAccel; + {$IFEND} + + {$IF LIBAVCODEC_VERSION >= 52020000} // >= 52.20.0 + (** + * For some codecs, the time base is closer to the field rate than the frame rate. + * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration + * if no telecine is used ... + * + * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2. + *) + ticks_per_frame: cint; + {$IFEND} + + {$IF LIBAVCODEC_VERSION >= 52021000} // >= 52.21.0 + (** + * Hardware accelerator context. + * For some hardware accelerators, a global context needs to be + * provided by the user. In that case, this holds display-dependent + * data FFmpeg cannot instantiate itself. Please refer to the + * FFmpeg HW accelerator documentation to know how to fill this + * is. e.g. for VA API, this is a struct vaapi_context. + * - encoding: unused + * - decoding: Set by user + *) + hwaccel_context: pointer; + {$IFEND} + + {$IF LIBAVCODEC_VERSION >= 52028000} // >= 52.28.0 + (** + * Chromaticity coordinates of the source primaries. + * - encoding: Set by user + * - decoding: Set by libavcodec + *) + color_primaries: TAVColorPrimaries; + + (** + * Color Transfer Characteristic. + * - encoding: Set by user + * - decoding: Set by libavcodec + *) + color_trc: TAVColorTransferCharacteristic; + + (** + * YUV colorspace type. + * - encoding: Set by user + * - decoding: Set by libavcodec + *) + colorspace: TAVColorSpace; + + (** + * MPEG vs JPEG YUV range. + * - encoding: Set by user + * - decoding: Set by libavcodec + *) + color_range: TAVColorRange; + (** * This defines the location of chroma samples. * - encoding: Set by user @@ -2798,6 +2792,7 @@ type *) chroma_sample_location: TAVChromaLocation; {$IFEND} + {$IF LIBAVCODEC_VERSION >= 52037000} // >= 52.37.0 (** * The codec may call this to execute several independent things. @@ -2819,6 +2814,7 @@ type *) execute2: function (c: PAVCodecContext; func: TExecute2Func; arg2: Pointer; ret: Pcint; count: cint): cint; cdecl; {$IFEND} + {$IF LIBAVCODEC_VERSION >= 52042000} // >= 52.42.0 (** * explicit P-frame weighted prediction analysis method @@ -3317,7 +3313,12 @@ procedure avcodec_set_dimensions(s: PAVCodecContext; width: cint; height: cint); function avcodec_get_pix_fmt(name: {const} PAnsiChar): TAVPixelFormat; cdecl; external av__codec; -function avcodec_pix_fmt_to_codec_tag(p: TAVPixelFormat): cuint; +(** + * Returns a value representing the fourCC code associated to the + * pixel format pix_fmt, or 0 if no associated fourCC code can be + * found. + *) +function avcodec_pix_fmt_to_codec_tag(pix_fmt: TAVPixelFormat): cuint; cdecl; external av__codec; const @@ -4087,9 +4088,10 @@ type codec_ids: array [0..4] of cint; (* several codec IDs are permitted *) priv_data_size: cint; parser_init: function(s: PAVCodecParserContext): cint; cdecl; - parser_parse: function(s: PAVCodecParserContext; avctx: PAVCodecContext; - poutbuf: {const} PPointer; poutbuf_size: PCint; - buf: {const} PByteArray; buf_size: cint): cint; cdecl; + parser_parse: function(s: PAVCodecParserContext; + avctx: PAVCodecContext; + poutbuf: {const} PPointer; poutbuf_size: PCint; + buf: {const} PByteArray; buf_size: cint): cint; cdecl; parser_close: procedure(s: PAVCodecParserContext); cdecl; split: function(avctx: PAVCodecContext; buf: {const} PByteArray; buf_size: cint): cint; cdecl; @@ -4212,6 +4214,7 @@ function av_bitstream_filter_filter(bsfc: PAVBitStreamFilterContext; poutbuf: PPointer; poutbuf_size: PCint; buf: PByte; buf_size: cint; keyframe: cint): cint; cdecl; external av__codec; + procedure av_bitstream_filter_close(bsf: PAVBitStreamFilterContext); cdecl; external av__codec; diff --git a/Lua/src/lib/ffmpeg/avformat.pas b/Lua/src/lib/ffmpeg/avformat.pas index 81018333..261ce8f6 100644 --- a/Lua/src/lib/ffmpeg/avformat.pas +++ b/Lua/src/lib/ffmpeg/avformat.pas @@ -28,12 +28,11 @@ * Conversion of libavformat/avformat.h * 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.44.0, Tue Dec 29 0:40:00 2009 CET + * Max. version: 52.46.0, Mo Jan 4 2010 0:40:00 CET * MiSchi -} + *) unit avformat; @@ -65,7 +64,7 @@ uses const (* Max. supported version by this header *) LIBAVFORMAT_MAX_VERSION_MAJOR = 52; - LIBAVFORMAT_MAX_VERSION_MINOR = 44; + LIBAVFORMAT_MAX_VERSION_MINOR = 46; LIBAVFORMAT_MAX_VERSION_RELEASE = 0; LIBAVFORMAT_MAX_VERSION = (LIBAVFORMAT_MAX_VERSION_MAJOR * VERSION_MAJOR) + (LIBAVFORMAT_MAX_VERSION_MINOR * VERSION_MINOR) + @@ -192,7 +191,7 @@ procedure av_metadata_free(var m: PAVMetadata); (* packet functions *) -{$IF LIBAVCODEC_VERSION < 52032000} // < 52.32.0 +{$IF LIBAVFORMAT_VERSION < 52032000} // < 52.32.0 type PAVPacket = ^TAVPacket; TAVPacket = record @@ -290,7 +289,7 @@ 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 +{$IF LIBAVFORMAT_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. @@ -1088,15 +1087,39 @@ procedure av_register_input_format(format: PAVInputFormat); procedure av_register_output_format(format: PAVOutputFormat); cdecl; external av__format; +{$IF LIBAVFORMAT_VERSION_MAJOR < 53} // < 53 function guess_stream_format(short_name: PAnsiChar; filename: PAnsiChar; mime_type: PAnsiChar): PAVOutputFormat; - cdecl; external av__format; + cdecl; external av__format; deprecated; +{$IFEND} +(** + * Returns the output format in the list of registered output formats + * which best matches the provided parameters, or returns NULL if + * there is no match. + * + * @param short_name if non-NULL checks if short_name matches with the + * names of the registered formats + * @param filename if non-NULL checks if filename terminates with the + * extensions of the registered formats + * @param mime_type if non-NULL checks if mime_type matches with the + * MIME type of the registered formats + *) +(** + * @deprecated Use av_guess_format() instead. + *) function guess_format(short_name: PAnsiChar; filename: PAnsiChar; mime_type: PAnsiChar): PAVOutputFormat; cdecl; external av__format; +{$IF LIBAVFORMAT_VERSION >= 52045000} // >= 52.45.0 + deprecated; +function av_guess_format(short_name: PAnsiChar; + filename: PAnsiChar; + mime_type: PAnsiChar): PAVOutputFormat; + cdecl; external av__format; +{$IFEND} (** * Guesses the codec ID based upon muxer and filename. @@ -1762,7 +1785,7 @@ begin end; {$IFEND} -{$IF LIBAVCODEC_VERSION < 52032000} // < 52.32.0 +{$IF LIBAVFORMAT_VERSION < 52032000} // < 52.32.0 procedure av_free_packet(pkt: PAVPacket); begin if ((pkt <> nil) and (@pkt^.destruct <> nil)) then diff --git a/Lua/src/lib/ffmpeg/avio.pas b/Lua/src/lib/ffmpeg/avio.pas index faa6c24f..1a37e556 100644 --- a/Lua/src/lib/ffmpeg/avio.pas +++ b/Lua/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; @@ -114,9 +112,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 >= 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; @@ -132,6 +127,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 +182,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; diff --git a/Lua/src/lib/ffmpeg/avutil.pas b/Lua/src/lib/ffmpeg/avutil.pas index c0428bef..a5e6b889 100644 --- a/Lua/src/lib/ffmpeg/avutil.pas +++ b/Lua/src/lib/ffmpeg/avutil.pas @@ -36,14 +36,15 @@ * * libavutil/log.h: * revision 16571, Tue Jan 13 00:14:43 2009 UTC + * + * Update changes auf avutil.h, mem.h and log.h + * Max. version 50.7.0, Tue, Dec 29 0:30:00 2009 UTC + * include/keep pixfmt.h (change in revision 50.01.0) + * Maybe, the pixelformats are not needed, but it has not been checked. + * log.h is only partial. + * + * update Mon, Jan 4 2010 *) -{ - Update changes auf avutil.h, mem.h and log.h - Max. version 50.7.0, Tue, Dec 29 0:30:00 2009 UTC - include/keep pixfmt.h (change in revision 50.01.0) - Maybe, the pixelformats are not needed, but it has not been checked. - log.h is only partial. -} unit avutil; @@ -115,6 +116,8 @@ function avutil_license(): PAnsiChar; cdecl; external av__format; {$IFEND} +(* libavutil/pixfmt.h *) + type (** * Pixel format. Notes: @@ -286,6 +289,7 @@ const function MKTAG(a, b, c, d: AnsiChar): integer; (* libavutil/mem.h *) + (* memory handling functions *) (** @@ -402,11 +406,40 @@ const AV_LOG_DEBUG = 48; {$IFEND} +(** + * Sends the specified message to the log if the level is less than or equal + * to the current av_log_level. By default, all logging messages are sent to + * stderr. This behavior can be altered by setting a different av_vlog callback + * function. + * + * @param avcl A pointer to an arbitrary struct of which the first field is a + * pointer to an AVClass struct. + * @param level The importance level of the message, lower values signifying + * higher importance. + * @param fmt The format string (printf-compatible) that specifies how + * subsequent arguments are converted to output. + * @see av_vlog + *) + +{** to be translated if needed +#ifdef __GNUC__ +void av_log(void*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4))); +#else +void av_log(void*, int level, const char *fmt, ...); +#endif + +void av_vlog(void*, int level, const char *fmt, va_list); +**} + function av_log_get_level(): cint; cdecl; external av__util; procedure av_log_set_level(level: cint); cdecl; external av__util; +{** to be translated if needed +void av_log_set_callback(void (*)(void*, int, const char*, va_list)); +void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl); +**} implementation diff --git a/Lua/src/lib/ffmpeg/mathematics.pas b/Lua/src/lib/ffmpeg/mathematics.pas index 24c9e186..651c1404 100644 --- a/Lua/src/lib/ffmpeg/mathematics.pas +++ b/Lua/src/lib/ffmpeg/mathematics.pas @@ -33,7 +33,7 @@ *) { * update to - * avutil max. version 50.05.1, Sun, Dec 6 24:00:00 2009 UTC + * avutil max. version 50.7.0, Mon, Jan 4 2010 24:00:00 UTC * MiSchi } diff --git a/Lua/src/lib/ffmpeg/opt.pas b/Lua/src/lib/ffmpeg/opt.pas index 86144598..7b1105a4 100644 --- a/Lua/src/lib/ffmpeg/opt.pas +++ b/Lua/src/lib/ffmpeg/opt.pas @@ -23,20 +23,17 @@ * - 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 libavcodec/opt.h * revision 16912, Sun Feb 1 02:00:19 2009 UTC * * update, MiSchi, no code change * Fri Jun 12 2009 21:50:00 UTC - *) -{ + * * update to - * Max. version: 52.42.0, Sun Dec 6 19:20:00 2009 CET + * Max. avcodec version: 52.45.0, Mon Jan 4 2010 19:20:00 CET * MiSchi -} + *) unit opt; diff --git a/Lua/src/lib/ffmpeg/rational.pas b/Lua/src/lib/ffmpeg/rational.pas index 4b8a2dc8..0f7dd714 100644 --- a/Lua/src/lib/ffmpeg/rational.pas +++ b/Lua/src/lib/ffmpeg/rational.pas @@ -32,8 +32,9 @@ * update, MiSchi, no code change * Fri Jun 12 2009 22:20:00 UTC * - * update, MiSchi, no code change needed - * Sun Dec 6 2009 22:20:00 UTC + * update to + * avutil max. version 50.7.0, Mon, Jan 4 2010 24:00:00 UTC + * MiSchi *) unit rational; diff --git a/Lua/src/lib/ffmpeg/swscale.pas b/Lua/src/lib/ffmpeg/swscale.pas index 595e16ba..99a59a97 100644 --- a/Lua/src/lib/ffmpeg/swscale.pas +++ b/Lua/src/lib/ffmpeg/swscale.pas @@ -27,7 +27,7 @@ *) { * update to - * Max. version: 0.7.2, Sun Dec 6 22:20:00 2009 CET + * Max. version: 0.7.2, Mon Jan 4 2010 22:20:00 CET * MiSchi } |