fail_if (sink == NULL);
caps = gst_caps_from_string ("foo/bar");
+ gst_pad_set_active (src, TRUE);
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);
+ gst_pad_set_active (src, TRUE);
fail_unless (gst_pad_set_caps (src, caps) == TRUE);
fail_if (gst_pad_set_caps (sink, caps) == TRUE);
- ASSERT_CAPS_REFCOUNT (caps, "caps", 3);
+ ASSERT_CAPS_REFCOUNT (caps, "caps", 2);
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);
- /* Pad is still inactive but the event gets stored sticky, so push is
- * successful: */
+ gst_pad_set_active (src, TRUE);
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 (src, TRUE);
gst_pad_set_active (sink, TRUE);
fail_unless (event_caps == NULL);
ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
event = gst_event_new_caps (caps);
- /* Pads are still inactive but event gets stored sticky, so push is
- * successful: */
+ gst_pad_set_active (src, TRUE);
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 (src, TRUE);
gst_pad_set_active (sink, TRUE);
fail_unless (event_caps == NULL);
caps = gst_caps_from_string ("foo/bar");
- gst_pad_set_caps (src, caps);
- ASSERT_CAPS_REFCOUNT (caps, "caps", 2);
-
/* pushing on an inactive pad will return wrong state */
buffer = gst_buffer_new ();
gst_buffer_ref (buffer);
gst_buffer_unref (buffer);
gst_pad_set_active (src, TRUE);
+ gst_pad_set_caps (src, caps);
+ ASSERT_CAPS_REFCOUNT (caps, "caps", 2);
/* pushing on an unlinked pad will drop the buffer */
buffer = gst_buffer_new ();
/* one for me */
ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
+ gst_pad_set_active (src, TRUE);
gst_pad_set_caps (src, caps);
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (sink, caps);
fail_unless (gst_pad_chain (sink, buffer) == GST_FLOW_WRONG_STATE);
#endif
- /* activate pads */
- gst_pad_set_active (src, TRUE);
- gst_pad_set_active (sink, TRUE);
-
/* test */
/* pushing on a linked pad will drop the ref to the buffer */
gst_buffer_ref (buffer);
/* one for me */
ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
+ gst_pad_set_active (src, 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 */
+ gst_pad_set_active (src, FALSE);
+ gst_pad_set_active (sink, FALSE);
/* pushing on a flushing pad will drop the buffer */
buffer = gst_buffer_new ();
gst_pad_remove_probe (src, id);
/* cleanup */
- ASSERT_CAPS_REFCOUNT (caps, "caps", 2);
+ ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
ASSERT_OBJECT_REFCOUNT (src, "src", 1);
gst_pad_link (src, sink);
gst_object_unref (src);
caps = gst_caps_from_string ("foo/bar");
+ gst_pad_set_active (src, TRUE);
gst_pad_set_caps (src, caps);
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (sink, caps);
list = gst_buffer_list_new ();
- /* activate pads */
- gst_pad_set_active (src, TRUE);
- gst_pad_set_active (sink, TRUE);
-
/* test */
/* adding to a buffer list will drop the ref to the buffer */
gst_buffer_list_add (list, buffer_from_string ("ListGroup"));
caps = gst_caps_from_string ("foo/bar");
+ gst_pad_set_active (src, TRUE);
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");
+ gst_pad_set_active (src, TRUE);
gst_pad_set_caps (src, caps);
gst_pad_set_active (sink, TRUE);
gst_pad_set_caps (sink, caps);