Commit 67e168ae authored by Mark Nauwelaerts's avatar Mark Nauwelaerts

collectpads2: rename to collectpads

parent 04b4d30f
......@@ -106,7 +106,7 @@ static gboolean gst_text_overlay_setcaps (GstPad * pad, GstCaps * caps);
static GstPadLinkReturn gst_text_overlay_text_pad_linked (GstPad * pad,
GstPad * peer);
static void gst_text_overlay_text_pad_unlinked (GstPad * pad);
static GstFlowReturn gst_text_overlay_collected (GstCollectPads2 * pads,
static GstFlowReturn gst_text_overlay_collected (GstCollectPads * pads,
gpointer data);
static void gst_text_overlay_finalize (GObject * object);
static void gst_text_overlay_font_init (GstCairoTextOverlay * overlay);
......@@ -215,7 +215,7 @@ gst_text_overlay_finalize (GObject * object)
{
GstCairoTextOverlay *overlay = GST_CAIRO_TEXT_OVERLAY (object);
gst_collect_pads2_stop (overlay->collect);
gst_collect_pads_stop (overlay->collect);
gst_object_unref (overlay->collect);
g_free (overlay->text_fill_image);
......@@ -279,16 +279,16 @@ gst_text_overlay_init (GstCairoTextOverlay * overlay,
overlay->fps_n = 0;
overlay->fps_d = 1;
overlay->collect = gst_collect_pads2_new ();
overlay->collect = gst_collect_pads_new ();
gst_collect_pads2_set_function (overlay->collect,
gst_collect_pads_set_function (overlay->collect,
GST_DEBUG_FUNCPTR (gst_text_overlay_collected), overlay);
overlay->video_collect_data = gst_collect_pads2_add_pad (overlay->collect,
overlay->video_sinkpad, sizeof (GstCollectData2));
overlay->video_collect_data = gst_collect_pads_add_pad (overlay->collect,
overlay->video_sinkpad, sizeof (GstCollectData));
/* FIXME: hacked way to override/extend the event function of
* GstCollectPads2; because it sets its own event function giving the
* GstCollectPads; because it sets its own event function giving the
* element no access to events. Nicked from avimux. */
overlay->collect_event =
(GstPadEventFunction) GST_PAD_EVENTFUNC (overlay->video_sinkpad);
......@@ -640,8 +640,8 @@ gst_text_overlay_text_pad_linked (GstPad * pad, GstPad * peer)
GST_DEBUG_OBJECT (overlay, "Text pad linked");
if (overlay->text_collect_data == NULL) {
overlay->text_collect_data = gst_collect_pads2_add_pad (overlay->collect,
overlay->text_sinkpad, sizeof (GstCollectData2));
overlay->text_collect_data = gst_collect_pads_add_pad (overlay->collect,
overlay->text_sinkpad, sizeof (GstCollectData));
}
overlay->need_render = TRUE;
......@@ -660,7 +660,7 @@ gst_text_overlay_text_pad_unlinked (GstPad * pad)
GST_DEBUG_OBJECT (overlay, "Text pad unlinked");
if (overlay->text_collect_data) {
gst_collect_pads2_remove_pad (overlay->collect, overlay->text_sinkpad);
gst_collect_pads_remove_pad (overlay->collect, overlay->text_sinkpad);
overlay->text_collect_data = NULL;
}
......@@ -807,7 +807,7 @@ gst_text_overlay_pop_video (GstCairoTextOverlay * overlay)
{
GstBuffer *buf;
buf = gst_collect_pads2_pop (overlay->collect, overlay->video_collect_data);
buf = gst_collect_pads_pop (overlay->collect, overlay->video_collect_data);
g_return_if_fail (buf != NULL);
gst_buffer_unref (buf);
}
......@@ -818,7 +818,7 @@ gst_text_overlay_pop_text (GstCairoTextOverlay * overlay)
GstBuffer *buf;
if (overlay->text_collect_data) {
buf = gst_collect_pads2_pop (overlay->collect, overlay->text_collect_data);
buf = gst_collect_pads_pop (overlay->collect, overlay->text_collect_data);
g_return_if_fail (buf != NULL);
gst_buffer_unref (buf);
}
......@@ -828,7 +828,7 @@ gst_text_overlay_pop_text (GstCairoTextOverlay * overlay)
/* This function is called when there is data on all pads */
static GstFlowReturn
gst_text_overlay_collected (GstCollectPads2 * pads, gpointer data)
gst_text_overlay_collected (GstCollectPads * pads, gpointer data)
{
GstCairoTextOverlay *overlay;
GstFlowReturn ret = GST_FLOW_OK;
......@@ -842,14 +842,14 @@ gst_text_overlay_collected (GstCollectPads2 * pads, gpointer data)
GST_DEBUG ("Collecting");
video_frame = gst_collect_pads2_peek (overlay->collect,
video_frame = gst_collect_pads_peek (overlay->collect,
overlay->video_collect_data);
/* send EOS if video stream EOSed regardless of text stream */
if (video_frame == NULL) {
GST_DEBUG ("Video stream at EOS");
if (overlay->text_collect_data) {
text_buf = gst_collect_pads2_pop (overlay->collect,
text_buf = gst_collect_pads_pop (overlay->collect,
overlay->text_collect_data);
}
gst_pad_push_event (overlay->srcpad, gst_event_new_eos ());
......@@ -892,7 +892,7 @@ gst_text_overlay_collected (GstCollectPads2 * pads, gpointer data)
goto done;
}
text_buf = gst_collect_pads2_peek (overlay->collect,
text_buf = gst_collect_pads_peek (overlay->collect,
overlay->text_collect_data);
/* just push the video frame if the text stream has EOSed */
......@@ -1004,7 +1004,7 @@ gst_text_overlay_video_event (GstPad * pad, GstEvent * event)
gst_pad_push_event (overlay->srcpad, event);
}
/* now GstCollectPads2 can take care of the rest, e.g. EOS */
/* now GstCollectPads can take care of the rest, e.g. EOS */
ret = overlay->collect_event (pad, event);
gst_object_unref (overlay);
return ret;
......@@ -1018,12 +1018,12 @@ gst_text_overlay_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_READY_TO_PAUSED:
gst_collect_pads2_start (overlay->collect);
gst_collect_pads_start (overlay->collect);
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_collect_pads2_stop (overlay->collect);
gst_collect_pads_stop (overlay->collect);
break;
default:
break;
......
......@@ -3,7 +3,7 @@
#define __GST_CAIRO_TEXT_OVERLAY_H__
#include <gst/gst.h>
#include <gst/base/gstcollectpads2.h>
#include <gst/base/gstcollectpads.h>
G_BEGIN_DECLS
......@@ -45,9 +45,9 @@ struct _GstCairoTextOverlay {
GstPad *text_sinkpad;
GstPad *srcpad;
GstCollectPads2 *collect;
GstCollectData2 *video_collect_data;
GstCollectData2 *text_collect_data;
GstCollectPads *collect;
GstCollectData *video_collect_data;
GstCollectData *text_collect_data;
GstPadEventFunction collect_event;
gint width;
......
......@@ -190,10 +190,10 @@ static GstStaticPadTemplate audio_sink_factory =
static void gst_avi_mux_pad_reset (GstAviPad * avipad, gboolean free);
static GstFlowReturn gst_avi_mux_collect_pads (GstCollectPads2 * pads,
static GstFlowReturn gst_avi_mux_collect_pads (GstCollectPads * pads,
GstAviMux * avimux);
static gboolean gst_avi_mux_handle_event (GstCollectPads2 * pad,
GstCollectData2 * data, GstEvent * event, gpointer user_data);
static gboolean gst_avi_mux_handle_event (GstCollectPads * pad,
GstCollectData * data, GstEvent * event, gpointer user_data);
static GstPad *gst_avi_mux_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
static void gst_avi_mux_release_pad (GstElement * element, GstPad * pad);
......@@ -378,12 +378,12 @@ gst_avi_mux_init (GstAviMux * avimux)
/* property */
avimux->enable_large_avi = DEFAULT_BIGFILE;
avimux->collect = gst_collect_pads2_new ();
gst_collect_pads2_set_function (avimux->collect,
(GstCollectPads2Function) (GST_DEBUG_FUNCPTR (gst_avi_mux_collect_pads)),
avimux->collect = gst_collect_pads_new ();
gst_collect_pads_set_function (avimux->collect,
(GstCollectPadsFunction) (GST_DEBUG_FUNCPTR (gst_avi_mux_collect_pads)),
avimux);
gst_collect_pads2_set_event_function (avimux->collect,
(GstCollectPads2EventFunction) (GST_DEBUG_FUNCPTR
gst_collect_pads_set_event_function (avimux->collect,
(GstCollectPadsEventFunction) (GST_DEBUG_FUNCPTR
(gst_avi_mux_handle_event)), avimux);
/* set to clean state */
......@@ -979,7 +979,7 @@ gst_avi_mux_request_new_pad (GstElement * element,
g_free (name);
avipad->collect = gst_collect_pads2_add_pad (avimux->collect,
avipad->collect = gst_collect_pads_add_pad (avimux->collect,
newpad, sizeof (GstAviCollectData));
((GstAviCollectData *) (avipad->collect))->avipad = avipad;
......@@ -1034,7 +1034,7 @@ gst_avi_mux_release_pad (GstElement * element, GstPad * pad)
* as it also represent number of streams present */
avipad->collect = NULL;
GST_DEBUG_OBJECT (avimux, "removed pad '%s'", GST_PAD_NAME (pad));
gst_collect_pads2_remove_pad (avimux->collect, pad);
gst_collect_pads_remove_pad (avimux->collect, pad);
gst_element_remove_pad (element, pad);
/* if not started yet, we can remove any sign this pad ever existed */
/* in this case _start will take care of the real pad count */
......@@ -1831,7 +1831,7 @@ gst_avi_mux_restart_file (GstAviMux * avimux)
/* handle events (search) */
static gboolean
gst_avi_mux_handle_event (GstCollectPads2 * pads, GstCollectData2 * data,
gst_avi_mux_handle_event (GstCollectPads * pads, GstCollectData * data,
GstEvent * event, gpointer user_data)
{
GstAviMux *avimux;
......@@ -1879,7 +1879,7 @@ gst_avi_mux_handle_event (GstCollectPads2 * pads, GstCollectData2 * data,
}
if (event != NULL)
return gst_collect_pads2_event_default (pads, data, event, FALSE);
return gst_collect_pads_event_default (pads, data, event, FALSE);
return ret;
}
......@@ -1906,7 +1906,7 @@ gst_avi_mux_do_buffer (GstAviMux * avimux, GstAviPad * avipad)
guint flags;
gsize datasize;
data = gst_collect_pads2_pop (avimux->collect, avipad->collect);
data = gst_collect_pads_pop (avimux->collect, avipad->collect);
/* arrange downstream running time */
data = gst_buffer_make_writable (data);
GST_BUFFER_TIMESTAMP (data) =
......@@ -2030,7 +2030,7 @@ gst_avi_mux_do_one_buffer (GstAviMux * avimux)
if (!avipad->hdr.fcc_handler)
goto not_negotiated;
buffer = gst_collect_pads2_peek (avimux->collect, avipad->collect);
buffer = gst_collect_pads_peek (avimux->collect, avipad->collect);
if (!buffer)
continue;
time = GST_BUFFER_TIMESTAMP (buffer);
......@@ -2043,7 +2043,7 @@ gst_avi_mux_do_one_buffer (GstAviMux * avimux)
if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (time))) {
GST_DEBUG_OBJECT (avimux, "clipping buffer on pad %s outside segment",
GST_PAD_NAME (avipad->collect->pad));
buffer = gst_collect_pads2_pop (avimux->collect, avipad->collect);
buffer = gst_collect_pads_pop (avimux->collect, avipad->collect);
gst_buffer_unref (buffer);
return GST_FLOW_OK;
}
......@@ -2082,7 +2082,7 @@ not_negotiated:
}
static GstFlowReturn
gst_avi_mux_collect_pads (GstCollectPads2 * pads, GstAviMux * avimux)
gst_avi_mux_collect_pads (GstCollectPads * pads, GstAviMux * avimux)
{
GstFlowReturn res;
......@@ -2141,12 +2141,12 @@ gst_avi_mux_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_READY_TO_PAUSED:
gst_collect_pads2_start (avimux->collect);
gst_collect_pads_start (avimux->collect);
break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_collect_pads2_stop (avimux->collect);
gst_collect_pads_stop (avimux->collect);
break;
default:
break;
......
......@@ -23,7 +23,7 @@
#include <gst/gst.h>
#include <gst/base/gstcollectpads2.h>
#include <gst/base/gstcollectpads.h>
#include <gst/riff/riff-ids.h>
#include "avi-ids.h"
......@@ -74,7 +74,7 @@ typedef GstFlowReturn (*GstAviPadHook) (GstAviMux * avi, GstAviPad * avipad,
struct _GstAviPad {
/* do not extend, link to it */
/* is NULL if original sink request pad has been removed */
GstCollectData2 *collect;
GstCollectData *collect;
/* type */
gboolean is_video;
......@@ -129,7 +129,7 @@ typedef struct _GstAviAudioPad {
typedef struct _GstAviCollectData {
/* extend the CollectData */
GstCollectData2 collect;
GstCollectData collect;
GstAviPad *avipad;
} GstAviCollectData;
......@@ -143,7 +143,7 @@ struct _GstAviMux {
GSList *sinkpads;
/* video restricted to 1 pad */
guint video_pads, audio_pads;
GstCollectPads2 *collect;
GstCollectPads *collect;
/* the AVI header */
/* still some single stream video data in mux struct */
......
......@@ -91,10 +91,10 @@ G_DEFINE_TYPE_WITH_CODE (GstFlvMux, gst_flv_mux, GST_TYPE_ELEMENT,
static void gst_flv_mux_finalize (GObject * object);
static GstFlowReturn
gst_flv_mux_handle_buffer (GstCollectPads2 * pads, GstCollectData2 * cdata,
gst_flv_mux_handle_buffer (GstCollectPads * pads, GstCollectData * cdata,
GstBuffer * buf, gpointer user_data);
static gboolean
gst_flv_mux_handle_sink_event (GstCollectPads2 * pads, GstCollectData2 * data,
gst_flv_mux_handle_sink_event (GstCollectPads * pads, GstCollectData * data,
GstEvent * event, gpointer user_data);
static gboolean gst_flv_mux_handle_src_event (GstPad * pad, GstObject * parent,
......@@ -215,13 +215,13 @@ gst_flv_mux_init (GstFlvMux * mux)
mux->new_tags = FALSE;
mux->collect = gst_collect_pads2_new ();
gst_collect_pads2_set_buffer_function (mux->collect,
mux->collect = gst_collect_pads_new ();
gst_collect_pads_set_buffer_function (mux->collect,
GST_DEBUG_FUNCPTR (gst_flv_mux_handle_buffer), mux);
gst_collect_pads2_set_event_function (mux->collect,
gst_collect_pads_set_event_function (mux->collect,
GST_DEBUG_FUNCPTR (gst_flv_mux_handle_sink_event), mux);
gst_collect_pads2_set_clip_function (mux->collect,
GST_DEBUG_FUNCPTR (gst_collect_pads2_clip_running_time), mux);
gst_collect_pads_set_clip_function (mux->collect,
GST_DEBUG_FUNCPTR (gst_collect_pads_clip_running_time), mux);
gst_flv_mux_reset (GST_ELEMENT (mux));
}
......@@ -283,7 +283,7 @@ gst_flv_mux_handle_src_event (GstPad * pad, GstObject * parent,
}
static gboolean
gst_flv_mux_handle_sink_event (GstCollectPads2 * pads, GstCollectData2 * data,
gst_flv_mux_handle_sink_event (GstCollectPads * pads, GstCollectData * data,
GstEvent * event, gpointer user_data)
{
GstFlvMux *mux = GST_FLV_MUX (user_data);
......@@ -329,7 +329,7 @@ gst_flv_mux_handle_sink_event (GstCollectPads2 * pads, GstCollectData2 * data,
}
if (event != NULL)
return gst_collect_pads2_event_default (pads, data, event, FALSE);
return gst_collect_pads_event_default (pads, data, event, FALSE);
return ret;
}
......@@ -573,7 +573,7 @@ gst_flv_mux_request_new_pad (GstElement * element,
pad = gst_pad_new_from_template (templ, name);
cpad = (GstFlvPad *)
gst_collect_pads2_add_pad (mux->collect, pad, sizeof (GstFlvPad));
gst_collect_pads_add_pad (mux->collect, pad, sizeof (GstFlvPad));
cpad->audio_codec_data = NULL;
cpad->video_codec_data = NULL;
......@@ -592,7 +592,7 @@ gst_flv_mux_release_pad (GstElement * element, GstPad * pad)
GstFlvPad *cpad = (GstFlvPad *) gst_pad_get_element_private (pad);
gst_flv_mux_reset_pad (mux, cpad, cpad->video);
gst_collect_pads2_remove_pad (mux->collect, pad);
gst_collect_pads_remove_pad (mux->collect, pad);
gst_element_remove_pad (element, pad);
}
......@@ -788,7 +788,7 @@ tags:
guint64 dur;
for (l = mux->collect->data; l; l = l->next) {
GstCollectData2 *cdata = l->data;
GstCollectData *cdata = l->data;
if (gst_pad_peer_query_duration (cdata->pad, GST_FORMAT_TIME,
(gint64 *) & dur) && dur != GST_CLOCK_TIME_NONE) {
......@@ -1455,7 +1455,7 @@ gst_flv_mux_rewrite_header (GstFlvMux * mux)
}
static GstFlowReturn
gst_flv_mux_handle_buffer (GstCollectPads2 * pads, GstCollectData2 * cdata,
gst_flv_mux_handle_buffer (GstCollectPads * pads, GstCollectData * cdata,
GstBuffer * buffer, gpointer user_data)
{
GstFlvMux *mux = GST_FLV_MUX (user_data);
......@@ -1566,12 +1566,12 @@ gst_flv_mux_change_state (GstElement * element, GstStateChange transition)
case GST_STATE_CHANGE_NULL_TO_READY:
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
gst_collect_pads2_start (mux->collect);
gst_collect_pads_start (mux->collect);
break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_collect_pads2_stop (mux->collect);
gst_collect_pads_stop (mux->collect);
break;
default:
break;
......
......@@ -22,7 +22,7 @@
#define __GST_FLV_MUX_H__
#include <gst/gst.h>
#include <gst/base/gstcollectpads2.h>
#include <gst/base/gstcollectpads.h>
G_BEGIN_DECLS
......@@ -39,7 +39,7 @@ G_BEGIN_DECLS
typedef struct
{
GstCollectData2 collect;
GstCollectData collect;
gboolean video;
......@@ -65,7 +65,7 @@ typedef struct _GstFlvMux {
GstElement element;
GstPad *srcpad;
GstCollectPads2 *collect;
GstCollectPads *collect;
/* <private> */
GstFlvMuxState state;
......
......@@ -211,8 +211,8 @@ static gboolean gst_interleave_src_query (GstPad * pad, GstObject * parent,
static gboolean gst_interleave_src_event (GstPad * pad, GstObject * parent,
GstEvent * event);
static gboolean gst_interleave_sink_event (GstCollectPads2 * pads,
GstCollectData2 * data, GstEvent * event, gpointer user_data);
static gboolean gst_interleave_sink_event (GstCollectPads * pads,
GstCollectData * data, GstEvent * event, gpointer user_data);
static gboolean gst_interleave_sink_setcaps (GstInterleave * self,
GstPad * pad, const GstCaps * caps);
......@@ -220,7 +220,7 @@ static gboolean gst_interleave_sink_setcaps (GstInterleave * self,
static GstCaps *gst_interleave_sink_getcaps (GstPad * pad, GstObject * parent,
GstCaps * filter);
static GstFlowReturn gst_interleave_collected (GstCollectPads2 * pads,
static GstFlowReturn gst_interleave_collected (GstCollectPads * pads,
GstInterleave * self);
static void
......@@ -388,9 +388,9 @@ gst_interleave_init (GstInterleave * self)
gst_pad_set_active (self->src, TRUE);
gst_element_add_pad (GST_ELEMENT (self), self->src);
self->collect = gst_collect_pads2_new ();
gst_collect_pads2_set_function (self->collect,
(GstCollectPads2Function) gst_interleave_collected, self);
self->collect = gst_collect_pads_new ();
gst_collect_pads_set_function (self->collect,
(GstCollectPadsFunction) gst_interleave_collected, self);
self->input_channel_positions = g_value_array_new (0);
self->channel_positions_from_input = TRUE;
......@@ -477,10 +477,10 @@ gst_interleave_request_new_pad (GstElement * element, GstPadTemplate * templ,
gst_pad_use_fixed_caps (new_pad);
gst_collect_pads2_add_pad (self->collect, new_pad, sizeof (GstCollectData2));
gst_collect_pads_add_pad (self->collect, new_pad, sizeof (GstCollectData));
gst_collect_pads2_set_event_function (self->collect,
(GstCollectPads2EventFunction)
gst_collect_pads_set_event_function (self->collect,
(GstCollectPadsEventFunction)
GST_DEBUG_FUNCPTR (gst_interleave_sink_event), self);
if (!gst_element_add_pad (element, new_pad))
......@@ -524,7 +524,7 @@ not_sink_pad:
could_not_add:
{
GST_DEBUG_OBJECT (self, "could not add pad %s", GST_PAD_NAME (new_pad));
gst_collect_pads2_remove_pad (self->collect, new_pad);
gst_collect_pads_remove_pad (self->collect, new_pad);
gst_object_unref (new_pad);
return NULL;
}
......@@ -579,7 +579,7 @@ gst_interleave_release_pad (GstElement * element, GstPad * pad)
GST_OBJECT_UNLOCK (self->collect);
gst_collect_pads2_remove_pad (self->collect, pad);
gst_collect_pads_remove_pad (self->collect, pad);
gst_element_remove_pad (element, pad);
}
......@@ -601,7 +601,7 @@ gst_interleave_change_state (GstElement * element, GstStateChange transition)
self->segment_position = 0;
self->segment_rate = 1.0;
gst_segment_init (&self->segment, GST_FORMAT_UNDEFINED);
gst_collect_pads2_start (self->collect);
gst_collect_pads_start (self->collect);
break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break;
......@@ -610,11 +610,11 @@ gst_interleave_change_state (GstElement * element, GstStateChange transition)
}
/* Stop before calling the parent's state change function as
* GstCollectPads2 might take locks and we would deadlock in that
* GstCollectPads might take locks and we would deadlock in that
* case
*/
if (transition == GST_STATE_CHANGE_PAUSED_TO_READY)
gst_collect_pads2_stop (self->collect);
gst_collect_pads_stop (self->collect);
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
......@@ -812,7 +812,7 @@ invalid_caps:
}
static gboolean
gst_interleave_sink_event (GstCollectPads2 * pads, GstCollectData2 * data,
gst_interleave_sink_event (GstCollectPads * pads, GstCollectData * data,
GstEvent * event, gpointer user_data)
{
GstInterleave *self = GST_INTERLEAVE (user_data);
......@@ -845,9 +845,9 @@ gst_interleave_sink_event (GstCollectPads2 * pads, GstCollectData2 * data,
break;
}
/* now GstCollectPads2 can take care of the rest, e.g. EOS */
/* now GstCollectPads can take care of the rest, e.g. EOS */
if (event != NULL)
return gst_collect_pads2_event_default (pads, data, event, FALSE);
return gst_collect_pads_event_default (pads, data, event, FALSE);
return ret;
}
......@@ -1138,7 +1138,7 @@ gst_interleave_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
/* check if we are flushing */
if (flags & GST_SEEK_FLAG_FLUSH) {
/* make sure we accept nothing anymore and return WRONG_STATE */
gst_collect_pads2_set_flushing (self->collect, TRUE);
gst_collect_pads_set_flushing (self->collect, TRUE);
/* flushing seek, start flush downstream, the flush will be done
* when all pads received a FLUSH_STOP. */
......@@ -1172,7 +1172,7 @@ gst_interleave_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
}
static GstFlowReturn
gst_interleave_collected (GstCollectPads2 * pads, GstInterleave * self)
gst_interleave_collected (GstCollectPads * pads, GstInterleave * self)
{
guint size;
GstBuffer *outbuf;
......@@ -1189,7 +1189,7 @@ gst_interleave_collected (GstCollectPads2 * pads, GstInterleave * self)
g_return_val_if_fail (self->channels > 0, GST_FLOW_NOT_NEGOTIATED);
g_return_val_if_fail (self->rate > 0, GST_FLOW_NOT_NEGOTIATED);
size = gst_collect_pads2_available (pads);
size = gst_collect_pads_available (pads);
g_return_val_if_fail (size % width == 0, GST_FLOW_ERROR);
......@@ -1209,14 +1209,14 @@ gst_interleave_collected (GstCollectPads2 * pads, GstInterleave * self)
memset (write_info.data, 0, size * self->channels);
for (collected = pads->data; collected != NULL; collected = collected->next) {
GstCollectData2 *cdata;
GstCollectData *cdata;
GstBuffer *inbuf;
guint8 *outdata;
GstMapInfo input_info;
cdata = (GstCollectData2 *) collected->data;
cdata = (GstCollectData *) collected->data;
inbuf = gst_collect_pads2_take_buffer (pads, cdata, size);
inbuf = gst_collect_pads_take_buffer (pads, cdata, size);
if (inbuf == NULL) {
GST_DEBUG_OBJECT (cdata->pad, "No buffer available");
goto next;
......
......@@ -27,7 +27,7 @@
#define __INTERLEAVE_H__
#include <gst/gst.h>
#include <gst/base/gstcollectpads2.h>
#include <gst/base/gstcollectpads.h>
G_BEGIN_DECLS
......@@ -49,7 +49,7 @@ struct _GstInterleave
GstElement element;
/*< private >*/
GstCollectPads2 *collect;
GstCollectPads *collect;
gint channels;
gint padcounter;
......
......@@ -116,7 +116,7 @@
#include <glib/gstdio.h>
#include <gst/gst.h>
#include <gst/base/gstcollectpads2.h>
#include <gst/base/gstcollectpads.h>
#include <gst/audio/audio.h>
#include <gst/video/video.h>
#include <gst/tag/xmpwriter.h>
......@@ -226,11 +226,11 @@ static GstPad *gst_qt_mux_request_new_pad (GstElement * element,
static void gst_qt_mux_release_pad (GstElement * element, GstPad * pad);
/* event */
static gboolean gst_qt_mux_sink_event (GstCollectPads2 * pads,
GstCollectData2 * data, GstEvent * event, gpointer user_data);
static gboolean gst_qt_mux_sink_event (GstCollectPads * pads,
GstCollectData * data, GstEvent * event, gpointer user_data);
static GstFlowReturn gst_qt_mux_handle_buffer (GstCollectPads2 * pads,
GstCollectData2 * cdata, GstBuffer * buf, gpointer user_data);
static GstFlowReturn gst_qt_mux_handle_buffer (GstCollectPads * pads,
GstCollectData * cdata, GstBuffer * buf, gpointer user_data);
static GstFlowReturn gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad,
GstBuffer * buf);
......@@ -482,13 +482,13 @@ gst_qt_mux_init (GstQTMux * qtmux, GstQTMuxClass * qtmux_klass)
gst_element_add_pad (GST_ELEMENT (qtmux), qtmux->srcpad);
qtmux->sinkpads = NULL;
qtmux->collect = gst_collect_pads2_new ();
gst_collect_pads2_set_buffer_function (qtmux->collect,
qtmux->collect = gst_collect_pads_new ();
gst_collect_pads_set_buffer_function (qtmux->collect,
GST_DEBUG_FUNCPTR (gst_qt_mux_handle_buffer), qtmux);
gst_collect_pads2_set_event_function (qtmux->collect,
gst_collect_pads_set_event_function (qtmux->collect,
GST_DEBUG_FUNCPTR (gst_qt_mux_sink_event), qtmux);
gst_collect_pads2_set_clip_function (qtmux->collect,
GST_DEBUG_FUNCPTR (gst_collect_pads2_clip_running_time), qtmux);
gst_collect_pads_set_clip_function (qtmux->collect,
GST_DEBUG_FUNCPTR (gst_collect_pads_clip_running_time), qtmux);
/* properties set to default upon construction */
......@@ -1691,7 +1691,7 @@ gst_qt_mux_start_file (GstQTMux * qtmux)
gst_buffer_unref (prefix);
for (walk = qtmux->sinkpads; walk && !fail; walk = g_slist_next (walk)) {
GstCollectData2 *cdata = (GstCollectData2 *) walk->data;
GstCollectData *cdata = (GstCollectData *) walk->data;
GstQTPad *qpad = (GstQTPad *) cdata;
/* write info for each stream */
fail = atoms_recov_write_trak_info (qtmux->moov_recov_file, qpad->trak);
......@@ -1791,7 +1791,7 @@ gst_qt_mux_stop_file (GstQTMux * qtmux)
/* pushing last buffers for each pad */
for (walk = qtmux->collect->data; walk; walk = g_slist_next (walk)) {
GstCollectData2 *cdata = (GstCollectData2 *) walk->data;
GstCollectData *cdata = (GstCollectData *) walk->data;
GstQTPad *qtpad = (GstQTPad *) cdata;
/* avoid add_buffer complaining if not negotiated
......@@ -1883,7 +1883,7 @@ gst_qt_mux_stop_file (GstQTMux * qtmux)
/* check for late streams */
first_ts = GST_CLOCK_TIME_NONE;
for (walk = qtmux->collect->data; walk; walk = g_slist_next (walk)) {
GstCollectData2 *cdata = (GstCollectData2 *) walk->data;
GstCollectData *cdata = (GstCollectData *) walk->data;
GstQTPad *qtpad = (GstQTPad *) cdata;
if (!GST_CLOCK_TIME_IS_VALID (first_ts) ||
......@@ -1896,7 +1896,7 @@ gst_qt_mux_stop_file (GstQTMux * qtmux)
GST_TIME_ARGS (first_ts));
/* add EDTSs for late streams */
for (walk = qtmux->collect->data; walk; walk = g_slist_next (walk)) {
GstCollectData2 *cdata = (GstCollectData2 *) walk->data;
GstCollectData *cdata = (GstCollectData *) walk->data;
GstQTPad *qtpad = (GstQTPad *) cdata;
guint32 lateness;
guint32 duration;
......@@ -2550,7 +2550,7 @@ not_negotiated:
}
static GstFlowReturn
gst_qt_mux_handle_buffer (GstCollectPads2 * pads, GstCollectData2 * cdata,
gst_qt_mux_handle_buffer (GstCollectPads * pads, GstCollectData * cdata,
GstBuffer * buf, gpointer user_data)
{
GstFlowReturn ret = GST_FLOW_OK;
......@@ -3274,7 +3274,7 @@ refuse_renegotiation:
}
static gboolean
gst_qt_mux_sink_event (GstCollectPads2 * pads, GstCollectData2 * data,
gst_qt_mux_sink_event (GstCollectPads * pads, GstCollectData * data,
GstEvent * event, gpointer user_data)
{
GstQTMux *qtmux;
......@@ -3337,7 +3337,7 @@ gst_qt_mux_sink_event (GstCollectPads2 * pads, GstCollectData2 * data,
}
if (event != NULL)
return gst_collect_pads2_event_default (pads, data, event, FALSE);
return gst_collect_pads_event_default (pads, data, event, FALSE);
return ret;
}
......@@ -3361,7 +3361,7 @@ gst_qt_mux_release_pad (GstElement * element, GstPad * pad)
}
}
gst_collect_pads2_remove_pad (mux->collect, pad);
gst_collect_pads_remove_pad (mux->collect, pad);
}
static GstPad *
......@@ -3405,8 +3405,8 @@ gst_qt_mux_request_new_pad (GstElement * element,
newpad = gst_pad_new_from_template (templ, name);
g_free (name);
collect_pad = (GstQTPad *)
gst_collect_pads2_add_pad_full (qtmux->collect, newpad, sizeof (GstQTPad),
(GstCollectData2DestroyNotify) (gst_qt_mux_pad_reset), TRUE);
gst_collect_pads_add_pad_full (qtmux->collect, newpad, sizeof (GstQTPad),
(GstCollectDataDestroyNotify) (gst_qt_mux_pad_reset), TRUE);
/* set up pad */
gst_qt_mux_pad_reset (collect_pad);
collect_pad->trak = atom_trak_new (qtmux->context);
......@@ -3556,13 +3556,13 @@ gst_qt_mux_change_state (GstElement * element, GstStateChange transition)
case GST_STATE_CHANGE_NULL_TO_READY:
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
gst_collect_pads2_start (qtmux->collect);
gst_collect_pads_start (qtmux->collect);
qtmux->state = GST_QT_MUX_STATE_STARTED;
break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_collect_pads2_stop (qtmux->collect);
gst_collect_pads_stop (qtmux->collect);
break;
default:
break;
......
......@@ -44,7 +44,7 @@
#define __GST_QT_MUX_H__
#include <gst/gst.h>
#include <gst/base/gstcollectpads2.h>
#include <gst/base/gstcollectpads.h>
#include "fourcc.h"
#include "atoms.h"
......@@ -82,7 +82,7 @@ typedef GstBuffer * (*GstQTPadPrepareBufferFunc) (GstQTPad * pad,