collectpads: remove gst_collect_pads_add_pad_full

Rename gst_collect_pads_add_pad_full() to gst_collect_pads_add_pad() and fix all
invocations.
This commit is contained in:
Stefan Sauer 2012-09-12 20:54:50 +02:00
parent 947635d893
commit 57ea490f5a
5 changed files with 11 additions and 45 deletions

View file

@ -645,7 +645,6 @@ GST_COLLECT_PADS_STREAM_UNLOCK
gst_collect_pads_new gst_collect_pads_new
gst_collect_pads_add_pad gst_collect_pads_add_pad
gst_collect_pads_add_pad_full
gst_collect_pads_remove_pad gst_collect_pads_remove_pad
gst_collect_pads_start gst_collect_pads_start

View file

@ -544,37 +544,6 @@ gst_collect_pads_set_clip_function (GstCollectPads * pads,
* @pads: the collectspads to use * @pads: the collectspads to use
* @pad: (transfer none): the pad to add * @pad: (transfer none): the pad to add
* @size: the size of the returned #GstCollectData structure * @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 * @destroy_notify: function to be called before the returned #GstCollectData
* structure is freed * structure is freed
* @lock: whether to lock this pad in usual waiting state * @lock: whether to lock this pad in usual waiting state
@ -609,8 +578,8 @@ gst_collect_pads_add_pad (GstCollectPads * pads, GstPad * pad, guint size)
* if wrong parameters are supplied. * if wrong parameters are supplied.
*/ */
GstCollectData * GstCollectData *
gst_collect_pads_add_pad_full (GstCollectPads * pads, GstPad * pad, gst_collect_pads_add_pad (GstCollectPads * pads, GstPad * pad, guint size,
guint size, GstCollectDataDestroyNotify destroy_notify, gboolean lock) GstCollectDataDestroyNotify destroy_notify, gboolean lock)
{ {
GstCollectData *data; GstCollectData *data;

View file

@ -313,8 +313,7 @@ void gst_collect_pads_set_clip_function (GstCollectPads *pads,
gpointer user_data); gpointer user_data);
/* pad management */ /* pad management */
GstCollectData* gst_collect_pads_add_pad (GstCollectPads *pads, GstPad *pad, guint size); GstCollectData* gst_collect_pads_add_pad (GstCollectPads *pads, GstPad *pad, guint size,
GstCollectData* gst_collect_pads_add_pad_full (GstCollectPads *pads, GstPad *pad, guint size,
GstCollectDataDestroyNotify destroy_notify, GstCollectDataDestroyNotify destroy_notify,
gboolean lock); gboolean lock);
gboolean gst_collect_pads_remove_pad (GstCollectPads *pads, GstPad *pad); gboolean gst_collect_pads_remove_pad (GstCollectPads *pads, GstPad *pad);

View file

@ -140,10 +140,10 @@ teardown (void)
GST_START_TEST (test_pad_add_remove) GST_START_TEST (test_pad_add_remove)
{ {
ASSERT_CRITICAL (gst_collect_pads_add_pad (collect, sinkpad1, ASSERT_CRITICAL (gst_collect_pads_add_pad (collect, sinkpad1,
sizeof (BadCollectData))); sizeof (BadCollectData)), NULL, TRUE);
data1 = (TestData *) gst_collect_pads_add_pad (collect, data1 = (TestData *) gst_collect_pads_add_pad (collect,
sinkpad1, sizeof (TestData)); sinkpad1, sizeof (TestData), NULL, TRUE);
fail_unless (data1 != NULL); fail_unless (data1 != NULL);
fail_unless (gst_collect_pads_remove_pad (collect, sinkpad2) == FALSE); fail_unless (gst_collect_pads_remove_pad (collect, sinkpad2) == FALSE);
@ -158,11 +158,11 @@ GST_START_TEST (test_collect)
GThread *thread1, *thread2; GThread *thread1, *thread2;
data1 = (TestData *) gst_collect_pads_add_pad (collect, data1 = (TestData *) gst_collect_pads_add_pad (collect,
sinkpad1, sizeof (TestData)); sinkpad1, sizeof (TestData), NULL, TRUE);
fail_unless (data1 != NULL); fail_unless (data1 != NULL);
data2 = (TestData *) gst_collect_pads_add_pad (collect, data2 = (TestData *) gst_collect_pads_add_pad (collect,
sinkpad2, sizeof (TestData)); sinkpad2, sizeof (TestData), NULL, TRUE);
fail_unless (data2 != NULL); fail_unless (data2 != NULL);
buf1 = gst_buffer_new (); buf1 = gst_buffer_new ();
@ -209,11 +209,11 @@ GST_START_TEST (test_collect_eos)
GThread *thread1, *thread2; GThread *thread1, *thread2;
data1 = (TestData *) gst_collect_pads_add_pad (collect, data1 = (TestData *) gst_collect_pads_add_pad (collect,
sinkpad1, sizeof (TestData)); sinkpad1, sizeof (TestData), NULL, TRUE);
fail_unless (data1 != NULL); fail_unless (data1 != NULL);
data2 = (TestData *) gst_collect_pads_add_pad (collect, data2 = (TestData *) gst_collect_pads_add_pad (collect,
sinkpad2, sizeof (TestData)); sinkpad2, sizeof (TestData), NULL, TRUE);
fail_unless (data2 != NULL); fail_unless (data2 != NULL);
buf1 = gst_buffer_new (); buf1 = gst_buffer_new ();
@ -258,11 +258,11 @@ GST_START_TEST (test_collect_twice)
GThread *thread1, *thread2; GThread *thread1, *thread2;
data1 = (TestData *) gst_collect_pads_add_pad (collect, data1 = (TestData *) gst_collect_pads_add_pad (collect,
sinkpad1, sizeof (TestData)); sinkpad1, sizeof (TestData), NULL, TRUE);
fail_unless (data1 != NULL); fail_unless (data1 != NULL);
data2 = (TestData *) gst_collect_pads_add_pad (collect, data2 = (TestData *) gst_collect_pads_add_pad (collect,
sinkpad2, sizeof (TestData)); sinkpad2, sizeof (TestData), NULL, TRUE);
fail_unless (data2 != NULL); fail_unless (data2 != NULL);
GST_INFO ("round 1"); GST_INFO ("round 1");

View file

@ -214,7 +214,6 @@ EXPORTS
gst_byte_writer_reset_and_get_buffer gst_byte_writer_reset_and_get_buffer
gst_byte_writer_reset_and_get_data gst_byte_writer_reset_and_get_data
gst_collect_pads_add_pad gst_collect_pads_add_pad
gst_collect_pads_add_pad_full
gst_collect_pads_available gst_collect_pads_available
gst_collect_pads_clip_running_time gst_collect_pads_clip_running_time
gst_collect_pads_event_default gst_collect_pads_event_default