gst_pad_set_caps (src, caps);
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (sink, caps);
gst_pad_set_caps (src, caps);
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (sink, caps);
caps = gst_caps_from_string ("foo/bar");
sink = gst_pad_new ("sink", GST_PAD_SINK);
caps = gst_caps_from_string ("foo/bar");
sink = gst_pad_new ("sink", GST_PAD_SINK);
fail_unless (gst_pad_set_caps (src, caps) == TRUE);
fail_if (gst_pad_set_caps (sink, caps) == TRUE);
fail_unless (gst_pad_set_caps (src, caps) == TRUE);
fail_if (gst_pad_set_caps (sink, caps) == TRUE);
gst_pad_set_active (sink, TRUE);
fail_unless (gst_pad_set_caps (sink, caps) == TRUE);
gst_pad_set_active (sink, TRUE);
fail_unless (gst_pad_set_caps (sink, caps) == TRUE);
ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
event = gst_event_new_caps (caps);
ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
event = gst_event_new_caps (caps);
fail_unless (gst_pad_push_event (src, event) == TRUE);
fail_unless (event_caps == NULL);
/* Linking and activating will not forward the sticky event yet... */
fail_unless (GST_PAD_LINK_SUCCESSFUL (gst_pad_link (src, sink)));
fail_unless (gst_pad_push_event (src, event) == TRUE);
fail_unless (event_caps == NULL);
/* Linking and activating will not forward the sticky event yet... */
fail_unless (GST_PAD_LINK_SUCCESSFUL (gst_pad_link (src, sink)));
gst_pad_set_active (sink, TRUE);
fail_unless (event_caps == NULL);
gst_pad_set_active (sink, TRUE);
fail_unless (event_caps == NULL);
ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
event = gst_event_new_caps (caps);
ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
event = gst_event_new_caps (caps);
fail_unless (gst_pad_push_event (src, event) == TRUE);
fail_unless (event_caps == NULL);
/* Activating will not forward the sticky event yet... */
fail_unless (gst_pad_push_event (src, event) == TRUE);
fail_unless (event_caps == NULL);
/* Activating will not forward the sticky event yet... */
gst_pad_set_active (sink, TRUE);
fail_unless (event_caps == NULL);
gst_pad_set_active (sink, TRUE);
fail_unless (event_caps == NULL);
gst_buffer_unref (buffer);
gst_pad_set_active (src, TRUE);
gst_buffer_unref (buffer);
gst_pad_set_active (src, TRUE);
gst_pad_set_caps (src, caps);
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (sink, caps);
gst_pad_set_caps (src, caps);
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (sink, caps);
gst_pad_set_caps (src, caps);
/* need to activate to make it accept the caps */
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (src, caps);
/* need to activate to make it accept the caps */
gst_pad_set_active (sink, TRUE);
ASSERT_CAPS_REFCOUNT (caps, "caps", 3);
/* not activating the pads here, which keeps them flushing */
ASSERT_CAPS_REFCOUNT (caps, "caps", 3);
/* not activating the pads here, which keeps them flushing */
ASSERT_OBJECT_REFCOUNT (src, "src", 1);
gst_pad_link (src, sink);
gst_object_unref (src);
ASSERT_OBJECT_REFCOUNT (src, "src", 1);
gst_pad_link (src, sink);
gst_object_unref (src);
gst_pad_set_caps (src, caps);
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (sink, caps);
gst_pad_set_caps (src, caps);
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (sink, caps);
/* test */
/* adding to a buffer list will drop the ref to the buffer */
gst_buffer_list_add (list, buffer_from_string ("ListGroup"));
/* test */
/* adding to a buffer list will drop the ref to the buffer */
gst_buffer_list_add (list, buffer_from_string ("ListGroup"));
gst_pad_set_caps (src, caps);
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (sink, caps);
gst_pad_set_caps (src, caps);
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (sink, caps);
gst_pad_set_caps (src, caps);
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (sink, caps);
gst_pad_set_caps (src, caps);
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (sink, caps);