From de1649a6ec474ae6711bdfd3b61a8a22fed1bed8 Mon Sep 17 00:00:00 2001 From: "ihf@chromium.org" Date: Wed, 26 Oct 2011 23:11:18 +0000 Subject: Fix regression and make CrOS audio codecs work again. TESTS=played relevant 3GP and WAV files on mario BUG=chromium-os:21037,18938 Review URL: http://codereview.chromium.org/8393037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107462 0039d316-1c4b-4281-b951-d872f2087c98 --- media/base/audio_decoder_config.h | 7 ++++++- media/ffmpeg/ffmpeg_common.cc | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'media') diff --git a/media/base/audio_decoder_config.h b/media/base/audio_decoder_config.h index 0245f42..e4891fa 100644 --- a/media/base/audio_decoder_config.h +++ b/media/base/audio_decoder_config.h @@ -18,7 +18,12 @@ enum AudioCodec { kCodecMP3, kCodecPCM, kCodecVorbis, - + // ChromiumOS and ChromeOS specific codecs. + kCodecFLAC, + // ChromeOS specific codecs. + kCodecAMR_NB, + kCodecAMR_WB, + kCodecPCM_MULAW, // DO NOT ADD RANDOM AUDIO CODECS! // // The only acceptable time to add a new codec is if there is production code diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc index 7807d3f..c7089c0 100644 --- a/media/ffmpeg/ffmpeg_common.cc +++ b/media/ffmpeg/ffmpeg_common.cc @@ -33,6 +33,14 @@ static AudioCodec CodecIDToAudioCodec(CodecID codec_id) { case CODEC_ID_PCM_S16LE: case CODEC_ID_PCM_S32LE: return kCodecPCM; + case CODEC_ID_FLAC: + return kCodecFLAC; + case CODEC_ID_AMR_NB: + return kCodecAMR_NB; + case CODEC_ID_AMR_WB: + return kCodecAMR_WB; + case CODEC_ID_PCM_MULAW: + return kCodecPCM_MULAW; default: NOTREACHED(); } @@ -61,6 +69,14 @@ static CodecID AudioCodecToCodecID(AudioCodec audio_codec, } case kCodecVorbis: return CODEC_ID_VORBIS; + case kCodecFLAC: + return CODEC_ID_FLAC; + case kCodecAMR_NB: + return CODEC_ID_AMR_NB; + case kCodecAMR_WB: + return CODEC_ID_AMR_WB; + case kCodecPCM_MULAW: + return CODEC_ID_PCM_MULAW; default: NOTREACHED(); } -- cgit v1.1