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

Unified Diff: media/base/media.cc

Issue 1825913003: media: Disable the unified media pipeline for API levels 16 & 17 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/media.cc
diff --git a/media/base/media.cc b/media/base/media.cc
index b2e1c4520174e7a04fb50c393dd3c32646700d2d..c3f44e64e0178eb03bcd1cbaf7feff619d3cf837 100644
--- a/media/base/media.cc
+++ b/media/base/media.cc
@@ -103,8 +103,16 @@ bool IsUnifiedMediaPipelineEnabled() {
const bool enabled_via_cli =
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableUnifiedMediaPipeline);
- return enabled_via_cli ||
- base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
+ // TODO(watk, dalecurtis): AVDA has bugs on API level 16 and 17 so it's
+ // disabled for now. http://crbug.com/597467
+ const bool api_level_supported =
+ base::android::BuildInfo::GetInstance()->sdk_int() >= 18;
+
+ if (enabled_via_cli)
DaleCurtis 2016/03/24 03:16:44 Seems cleaner as return "enabled_via_cli || api_le
+ return true;
+ if (!api_level_supported)
+ return false;
+ return base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
}
bool IsUnifiedMediaPipelineEnabledForMse() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698