videobox: Fix caps negotiation issue

Make sure that if AYUV is received it will detect that it can produce
both RGB and YUV formats

Signed-off-by: Ravi Kiran K N <ravi.kiran@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=725248
This commit is contained in:
Ravi Kiran K N 2014-06-17 13:16:27 +05:30 committed by Thiago Santos
parent 054f774455
commit 3c4c130c5e

View file

@ -2862,22 +2862,27 @@ gst_video_box_transform_caps (GstBaseTransform * trans,
for (j = 0; j < gst_value_list_get_size (fval); j++) {
lval = gst_value_list_get_value (fval, j);
if ((str = g_value_get_string (lval))) {
if (strstr (str, "RGB") || strstr (str, "BGR") ||
strcmp (str, "AYUV") == 0)
seen_rgb = TRUE;
else if (strcmp (str, "I420") == 0 || strcmp (str, "YV12") == 0 ||
strcmp (str, "AYUV") == 0)
if (strcmp (str, "AYUV") == 0) {
seen_yuv = TRUE;
seen_rgb = TRUE;
break;
} else if (strstr (str, "RGB") || strstr (str, "BGR")) {
seen_rgb = TRUE;
} else if (strcmp (str, "I420") == 0 || strcmp (str, "YV12") == 0) {
seen_yuv = TRUE;
}
}
}
} else if (fval && G_VALUE_HOLDS_STRING (fval)) {
if ((str = g_value_get_string (fval))) {
if (strstr (str, "RGB") || strstr (str, "BGR") ||
strcmp (str, "AYUV") == 0)
seen_rgb = TRUE;
else if (strcmp (str, "I420") == 0 || strcmp (str, "YV12") == 0 ||
strcmp (str, "AYUV") == 0)
if (strcmp (str, "AYUV") == 0) {
seen_yuv = TRUE;
seen_rgb = TRUE;
} else if (strstr (str, "RGB") || strstr (str, "BGR")) {
seen_rgb = TRUE;
} else if (strcmp (str, "I420") == 0 || strcmp (str, "YV12") == 0) {
seen_yuv = TRUE;
}
}
}