Index: media/base/mime_util_internal.cc |
diff --git a/media/base/mime_util_internal.cc b/media/base/mime_util_internal.cc |
index 11a763e74ab3c0054e6a39db8a3bcdbac462b19b..70faa9c6043a1e0d61c269279e94425a712937e8 100644 |
--- a/media/base/mime_util_internal.cc |
+++ b/media/base/mime_util_internal.cc |
@@ -33,6 +33,7 @@ struct CodecIDMappings { |
// The "mp4a" strings come from RFC 6381. |
static const CodecIDMappings kUnambiguousCodecStringMap[] = { |
{"1", MimeUtil::PCM}, // We only allow this for WAV so it isn't ambiguous. |
+ {"flac", MimeUtil::FLAC}, |
ddorwin
2016/11/17 17:46:31
We don't need this since we aren't currently suppo
DaleCurtis
2016/11/17 23:41:57
Removed.
|
// avc1/avc3.XXXXXX may be unambiguous; handled by ParseAVCCodecId(). |
// hev1/hvc1.XXXXXX may be unambiguous; handled by ParseHEVCCodecID(). |
// vp9, vp9.0, vp09.xx.xx.xx.xx.xx.xx.xx may be unambiguous; handled by |
@@ -366,6 +367,9 @@ void MimeUtil::AddSupportedMediaFormats() { |
CodecSet webm_codecs(webm_audio_codecs); |
webm_codecs.insert(webm_video_codecs.begin(), webm_video_codecs.end()); |
+ CodecSet flac_audio_codecs; |
ddorwin
2016/11/17 17:46:31
We don't need this. Instead, update GetDefaultCode
DaleCurtis
2016/11/17 23:41:57
Removed.
|
+ flac_audio_codecs.insert(FLAC); |
+ |
#if defined(USE_PROPRIETARY_CODECS) |
CodecSet mp3_codecs; |
mp3_codecs.insert(MP3); |
@@ -409,6 +413,10 @@ void MimeUtil::AddSupportedMediaFormats() { |
// TODO(ddorwin): Should the application type support Opus? |
AddContainerWithCodecs("application/ogg", ogg_codecs, false); |
+ AddContainerWithCodecs("audio/flac", flac_audio_codecs, false); |
ddorwin
2016/11/17 17:46:31
s/flac_audio_codecs/implicit_codec/
We don't want
DaleCurtis
2016/11/17 23:41:57
Done.
|
+ AddContainerWithCodecs("audio/x-flac", flac_audio_codecs, false); |
ddorwin
2016/11/16 17:44:47
Do we need to support these other variants? Are th
ddorwin
2016/11/17 17:46:31
FWIW, this would also be inconsistent with net/: h
DaleCurtis
2016/11/17 23:41:58
Made consistent with net, i.e. just audio/flac
|
+ AddContainerWithCodecs("application/x-flac", flac_audio_codecs, false); |
+ |
#if defined(USE_PROPRIETARY_CODECS) |
AddContainerWithCodecs("audio/mpeg", mp3_codecs, true); // Allow "mp3". |
AddContainerWithCodecs("audio/mp3", implicit_codec, true); |
@@ -562,6 +570,7 @@ bool MimeUtil::IsCodecSupportedOnPlatform( |
// The remaining codecs may be supported depending on platform abilities. |
// ---------------------------------------------------------------------- |
+ case FLAC: |
ddorwin
2016/11/16 17:44:47
Is this actually supported by MediaPlayer? MediaCo
DaleCurtis
2016/11/17 23:41:57
Yes, it's supported by Android platform always.
h
|
case PCM: |
case MP3: |
case MPEG4_AAC: |
@@ -766,6 +775,7 @@ bool MimeUtil::IsCodecProprietary(Codec codec) const { |
case HEVC: |
return true; |
+ case FLAC: |
ddorwin
2016/11/17 17:46:31
FLAC should be added to all the tests in content/b
|
case PCM: |
case VORBIS: |
case OPUS: |