mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 13:56:32 +00:00
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:
parent
947635d893
commit
57ea490f5a
5 changed files with 11 additions and 45 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue