From 57ea490f5a820e26b8f3fbebe9b1eec047d0dc9a Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Wed, 12 Sep 2012 20:54:50 +0200 Subject: [PATCH] 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. --- docs/libs/gstreamer-libs-sections.txt | 1 - libs/gst/base/gstcollectpads.c | 35 ++------------------------- libs/gst/base/gstcollectpads.h | 3 +-- tests/check/libs/collectpads.c | 16 ++++++------ win32/common/libgstbase.def | 1 - 5 files changed, 11 insertions(+), 45 deletions(-) diff --git a/docs/libs/gstreamer-libs-sections.txt b/docs/libs/gstreamer-libs-sections.txt index 5898c38a66..3a0694e14e 100644 --- a/docs/libs/gstreamer-libs-sections.txt +++ b/docs/libs/gstreamer-libs-sections.txt @@ -645,7 +645,6 @@ GST_COLLECT_PADS_STREAM_UNLOCK gst_collect_pads_new gst_collect_pads_add_pad -gst_collect_pads_add_pad_full gst_collect_pads_remove_pad gst_collect_pads_start diff --git a/libs/gst/base/gstcollectpads.c b/libs/gst/base/gstcollectpads.c index c696231799..610d2d870f 100644 --- a/libs/gst/base/gstcollectpads.c +++ b/libs/gst/base/gstcollectpads.c @@ -544,37 +544,6 @@ gst_collect_pads_set_clip_function (GstCollectPads * pads, * @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 @@ -609,8 +578,8 @@ gst_collect_pads_add_pad (GstCollectPads * pads, GstPad * pad, guint size) * 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; diff --git a/libs/gst/base/gstcollectpads.h b/libs/gst/base/gstcollectpads.h index 220219bb85..ee1c038307 100644 --- a/libs/gst/base/gstcollectpads.h +++ b/libs/gst/base/gstcollectpads.h @@ -313,8 +313,7 @@ void gst_collect_pads_set_clip_function (GstCollectPads *pads, gpointer user_data); /* pad management */ -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, +GstCollectData* gst_collect_pads_add_pad (GstCollectPads *pads, GstPad *pad, guint size, GstCollectDataDestroyNotify destroy_notify, gboolean lock); gboolean gst_collect_pads_remove_pad (GstCollectPads *pads, GstPad *pad); diff --git a/tests/check/libs/collectpads.c b/tests/check/libs/collectpads.c index 6d6e713ada..af81847eb5 100644 --- a/tests/check/libs/collectpads.c +++ b/tests/check/libs/collectpads.c @@ -140,10 +140,10 @@ teardown (void) 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); @@ -158,11 +158,11 @@ GST_START_TEST (test_collect) 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 (); @@ -209,11 +209,11 @@ GST_START_TEST (test_collect_eos) 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 (); @@ -258,11 +258,11 @@ GST_START_TEST (test_collect_twice) 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"); diff --git a/win32/common/libgstbase.def b/win32/common/libgstbase.def index 1da0fe61b4..190d5e630d 100644 --- a/win32/common/libgstbase.def +++ b/win32/common/libgstbase.def @@ -214,7 +214,6 @@ EXPORTS gst_byte_writer_reset_and_get_buffer gst_byte_writer_reset_and_get_data gst_collect_pads_add_pad - gst_collect_pads_add_pad_full gst_collect_pads_available gst_collect_pads_clip_running_time gst_collect_pads_event_default