Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: media/base/mime_util.cc

Issue 1563893003: media: Fix case ordering of switch statements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ps2 Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/audio_decoder_config.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/mime_util.cc
diff --git a/media/base/mime_util.cc b/media/base/mime_util.cc
index ba52704bba7bd82e3de76722f213bdfbdf3a7fbd..01422b26fb8f2649059fa6edb805d64c7926529b 100644
--- a/media/base/mime_util.cc
+++ b/media/base/mime_util.cc
@@ -145,13 +145,23 @@ static bool IsCodecSupportedOnAndroid(MimeUtil::Codec codec) {
case MimeUtil::MPEG4_AAC_LC:
case MimeUtil::MPEG4_AAC_SBR_v1:
case MimeUtil::MPEG4_AAC_SBR_PS_v2:
+ case MimeUtil::VORBIS:
case MimeUtil::H264_BASELINE:
case MimeUtil::H264_MAIN:
case MimeUtil::H264_HIGH:
case MimeUtil::VP8:
- case MimeUtil::VORBIS:
return true;
+ case MimeUtil::MPEG2_AAC_LC:
+ case MimeUtil::MPEG2_AAC_MAIN:
+ case MimeUtil::MPEG2_AAC_SSR:
+ // MPEG-2 variants of AAC are not supported on Android.
+ return false;
+
+ case MimeUtil::OPUS:
+ // Opus is supported only in Lollipop+ (API Level 21).
+ return base::android::BuildInfo::GetInstance()->sdk_int() >= 21;
+
case MimeUtil::HEVC_MAIN:
#if defined(ENABLE_HEVC_DEMUXING)
// HEVC/H.265 is supported in Lollipop+ (API Level 21), according to
@@ -161,20 +171,10 @@ static bool IsCodecSupportedOnAndroid(MimeUtil::Codec codec) {
return false;
#endif
- case MimeUtil::MPEG2_AAC_LC:
- case MimeUtil::MPEG2_AAC_MAIN:
- case MimeUtil::MPEG2_AAC_SSR:
- // MPEG-2 variants of AAC are not supported on Android.
- return false;
-
case MimeUtil::VP9:
// VP9 is supported only in KitKat+ (API Level 19).
return base::android::BuildInfo::GetInstance()->sdk_int() >= 19;
- case MimeUtil::OPUS:
- // Opus is supported only in Lollipop+ (API Level 21).
- return base::android::BuildInfo::GetInstance()->sdk_int() >= 21;
-
case MimeUtil::THEORA:
return false;
}
@@ -279,6 +279,7 @@ struct CodecIDMappings {
static const CodecIDMappings kUnambiguousCodecStringMap[] = {
{"1", MimeUtil::PCM}, // We only allow this for WAV so it isn't ambiguous.
// avc1/avc3.XXXXXX may be unambiguous; handled by ParseH264CodecID().
+ // hev1/hvc1.XXXXXX may be unambiguous; handled by ParseHEVCCodecID().
{"mp3", MimeUtil::MP3},
{"mp4a.66", MimeUtil::MPEG2_AAC_MAIN},
{"mp4a.67", MimeUtil::MPEG2_AAC_LC},
« no previous file with comments | « media/base/audio_decoder_config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698