gst/gstpad.c: give events a chance to be handled by event probes when the pad is...
authorThomas Vander Stichele <thomas@apestaart.org>
Thu, 6 Oct 2005 14:01:44 +0000 (14:01 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Thu, 6 Oct 2005 14:01:44 +0000 (14:01 +0000)
Original commit message from CVS:

* gst/gstpad.c: (gst_pad_event_default_dispatch):
give events a chance to be handled by event probes when the pad
is not linked

ChangeLog
gst/gstpad.c

index 568463d..405c4a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2005-10-06  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+       * gst/gstpad.c: (gst_pad_event_default_dispatch):
+         give events a chance to be handled by event probes when the pad
+         is not linked
+
+2005-10-06  Thomas Vander Stichele  <thomas at apestaart dot org>
+
        * gst/gstevent.c: (gst_event_type_get_name),
        (gst_event_type_to_quark), (gst_event_finalize), (gst_event_new):
        * gst/gstevent.h:
index 6590a02..fd1e585 100644 (file)
@@ -2584,23 +2584,22 @@ gst_pad_event_default_dispatch (GstPad * pad, GstEvent * event)
 
     pads = g_list_next (pads);
 
-    /* for all of the internally-linked pads that are actually linked */
-    if (GST_PAD_IS_LINKED (eventpad)) {
-      if (GST_PAD_DIRECTION (eventpad) == GST_PAD_SRC) {
-        /* for each pad we send to, we should ref the event; it's up
-         * to downstream to unref again when handled. */
-        GST_LOG_OBJECT (pad, "Reffing and sending event %p to %s:%s", event,
-            GST_DEBUG_PAD_NAME (eventpad));
-        gst_event_ref (event);
-        gst_pad_push_event (eventpad, event);
-      } else {
-        /* we only send the event on one pad, multi-sinkpad elements
-         * should implement a handler */
-        GST_LOG_OBJECT (pad, "sending event %p to one sink pad %s:%s", event,
-            GST_DEBUG_PAD_NAME (eventpad));
-        result = gst_pad_push_event (eventpad, event);
-        goto done;
-      }
+    if (GST_PAD_DIRECTION (eventpad) == GST_PAD_SRC) {
+      /* for each pad we send to, we should ref the event; it's up
+       * to downstream to unref again when handled. */
+      GST_LOG_OBJECT (pad, "Reffing and sending event %p (%s) to %s:%s",
+          event, gst_event_type_get_name (GST_EVENT_TYPE (event)),
+          GST_DEBUG_PAD_NAME (eventpad));
+      gst_event_ref (event);
+      gst_pad_push_event (eventpad, event);
+    } else {
+      /* we only send the event on one pad, multi-sinkpad elements
+       * should implement a handler */
+      GST_LOG_OBJECT (pad, "sending event %p (%s) to one sink pad %s:%s",
+          event, gst_event_type_get_name (GST_EVENT_TYPE (event)),
+          GST_DEBUG_PAD_NAME (eventpad));
+      result = gst_pad_push_event (eventpad, event);
+      goto done;
     }
   }
   /* we handled the incoming event so we unref once */