GstCaps *caps;
GstCaps *caps_mixed, *caps_progressive, *caps_interleaved;
GstEvent *caps_event;
+ GstQuery *drain;
caps_interleaved =
gst_caps_from_string ("video/x-raw, interlace-mode=interleaved");
gst_caps_unref (caps);
fail_unless (gst_pad_send_event (sinkpad, caps_event));
+ /* Send drain query to make sure this is processed */
+ drain = gst_query_new_drain ();
+ gst_pad_query (sinkpad, drain);
+ gst_query_unref (drain);
+
/* now recheck the interlace-mode */
gst_object_unref (sinkpad);
sinkpad = gst_element_get_request_pad (compositor, "sink_%u");
GstStateChangeReturn state_res;
GstPad *sinkpad_2;
GstCaps *caps;
- GstEvent *caps_event;
GstBus *bus;
GstMessage *msg;
sinkpad_2 = gst_element_get_request_pad (compositor, "sink_%u");
caps = gst_pad_query_caps (sinkpad_2, NULL);
fail_unless (gst_caps_is_subset (expected_query_caps, caps));
- caps_event = gst_event_new_caps (second_caps);
- fail_unless (gst_pad_send_event (sinkpad_2, caps_event) == accept_caps);
+ gst_caps_unref (caps);
+ caps = gst_pad_query_caps (sinkpad_2, second_caps);
+ fail_unless (gst_caps_is_empty (caps) != accept_caps);
gst_caps_unref (caps);
gst_object_unref (sinkpad_2);