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

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
parent 37c3c87e
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> 2005-10-06 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/gstevent.c: (gst_event_type_get_name), * gst/gstevent.c: (gst_event_type_get_name),
......
...@@ -2584,23 +2584,22 @@ gst_pad_event_default_dispatch (GstPad * pad, GstEvent * event) ...@@ -2584,23 +2584,22 @@ gst_pad_event_default_dispatch (GstPad * pad, GstEvent * event)
pads = g_list_next (pads); pads = g_list_next (pads);
/* for all of the internally-linked pads that are actually linked */ if (GST_PAD_DIRECTION (eventpad) == GST_PAD_SRC) {
if (GST_PAD_IS_LINKED (eventpad)) { /* for each pad we send to, we should ref the event; it's up
if (GST_PAD_DIRECTION (eventpad) == GST_PAD_SRC) { * to downstream to unref again when handled. */
/* for each pad we send to, we should ref the event; it's up GST_LOG_OBJECT (pad, "Reffing and sending event %p (%s) to %s:%s",
* to downstream to unref again when handled. */ event, gst_event_type_get_name (GST_EVENT_TYPE (event)),
GST_LOG_OBJECT (pad, "Reffing and sending event %p to %s:%s", event, GST_DEBUG_PAD_NAME (eventpad));
GST_DEBUG_PAD_NAME (eventpad)); gst_event_ref (event);
gst_event_ref (event); gst_pad_push_event (eventpad, event);
gst_pad_push_event (eventpad, event); } else {
} else { /* we only send the event on one pad, multi-sinkpad elements
/* we only send the event on one pad, multi-sinkpad elements * should implement a handler */
* should implement a handler */ GST_LOG_OBJECT (pad, "sending event %p (%s) to one sink pad %s:%s",
GST_LOG_OBJECT (pad, "sending event %p to one sink pad %s:%s", event, event, gst_event_type_get_name (GST_EVENT_TYPE (event)),
GST_DEBUG_PAD_NAME (eventpad)); GST_DEBUG_PAD_NAME (eventpad));
result = gst_pad_push_event (eventpad, event); result = gst_pad_push_event (eventpad, event);
goto done; goto done;
}
} }
} }
/* we handled the incoming event so we unref once */ /* we handled the incoming event so we unref once */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment