| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 | 109 |
| 110 bool IsUnifiedMediaPipelineEnabledForMse() { | 110 bool IsUnifiedMediaPipelineEnabledForMse() { |
| 111 // Don't check IsUnifiedMediaPipelineEnabled() here since we don't want MSE to | 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 | 112 // be enabled via experiment yet; only when the existing implementation can't |
| 113 // be used (i.e. MediaCodec unavailable). | 113 // be used (i.e. MediaCodec unavailable). |
| 114 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 114 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 115 switches::kEnableUnifiedMediaPipeline) || | 115 switches::kEnableUnifiedMediaPipeline) || |
| 116 !MediaCodecUtil::IsMediaCodecAvailable(); | 116 !MediaCodecUtil::IsMediaCodecAvailable(); |
| 117 } | 117 } |
| 118 |
| 119 bool ArePlatformDecodersAvailable() { |
| 120 return IsUnifiedMediaPipelineEnabled() |
| 121 ? HasPlatformDecoderSupport() |
| 122 : MediaCodecUtil::IsMediaCodecAvailable(); |
| 123 } |
| 118 #endif | 124 #endif |
| 119 | 125 |
| 120 } // namespace media | 126 } // namespace media |
| OLD | NEW |