| OLD | NEW |
| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 g_media_library.Pointer()->enable_platform_decoder_support(); | 79 g_media_library.Pointer()->enable_platform_decoder_support(); |
| 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 | |
| 90 bool IsUnifiedMediaPipelineEnabled() { | |
| 91 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 92 switches::kDisableUnifiedMediaPipeline); | |
| 93 } | |
| 94 | |
| 95 bool ArePlatformDecodersAvailable() { | |
| 96 return IsUnifiedMediaPipelineEnabled() | |
| 97 ? HasPlatformDecoderSupport() | |
| 98 : MediaCodecUtil::IsMediaCodecAvailable(); | |
| 99 } | |
| 100 #endif | 89 #endif |
| 101 | 90 |
| 102 } // namespace media | 91 } // namespace media |
| OLD | NEW |