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

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

Issue 2348683002: Disallow vp8 MediaCodec in MediaCodecUtil instead of AVDA. (Closed)
Patch Set: Created 4 years, 3 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/gpu/android_video_decode_accelerator.cc » ('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 a8adcd7beb2d8df1ef4f26be5608c9f6da7f2387..f6d97af9f23fd9c05cb4d45dcdbe26f5cffca74e 100644
--- a/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java
+++ b/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java
@@ -239,6 +239,12 @@ class MediaCodecUtil {
// *** DO NOT ADD ANY NEW CODECS WITHOUT UPDATING MIME_UTIL. ***
// *************************************************************
if (mime.equals("video/x-vnd.on2.vp8")) {
+ // Only support VP8 on Android versions where we don't have to synchronously
+ // tear down the MediaCodec on surface destruction because VP8 requires us to
+ // completely drain the decoder before releasing it, which is difficult and
+ // time consuming to do while the surface is being destroyed.
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) return false;
+
if (Build.MANUFACTURER.toLowerCase(Locale.getDefault()).equals("samsung")) {
// Some Samsung devices cannot render VP8 video directly to the surface.
« no previous file with comments | « no previous file | media/gpu/android_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698