From 513b9fc615de45378ec2f9403106767204ae3a45 Mon Sep 17 00:00:00 2001 From: tobigun Date: Wed, 22 Dec 2010 18:39:37 +0000 Subject: replace asf... by AUDIO_SAMPLE_FORMAT_... constants git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2769 b956fd51-792f-4845-bead-9b4dfca2ff2c --- mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_audio_convert.h | 2 +- mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_audio_decode.cpp | 2 +- mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_core.cpp | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'mediaplugin/src/mediaplugins/ffmpeg') diff --git a/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_audio_convert.h b/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_audio_convert.h index ee4c5a81..fbb5bedc 100644 --- a/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_audio_convert.h +++ b/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_audio_convert.h @@ -47,7 +47,7 @@ protected: bool init() { // Note: FFmpeg does not support resampling for more than 2 input channels - if (_srcFormatInfo.getFormat() != asfS16) { + if (_srcFormatInfo.getFormat() != AUDIO_SAMPLE_FORMAT_S16) { logger.error("Unsupported format", "TAudioConverter_FFmpeg.Init"); return false; } diff --git a/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_audio_decode.cpp b/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_audio_decode.cpp index da49891c..ce15f7a7 100644 --- a/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_audio_decode.cpp +++ b/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_audio_decode.cpp @@ -179,7 +179,7 @@ bool FFmpegAudioDecodeStream::_open(const IPath &filename) { audioSampleFormat_t sampleFormat; if (!ffmpegCore->convertFFmpegToAudioFormat(_codecCtx->sample_fmt, &sampleFormat)) { // try standard format - sampleFormat = asfS16; + sampleFormat = AUDIO_SAMPLE_FORMAT_S16; } if (_codecCtx->channels > 255) { logger.status("Error: _codecCtx->channels > 255", "TFFmpegDecodeStream.Open"); diff --git a/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_core.cpp b/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_core.cpp index 79f353e1..506387ba 100644 --- a/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_core.cpp +++ b/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_core.cpp @@ -165,20 +165,20 @@ int MediaCore_FFmpeg::findAudioStreamIndex(AVFormatContext *formatCtx) const { bool MediaCore_FFmpeg::convertFFmpegToAudioFormat(SampleFormat ffmpegFormat, audioSampleFormat_t *format) const { switch (ffmpegFormat) { case SAMPLE_FMT_U8: - *format = asfU8; + *format = AUDIO_SAMPLE_FORMAT_U8; break; case SAMPLE_FMT_S16: - *format = asfS16; + *format = AUDIO_SAMPLE_FORMAT_S16; break; case SAMPLE_FMT_S32: - *format = asfS32; + *format = AUDIO_SAMPLE_FORMAT_S32; break; case SAMPLE_FMT_FLT: - *format = asfFloat; + *format = AUDIO_SAMPLE_FORMAT_FLOAT; break; #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(51,65,0) case SAMPLE_FMT_DBL: - *format = asfDouble; + *format = AUDIO_SAMPLE_FORMAT_DOUBLE; break; #endif default: -- cgit v1.2.3