From 170917432bdc4e1c52d0fe7ac9bf539cacc2f5f8 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Fri, 20 Apr 2012 19:54:15 +0000 Subject: new detection of ffmpeg version. API changes: SampleFormat -> AVSampleFormat. Configure still needs update. Special thanks to lotan. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2856 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/avcodec.pas | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/lib/ffmpeg') diff --git a/src/lib/ffmpeg/avcodec.pas b/src/lib/ffmpeg/avcodec.pas index 0a436a48..c390a187 100644 --- a/src/lib/ffmpeg/avcodec.pas +++ b/src/lib/ffmpeg/avcodec.pas @@ -526,17 +526,17 @@ type * all in native endian *} type - TSampleFormat = ( - SAMPLE_FMT_NONE = -1, - SAMPLE_FMT_U8, ///< unsigned 8 bits - SAMPLE_FMT_S16, ///< signed 16 bits - SAMPLE_FMT_S32, ///< signed 32 bits - SAMPLE_FMT_FLT, ///< float - SAMPLE_FMT_DBL, ///< double - SAMPLE_FMT_NB ///< Number of sample formats. DO NOT USE if dynamically linking to libavcodec + TAVSampleFormat = ( + AV_SAMPLE_FMT_NONE = -1, + AV_SAMPLE_FMT_U8, ///< unsigned 8 bits + AV_SAMPLE_FMT_S16, ///< signed 16 bits + AV_SAMPLE_FMT_S32, ///< signed 32 bits + AV_SAMPLE_FMT_FLT, ///< float + AV_SAMPLE_FMT_DBL, ///< double + AV_SAMPLE_FMT_NB ///< Number of sample formats. DO NOT USE if dynamically linking to libavcodec ); - _TSampleFormatArray = array [0 .. MaxInt div SizeOf(TSampleFormat)-1] of TSampleFormat; - PSampleFormatArray = ^_TSampleFormatArray; + TAVSampleFormatArray = array [0 .. MaxInt div SizeOf(TAVSampleFormat)-1] of TAVSampleFormat; + PAVSampleFormatArray = ^TAVSampleFormatArray; const {* Audio channel masks *} @@ -1686,7 +1686,7 @@ type * - encoding: Set by user. * - decoding: Set by libavcodec. *) - sample_fmt: TSampleFormat; ///< sample format + sample_fmt: TAVSampleFormat; ///< sample format (* The following data should not be initialized. *) (** @@ -3143,7 +3143,7 @@ type supported_samplerates: {const} PCint; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0 {$IFEND} {$IF LIBAVCODEC_VERSION >= 51062000} // 51.62.0 - sample_fmts: {const} PSampleFormatArray; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1 + sample_fmts: {const} PAVSampleFormatArray; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1 {$IFEND} {$IF LIBAVCODEC_VERSION >= 52002000} // 52.2.0 channel_layouts: {const} PCint64; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0 @@ -4343,7 +4343,7 @@ function av_get_bits_per_sample(codec_id: TCodecID): cint; * @param[in] sample_fmt the sample format * @return Number of bits per sample or zero if unknown for the given sample format. *) -function av_get_bits_per_sample_format(sample_fmt: TSampleFormat): cint; +function av_get_bits_per_sample_format(sample_fmt: TAVSampleFormat): cint; cdecl; external av__codec; {$IFEND} -- cgit v1.2.3