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

Unified Diff: media/base/android/java/src/org/chromium/media/MediaCodecUtil.java

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: Simplify, test, rebase on split. 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/java/src/org/chromium/media/MediaCodecUtil.java
diff --git a/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java b/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java
index 10498287e9aaf89cded7c28e5f3b270c5f89f0b3..83835836a6a701a0cab0d4477ae81d33e6a2ce8c 100644
--- a/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java
+++ b/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java
@@ -275,7 +275,11 @@ class MediaCodecUtil {
* @param mime MIME type as passed to mediaCodec.createDecoderByType(mime).
* @return true if this codec is supported for decoder on this device.
*/
- private static boolean isDecoderSupportedForDevice(String mime) {
+ @CalledByNative
+ static boolean isDecoderSupportedForDevice(String mime) {
+ // *************************************************************
+ // *** DO NOT ADD ANY NEW CODECS WITHOUT UPDATING MIME_UTIL. ***
+ // *************************************************************
if (mime.equals("video/x-vnd.on2.vp8")) {
// Some Samsung devices cannot render VP8 video directly to the surface.
if (Build.MANUFACTURER.toLowerCase(Locale.getDefault()).equals("samsung")) {
@@ -297,7 +301,9 @@ class MediaCodecUtil {
}
}
}
-
+ // *************************************************************
+ // *** DO NOT ADD ANY NEW CODECS WITHOUT UPDATING MIME_UTIL. ***
+ // *************************************************************
return true;
}

Powered by Google App Engine
This is Rietveld 408576698