mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
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:
parent
37c3c87edb
commit
68e6852e0e
2 changed files with 22 additions and 17 deletions
|
@ -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),
|
||||||
|
|
|
@ -2584,25 +2584,24 @@ 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_IS_LINKED (eventpad)) {
|
|
||||||
if (GST_PAD_DIRECTION (eventpad) == GST_PAD_SRC) {
|
if (GST_PAD_DIRECTION (eventpad) == GST_PAD_SRC) {
|
||||||
/* for each pad we send to, we should ref the event; it's up
|
/* for each pad we send to, we should ref the event; it's up
|
||||||
* to downstream to unref again when handled. */
|
* to downstream to unref again when handled. */
|
||||||
GST_LOG_OBJECT (pad, "Reffing and sending event %p to %s:%s", event,
|
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_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 to one sink pad %s:%s", event,
|
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));
|
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 */
|
||||||
GST_LOG_OBJECT (pad, "handled event %p, unreffing", event);
|
GST_LOG_OBJECT (pad, "handled event %p, unreffing", event);
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
|
|
Loading…
Reference in a new issue