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

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

Issue 1997783002: Revert "Flip unified media pipeline to default-on w/ disabled holdback." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | media/base/media_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 bool IsUnifiedMediaPipelineEnabled() { 90 bool IsUnifiedMediaPipelineEnabled() {
91 // TODO(dalecurtis): This experiment is temporary and should be removed once 91 // TODO(dalecurtis): This experiment is temporary and should be removed once
92 // we have enough data to support the primacy of the unified media pipeline; 92 // we have enough data to support the primacy of the unified media pipeline;
93 // see http://crbug.com/533190 for details. 93 // see http://crbug.com/533190 for details.
94 // 94 //
95 // Note: It's important to query the field trial state first, to ensure that 95 // Note: It's important to query the field trial state first, to ensure that
96 // UMA reports the correct group. 96 // UMA reports the correct group.
97 const std::string group_name = 97 const std::string group_name =
98 base::FieldTrialList::FindFullName("UnifiedMediaPipelineTrial"); 98 base::FieldTrialList::FindFullName("UnifiedMediaPipelineTrial");
99 const bool disabled_via_cli = 99 const bool enabled_via_cli =
100 base::CommandLine::ForCurrentProcess()->HasSwitch( 100 base::CommandLine::ForCurrentProcess()->HasSwitch(
101 switches::kDisableUnifiedMediaPipeline); 101 switches::kEnableUnifiedMediaPipeline);
102 // TODO(watk, dalecurtis): AVDA has bugs on API level 16 and 17 so it's 102 // TODO(watk, dalecurtis): AVDA has bugs on API level 16 and 17 so it's
103 // disabled for now. http://crbug.com/597467 103 // disabled for now. http://crbug.com/597467
104 const bool api_level_supported = 104 const bool api_level_supported =
105 base::android::BuildInfo::GetInstance()->sdk_int() >= 18; 105 base::android::BuildInfo::GetInstance()->sdk_int() >= 18;
106 106
107 return !disabled_via_cli && api_level_supported && 107 return enabled_via_cli || (api_level_supported &&
108 !base::StartsWith(group_name, "Disabled", 108 base::StartsWith(group_name, "Enabled",
109 base::CompareCase::SENSITIVE); 109 base::CompareCase::SENSITIVE));
110 } 110 }
111 111
112 bool ArePlatformDecodersAvailable() { 112 bool ArePlatformDecodersAvailable() {
113 return IsUnifiedMediaPipelineEnabled() 113 return IsUnifiedMediaPipelineEnabled()
114 ? HasPlatformDecoderSupport() 114 ? HasPlatformDecoderSupport()
115 : MediaCodecUtil::IsMediaCodecAvailable(); 115 : MediaCodecUtil::IsMediaCodecAvailable();
116 } 116 }
117 #endif 117 #endif
118 118
119 } // namespace media 119 } // namespace media
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | media/base/media_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698