summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorihf@chromium.org <ihf@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-26 23:11:18 +0000
committerihf@chromium.org <ihf@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-26 23:11:18 +0000
commitde1649a6ec474ae6711bdfd3b61a8a22fed1bed8 (patch)
treeff0786f1448210c3f98fbd74cdc6875d004bfde0 /media
parenta2ad0112b4b9aaff7cddcde84aaa73ddf8bd569f (diff)
downloadchromium_src-de1649a6ec474ae6711bdfd3b61a8a22fed1bed8.zip
chromium_src-de1649a6ec474ae6711bdfd3b61a8a22fed1bed8.tar.gz
chromium_src-de1649a6ec474ae6711bdfd3b61a8a22fed1bed8.tar.bz2
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
Diffstat (limited to 'media')
-rw-r--r--media/base/audio_decoder_config.h7
-rw-r--r--media/ffmpeg/ffmpeg_common.cc16
2 files changed, 22 insertions, 1 deletions
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();
}