From 738ee836f3f44d9c9bdd9612813967ff22f22076 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Wed, 14 Dec 2011 19:10:53 +0000 Subject: [PATCH] multipartmux: port to GstCollectPads2 --- gst/multipart/multipartmux.c | 20 ++++++++++---------- gst/multipart/multipartmux.h | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gst/multipart/multipartmux.c b/gst/multipart/multipartmux.c index 9d3e56a..0417b76 100644 --- a/gst/multipart/multipartmux.c +++ b/gst/multipart/multipartmux.c @@ -88,7 +88,7 @@ static GstPad *gst_multipart_mux_request_new_pad (GstElement * element, static GstStateChangeReturn gst_multipart_mux_change_state (GstElement * element, GstStateChange transition); -static GstFlowReturn gst_multipart_mux_collected (GstCollectPads * pads, +static GstFlowReturn gst_multipart_mux_collected (GstCollectPads2 * pads, GstMultipartMux * mux); static void gst_multipart_mux_set_property (GObject * object, guint prop_id, @@ -180,9 +180,9 @@ gst_multipart_mux_init (GstMultipartMux * multipart_mux) multipart_mux->boundary = g_strdup (DEFAULT_BOUNDARY); - multipart_mux->collect = gst_collect_pads_new (); - gst_collect_pads_set_function (multipart_mux->collect, - (GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_multipart_mux_collected), + multipart_mux->collect = gst_collect_pads2_new (); + gst_collect_pads2_set_function (multipart_mux->collect, + (GstCollectPads2Function) GST_DEBUG_FUNCPTR (gst_multipart_mux_collected), multipart_mux); } @@ -226,7 +226,7 @@ gst_multipart_mux_request_new_pad (GstElement * element, GstMultipartPadData *multipartpad; multipartpad = (GstMultipartPadData *) - gst_collect_pads_add_pad (multipart_mux->collect, newpad, + gst_collect_pads2_add_pad (multipart_mux->collect, newpad, sizeof (GstMultipartPadData)); /* save a pointer to our data in the pad */ @@ -375,7 +375,7 @@ gst_multipart_mux_queue_pads (GstMultipartMux * mux) /* try to make sure we have a buffer from each usable pad first */ walk = mux->collect->data; while (walk) { - GstCollectData *data = (GstCollectData *) walk->data; + GstCollectData2 *data = (GstCollectData2 *) walk->data; GstMultipartPadData *pad = (GstMultipartPadData *) data; walk = g_slist_next (walk); @@ -384,7 +384,7 @@ gst_multipart_mux_queue_pads (GstMultipartMux * mux) if (pad->buffer == NULL) { GstBuffer *buf = NULL; - buf = gst_collect_pads_pop (mux->collect, data); + buf = gst_collect_pads2_pop (mux->collect, data); /* Store timestamp with segment_start and preroll */ if (buf && GST_BUFFER_TIMESTAMP_IS_VALID (buf)) { @@ -418,7 +418,7 @@ gst_multipart_mux_queue_pads (GstMultipartMux * mux) * 3) push both buffers on best pad, go to 1 */ static GstFlowReturn -gst_multipart_mux_collected (GstCollectPads * pads, GstMultipartMux * mux) +gst_multipart_mux_collected (GstCollectPads2 * pads, GstMultipartMux * mux) { GstMultipartPadData *best; GstFlowReturn ret = GST_FLOW_OK; @@ -648,11 +648,11 @@ gst_multipart_mux_change_state (GstElement * element, GstStateChange transition) multipart_mux->negotiated = FALSE; multipart_mux->need_segment = TRUE; GST_DEBUG_OBJECT (multipart_mux, "starting collect pads"); - gst_collect_pads_start (multipart_mux->collect); + gst_collect_pads2_start (multipart_mux->collect); break; case GST_STATE_CHANGE_PAUSED_TO_READY: GST_DEBUG_OBJECT (multipart_mux, "stopping collect pads"); - gst_collect_pads_stop (multipart_mux->collect); + gst_collect_pads2_stop (multipart_mux->collect); break; default: break; diff --git a/gst/multipart/multipartmux.h b/gst/multipart/multipartmux.h index a52db36..1ea2d8a 100644 --- a/gst/multipart/multipartmux.h +++ b/gst/multipart/multipartmux.h @@ -23,7 +23,7 @@ #define __GST_MULTIPART_MUX__ #include -#include +#include #include @@ -42,7 +42,7 @@ typedef struct _GstMultipartMuxClass GstMultipartMuxClass; /* all information needed for one multipart stream */ typedef struct { - GstCollectData collect; /* we extend the CollectData */ + GstCollectData2 collect; /* we extend the CollectData2 */ GstBuffer *buffer; /* the queued buffer for this pad */ GstClockTime timestamp; /* its timestamp, converted to running_time so that we can @@ -63,7 +63,7 @@ struct _GstMultipartMux GstPad *srcpad; /* sinkpads */ - GstCollectPads *collect; + GstCollectPads2 *collect; gint numpads; -- 2.7.4