diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-06-01 19:23:01 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-06-01 19:41:21 +0200 |
commit | 2e0395aa59054c5f0cd4fdca0400348f57e69fe9 (patch) | |
tree | 18117a4a2579905454584636d6fb6c94d65470d4 /sys | |
parent | 8f2b65c74df60f77da0af9cdb35182d0ff99a3f6 (diff) | |
download | gstreamer-plugins-bad-2e0395aa59054c5f0cd4fdca0400348f57e69fe9.tar.gz |
androidmedia: Give lower ranks to codecs not starting with OMX.
On some devices there are codecs that don't start with OMX., while
there are also some that do. And on some of these devices the ones
that don't start with OMX. just crash during initialization while
the others work. To make things even more complicated other devices
have codecs with the same name that work and no alternatives.
So just give a lower rank to these non-OMX codecs and hope that
there's an alternative with a higher rank.
Also stagefright gives codecs starting with OMX. a higher rank too and
considers other codecs that don't start with OMX. as software codecs.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/androidmedia/gstamc.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/androidmedia/gstamc.c b/sys/androidmedia/gstamc.c index 88f81a7ab..2b8d494e2 100644 --- a/sys/androidmedia/gstamc.c +++ b/sys/androidmedia/gstamc.c @@ -3130,12 +3130,25 @@ register_codecs (GstPlugin * plugin) /* Give the Google software codec a secondary rank, * everything else is likely a hardware codec, except - * OMX.SEC.*.sw.dec (as seen in Galaxy S4) */ + * OMX.SEC.*.sw.dec (as seen in Galaxy S4). + * + * Also on some devices there are codecs that don't start + * with OMX., while there are also some that do. And on + * some of these devices the ones that don't start with + * OMX. just crash during initialization while the others + * work. To make things even more complicated other devices + * have codecs with the same name that work and no alternatives. + * So just give a lower rank to these non-OMX codecs and hope + * that there's an alternative with a higher rank. + */ if (g_str_has_prefix (codec_info->name, "OMX.google") || - g_str_has_suffix (codec_info->name, ".sw.dec")) + g_str_has_suffix (codec_info->name, ".sw.dec")) { rank = GST_RANK_SECONDARY; - else + } else if (g_str_has_prefix (codec_info->name, "OMX.")) { rank = GST_RANK_PRIMARY; + } else { + rank = GST_RANK_MARGINAL; + } ret |= gst_element_register (plugin, element_name, rank, subtype); g_free (element_name); |