Chromium Code Reviews| Index: content/child/runtime_features.cc |
| diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc |
| index 34225de2c7fbedaf8b3ecb2cd4309b16e66be5a4..9c532e38178ba58b6fff29bb4b009e479ee374ad 100644 |
| --- a/content/child/runtime_features.cc |
| +++ b/content/child/runtime_features.cc |
| @@ -10,7 +10,7 @@ |
| #if defined(OS_ANDROID) |
| #include <cpu-features.h> |
| -#include "base/android/build_info.h" |
| +#include "media/base/android/media_codec_bridge.h" |
| #endif |
| using WebKit::WebRuntimeFeatures; |
| @@ -20,9 +20,8 @@ namespace content { |
| static void SetRuntimeFeatureDefaultsForPlatform() { |
| #if defined(OS_ANDROID) |
| #if !defined(GOOGLE_TV) |
| - // MSE/EME implementation needs Android MediaCodec API that was introduced |
| - // in JellyBrean. |
| - if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) { |
| + // MSE/EME implementation needs Android MediaCodec API. |
| + if (!media::MediaCodecBridge::IsAvailable()) { |
|
ddorwin
2013/10/16 20:17:17
I like this change!
xhwang
2013/10/16 21:41:17
:)
|
| WebRuntimeFeatures::enableWebKitMediaSource(false); |
| WebRuntimeFeatures::enableMediaSource(false); |
| WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); |
| @@ -30,10 +29,10 @@ static void SetRuntimeFeatureDefaultsForPlatform() { |
| #endif // !defined(GOOGLE_TV) |
| bool enable_webaudio = false; |
| #if defined(ARCH_CPU_ARMEL) |
| - // WebAudio needs Android MediaCodec API that was introduced in |
| - // JellyBean, and also currently needs NEON support for the FFT. |
| + // WebAudio needs Android MediaCodec API, and also currently needs NEON |
| + // support for the FFT. |
| enable_webaudio = |
| - (base::android::BuildInfo::GetInstance()->sdk_int() >= 16) && |
| + (media::MediaCodecBridge::IsAvailable()) && |
| ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0); |
| #endif // defined(ARCH_CPU_ARMEL) |
| WebRuntimeFeatures::enableWebAudio(enable_webaudio); |