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

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

Issue 2693653003: Merge M57: "Make setOutputSurface, encrypted capabilities. Blacklist hi6210sft." (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | media/base/android/media_codec_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 892e8d9df6ffdb738b6cfa75da37a1ceba0eeecb..024f4b02115ec2c77ca97c911cfa8c653792b94a 100644
--- a/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java
+++ b/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java
@@ -481,6 +481,18 @@ class MediaCodecUtil {
}
/**
+ * Provides a way to blacklist MediaCodec.setOutputSurface() on devices.
+ * @return true if setOutputSurface() is expected to work.
+ */
+ @CalledByNative
+ static boolean isSetOutputSurfaceSupported() {
+ // All Huawei devices based on this processor will immediately hang during
+ // MediaCodec.setOutputSurface(). http://crbug.com/683401
+ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
+ && !Build.HARDWARE.equalsIgnoreCase("hi6210sft");
+ }
+
+ /**
* Find HW encoder with given MIME type.
* @param mime MIME type of the media.
* @return HWEncoderProperties object.
« no previous file with comments | « no previous file | media/base/android/media_codec_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698