[Android] HWDecoderUtil: blacklist some bad samsung cpu

Thomas Guillem git at videolan.org
Wed May 6 11:04:25 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed May  6 10:57:19 2015 +0200| [56f9a0d75f69adfdfb938615be8690f5a4b29887] | committer: Thomas Guillem

HWDecoderUtil: blacklist some bad samsung cpu

It's temporary, we need to get hands on these device in order to debug it.

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=56f9a0d75f69adfdfb938615be8690f5a4b29887
---

 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.



More information about the Android mailing list