[Android] [PATCH] HWDecoderUtil: blacklist some bad samsung cpu

Thomas Guillem thomas at gllm.fr
Wed May 6 10:57:48 CEST 2015


It's temporary, we need to get hands on these device in order to debug it.
---
 libvlc/src/org/videolan/libvlc/HWDecoderUtil.java | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/libvlc/src/org/videolan/libvlc/HWDecoderUtil.java b/libvlc/src/org/videolan/libvlc/HWDecoderUtil.java
index 7c60221..cf89d18 100644
--- a/libvlc/src/org/videolan/libvlc/HWDecoderUtil.java
+++ b/libvlc/src/org/videolan/libvlc/HWDecoderUtil.java
@@ -59,6 +59,15 @@ public class HWDecoderUtil {
         }
     }
 
+    private static final DecoderBySOC[] sBlacklistedDecoderBySOCList = new DecoderBySOC[] {
+        /*
+         * FIXME: Theses cpu crash in MediaCodec. We need to get hands on these devices in order to debug it.
+         */
+        new DecoderBySOC("ro.product.board", "msm8916", Decoder.NONE), //Samsung Galaxy Core Prime
+        new DecoderBySOC("ro.product.board", "MSM8225", Decoder.NONE), //Samsung Galaxy Core
+        new DecoderBySOC("ro.product.board", "hawaii", Decoder.NONE), // Samsung Galaxy Ace 4
+    };
+
     private static final DecoderBySOC[] sDecoderBySOCList = new DecoderBySOC[] {
         /*
          *  Put first devices you want to blacklist
@@ -114,6 +123,16 @@ public class HWDecoderUtil {
      */
     public static Decoder getDecoderFromDevice() {
         /*
+         * Try first blacklisted decoders (for all android versions)
+         */
+        for (DecoderBySOC decBySOC : sBlacklistedDecoderBySOCList) {
+            final String prop = getSystemPropertyCached(decBySOC.key);
+            if (prop != null) {
+                if (prop.contains(decBySOC.value))
+                    return decBySOC.dec;
+            }
+        }
+        /*
          * Always try MediaCodec after JellyBean MR2,
          * Try OMX or MediaCodec after HoneyComb depending on device properties.
          * Otherwise, use software decoder by default.
-- 
2.1.4



More information about the Android mailing list