From: cedric Date: Tue, 30 Aug 2011 14:05:49 +0000 (+0000) Subject: emotion: correctly setup the pipeline for non standard colorspace. X-Git-Tag: submit/2.0alpha-wayland/20121127.222018~186 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4f0cf144ab6f0558933f2638a65b85500b0ea5a;p=profile%2Fivi%2Femotion.git emotion: correctly setup the pipeline for non standard colorspace. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/emotion@62986 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/modules/gstreamer/emotion_sink.c b/src/modules/gstreamer/emotion_sink.c index 219da46..a43d6c3 100644 --- a/src/modules/gstreamer/emotion_sink.c +++ b/src/modules/gstreamer/emotion_sink.c @@ -186,23 +186,16 @@ gboolean evas_video_sink_set_caps(GstBaseSink *bsink, GstCaps *caps) GstStructure *structure; GstVideoFormat format; guint32 fourcc; - int width; - int height; sink = EVAS_VIDEO_SINK(bsink); priv = sink->priv; - if (!gst_video_format_parse_caps(caps, &format, &width, &height)) - { - ERR("Unable to parse caps."); - return FALSE; - } - - priv->width = width; - priv->height = height; - structure = gst_caps_get_structure(caps, 0); + if (!((gst_structure_get_int(structure, "width", &priv->width) + && gst_structure_get_int(structure, "height", &priv->height)))) + goto test_format; + if (gst_structure_get_fourcc(structure, "format", &fourcc)) { switch (fourcc) @@ -235,6 +228,12 @@ gboolean evas_video_sink_set_caps(GstBaseSink *bsink, GstCaps *caps) else { test_format: + if (!gst_video_format_parse_caps(caps, &format, &priv->width, &priv->height)) + { + ERR("Unable to parse caps."); + return FALSE; + } + switch (format) { case GST_VIDEO_FORMAT_BGR: priv->eformat = EVAS_COLORSPACE_ARGB8888;