[0.11] gst-plugins-good: videomixer2: Update for the new collectpads2 event handling API

Sebastian Dröge slomo at kemper.freedesktop.org
Thu Jan 26 01:46:18 PST 2012


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

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Thu Jan 26 10:44:28 2012 +0100

videomixer2: Update for the new collectpads2 event handling API

---

 gst/videomixer/videomixer2.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/gst/videomixer/videomixer2.c b/gst/videomixer/videomixer2.c
index a8e6002..5f7c56c 100644
--- a/gst/videomixer/videomixer2.c
+++ b/gst/videomixer/videomixer2.c
@@ -1615,8 +1615,9 @@ gst_videomixer2_sink_event (GstCollectPads2 * pads, GstCollectData2 * cdata,
       gst_event_parse_new_segment (event, NULL, NULL, &fmt, NULL, NULL, NULL);
 
       g_assert (fmt == GST_FORMAT_TIME);
-      /* eat NEWSEGMENT events, collectpads2 unrefs the event */
-      ret = FALSE;
+      /* eat NEWSEGMENT events */
+      ret = TRUE;
+      gst_event_unref (event);
       break;
     }
     case GST_EVENT_FLUSH_STOP:
@@ -1632,10 +1633,15 @@ gst_videomixer2_sink_event (GstCollectPads2 * pads, GstCollectData2 * cdata,
       mix->ts_offset = 0;
       mix->nframes = 0;
 
-      gst_pad_push_event (mix->srcpad, event);
+      ret = gst_pad_event_default (cdata->pad, GST_OBJECT (mix), event);
       break;
     default:
-      gst_pad_push_event (mix->srcpad, event);
+      ret = gst_pad_event_default (cdata->pad, GST_OBJECT (mix), event);
+      break;
+    case GST_EVENT_EOS:
+    case GST_EVENT_SEGMENT:
+      gst_event_unref (event);
+      ret = TRUE;
       break;
   }
 



More information about the gstreamer-commits mailing list