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

Unified Diff: content/child/runtime_features.cc

Issue 27230004: Do not run MSE related tests when MSE is not available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Check MediaCodecBridge Availability Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« chrome/browser/media/encrypted_media_browsertest.cc ('K') | « content/child/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« chrome/browser/media/encrypted_media_browsertest.cc ('K') | « content/child/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698