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

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

Issue 1840563002: Revert of media: Enable Unified Media Pipeline for MSE and EME on Android (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 unified diff | Download patch
« no previous file with comments | « media/base/media.h ('k') | media/filters/stream_parser_factory.cc » ('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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 enabled_via_cli =
104 base::CommandLine::ForCurrentProcess()->HasSwitch( 104 base::CommandLine::ForCurrentProcess()->HasSwitch(
105 switches::kEnableUnifiedMediaPipeline); 105 switches::kEnableUnifiedMediaPipeline);
106 return enabled_via_cli || 106 return enabled_via_cli ||
107 base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE); 107 base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
108 } 108 }
109 109
110 bool IsUnifiedMediaPipelineEnabledForMse() {
111 // Don't check IsUnifiedMediaPipelineEnabled() here since we don't want MSE to
112 // be enabled via experiment yet; only when the existing implementation can't
113 // be used (i.e. MediaCodec unavailable).
114 return base::CommandLine::ForCurrentProcess()->HasSwitch(
115 switches::kEnableUnifiedMediaPipeline) ||
116 !MediaCodecUtil::IsMediaCodecAvailable();
117 }
118
110 bool ArePlatformDecodersAvailable() { 119 bool ArePlatformDecodersAvailable() {
111 return IsUnifiedMediaPipelineEnabled() 120 return IsUnifiedMediaPipelineEnabled()
112 ? HasPlatformDecoderSupport() 121 ? HasPlatformDecoderSupport()
113 : MediaCodecUtil::IsMediaCodecAvailable(); 122 : MediaCodecUtil::IsMediaCodecAvailable();
114 } 123 }
115 #endif 124 #endif
116 125
117 } // namespace media 126 } // namespace media
OLDNEW
« no previous file with comments | « media/base/media.h ('k') | media/filters/stream_parser_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698