[0.11] gst-plugins-good: smpte: port to GstCollectPads2

Sebastian Dröge slomo at kemper.freedesktop.org
Tue Jan 10 05:33:18 PST 2012


Module: gst-plugins-good
Branch: 0.11
Commit: 994dbb4c39d7b9abe0a8f2ea1b04c7af32bb1ad8
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=994dbb4c39d7b9abe0a8f2ea1b04c7af32bb1ad8

Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Wed Dec 14 19:13:21 2011 +0000

smpte: port to GstCollectPads2

---

 gst/smpte/gstsmpte.c |   32 ++++++++++++++++----------------
 gst/smpte/gstsmpte.h |    4 ++--
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c
index 4b21cd0..0579844 100644
--- a/gst/smpte/gstsmpte.c
+++ b/gst/smpte/gstsmpte.c
@@ -152,7 +152,7 @@ static void gst_smpte_base_init (GstSMPTEClass * klass);
 static void gst_smpte_init (GstSMPTE * smpte);
 static void gst_smpte_finalize (GstSMPTE * smpte);
 
-static GstFlowReturn gst_smpte_collected (GstCollectPads * pads,
+static GstFlowReturn gst_smpte_collected (GstCollectPads2 * pads,
     GstSMPTE * smpte);
 
 static void gst_smpte_set_property (GObject * object, guint prop_id,
@@ -360,15 +360,15 @@ 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_pads_new ();
-  gst_collect_pads_set_function (smpte->collect,
-      (GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_smpte_collected), smpte);
-  gst_collect_pads_start (smpte->collect);
+  smpte->collect = gst_collect_pads2_new ();
+  gst_collect_pads2_set_function (smpte->collect,
+      (GstCollectPads2Function) GST_DEBUG_FUNCPTR (gst_smpte_collected), smpte);
+  gst_collect_pads2_start (smpte->collect);
 
-  gst_collect_pads_add_pad (smpte->collect, smpte->sinkpad1,
-      sizeof (GstCollectData));
-  gst_collect_pads_add_pad (smpte->collect, smpte->sinkpad2,
-      sizeof (GstCollectData));
+  gst_collect_pads2_add_pad (smpte->collect, smpte->sinkpad1,
+      sizeof (GstCollectData2));
+  gst_collect_pads2_add_pad (smpte->collect, smpte->sinkpad2,
+      sizeof (GstCollectData2));
 
   smpte->fps = DEFAULT_PROP_FPS;
   smpte->type = DEFAULT_PROP_TYPE;
@@ -441,7 +441,7 @@ gst_smpte_blend_i420 (guint8 * in1, guint8 * in2, guint8 * out, GstMask * mask,
 }
 
 static GstFlowReturn
-gst_smpte_collected (GstCollectPads * pads, GstSMPTE * smpte)
+gst_smpte_collected (GstCollectPads2 * pads, GstSMPTE * smpte)
 {
   GstBuffer *outbuf;
   GstClockTime ts;
@@ -458,14 +458,14 @@ gst_smpte_collected (GstCollectPads * pads, GstSMPTE * smpte)
       smpte->fps_denom, smpte->fps_num);
 
   for (collected = pads->data; collected; collected = g_slist_next (collected)) {
-    GstCollectData *data;
+    GstCollectData2 *data;
 
-    data = (GstCollectData *) collected->data;
+    data = (GstCollectData2 *) collected->data;
 
     if (data->pad == smpte->sinkpad1)
-      in1 = gst_collect_pads_pop (pads, data);
+      in1 = gst_collect_pads2_pop (pads, data);
     else if (data->pad == smpte->sinkpad2)
-      in2 = gst_collect_pads_pop (pads, data);
+      in2 = gst_collect_pads2_pop (pads, data);
   }
 
   if (in1 == NULL) {
@@ -623,11 +623,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_pads_start (smpte->collect);
+      gst_collect_pads2_start (smpte->collect);
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       GST_LOG_OBJECT (smpte, "stopping collectpads");
-      gst_collect_pads_stop (smpte->collect);
+      gst_collect_pads2_stop (smpte->collect);
       break;
     default:
       break;
diff --git a/gst/smpte/gstsmpte.h b/gst/smpte/gstsmpte.h
index dc6bc6d..ac138f4 100644
--- a/gst/smpte/gstsmpte.h
+++ b/gst/smpte/gstsmpte.h
@@ -22,7 +22,7 @@
 #define __GST_SMPTE_H__
 
 #include <gst/gst.h>
-#include <gst/base/gstcollectpads.h>
+#include <gst/base/gstcollectpads2.h>
 
 G_BEGIN_DECLS
 
@@ -49,7 +49,7 @@ struct _GstSMPTE {
   GstPad        *srcpad,
                 *sinkpad1,
                 *sinkpad2;
-  GstCollectPads *collect;
+  GstCollectPads2 *collect;
 
   /* properties */
   gint           type;



More information about the gstreamer-commits mailing list