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
This commit is contained in:
Thomas Vander Stichele 2005-10-06 14:01:44 +00:00
parent 37c3c87edb
commit 68e6852e0e
2 changed files with 22 additions and 17 deletions

View file

@ -1,3 +1,9 @@
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),

View file

@ -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 */