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

Unified Diff: webrtc/sdk/android/api/org/webrtc/MediaCodecVideoDecoder.java

Issue 2942463002: Support H.264 high profile decoding on Exynos devices. (Closed)
Patch Set: Created 3 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/android/api/org/webrtc/MediaCodecVideoDecoder.java
diff --git a/webrtc/sdk/android/api/org/webrtc/MediaCodecVideoDecoder.java b/webrtc/sdk/android/api/org/webrtc/MediaCodecVideoDecoder.java
index 4ba6b727df5cdccd83332841bcccc610ae026ef5..4304ff421b42b9b6987cf8138acfb948f391829b 100644
--- a/webrtc/sdk/android/api/org/webrtc/MediaCodecVideoDecoder.java
+++ b/webrtc/sdk/android/api/org/webrtc/MediaCodecVideoDecoder.java
@@ -82,7 +82,8 @@ public class MediaCodecVideoDecoder {
private static final String[] supportedH264HwCodecPrefixes = {
"OMX.qcom.", "OMX.Intel.", "OMX.Exynos."};
// List of supported HW H.264 high profile decoders.
- private static final String[] supportedH264HighProfileHwCodecPrefixes = {"OMX.qcom."};
+ private static final String supportedQcomH264HighProfileHwCodecPrefix = "OMX.qcom.";
+ private static final String supportedExynosH264HighProfileHwCodecPrefix = "OMX.Exynos.";
// NV12 color format supported by QCOM codec, but not declared in MediaCodec -
// see /hardware/qcom/media/mm-core/inc/OMX_QCOMExtns.h
@@ -160,9 +161,22 @@ public class MediaCodecVideoDecoder {
}
public static boolean isH264HighProfileHwSupported() {
- return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
- && !hwDecoderDisabledTypes.contains(H264_MIME_TYPE)
- && (findDecoder(H264_MIME_TYPE, supportedH264HighProfileHwCodecPrefixes) != null);
+ if (hwDecoderDisabledTypes.contains(H264_MIME_TYPE)) {
+ return false;
+ }
+ // Support H.264 HP decoding on QCOM chips for Android L and above.
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
+ && findDecoder(H264_MIME_TYPE, new String[] {supportedQcomH264HighProfileHwCodecPrefix})
+ != null) {
+ return true;
+ }
+ // Support H.264 HP decoding on Exynos chips for Android M and above.
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
+ && findDecoder(H264_MIME_TYPE, new String[] {supportedExynosH264HighProfileHwCodecPrefix})
+ != null) {
+ return true;
+ }
+ return false;
}
public static void printStackTrace() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698