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/macros.h" | 8 #include "base/macros.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #if defined(OS_ANDROID) | 50 #if defined(OS_ANDROID) |
51 void enable_platform_decoder_support() { | 51 void enable_platform_decoder_support() { |
52 has_platform_decoder_support_ = true; | 52 has_platform_decoder_support_ = true; |
53 } | 53 } |
54 | 54 |
55 bool has_platform_decoder_support() const { | 55 bool has_platform_decoder_support() const { |
56 return has_platform_decoder_support_; | 56 return has_platform_decoder_support_; |
57 } | 57 } |
58 #endif // defined(OS_ANDROID) | 58 #endif // defined(OS_ANDROID) |
59 | 59 |
60 void enable_new_vp9_codec_string_support() { | 60 void enable_new_vp9_codec_string_support(bool enable) { |
61 has_new_vp9_codec_string_support_ = true; | 61 has_new_vp9_codec_string_support_ = enable; |
62 } | 62 } |
63 | 63 |
64 bool has_new_vp9_codec_string_support() { | 64 bool has_new_vp9_codec_string_support() { |
65 return has_new_vp9_codec_string_support_; | 65 return has_new_vp9_codec_string_support_; |
66 } | 66 } |
67 | 67 |
68 private: | 68 private: |
69 ~MediaInitializer() = delete; | 69 ~MediaInitializer() = delete; |
70 | 70 |
71 #if defined(OS_ANDROID) | 71 #if defined(OS_ANDROID) |
(...skipping 22 matching lines...) Expand all Loading... |
94 bool HasPlatformDecoderSupport() { | 94 bool HasPlatformDecoderSupport() { |
95 return GetMediaInstance()->has_platform_decoder_support(); | 95 return GetMediaInstance()->has_platform_decoder_support(); |
96 } | 96 } |
97 | 97 |
98 bool PlatformHasOpusSupport() { | 98 bool PlatformHasOpusSupport() { |
99 return base::android::BuildInfo::GetInstance()->sdk_int() >= 21; | 99 return base::android::BuildInfo::GetInstance()->sdk_int() >= 21; |
100 } | 100 } |
101 #endif // defined(OS_ANDROID) | 101 #endif // defined(OS_ANDROID) |
102 | 102 |
103 void EnableNewVp9CodecStringSupport() { | 103 void EnableNewVp9CodecStringSupport() { |
104 GetMediaInstance()->enable_new_vp9_codec_string_support(); | 104 GetMediaInstance()->enable_new_vp9_codec_string_support(true); |
| 105 } |
| 106 |
| 107 void DisableNewVp9CodecStringSupport_ForTesting() { |
| 108 GetMediaInstance()->enable_new_vp9_codec_string_support(false); |
105 } | 109 } |
106 | 110 |
107 bool HasNewVp9CodecStringSupport() { | 111 bool HasNewVp9CodecStringSupport() { |
108 return GetMediaInstance()->has_new_vp9_codec_string_support(); | 112 return GetMediaInstance()->has_new_vp9_codec_string_support(); |
109 } | 113 } |
110 | 114 |
111 } // namespace media | 115 } // namespace media |
OLD | NEW |