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

Side by Side Diff: media/base/media.cc

Issue 1840173004: Flip unified media pipeline to default-on w/ disabled holdback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix outstanding failures. Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/media.h" 5 #include "media/base/media.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 bool IsUnifiedMediaPipelineEnabled() { 94 bool IsUnifiedMediaPipelineEnabled() {
95 // TODO(dalecurtis): This experiment is temporary and should be removed once 95 // TODO(dalecurtis): This experiment is temporary and should be removed once
96 // we have enough data to support the primacy of the unified media pipeline; 96 // we have enough data to support the primacy of the unified media pipeline;
97 // see http://crbug.com/533190 for details. 97 // see http://crbug.com/533190 for details.
98 // 98 //
99 // Note: It's important to query the field trial state first, to ensure that 99 // Note: It's important to query the field trial state first, to ensure that
100 // UMA reports the correct group. 100 // UMA reports the correct group.
101 const std::string group_name = 101 const std::string group_name =
102 base::FieldTrialList::FindFullName("UnifiedMediaPipelineTrial"); 102 base::FieldTrialList::FindFullName("UnifiedMediaPipelineTrial");
103 const bool enabled_via_cli = 103 const bool disabled_via_cli =
104 base::CommandLine::ForCurrentProcess()->HasSwitch( 104 base::CommandLine::ForCurrentProcess()->HasSwitch(
105 switches::kEnableUnifiedMediaPipeline); 105 switches::kDisableUnifiedMediaPipeline);
106 // TODO(watk, dalecurtis): AVDA has bugs on API level 16 and 17 so it's 106 // TODO(watk, dalecurtis): AVDA has bugs on API level 16 and 17 so it's
107 // disabled for now. http://crbug.com/597467 107 // disabled for now. http://crbug.com/597467
108 const bool api_level_supported = 108 const bool api_level_supported =
109 base::android::BuildInfo::GetInstance()->sdk_int() >= 18; 109 base::android::BuildInfo::GetInstance()->sdk_int() >= 18;
110 110
111 return enabled_via_cli || (api_level_supported && 111 return !disabled_via_cli && api_level_supported &&
112 base::StartsWith(group_name, "Enabled", 112 !base::StartsWith(group_name, "Disabled",
ddorwin 2016/03/30 20:16:24 Do all users already have "Enabled" or "Disabled"
DaleCurtis 2016/03/31 22:10:33 The groups are, "Control", "Enabled", "EnabledByFl
113 base::CompareCase::SENSITIVE)); 113 base::CompareCase::SENSITIVE);
114 } 114 }
115 115
116 bool ArePlatformDecodersAvailable() { 116 bool ArePlatformDecodersAvailable() {
117 return IsUnifiedMediaPipelineEnabled() 117 return IsUnifiedMediaPipelineEnabled()
118 ? HasPlatformDecoderSupport() 118 ? HasPlatformDecoderSupport()
119 : MediaCodecUtil::IsMediaCodecAvailable(); 119 : MediaCodecUtil::IsMediaCodecAvailable();
120 } 120 }
121 #endif 121 #endif
122 122
123 } // namespace media 123 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698