collectpads2: rename to collectpads
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 17 Apr 2012 13:09:27 +0000 (15:09 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 17 Apr 2012 13:09:58 +0000 (15:09 +0200)
ext/ogg/gstoggmux.c
ext/ogg/gstoggmux.h
gst/adder/gstadder.c
gst/adder/gstadder.h

index 6774160..0620e31 100644 (file)
@@ -128,10 +128,10 @@ static GstStaticPadTemplate subtitle_sink_factory =
 
 static void gst_ogg_mux_finalize (GObject * object);
 
 
 static void gst_ogg_mux_finalize (GObject * object);
 
-static GstFlowReturn gst_ogg_mux_collected (GstCollectPads2 * pads,
+static GstFlowReturn gst_ogg_mux_collected (GstCollectPads * pads,
     GstOggMux * ogg_mux);
     GstOggMux * ogg_mux);
-static gboolean gst_ogg_mux_sink_event (GstCollectPads2 * pads,
-    GstCollectData2 * pad, GstEvent * event, gpointer user_data);
+static gboolean gst_ogg_mux_sink_event (GstCollectPads * pads,
+    GstCollectData * pad, GstEvent * event, gpointer user_data);
 static gboolean gst_ogg_mux_handle_src_event (GstPad * pad, GstObject * parent,
     GstEvent * event);
 static GstPad *gst_ogg_mux_request_new_pad (GstElement * element,
 static gboolean gst_ogg_mux_handle_src_event (GstPad * pad, GstObject * parent,
     GstEvent * event);
 static GstPad *gst_ogg_mux_request_new_pad (GstElement * element,
@@ -246,12 +246,12 @@ gst_ogg_mux_init (GstOggMux * ogg_mux)
   /* seed random number generator for creation of serial numbers */
   srand (time (NULL));
 
   /* seed random number generator for creation of serial numbers */
   srand (time (NULL));
 
-  ogg_mux->collect = gst_collect_pads2_new ();
-  gst_collect_pads2_set_function (ogg_mux->collect,
-      (GstCollectPads2Function) GST_DEBUG_FUNCPTR (gst_ogg_mux_collected),
+  ogg_mux->collect = gst_collect_pads_new ();
+  gst_collect_pads_set_function (ogg_mux->collect,
+      (GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_ogg_mux_collected),
       ogg_mux);
       ogg_mux);
-  gst_collect_pads2_set_event_function (ogg_mux->collect,
-      (GstCollectPads2EventFunction) GST_DEBUG_FUNCPTR (gst_ogg_mux_sink_event),
+  gst_collect_pads_set_event_function (ogg_mux->collect,
+      (GstCollectPadsEventFunction) GST_DEBUG_FUNCPTR (gst_ogg_mux_sink_event),
       ogg_mux);
 
   ogg_mux->max_delay = DEFAULT_MAX_DELAY;
       ogg_mux);
 
   ogg_mux->max_delay = DEFAULT_MAX_DELAY;
@@ -277,7 +277,7 @@ gst_ogg_mux_finalize (GObject * object)
 }
 
 static void
 }
 
 static void
-gst_ogg_mux_ogg_pad_destroy_notify (GstCollectData2 * data)
+gst_ogg_mux_ogg_pad_destroy_notify (GstCollectData * data)
 {
   GstOggPadData *oggpad = (GstOggPadData *) data;
   GstBuffer *buf;
 {
   GstOggPadData *oggpad = (GstOggPadData *) data;
   GstBuffer *buf;
@@ -309,7 +309,7 @@ gst_ogg_mux_sinkconnect (GstPad * pad, GstPad * peer)
 }
 
 static gboolean
 }
 
 static gboolean
-gst_ogg_mux_sink_event (GstCollectPads2 * pads, GstCollectData2 * pad,
+gst_ogg_mux_sink_event (GstCollectPads * pads, GstCollectData * pad,
     GstEvent * event, gpointer user_data)
 {
   GstOggMux *ogg_mux = GST_OGG_MUX (user_data);
     GstEvent * event, gpointer user_data)
 {
   GstOggMux *ogg_mux = GST_OGG_MUX (user_data);
@@ -356,7 +356,7 @@ gst_ogg_mux_sink_event (GstCollectPads2 * pads, GstCollectData2 * pad,
 
   /* now GstCollectPads can take care of the rest, e.g. EOS */
   if (event != NULL)
 
   /* now GstCollectPads can take care of the rest, e.g. EOS */
   if (event != NULL)
-    return gst_collect_pads2_event_default (pads, pad, event, FALSE);
+    return gst_collect_pads_event_default (pads, pad, event, FALSE);
 
   return TRUE;
 }
 
   return TRUE;
 }
@@ -452,7 +452,7 @@ gst_ogg_mux_request_new_pad (GstElement * element,
       GstOggPadData *oggpad;
 
       oggpad = (GstOggPadData *)
       GstOggPadData *oggpad;
 
       oggpad = (GstOggPadData *)
-          gst_collect_pads2_add_pad_full (ogg_mux->collect, newpad,
+          gst_collect_pads_add_pad_full (ogg_mux->collect, newpad,
           sizeof (GstOggPadData), gst_ogg_mux_ogg_pad_destroy_notify, FALSE);
       ogg_mux->active_pads++;
 
           sizeof (GstOggPadData), gst_ogg_mux_ogg_pad_destroy_notify, FALSE);
       ogg_mux->active_pads++;
 
@@ -510,7 +510,7 @@ gst_ogg_mux_release_pad (GstElement * element, GstPad * pad)
 
   ogg_mux = GST_OGG_MUX (gst_pad_get_parent (pad));
 
 
   ogg_mux = GST_OGG_MUX (gst_pad_get_parent (pad));
 
-  gst_collect_pads2_remove_pad (ogg_mux->collect, pad);
+  gst_collect_pads_remove_pad (ogg_mux->collect, pad);
   gst_element_remove_pad (element, pad);
 
   gst_object_unref (ogg_mux);
   gst_element_remove_pad (element, pad);
 
   gst_object_unref (ogg_mux);
@@ -919,9 +919,9 @@ gst_ogg_mux_queue_pads (GstOggMux * ogg_mux, gboolean * popped)
   walk = ogg_mux->collect->data;
   while (walk) {
     GstOggPadData *pad;
   walk = ogg_mux->collect->data;
   while (walk) {
     GstOggPadData *pad;
-    GstCollectData2 *data;
+    GstCollectData *data;
 
 
-    data = (GstCollectData2 *) walk->data;
+    data = (GstCollectData *) walk->data;
     pad = (GstOggPadData *) data;
 
     walk = g_slist_next (walk);
     pad = (GstOggPadData *) data;
 
     walk = g_slist_next (walk);
@@ -932,7 +932,7 @@ gst_ogg_mux_queue_pads (GstOggMux * ogg_mux, gboolean * popped)
     if (pad->buffer == NULL) {
       GstBuffer *buf;
 
     if (pad->buffer == NULL) {
       GstBuffer *buf;
 
-      buf = gst_collect_pads2_pop (ogg_mux->collect, data);
+      buf = gst_collect_pads_pop (ogg_mux->collect, data);
       GST_LOG_OBJECT (data->pad, "popped buffer %" GST_PTR_FORMAT, buf);
 
       /* On EOS we get a NULL buffer */
       GST_LOG_OBJECT (data->pad, "popped buffer %" GST_PTR_FORMAT, buf);
 
       /* On EOS we get a NULL buffer */
@@ -979,8 +979,8 @@ gst_ogg_mux_queue_pads (GstOggMux * ogg_mux, gboolean * popped)
 
               if (pad->map.is_sparse) {
                 GST_DEBUG_OBJECT (pad, "Pad is sparse, marking as such");
 
               if (pad->map.is_sparse) {
                 GST_DEBUG_OBJECT (pad, "Pad is sparse, marking as such");
-                gst_collect_pads2_set_waiting (ogg_mux->collect,
-                    (GstCollectData2 *) pad, FALSE);
+                gst_collect_pads_set_waiting (ogg_mux->collect,
+                    (GstCollectData *) pad, FALSE);
               }
             }
             if (caps)
               }
             }
             if (caps)
@@ -1584,7 +1584,7 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPadData * best)
       ogg_mux->pulling ? ogg_mux->pulling->collect.pad : NULL);
 
   if (ogg_mux->pulling) {
       ogg_mux->pulling ? ogg_mux->pulling->collect.pad : NULL);
 
   if (ogg_mux->pulling) {
-    next_buf = gst_collect_pads2_peek (ogg_mux->collect,
+    next_buf = gst_collect_pads_peek (ogg_mux->collect,
         &ogg_mux->pulling->collect);
     if (next_buf) {
       ogg_mux->pulling->eos = FALSE;
         &ogg_mux->pulling->collect);
     if (next_buf) {
       ogg_mux->pulling->eos = FALSE;
@@ -1598,7 +1598,7 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPadData * best)
   /* We could end up pushing from the best pad instead, so check that
    * as well */
   if (best && best != ogg_mux->pulling) {
   /* We could end up pushing from the best pad instead, so check that
    * as well */
   if (best && best != ogg_mux->pulling) {
-    next_buf = gst_collect_pads2_peek (ogg_mux->collect, &best->collect);
+    next_buf = gst_collect_pads_peek (ogg_mux->collect, &best->collect);
     if (next_buf) {
       best->eos = FALSE;
       gst_buffer_unref (next_buf);
     if (next_buf) {
       best->eos = FALSE;
       gst_buffer_unref (next_buf);
@@ -1893,7 +1893,7 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPadData * best)
  * Returns TRUE if all pads are EOS.
  */
 static gboolean
  * Returns TRUE if all pads are EOS.
  */
 static gboolean
-all_pads_eos (GstCollectPads2 * pads)
+all_pads_eos (GstCollectPads * pads)
 {
   GSList *walk;
 
 {
   GSList *walk;
 
@@ -1924,7 +1924,7 @@ all_pads_eos (GstCollectPads2 * pads)
  * are all empty, and then sends EOS.
  */
 static GstFlowReturn
  * are all empty, and then sends EOS.
  */
 static GstFlowReturn
-gst_ogg_mux_collected (GstCollectPads2 * pads, GstOggMux * ogg_mux)
+gst_ogg_mux_collected (GstCollectPads * pads, GstOggMux * ogg_mux)
 {
   GstOggPadData *best;
   GstFlowReturn ret;
 {
   GstOggPadData *best;
   GstFlowReturn ret;
@@ -2009,7 +2009,7 @@ gst_ogg_mux_set_property (GObject * object,
 
 /* reset all variables in the ogg pads. */
 static void
 
 /* reset all variables in the ogg pads. */
 static void
-gst_ogg_mux_init_collectpads (GstCollectPads2 * collect)
+gst_ogg_mux_init_collectpads (GstCollectPads * collect)
 {
   GSList *walk;
 
 {
   GSList *walk;
 
@@ -2037,7 +2037,7 @@ gst_ogg_mux_init_collectpads (GstCollectPads2 * collect)
 
 /* Clear all buffers from the collectpads object */
 static void
 
 /* Clear all buffers from the collectpads object */
 static void
-gst_ogg_mux_clear_collectpads (GstCollectPads2 * collect)
+gst_ogg_mux_clear_collectpads (GstCollectPads * collect)
 {
   GSList *walk;
 
 {
   GSList *walk;
 
@@ -2081,12 +2081,12 @@ gst_ogg_mux_change_state (GstElement * element, GstStateChange transition)
     case GST_STATE_CHANGE_READY_TO_PAUSED:
       gst_ogg_mux_clear (ogg_mux);
       gst_ogg_mux_init_collectpads (ogg_mux->collect);
     case GST_STATE_CHANGE_READY_TO_PAUSED:
       gst_ogg_mux_clear (ogg_mux);
       gst_ogg_mux_init_collectpads (ogg_mux->collect);
-      gst_collect_pads2_start (ogg_mux->collect);
+      gst_collect_pads_start (ogg_mux->collect);
       break;
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       break;
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
-      gst_collect_pads2_stop (ogg_mux->collect);
+      gst_collect_pads_stop (ogg_mux->collect);
       break;
     default:
       break;
       break;
     default:
       break;
index 4151700..fb87ca0 100644 (file)
@@ -24,7 +24,7 @@
 #include <ogg/ogg.h>
 
 #include <gst/gst.h>
 #include <ogg/ogg.h>
 
 #include <gst/gst.h>
-#include <gst/base/gstcollectpads2.h>
+#include <gst/base/gstcollectpads.h>
 #include "gstoggstream.h"
 
 G_BEGIN_DECLS
 #include "gstoggstream.h"
 
 G_BEGIN_DECLS
@@ -48,7 +48,7 @@ GstOggPadState;
 /* all information needed for one ogg stream */
 typedef struct
 {
 /* all information needed for one ogg stream */
 typedef struct
 {
-  GstCollectData2 collect;       /* we extend the CollectData */
+  GstCollectData collect;       /* we extend the CollectData */
 
   GstOggStream map;
   gboolean have_type;
 
   GstOggStream map;
   gboolean have_type;
@@ -99,7 +99,7 @@ struct _GstOggMux
   GstPad *srcpad;
 
   /* sinkpads */
   GstPad *srcpad;
 
   /* sinkpads */
-  GstCollectPads2 *collect;
+  GstCollectPads *collect;
 
   /* number of pads which have not received EOS */
   gint active_pads;
 
   /* number of pads which have not received EOS */
   gint active_pads;
index 103e06f..20ed243 100644 (file)
@@ -116,8 +116,8 @@ static gboolean gst_adder_sink_query (GstPad * pad, GstObject * parent,
     GstQuery * query);
 static gboolean gst_adder_src_event (GstPad * pad, GstObject * parent,
     GstEvent * event);
     GstQuery * query);
 static gboolean gst_adder_src_event (GstPad * pad, GstObject * parent,
     GstEvent * event);
-static gboolean gst_adder_sink_event (GstCollectPads2 * pads,
-    GstCollectData2 * pad, GstEvent * event, gpointer user_data);
+static gboolean gst_adder_sink_event (GstCollectPads * pads,
+    GstCollectData * pad, GstEvent * event, gpointer user_data);
 
 static GstPad *gst_adder_request_new_pad (GstElement * element,
     GstPadTemplate * temp, const gchar * unused, const GstCaps * caps);
 
 static GstPad *gst_adder_request_new_pad (GstElement * element,
     GstPadTemplate * temp, const gchar * unused, const GstCaps * caps);
@@ -126,10 +126,10 @@ static void gst_adder_release_pad (GstElement * element, GstPad * pad);
 static GstStateChangeReturn gst_adder_change_state (GstElement * element,
     GstStateChange transition);
 
 static GstStateChangeReturn gst_adder_change_state (GstElement * element,
     GstStateChange transition);
 
-static GstFlowReturn gst_adder_do_clip (GstCollectPads2 * pads,
-    GstCollectData2 * data, GstBuffer * buffer, GstBuffer ** out,
+static GstFlowReturn gst_adder_do_clip (GstCollectPads * pads,
+    GstCollectData * data, GstBuffer * buffer, GstBuffer ** out,
     gpointer user_data);
     gpointer user_data);
-static GstFlowReturn gst_adder_collected (GstCollectPads2 * pads,
+static GstFlowReturn gst_adder_collected (GstCollectPads * pads,
     gpointer user_data);
 
 /* non-clipping versions (for float) */
     gpointer user_data);
 
 /* non-clipping versions (for float) */
@@ -701,7 +701,7 @@ gst_adder_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
          * as we need to take the stream lock.
          */
         gst_pad_push_event (adder->srcpad, gst_event_new_flush_start ());
          * as we need to take the stream lock.
          */
         gst_pad_push_event (adder->srcpad, gst_event_new_flush_start ());
-        gst_collect_pads2_set_flushing (adder->collect, TRUE);
+        gst_collect_pads_set_flushing (adder->collect, TRUE);
 
         /* We can't send FLUSH_STOP here since upstream could start pushing data
          * after we unlock adder->collect.
 
         /* We can't send FLUSH_STOP here since upstream could start pushing data
          * after we unlock adder->collect.
@@ -716,7 +716,7 @@ gst_adder_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
       /* now wait for the collected to be finished and mark a new
        * segment. After we have the lock, no collect function is running and no
        * new collect function will be called for as long as we're flushing. */
       /* now wait for the collected to be finished and mark a new
        * segment. After we have the lock, no collect function is running and no
        * new collect function will be called for as long as we're flushing. */
-      GST_COLLECT_PADS2_STREAM_LOCK (adder->collect);
+      GST_COLLECT_PADS_STREAM_LOCK (adder->collect);
       adder->segment.rate = rate;
       if (curtype == GST_SEEK_TYPE_SET)
         adder->segment.start = cur;
       adder->segment.rate = rate;
       if (curtype == GST_SEEK_TYPE_SET)
         adder->segment.start = cur;
@@ -729,9 +729,9 @@ gst_adder_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
       if (flush) {
         /* Yes, we need to call _set_flushing again *WHEN* the streaming threads
          * have stopped so that the cookie gets properly updated. */
       if (flush) {
         /* Yes, we need to call _set_flushing again *WHEN* the streaming threads
          * have stopped so that the cookie gets properly updated. */
-        gst_collect_pads2_set_flushing (adder->collect, TRUE);
+        gst_collect_pads_set_flushing (adder->collect, TRUE);
       }
       }
-      GST_COLLECT_PADS2_STREAM_UNLOCK (adder->collect);
+      GST_COLLECT_PADS_STREAM_UNLOCK (adder->collect);
       GST_DEBUG_OBJECT (adder, "forwarding seek event: %" GST_PTR_FORMAT,
           event);
 
       GST_DEBUG_OBJECT (adder, "forwarding seek event: %" GST_PTR_FORMAT,
           event);
 
@@ -774,7 +774,7 @@ done:
 }
 
 static gboolean
 }
 
 static gboolean
-gst_adder_sink_event (GstCollectPads2 * pads, GstCollectData2 * pad,
+gst_adder_sink_event (GstCollectPads * pads, GstCollectData * pad,
     GstEvent * event, gpointer user_data)
 {
   GstAdder *adder = GST_ADDER (user_data);
     GstEvent * event, gpointer user_data)
 {
   GstAdder *adder = GST_ADDER (user_data);
@@ -831,7 +831,7 @@ gst_adder_sink_event (GstCollectPads2 * pads, GstCollectData2 * pad,
   }
 
   if (G_LIKELY (event))
   }
 
   if (G_LIKELY (event))
-    return gst_collect_pads2_event_default (pads, pad, event, discard);
+    return gst_collect_pads_event_default (pads, pad, event, discard);
   else
     return res;
 }
   else
     return res;
 }
@@ -896,12 +896,12 @@ gst_adder_init (GstAdder * adder)
   adder->filter_caps = NULL;
 
   /* keep track of the sinkpads requested */
   adder->filter_caps = NULL;
 
   /* keep track of the sinkpads requested */
-  adder->collect = gst_collect_pads2_new ();
-  gst_collect_pads2_set_function (adder->collect,
+  adder->collect = gst_collect_pads_new ();
+  gst_collect_pads_set_function (adder->collect,
       GST_DEBUG_FUNCPTR (gst_adder_collected), adder);
       GST_DEBUG_FUNCPTR (gst_adder_collected), adder);
-  gst_collect_pads2_set_clip_function (adder->collect,
+  gst_collect_pads_set_clip_function (adder->collect,
       GST_DEBUG_FUNCPTR (gst_adder_do_clip), adder);
       GST_DEBUG_FUNCPTR (gst_adder_do_clip), adder);
-  gst_collect_pads2_set_event_function (adder->collect,
+  gst_collect_pads_set_event_function (adder->collect,
       GST_DEBUG_FUNCPTR (gst_adder_sink_event), adder);
 }
 
       GST_DEBUG_FUNCPTR (gst_adder_sink_event), adder);
 }
 
@@ -1000,7 +1000,7 @@ gst_adder_request_new_pad (GstElement * element, GstPadTemplate * templ,
   g_free (name);
 
   gst_pad_set_query_function (newpad, GST_DEBUG_FUNCPTR (gst_adder_sink_query));
   g_free (name);
 
   gst_pad_set_query_function (newpad, GST_DEBUG_FUNCPTR (gst_adder_sink_query));
-  gst_collect_pads2_add_pad (adder->collect, newpad, sizeof (GstCollectData2));
+  gst_collect_pads_add_pad (adder->collect, newpad, sizeof (GstCollectData));
 
   /* takes ownership of the pad */
   if (!gst_element_add_pad (GST_ELEMENT (adder), newpad))
 
   /* takes ownership of the pad */
   if (!gst_element_add_pad (GST_ELEMENT (adder), newpad))
@@ -1017,7 +1017,7 @@ not_sink:
 could_not_add:
   {
     GST_DEBUG_OBJECT (adder, "could not add pad");
 could_not_add:
   {
     GST_DEBUG_OBJECT (adder, "could not add pad");
-    gst_collect_pads2_remove_pad (adder->collect, newpad);
+    gst_collect_pads_remove_pad (adder->collect, newpad);
     gst_object_unref (newpad);
     return NULL;
   }
     gst_object_unref (newpad);
     return NULL;
   }
@@ -1033,12 +1033,12 @@ gst_adder_release_pad (GstElement * element, GstPad * pad)
   GST_DEBUG_OBJECT (adder, "release pad %s:%s", GST_DEBUG_PAD_NAME (pad));
 
   if (adder->collect)
   GST_DEBUG_OBJECT (adder, "release pad %s:%s", GST_DEBUG_PAD_NAME (pad));
 
   if (adder->collect)
-    gst_collect_pads2_remove_pad (adder->collect, pad);
+    gst_collect_pads_remove_pad (adder->collect, pad);
   gst_element_remove_pad (element, pad);
 }
 
 static GstFlowReturn
   gst_element_remove_pad (element, pad);
 }
 
 static GstFlowReturn
-gst_adder_do_clip (GstCollectPads2 * pads, GstCollectData2 * data,
+gst_adder_do_clip (GstCollectPads * pads, GstCollectData * data,
     GstBuffer * buffer, GstBuffer ** out, gpointer user_data)
 {
   GstAdder *adder = GST_ADDER (user_data);
     GstBuffer * buffer, GstBuffer ** out, gpointer user_data)
 {
   GstAdder *adder = GST_ADDER (user_data);
@@ -1054,7 +1054,7 @@ gst_adder_do_clip (GstCollectPads2 * pads, GstCollectData2 * data,
 }
 
 static GstFlowReturn
 }
 
 static GstFlowReturn
-gst_adder_collected (GstCollectPads2 * pads, gpointer user_data)
+gst_adder_collected (GstCollectPads * pads, gpointer user_data)
 {
   /*
    * combine streams by adding data values
 {
   /*
    * combine streams by adding data values
@@ -1096,7 +1096,7 @@ gst_adder_collected (GstCollectPads2 * pads, gpointer user_data)
 
   /* get available bytes for reading, this can be 0 which could mean empty
    * buffers or EOS, which we will catch when we loop over the pads. */
 
   /* get available bytes for reading, this can be 0 which could mean empty
    * buffers or EOS, which we will catch when we loop over the pads. */
-  outsize = gst_collect_pads2_available (pads);
+  outsize = gst_collect_pads_available (pads);
   /* can only happen when no pads to collect or all EOS */
   if (outsize == 0)
     goto eos;
   /* can only happen when no pads to collect or all EOS */
   if (outsize == 0)
     goto eos;
@@ -1110,18 +1110,18 @@ gst_adder_collected (GstCollectPads2 * pads, gpointer user_data)
       outsize, bps, bpf);
 
   for (collected = pads->data; collected; collected = next) {
       outsize, bps, bpf);
 
   for (collected = pads->data; collected; collected = next) {
-    GstCollectData2 *collect_data;
+    GstCollectData *collect_data;
     GstBuffer *inbuf;
     gboolean is_gap;
 
     /* take next to see if this is the last collectdata */
     next = g_slist_next (collected);
 
     GstBuffer *inbuf;
     gboolean is_gap;
 
     /* take next to see if this is the last collectdata */
     next = g_slist_next (collected);
 
-    collect_data = (GstCollectData2 *) collected->data;
+    collect_data = (GstCollectData *) collected->data;
 
     /* get a buffer of size bytes, if we get a buffer, it is at least outsize
      * bytes big. */
 
     /* get a buffer of size bytes, if we get a buffer, it is at least outsize
      * bytes big. */
-    inbuf = gst_collect_pads2_take_buffer (pads, collect_data, outsize);
+    inbuf = gst_collect_pads_take_buffer (pads, collect_data, outsize);
     /* NULL means EOS or an empty buffer so we still need to flush in
      * case of an empty buffer. */
     if (inbuf == NULL) {
     /* NULL means EOS or an empty buffer so we still need to flush in
      * case of an empty buffer. */
     if (inbuf == NULL) {
@@ -1314,14 +1314,14 @@ gst_adder_change_state (GstElement * element, GstStateChange transition)
       adder->new_segment_pending = TRUE;
       adder->wait_for_new_segment = FALSE;
       gst_segment_init (&adder->segment, GST_FORMAT_TIME);
       adder->new_segment_pending = TRUE;
       adder->wait_for_new_segment = FALSE;
       gst_segment_init (&adder->segment, GST_FORMAT_TIME);
-      gst_collect_pads2_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:
       break;
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
-      /* need to unblock the collectpads2 before calling the
+      /* need to unblock the collectpads before calling the
        * parent change_state so that streaming can finish */
        * parent change_state so that streaming can finish */
-      gst_collect_pads2_stop (adder->collect);
+      gst_collect_pads_stop (adder->collect);
       break;
     default:
       break;
       break;
     default:
       break;
index 9fedf06..7aa0fa3 100644 (file)
@@ -24,7 +24,7 @@
 #define __GST_ADDER_H__
 
 #include <gst/gst.h>
 #define __GST_ADDER_H__
 
 #include <gst/gst.h>
-#include <gst/base/gstcollectpads2.h>
+#include <gst/base/gstcollectpads.h>
 #include <gst/audio/audio.h>
 
 G_BEGIN_DECLS
 #include <gst/audio/audio.h>
 
 G_BEGIN_DECLS
@@ -51,7 +51,7 @@ struct _GstAdder {
   GstElement      element;
 
   GstPad         *srcpad;
   GstElement      element;
 
   GstPad         *srcpad;
-  GstCollectPads2 *collect;
+  GstCollectPads *collect;
   /* pad counter, used for creating unique request pads */
   gint            padcount;
 
   /* pad counter, used for creating unique request pads */
   gint            padcount;