From 46db91babf539a253d6252528c207393638bb0bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 21 Nov 2005 11:54:16 +0000 Subject: [PATCH] Update for gst_collectpads_foo() to gst_collect_pads_foo() Original commit message from CVS: * ext/ogg/gstoggmux.c: (gst_ogg_mux_init), (gst_ogg_mux_request_new_pad), (gst_ogg_mux_queue_pads), (gst_ogg_mux_clear_collectpads), (gst_ogg_mux_change_state): * gst/adder/gstadder.c: (gst_adder_init), (gst_adder_request_new_pad), (gst_adder_collected), (gst_adder_change_state): Update for gst_collectpads_foo() to gst_collect_pads_foo() API change. --- ChangeLog | 11 +++++++++++ ext/ogg/gstoggmux.c | 16 ++++++++-------- gst/adder/gstadder.c | 18 +++++++++--------- 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index b2b4b5351a..e02bafab5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-11-21 Tim-Philipp Müller + + * ext/ogg/gstoggmux.c: (gst_ogg_mux_init), + (gst_ogg_mux_request_new_pad), (gst_ogg_mux_queue_pads), + (gst_ogg_mux_clear_collectpads), (gst_ogg_mux_change_state): + * gst/adder/gstadder.c: (gst_adder_init), + (gst_adder_request_new_pad), (gst_adder_collected), + (gst_adder_change_state): + Update for gst_collectpads_foo() to gst_collect_pads_foo() + API change. + 2005-11-21 Michael Smith * ext/vorbis/vorbisenc.c: (gst_vorbisenc_clear), diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index c2720cf0eb..b930dd1db4 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -289,8 +289,8 @@ gst_ogg_mux_init (GstOggMux * ogg_mux) /* seed random number generator for creation of serial numbers */ srand (time (NULL)); - ogg_mux->collect = gst_collectpads_new (); - gst_collectpads_set_function (ogg_mux->collect, + ogg_mux->collect = gst_collect_pads_new (); + gst_collect_pads_set_function (ogg_mux->collect, (GstCollectPadsFunction) gst_ogg_mux_collected, ogg_mux); gst_ogg_mux_clear (ogg_mux); @@ -371,7 +371,7 @@ gst_ogg_mux_request_new_pad (GstElement * element, GstOggPad *oggpad; oggpad = (GstOggPad *) - gst_collectpads_add_pad (ogg_mux->collect, newpad, + gst_collect_pads_add_pad (ogg_mux->collect, newpad, sizeof (GstOggPad)); oggpad->serial = serial; @@ -385,7 +385,7 @@ gst_ogg_mux_request_new_pad (GstElement * element, oggpad->first_delta = FALSE; oggpad->prev_delta = FALSE; /* TODO: delete this queue (and the things contained within) later, - * possibly when doing gst_collectpads_remove_pad() (which we don't seem + * possibly when doing gst_collect_pads_remove_pad() (which we don't seem * to do at all?) */ oggpad->pagebuffers = g_queue_new (); @@ -660,7 +660,7 @@ gst_ogg_mux_queue_pads (GstOggMux * ogg_mux) GstBuffer *buf; gboolean incaps; - buf = gst_collectpads_pop (ogg_mux->collect, data); + buf = gst_collect_pads_pop (ogg_mux->collect, data); GST_DEBUG_OBJECT (ogg_mux, "popping buffer %p", buf); /* On EOS we get a NULL buffer */ @@ -1303,7 +1303,7 @@ gst_ogg_mux_clear_collectpads (GstCollectPads * collect) } g_queue_free (pad->pagebuffers); - gst_collectpads_remove_pad (collect, ((GstCollectData *) pad)->pad); + gst_collect_pads_remove_pad (collect, ((GstCollectData *) pad)->pad); walk = collect->data; } } @@ -1323,13 +1323,13 @@ gst_ogg_mux_change_state (GstElement * element, GstStateChange transition) ogg_mux->next_ts = 0; ogg_mux->offset = 0; ogg_mux->pulling = NULL; - gst_collectpads_start (ogg_mux->collect); + gst_collect_pads_start (ogg_mux->collect); gst_ogg_mux_clear (ogg_mux); break; case GST_STATE_CHANGE_PAUSED_TO_PLAYING: break; case GST_STATE_CHANGE_PAUSED_TO_READY: - gst_collectpads_stop (ogg_mux->collect); + gst_collect_pads_stop (ogg_mux->collect); break; default: break; diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index 2835f78341..b412a0b49a 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -286,8 +286,8 @@ gst_adder_init (GstAdder * adder) adder->func = NULL; /* keep track of the sinkpads requested */ - adder->collect = gst_collectpads_new (); - gst_collectpads_set_function (adder->collect, gst_adder_collected, adder); + adder->collect = gst_collect_pads_new (); + gst_collect_pads_set_function (adder->collect, gst_adder_collected, adder); } static void @@ -320,7 +320,7 @@ gst_adder_request_new_pad (GstElement * element, GstPadTemplate * templ, gst_pad_set_getcaps_function (newpad, GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps)); gst_pad_set_setcaps_function (newpad, GST_DEBUG_FUNCPTR (gst_adder_setcaps)); - gst_collectpads_add_pad (adder->collect, newpad, sizeof (GstCollectData)); + gst_collect_pads_add_pad (adder->collect, newpad, sizeof (GstCollectData)); if (!gst_element_add_pad (GST_ELEMENT (adder), newpad)) goto could_not_add; @@ -336,7 +336,7 @@ not_sink: } could_not_add: { - gst_collectpads_remove_pad (adder->collect, newpad); + gst_collect_pads_remove_pad (adder->collect, newpad); gst_object_unref (newpad); return NULL; } @@ -365,7 +365,7 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data) adder = GST_ADDER (user_data); /* get available bytes for reading */ - size = gst_collectpads_available (pads); + size = gst_collect_pads_available (pads); if (size == 0) return GST_FLOW_OK; @@ -388,7 +388,7 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data) GST_LOG_OBJECT (adder, "looking into channel %p", data); /* get pointer to copy size bytes */ - len = gst_collectpads_read (pads, data, &bytes, size); + len = gst_collect_pads_read (pads, data, &bytes, size); if (len == 0) continue; @@ -410,7 +410,7 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data) /* other buffers, need to add them */ adder->func ((gpointer) outbytes, (gpointer) bytes, len); } - gst_collectpads_flush (pads, data, len); + gst_collect_pads_flush (pads, data, len); } /* set timestamps on the output buffer */ @@ -459,14 +459,14 @@ gst_adder_change_state (GstElement * element, GstStateChange transition) case GST_STATE_CHANGE_READY_TO_PAUSED: adder->timestamp = 0; adder->offset = 0; - gst_collectpads_start (adder->collect); + gst_collect_pads_start (adder->collect); break; case GST_STATE_CHANGE_PAUSED_TO_PLAYING: break; case GST_STATE_CHANGE_PAUSED_TO_READY: /* need to unblock the collectpads before calling the * parent change_state so that streaming can finish */ - gst_collectpads_stop (adder->collect); + gst_collect_pads_stop (adder->collect); break; default: break;