collectpads2: rename to collectpads
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 17 Apr 2012 13:14:27 +0000 (15:14 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 17 Apr 2012 13:14:27 +0000 (15:14 +0200)
19 files changed:
ext/cairo/gsttextoverlay.c
ext/cairo/gsttextoverlay.h
gst/avi/gstavimux.c
gst/avi/gstavimux.h
gst/flv/gstflvmux.c
gst/flv/gstflvmux.h
gst/interleave/interleave.c
gst/interleave/interleave.h
gst/isomp4/gstqtmux.c
gst/isomp4/gstqtmux.h
gst/matroska/matroska-mux.c
gst/matroska/matroska-mux.h
gst/multipart/multipartmux.c
gst/multipart/multipartmux.h
gst/smpte/gstsmpte.c
gst/smpte/gstsmpte.h
gst/videomixer/videomixer2.c
gst/videomixer/videomixer2.h
gst/videomixer/videomixer2pad.h

index 6c01a31..d14c50a 100644 (file)
@@ -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;
index 1f98d3d..3476319 100644 (file)
@@ -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;
index 32084d5..573de47 100644 (file)
@@ -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;
index cb0cdb7..f1ce706 100644 (file)
@@ -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 */
index 8b10cd5..2b44a18 100644 (file)
@@ -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;
index b0e10ea..ca0b2e1 100644 (file)
@@ -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;
index 5d8b1e1..f8ef9f6 100644 (file)
@@ -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;
index abe3439..fb3b274 100644 (file)
@@ -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;
index 37bf916..3c1636a 100644 (file)
 #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;
index c17ff25..a0d2b53 100644 (file)
@@ -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,
 
 struct _GstQTPad
 {
-  GstCollectData2 collect;       /* we extend the CollectData2 */
+  GstCollectData collect;       /* we extend the CollectData */
 
   /* fourcc id of stream */
   guint32 fourcc;
@@ -145,7 +145,7 @@ struct _GstQTMux
   GstElement element;
 
   GstPad *srcpad;
-  GstCollectPads2 *collect;
+  GstCollectPads *collect;
   GSList *sinkpads;
 
   /* state */
index 4cb87da..292617f 100644 (file)
@@ -208,10 +208,10 @@ G_DEFINE_TYPE_WITH_CODE (GstMatroskaMux, gst_matroska_mux, GST_TYPE_ELEMENT,
 static void gst_matroska_mux_finalize (GObject * object);
 
 /* Pads collected callback */
-static GstFlowReturn gst_matroska_mux_handle_buffer (GstCollectPads2 * pads,
-    GstCollectData2 * data, GstBuffer * buf, gpointer user_data);
-static gboolean gst_matroska_mux_handle_sink_event (GstCollectPads2 * pads,
-    GstCollectData2 * data, GstEvent * event, gpointer user_data);
+static GstFlowReturn gst_matroska_mux_handle_buffer (GstCollectPads * pads,
+    GstCollectData * data, GstBuffer * buf, gpointer user_data);
+static gboolean gst_matroska_mux_handle_sink_event (GstCollectPads * pads,
+    GstCollectData * data, GstEvent * event, gpointer user_data);
 
 /* pad functions */
 static gboolean gst_matroska_mux_handle_src_event (GstPad * pad,
@@ -426,12 +426,12 @@ gst_matroska_mux_init (GstMatroskaMux * mux)
   gst_pad_set_event_function (mux->srcpad, gst_matroska_mux_handle_src_event);
   gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad);
 
-  mux->collect = gst_collect_pads2_new ();
-  gst_collect_pads2_set_clip_function (mux->collect,
-      GST_DEBUG_FUNCPTR (gst_collect_pads2_clip_running_time), mux);
-  gst_collect_pads2_set_buffer_function (mux->collect,
+  mux->collect = gst_collect_pads_new ();
+  gst_collect_pads_set_clip_function (mux->collect,
+      GST_DEBUG_FUNCPTR (gst_collect_pads_clip_running_time), mux);
+  gst_collect_pads_set_buffer_function (mux->collect,
       GST_DEBUG_FUNCPTR (gst_matroska_mux_handle_buffer), mux);
-  gst_collect_pads2_set_event_function (mux->collect,
+  gst_collect_pads_set_event_function (mux->collect,
       GST_DEBUG_FUNCPTR (gst_matroska_mux_handle_sink_event), mux);
 
   mux->ebml_write = gst_ebml_write_new (mux->srcpad);
@@ -738,8 +738,8 @@ gst_matroska_mux_build_vobsub_private (GstMatroskaTrackContext * context,
  * Returns: #TRUE on success.
  */
 static gboolean
-gst_matroska_mux_handle_sink_event (GstCollectPads2 * pads,
-    GstCollectData2 * data, GstEvent * event, gpointer user_data)
+gst_matroska_mux_handle_sink_event (GstCollectPads * pads,
+    GstCollectData * data, GstEvent * event, gpointer user_data)
 {
   GstMatroskaPad *collect_pad;
   GstMatroskaTrackContext *context;
@@ -861,7 +861,7 @@ gst_matroska_mux_handle_sink_event (GstCollectPads2 * pads,
   }
 
   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;
 }
@@ -2146,9 +2146,9 @@ gst_matroska_mux_request_new_pad (GstElement * element,
 
   gst_matroskamux_pad_init (newpad);
   collect_pad = (GstMatroskaPad *)
-      gst_collect_pads2_add_pad_full (mux->collect, GST_PAD (newpad),
+      gst_collect_pads_add_pad_full (mux->collect, GST_PAD (newpad),
       sizeof (GstMatroskamuxPad),
-      (GstCollectData2DestroyNotify) gst_matroska_pad_free, locked);
+      (GstCollectDataDestroyNotify) gst_matroska_pad_free, locked);
 
   collect_pad->track = context;
   gst_matroska_pad_reset (collect_pad, FALSE);
@@ -2190,7 +2190,7 @@ gst_matroska_mux_release_pad (GstElement * element, GstPad * pad)
   mux = GST_MATROSKA_MUX (GST_PAD_PARENT (pad));
 
   for (walk = mux->collect->data; walk; walk = g_slist_next (walk)) {
-    GstCollectData2 *cdata = (GstCollectData2 *) walk->data;
+    GstCollectData *cdata = (GstCollectData *) walk->data;
     GstMatroskaPad *collect_pad = (GstMatroskaPad *) cdata;
 
     if (cdata->pad == pad) {
@@ -2211,7 +2211,7 @@ gst_matroska_mux_release_pad (GstElement * element, GstPad * pad)
     }
   }
 
-  gst_collect_pads2_remove_pad (mux->collect, pad);
+  gst_collect_pads_remove_pad (mux->collect, pad);
   if (gst_element_remove_pad (element, pad))
     mux->num_streams--;
 }
@@ -3363,7 +3363,7 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad,
 
 /**
  * gst_matroska_mux_handle_buffer:
- * @pads: #GstCollectPads2
+ * @pads: #GstCollectPads
  * @uuser_data: #GstMatroskaMux
  *
  * Collectpads callback.
@@ -3371,7 +3371,7 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad,
  * Returns: #GstFlowReturn
  */
 static GstFlowReturn
-gst_matroska_mux_handle_buffer (GstCollectPads2 * pads, GstCollectData2 * data,
+gst_matroska_mux_handle_buffer (GstCollectPads * pads, GstCollectData * data,
     GstBuffer * buf, gpointer user_data)
 {
   GstMatroskaMux *mux = GST_MATROSKA_MUX (user_data);
@@ -3465,12 +3465,12 @@ gst_matroska_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;
index 3e14627..2df0ec9 100644 (file)
@@ -24,7 +24,7 @@
 #define __GST_MATROSKA_MUX_H__
 
 #include <gst/gst.h>
-#include <gst/base/gstcollectpads2.h>
+#include <gst/base/gstcollectpads.h>
 
 #include "ebml-write.h"
 #include "matroska-ids.h"
@@ -58,7 +58,7 @@ typedef gboolean (*GstMatroskaCapsFunc) (GstPad *pad, GstCaps *caps);
 /* all information needed for one matroska stream */
 typedef struct
 {
-  GstCollectData2 collect;       /* we extend the CollectData */
+  GstCollectData collect;       /* we extend the CollectData */
   GstMatroskaCapsFunc capsfunc;
   GstMatroskaTrackContext *track;
 
@@ -77,7 +77,7 @@ typedef struct _GstMatroskaMux {
 
   /* pads */
   GstPad        *srcpad;
-  GstCollectPads2 *collect;
+  GstCollectPads *collect;
   GstEbmlWrite *ebml_write;
 
   guint          num_streams,
index daeb11b..38d3711 100644 (file)
@@ -84,7 +84,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 (GstCollectPads2 * pads,
+static GstFlowReturn gst_multipart_mux_collected (GstCollectPads * pads,
     GstMultipartMux * mux);
 
 static void gst_multipart_mux_set_property (GObject * object, guint prop_id,
@@ -148,9 +148,9 @@ gst_multipart_mux_init (GstMultipartMux * multipart_mux)
 
   multipart_mux->boundary = g_strdup (DEFAULT_BOUNDARY);
 
-  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->collect = gst_collect_pads_new ();
+  gst_collect_pads_set_function (multipart_mux->collect,
+      (GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_multipart_mux_collected),
       multipart_mux);
 }
 
@@ -194,7 +194,7 @@ gst_multipart_mux_request_new_pad (GstElement * element,
     GstMultipartPadData *multipartpad;
 
     multipartpad = (GstMultipartPadData *)
-        gst_collect_pads2_add_pad (multipart_mux->collect, newpad,
+        gst_collect_pads_add_pad (multipart_mux->collect, newpad,
         sizeof (GstMultipartPadData));
 
     /* save a pointer to our data in the pad */
@@ -340,7 +340,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) {
-    GstCollectData2 *data = (GstCollectData2 *) walk->data;
+    GstCollectData *data = (GstCollectData *) walk->data;
     GstMultipartPadData *pad = (GstMultipartPadData *) data;
 
     walk = g_slist_next (walk);
@@ -349,7 +349,7 @@ gst_multipart_mux_queue_pads (GstMultipartMux * mux)
     if (pad->buffer == NULL) {
       GstBuffer *buf = NULL;
 
-      buf = gst_collect_pads2_pop (mux->collect, data);
+      buf = gst_collect_pads_pop (mux->collect, data);
 
       /* Store timestamp with segment_start and preroll */
       if (buf && GST_BUFFER_TIMESTAMP_IS_VALID (buf)) {
@@ -383,7 +383,7 @@ gst_multipart_mux_queue_pads (GstMultipartMux * mux)
  * 3) push both buffers on best pad, go to 1
  */
 static GstFlowReturn
-gst_multipart_mux_collected (GstCollectPads2 * pads, GstMultipartMux * mux)
+gst_multipart_mux_collected (GstCollectPads * pads, GstMultipartMux * mux)
 {
   GstMultipartPadData *best;
   GstFlowReturn ret = GST_FLOW_OK;
@@ -606,11 +606,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_pads2_start (multipart_mux->collect);
+      gst_collect_pads_start (multipart_mux->collect);
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       GST_DEBUG_OBJECT (multipart_mux, "stopping collect pads");
-      gst_collect_pads2_stop (multipart_mux->collect);
+      gst_collect_pads_stop (multipart_mux->collect);
       break;
     default:
       break;
index 4583b50..d2711ac 100644 (file)
@@ -23,7 +23,7 @@
 #define __GST_MULTIPART_MUX__
 
 #include <gst/gst.h>
-#include <gst/base/gstcollectpads2.h>
+#include <gst/base/gstcollectpads.h>
 
 #include <string.h>
 
@@ -42,7 +42,7 @@ typedef struct _GstMultipartMuxClass GstMultipartMuxClass;
 /* all information needed for one multipart stream */
 typedef struct
 {
-  GstCollectData2 collect;       /* we extend the CollectData2 */
+  GstCollectData collect;       /* we extend the CollectData */
 
   GstBuffer *buffer;            /* the queued buffer for this pad */
   GstClockTime timestamp;       /* its timestamp, converted to running_time so that we can
@@ -64,7 +64,7 @@ struct _GstMultipartMux
   GstPad *srcpad;
 
   /* sinkpads */
-  GstCollectPads2 *collect;
+  GstCollectPads *collect;
 
   gint numpads;
 
index c399011..c2ed40a 100644 (file)
@@ -148,7 +148,7 @@ gst_smpte_transition_type_get_type (void)
 
 static void gst_smpte_finalize (GstSMPTE * smpte);
 
-static GstFlowReturn gst_smpte_collected (GstCollectPads2 * pads,
+static GstFlowReturn gst_smpte_collected (GstCollectPads * pads,
     GstSMPTE * smpte);
 
 static void gst_smpte_set_property (GObject * object, guint prop_id,
@@ -313,8 +313,8 @@ gst_smpte_setcaps (GstPad * pad, GstCaps * caps)
 }
 
 static gboolean
-gst_smpte_sink_event (GstCollectPads2 * pads,
-    GstCollectData2 * data, GstEvent * event, gpointer user_data)
+gst_smpte_sink_event (GstCollectPads * pads,
+    GstCollectData * data, GstEvent * event, gpointer user_data)
 {
   GstPad *pad;
   gboolean ret = FALSE;
@@ -337,7 +337,7 @@ gst_smpte_sink_event (GstCollectPads2 * pads,
   }
 
   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;
 }
@@ -359,16 +359,16 @@ gst_smpte_init (GstSMPTE * smpte)
       gst_pad_new_from_static_template (&gst_smpte_src_template, "src");
   gst_element_add_pad (GST_ELEMENT (smpte), smpte->srcpad);
 
-  smpte->collect = gst_collect_pads2_new ();
-  gst_collect_pads2_set_function (smpte->collect,
-      (GstCollectPads2Function) GST_DEBUG_FUNCPTR (gst_smpte_collected), smpte);
-  gst_collect_pads2_set_event_function (smpte->collect,
+  smpte->collect = gst_collect_pads_new ();
+  gst_collect_pads_set_function (smpte->collect,
+      (GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_smpte_collected), smpte);
+  gst_collect_pads_set_event_function (smpte->collect,
       GST_DEBUG_FUNCPTR (gst_smpte_sink_event), smpte);
 
-  gst_collect_pads2_add_pad (smpte->collect, smpte->sinkpad1,
-      sizeof (GstCollectData2));
-  gst_collect_pads2_add_pad (smpte->collect, smpte->sinkpad2,
-      sizeof (GstCollectData2));
+  gst_collect_pads_add_pad (smpte->collect, smpte->sinkpad1,
+      sizeof (GstCollectData));
+  gst_collect_pads_add_pad (smpte->collect, smpte->sinkpad2,
+      sizeof (GstCollectData));
 
   smpte->fps = DEFAULT_PROP_FPS;
   smpte->type = DEFAULT_PROP_TYPE;
@@ -462,7 +462,7 @@ gst_smpte_blend_i420 (GstVideoFrame * frame1, GstVideoFrame * frame2,
 }
 
 static GstFlowReturn
-gst_smpte_collected (GstCollectPads2 * pads, GstSMPTE * smpte)
+gst_smpte_collected (GstCollectPads * pads, GstSMPTE * smpte)
 {
   GstBuffer *outbuf;
   GstClockTime ts;
@@ -482,14 +482,14 @@ gst_smpte_collected (GstCollectPads2 * pads, GstSMPTE * smpte)
       smpte->fps_denom, smpte->fps_num);
 
   for (collected = pads->data; collected; collected = g_slist_next (collected)) {
-    GstCollectData2 *data;
+    GstCollectData *data;
 
-    data = (GstCollectData2 *) collected->data;
+    data = (GstCollectData *) collected->data;
 
     if (data->pad == smpte->sinkpad1)
-      in1 = gst_collect_pads2_pop (pads, data);
+      in1 = gst_collect_pads_pop (pads, data);
     else if (data->pad == smpte->sinkpad2)
-      in2 = gst_collect_pads2_pop (pads, data);
+      in2 = gst_collect_pads_pop (pads, data);
   }
 
   if (in1 == NULL) {
@@ -661,11 +661,11 @@ gst_smpte_change_state (GstElement * element, GstStateChange transition)
     case GST_STATE_CHANGE_READY_TO_PAUSED:
       gst_smpte_reset (smpte);
       GST_LOG_OBJECT (smpte, "starting collectpads");
-      gst_collect_pads2_start (smpte->collect);
+      gst_collect_pads_start (smpte->collect);
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       GST_LOG_OBJECT (smpte, "stopping collectpads");
-      gst_collect_pads2_stop (smpte->collect);
+      gst_collect_pads_stop (smpte->collect);
       break;
     default:
       break;
index 65c37e8..cc48108 100644 (file)
@@ -22,7 +22,7 @@
 #define __GST_SMPTE_H__
 
 #include <gst/gst.h>
-#include <gst/base/gstcollectpads2.h>
+#include <gst/base/gstcollectpads.h>
 #include <gst/video/video.h>
 
 G_BEGIN_DECLS
@@ -50,7 +50,7 @@ struct _GstSMPTE {
   GstPad        *srcpad,
                 *sinkpad1,
                 *sinkpad2;
-  GstCollectPads2 *collect;
+  GstCollectPads *collect;
 
   /* properties */
   gint           type;
index e559221..804b060 100644 (file)
@@ -127,7 +127,7 @@ static void gst_videomixer2_reset_qos (GstVideoMixer2 * mix);
 
 struct _GstVideoMixer2Collect
 {
-  GstCollectData2 collect;      /* we extend the CollectData */
+  GstCollectData collect;       /* we extend the CollectData */
 
   GstVideoMixer2Pad *mixpad;
 
@@ -154,7 +154,7 @@ enum
 G_DEFINE_TYPE (GstVideoMixer2Pad, gst_videomixer2_pad, GST_TYPE_PAD);
 
 static void
-gst_videomixer2_collect_free (GstCollectData2 * data)
+gst_videomixer2_collect_free (GstCollectData * data)
 {
   GstVideoMixer2Collect *cdata = (GstVideoMixer2Collect *) data;
 
@@ -660,7 +660,7 @@ gst_videomixer2_fill_queues (GstVideoMixer2 * mix,
     GstSegment *segment = &pad->mixcol->collect.segment;
     GstBuffer *buf;
 
-    buf = gst_collect_pads2_peek (mix->collect, &mixcol->collect);
+    buf = gst_collect_pads_peek (mix->collect, &mixcol->collect);
     if (buf) {
       GstClockTime start_time, end_time;
 
@@ -678,7 +678,7 @@ gst_videomixer2_fill_queues (GstVideoMixer2 * mix,
               && start_time < GST_BUFFER_TIMESTAMP (mixcol->queued))) {
         GST_WARNING_OBJECT (pad, "Buffer from the past, dropping");
         gst_buffer_unref (buf);
-        buf = gst_collect_pads2_pop (mix->collect, &mixcol->collect);
+        buf = gst_collect_pads_pop (mix->collect, &mixcol->collect);
         gst_buffer_unref (buf);
         need_more_data = TRUE;
         continue;
@@ -709,7 +709,7 @@ gst_videomixer2_fill_queues (GstVideoMixer2 * mix,
           gst_buffer_replace (&mixcol->queued, NULL);
         } else {
           gst_buffer_unref (buf);
-          buf = gst_collect_pads2_pop (mix->collect, &mixcol->collect);
+          buf = gst_collect_pads_pop (mix->collect, &mixcol->collect);
           gst_buffer_unref (buf);
         }
 
@@ -726,7 +726,7 @@ gst_videomixer2_fill_queues (GstVideoMixer2 * mix,
           gst_buffer_replace (&mixcol->queued, NULL);
         } else {
           gst_buffer_unref (buf);
-          buf = gst_collect_pads2_pop (mix->collect, &mixcol->collect);
+          buf = gst_collect_pads_pop (mix->collect, &mixcol->collect);
           gst_buffer_unref (buf);
         }
 
@@ -763,7 +763,7 @@ gst_videomixer2_fill_queues (GstVideoMixer2 * mix,
           gst_buffer_replace (&mixcol->queued, NULL);
         } else {
           gst_buffer_unref (buf);
-          buf = gst_collect_pads2_pop (mix->collect, &mixcol->collect);
+          buf = gst_collect_pads_pop (mix->collect, &mixcol->collect);
           gst_buffer_unref (buf);
         }
         eos = FALSE;
@@ -779,7 +779,7 @@ gst_videomixer2_fill_queues (GstVideoMixer2 * mix,
           gst_buffer_replace (&mixcol->queued, NULL);
         } else {
           gst_buffer_unref (buf);
-          buf = gst_collect_pads2_pop (mix->collect, &mixcol->collect);
+          buf = gst_collect_pads_pop (mix->collect, &mixcol->collect);
           gst_buffer_unref (buf);
         }
 
@@ -791,8 +791,8 @@ gst_videomixer2_fill_queues (GstVideoMixer2 * mix,
         if (mixcol->end_time < output_start_time) {
           gst_buffer_replace (&mixcol->buffer, NULL);
           mixcol->start_time = mixcol->end_time = -1;
-          if (!GST_COLLECT_PADS2_STATE_IS_SET (mixcol,
-                  GST_COLLECT_PADS2_STATE_EOS))
+          if (!GST_COLLECT_PADS_STATE_IS_SET (mixcol,
+                  GST_COLLECT_PADS_STATE_EOS))
             need_more_data = TRUE;
         } else {
           eos = FALSE;
@@ -923,7 +923,7 @@ gst_videomixer2_do_qos (GstVideoMixer2 * mix, GstClockTime timestamp)
 }
 
 static GstFlowReturn
-gst_videomixer2_collected (GstCollectPads2 * pads, GstVideoMixer2 * mix)
+gst_videomixer2_collected (GstCollectPads * pads, GstVideoMixer2 * mix)
 {
   GstFlowReturn ret;
   GstClockTime output_start_time, output_end_time;
@@ -1313,12 +1313,12 @@ gst_videomixer2_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
         gst_pad_push_event (mix->srcpad, gst_event_new_flush_start ());
 
         /* make sure we accept nothing anymore and return WRONG_STATE */
-        gst_collect_pads2_set_flushing (mix->collect, TRUE);
+        gst_collect_pads_set_flushing (mix->collect, TRUE);
       }
 
       /* now wait for the collected to be finished and mark a new
        * segment */
-      GST_COLLECT_PADS2_STREAM_LOCK (mix->collect);
+      GST_COLLECT_PADS_STREAM_LOCK (mix->collect);
 
       abs_rate = ABS (rate);
 
@@ -1354,7 +1354,7 @@ gst_videomixer2_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
       mix->newseg_pending = TRUE;
 
       if (flags & GST_SEEK_FLAG_FLUSH) {
-        gst_collect_pads2_set_flushing (mix->collect, FALSE);
+        gst_collect_pads_set_flushing (mix->collect, FALSE);
 
         /* we can't send FLUSH_STOP here since upstream could start pushing data
          * after we unlock mix->collect.
@@ -1365,7 +1365,7 @@ gst_videomixer2_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
         mix->flush_stop_pending = TRUE;
       }
 
-      GST_COLLECT_PADS2_STREAM_UNLOCK (mix->collect);
+      GST_COLLECT_PADS_STREAM_UNLOCK (mix->collect);
 
       gst_videomixer2_reset_qos (mix);
 
@@ -1568,8 +1568,8 @@ done:
 }
 
 static GstFlowReturn
-gst_videomixer2_sink_clip (GstCollectPads2 * pads,
-    GstCollectData2 * data, GstBuffer * buf, GstBuffer ** outbuf,
+gst_videomixer2_sink_clip (GstCollectPads * pads,
+    GstCollectData * data, GstBuffer * buf, GstBuffer ** outbuf,
     GstVideoMixer2 * mix)
 {
   GstVideoMixer2Pad *pad = GST_VIDEO_MIXER2_PAD (data->pad);
@@ -1622,7 +1622,7 @@ gst_videomixer2_sink_clip (GstCollectPads2 * pads,
 }
 
 static gboolean
-gst_videomixer2_sink_event (GstCollectPads2 * pads, GstCollectData2 * cdata,
+gst_videomixer2_sink_event (GstCollectPads * pads, GstCollectData * cdata,
     GstEvent * event, GstVideoMixer2 * mix)
 {
   GstVideoMixer2Pad *pad = GST_VIDEO_MIXER2_PAD (cdata->pad);
@@ -1669,7 +1669,7 @@ gst_videomixer2_sink_event (GstCollectPads2 * pads, GstCollectData2 * cdata,
   }
 
   if (event != NULL)
-    return gst_collect_pads2_event_default (pads, cdata, event, FALSE);
+    return gst_collect_pads_event_default (pads, cdata, event, FALSE);
 
   return ret;
 }
@@ -1721,11 +1721,11 @@ gst_videomixer2_change_state (GstElement * element, GstStateChange transition)
   switch (transition) {
     case GST_STATE_CHANGE_READY_TO_PAUSED:
       GST_LOG_OBJECT (mix, "starting collectpads");
-      gst_collect_pads2_start (mix->collect);
+      gst_collect_pads_start (mix->collect);
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       GST_LOG_OBJECT (mix, "stopping collectpads");
-      gst_collect_pads2_stop (mix->collect);
+      gst_collect_pads_stop (mix->collect);
       break;
     default:
       break;
@@ -1782,9 +1782,9 @@ gst_videomixer2_request_new_pad (GstElement * element,
     mixpad->alpha = DEFAULT_PAD_ALPHA;
 
     mixcol = (GstVideoMixer2Collect *)
-        gst_collect_pads2_add_pad_full (mix->collect, GST_PAD (mixpad),
+        gst_collect_pads_add_pad_full (mix->collect, GST_PAD (mixpad),
         sizeof (GstVideoMixer2Collect),
-        (GstCollectData2DestroyNotify) gst_videomixer2_collect_free, TRUE);
+        (GstCollectDataDestroyNotify) gst_videomixer2_collect_free, TRUE);
 
     /* Keep track of each other */
     mixcol->mixpad = mixpad;
@@ -1836,7 +1836,7 @@ gst_videomixer2_release_pad (GstElement * element, GstPad * pad)
   update_caps = GST_VIDEO_INFO_FORMAT (&mix->info) != GST_VIDEO_FORMAT_UNKNOWN;
   GST_VIDEO_MIXER2_UNLOCK (mix);
 
-  gst_collect_pads2_remove_pad (mix->collect, pad);
+  gst_collect_pads_remove_pad (mix->collect, pad);
 
   if (update_caps)
     gst_videomixer2_update_src_caps (mix);
@@ -1981,16 +1981,16 @@ gst_videomixer2_init (GstVideoMixer2 * mix)
       GST_DEBUG_FUNCPTR (gst_videomixer2_src_event));
   gst_element_add_pad (GST_ELEMENT (mix), mix->srcpad);
 
-  mix->collect = gst_collect_pads2_new ();
+  mix->collect = gst_collect_pads_new ();
   mix->background = DEFAULT_BACKGROUND;
 
-  gst_collect_pads2_set_function (mix->collect,
-      (GstCollectPads2Function) GST_DEBUG_FUNCPTR (gst_videomixer2_collected),
+  gst_collect_pads_set_function (mix->collect,
+      (GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_videomixer2_collected),
       mix);
-  gst_collect_pads2_set_event_function (mix->collect,
-      (GstCollectPads2EventFunction) gst_videomixer2_sink_event, mix);
-  gst_collect_pads2_set_clip_function (mix->collect,
-      (GstCollectPads2ClipFunction) gst_videomixer2_sink_clip, mix);
+  gst_collect_pads_set_event_function (mix->collect,
+      (GstCollectPadsEventFunction) gst_videomixer2_sink_event, mix);
+  gst_collect_pads_set_clip_function (mix->collect,
+      (GstCollectPadsClipFunction) gst_videomixer2_sink_clip, mix);
 
   g_mutex_init (&mix->lock);
   /* initialize variables */
index 02f7d11..5f4af2e 100644 (file)
@@ -25,7 +25,7 @@
 #include <gst/video/video.h>
 
 #include "blend.h"
-#include <gst/base/gstcollectpads2.h>
+#include <gst/base/gstcollectpads.h>
 
 G_BEGIN_DECLS
 
@@ -77,7 +77,7 @@ struct _GstVideoMixer2
   /* Lock to prevent the state to change while blending */
   GMutex lock;
   /* Sink pads using Collect Pads 2*/
-  GstCollectPads2 *collect;
+  GstCollectPads *collect;
 
   /* sinkpads, a GSList of GstVideoMixer2Pads */
   GSList *sinkpads;
index d77519c..cd34420 100644 (file)
@@ -24,7 +24,7 @@
 #include <gst/gst.h>
 #include <gst/video/video.h>
 
-#include <gst/base/gstcollectpads2.h>
+#include <gst/base/gstcollectpads.h>
 
 G_BEGIN_DECLS