androidmedia: fix rank for more software decoders
authorAndoni Morales Alastruey <ylatuya@gmail.com>
Wed, 30 Oct 2013 17:25:50 +0000 (18:25 +0100)
committerAndoni Morales Alastruey <ylatuya@gmail.com>
Thu, 31 Oct 2013 15:38:41 +0000 (16:38 +0100)
In Galaxy S4 the codecs list contains some OMX.SEC.foo.sw.dec
as software decoders

https://bugzilla.gnome.org/show_bug.cgi?id=711214

sys/androidmedia/gstamc.c

index 18743a3..e7159f0 100644 (file)
@@ -2775,8 +2775,10 @@ register_codecs (GstPlugin * plugin)
           codec_info->name);
 
       /* Give the Google software codec a secondary rank,
-       * everything else is likely a hardware codec */
-      if (g_str_has_prefix (codec_info->name, "OMX.google"))
+       * everything else is likely a hardware codec, except
+       * OMX.SEC.*.sw.dec (as seen in Galaxy S4) */
+      if (g_str_has_prefix (codec_info->name, "OMX.google") ||
+          g_str_has_suffix (codec_info->name, ".sw.dec"))
         rank = GST_RANK_SECONDARY;
       else
         rank = GST_RANK_PRIMARY;