From: Sebastian Dröge Date: Thu, 7 May 2009 14:52:02 +0000 (+0200) Subject: textrender: Don't always use ARGB if downstream supports it but take it's preference X-Git-Tag: 1.19.3~511^2~9698 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f5502a8960c7d37cc63a5471c945714bf76a5f1;p=platform%2Fupstream%2Fgstreamer.git textrender: Don't always use ARGB if downstream supports it but take it's preference --- diff --git a/ext/pango/gsttextrender.c b/ext/pango/gsttextrender.c index dfab335..f8fbab4 100644 --- a/ext/pango/gsttextrender.c +++ b/ext/pango/gsttextrender.c @@ -276,12 +276,20 @@ gst_text_render_check_argb (GstTextRender * render) GST_DEBUG_OBJECT (render, "peer allowed caps (%u structure(s)) are %" GST_PTR_FORMAT, n, peer_caps); + /* Check if AYUV or ARGB is first */ for (i = 0; i < n; i++) { GstStructure *s = gst_caps_get_structure (peer_caps, i); - /* Check if the peer pad support ARGB format, if yes change caps */ if (gst_structure_has_name (s, "video/x-raw-rgb") && gst_structure_has_field (s, "alpha_mask")) { render->use_ARGB = TRUE; + break; + } else if (gst_structure_has_name (s, "video/x-raw-yuv")) { + guint fourcc; + if (gst_structure_get_fourcc (s, "format", &fourcc) && + fourcc == GST_MAKE_FOURCC ('A', 'Y', 'U', 'V')) { + render->use_ARGB = FALSE; + break; + } } } gst_caps_unref (peer_caps);