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

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

Issue 2681643006: Remove kDisableUnifiedMediaPipeline (Closed)
Patch Set: Replace ArePlatformDecodersAvailable Created 3 years, 10 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 bool HasPlatformDecoderSupport() { 82 bool HasPlatformDecoderSupport() {
83 return g_media_library.Pointer()->has_platform_decoder_support(); 83 return g_media_library.Pointer()->has_platform_decoder_support();
84 } 84 }
85 85
86 bool PlatformHasOpusSupport() { 86 bool PlatformHasOpusSupport() {
87 return base::android::BuildInfo::GetInstance()->sdk_int() >= 21; 87 return base::android::BuildInfo::GetInstance()->sdk_int() >= 21;
88 } 88 }
89 89
90 bool IsUnifiedMediaPipelineEnabled() {
91 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
92 switches::kDisableUnifiedMediaPipeline);
93 }
94
95 bool ArePlatformDecodersAvailable() { 90 bool ArePlatformDecodersAvailable() {
xhwang 2017/02/08 02:46:01 Maybe we only need HasPlatformDecoderSupport() now
tguilbert 2017/02/09 02:32:17 I made the switch to HasPlatformDecoderSupport(),
96 return IsUnifiedMediaPipelineEnabled() 91 return HasPlatformDecoderSupport();
97 ? HasPlatformDecoderSupport()
98 : MediaCodecUtil::IsMediaCodecAvailable();
99 } 92 }
100 #endif 93 #endif
101 94
102 } // namespace media 95 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698