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

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: 2 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
« media/base/audio_decoder_config.cc ('K') | « 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 7debd6ca5d22d85ff3b87ee7b0b0080b78f5df6d..ff9fb1bdfb2d4200ff4dfb0e83e1882a3341b3d4 100644
--- a/media/base/mime_util.cc
+++ b/media/base/mime_util.cc
@@ -147,15 +147,6 @@ static bool IsCodecSupportedOnAndroid(MimeUtil::Codec codec) {
case MimeUtil::VORBIS:
ddorwin 2016/01/07 19:44:11 This should be before video (H264).
servolk 2016/01/07 22:08:04 Done.
return true;
- case MimeUtil::HEVC_MAIN:
-#if defined(ENABLE_HEVC_DEMUXING)
- // HEVC/H.265 is supported in Lollipop+ (API Level 21), according to
- // http://developer.android.com/reference/android/media/MediaFormat.html
- return base::android::BuildInfo::GetInstance()->sdk_int() >= 21;
-#else
- return false;
-#endif
-
case MimeUtil::MPEG2_AAC_LC:
case MimeUtil::MPEG2_AAC_MAIN:
case MimeUtil::MPEG2_AAC_SSR:
@@ -172,6 +163,15 @@ static bool IsCodecSupportedOnAndroid(MimeUtil::Codec codec) {
case MimeUtil::THEORA:
return false;
+
+ case MimeUtil::HEVC_MAIN:
+#if defined(ENABLE_HEVC_DEMUXING)
+ // HEVC/H.265 is supported in Lollipop+ (API Level 21), according to
+ // http://developer.android.com/reference/android/media/MediaFormat.html
+ return base::android::BuildInfo::GetInstance()->sdk_int() >= 21;
+#else
+ return false;
+#endif
}
return false;
@@ -274,6 +274,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},
« media/base/audio_decoder_config.cc ('K') | « media/base/audio_decoder_config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698