* @pads: the collectspads to use
* @pad: (transfer none): the pad to add
* @size: the size of the returned #GstCollectData structure
- *
- * Add a pad to the collection of collect pads. The pad has to be
- * a sinkpad. The refcount of the pad is incremented. Use
- * gst_collect_pads_remove_pad() to remove the pad from the collection
- * again.
- *
- * You specify a size for the returned #GstCollectData structure
- * so that you can use it to store additional information.
- *
- * The pad will be automatically activated in push mode when @pads is
- * started.
- *
- * This function calls gst_collect_pads_add_pad_full() passing a value of NULL
- * for destroy_notify and TRUE for locked.
- *
- * MT safe.
- *
- * Returns: a new #GstCollectData to identify the new pad. Or NULL
- * if wrong parameters are supplied.
- */
-GstCollectData *
-gst_collect_pads_add_pad (GstCollectPads * pads, GstPad * pad, guint size)
-{
- return gst_collect_pads_add_pad_full (pads, pad, size, NULL, TRUE);
-}
-
-/**
- * gst_collect_pads_add_pad_full:
- * @pads: the collectspads to use
- * @pad: (transfer none): the pad to add
- * @size: the size of the returned #GstCollectData structure
* @destroy_notify: function to be called before the returned #GstCollectData
* structure is freed
* @lock: whether to lock this pad in usual waiting state
* if wrong parameters are supplied.
*/
GstCollectData *
-gst_collect_pads_add_pad_full (GstCollectPads * pads, GstPad * pad,
- guint size, GstCollectDataDestroyNotify destroy_notify, gboolean lock)
+gst_collect_pads_add_pad (GstCollectPads * pads, GstPad * pad, guint size,
+ GstCollectDataDestroyNotify destroy_notify, gboolean lock)
{
GstCollectData *data;
GST_START_TEST (test_pad_add_remove)
{
ASSERT_CRITICAL (gst_collect_pads_add_pad (collect, sinkpad1,
- sizeof (BadCollectData)));
+ sizeof (BadCollectData)), NULL, TRUE);
data1 = (TestData *) gst_collect_pads_add_pad (collect,
- sinkpad1, sizeof (TestData));
+ sinkpad1, sizeof (TestData), NULL, TRUE);
fail_unless (data1 != NULL);
fail_unless (gst_collect_pads_remove_pad (collect, sinkpad2) == FALSE);
GThread *thread1, *thread2;
data1 = (TestData *) gst_collect_pads_add_pad (collect,
- sinkpad1, sizeof (TestData));
+ sinkpad1, sizeof (TestData), NULL, TRUE);
fail_unless (data1 != NULL);
data2 = (TestData *) gst_collect_pads_add_pad (collect,
- sinkpad2, sizeof (TestData));
+ sinkpad2, sizeof (TestData), NULL, TRUE);
fail_unless (data2 != NULL);
buf1 = gst_buffer_new ();
GThread *thread1, *thread2;
data1 = (TestData *) gst_collect_pads_add_pad (collect,
- sinkpad1, sizeof (TestData));
+ sinkpad1, sizeof (TestData), NULL, TRUE);
fail_unless (data1 != NULL);
data2 = (TestData *) gst_collect_pads_add_pad (collect,
- sinkpad2, sizeof (TestData));
+ sinkpad2, sizeof (TestData), NULL, TRUE);
fail_unless (data2 != NULL);
buf1 = gst_buffer_new ();
GThread *thread1, *thread2;
data1 = (TestData *) gst_collect_pads_add_pad (collect,
- sinkpad1, sizeof (TestData));
+ sinkpad1, sizeof (TestData), NULL, TRUE);
fail_unless (data1 != NULL);
data2 = (TestData *) gst_collect_pads_add_pad (collect,
- sinkpad2, sizeof (TestData));
+ sinkpad2, sizeof (TestData), NULL, TRUE);
fail_unless (data2 != NULL);
GST_INFO ("round 1");