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

Unified Diff: media/base/android/media_codec_util.cc

Issue 1690063002: Fix mime type mappings when the unified media pipeline is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix all teh things. Created 4 years, 10 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
Index: media/base/android/media_codec_util.cc
diff --git a/media/base/android/media_codec_util.cc b/media/base/android/media_codec_util.cc
index 7650ecd7f7813a11352163f4f099d073ddef58a6..f605697c00a54456c7f49d92721d7163fab0dbb3 100644
--- a/media/base/android/media_codec_util.cc
+++ b/media/base/android/media_codec_util.cc
@@ -245,4 +245,23 @@ bool MediaCodecUtil::RegisterMediaCodecUtil(JNIEnv* env) {
return RegisterNativesImpl(env);
}
+// static
+bool MediaCodecUtil::PlatformHasOpusSupport() {
+ return base::android::BuildInfo::GetInstance()->sdk_int() >= 21;
+}
+
+// static
+bool MediaCodecUtil::PlatformHasVp9Support() {
+ return base::android::BuildInfo::GetInstance()->sdk_int() >= 19;
+}
+
+bool MediaCodecUtil::IsVp8Blacklisted() {
+ if (!IsMediaCodecAvailable())
+ return false;
ddorwin 2016/02/16 20:34:36 // Android MediaPlayer will be used. ? Still, I w
DaleCurtis 2016/02/17 03:01:05 I don't think we need to mention MediaPlayer here,
+
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jstring> j_mime = ConvertUTF8ToJavaString(env, "vp8");
+ return Java_MediaCodecUtil_isDecoderSupportedForDevice(env, j_mime.obj());
+}
+
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698