emotion: correctly setup the pipeline for non standard colorspace.

SVN revision: 62986
This commit is contained in:
Cedric BAIL 2011-08-30 14:05:49 +00:00
parent dc78efed2b
commit bc3979229f
1 changed files with 10 additions and 11 deletions

View File

@ -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;