{
GstPad *peer = gst_pad_get_peer (pad);
GstCaps *caps;
- gboolean ret;
+ gboolean ret = FALSE;
const gchar *name;
+ guint i;
if (peer) {
caps = gst_pad_get_current_caps (peer);
caps = gst_pad_query_caps (pad, NULL);
}
- name = gst_structure_get_name (gst_caps_get_structure (caps, 0));
- if (g_str_equal (name, "video/x-raw")) {
- ret = TRUE;
- if (hw_accelerated)
- *hw_accelerated = FALSE;
+ for (i = 0; i < gst_caps_get_size (caps) && ret == FALSE; i++) {
+ name = gst_structure_get_name (gst_caps_get_structure (caps, i));
+ if (g_str_equal (name, "video/x-raw")) {
+ ret = TRUE;
+ if (hw_accelerated)
+ *hw_accelerated = FALSE;
- } else if (g_str_has_prefix (name, "video/x-surface")) {
- ret = TRUE;
- if (hw_accelerated)
- *hw_accelerated = TRUE;
- } else {
+ } else if (g_str_has_prefix (name, "video/x-surface")) {
+ ret = TRUE;
+ if (hw_accelerated)
+ *hw_accelerated = TRUE;
+ } else {
- ret = FALSE;
- if (hw_accelerated)
- *hw_accelerated = FALSE;
+ ret = FALSE;
+ if (hw_accelerated)
+ *hw_accelerated = FALSE;
+ }
}
gst_caps_unref (caps);