mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 13:53:19 +00:00
Make events use internal links, too
Original commit message from CVS: Make events use internal links, too
This commit is contained in:
parent
1c89c5e829
commit
775fbca9a5
1 changed files with 6 additions and 4 deletions
10
gst/gstpad.c
10
gst/gstpad.c
|
@ -2791,15 +2791,16 @@ static gboolean
|
||||||
gst_pad_event_default_dispatch (GstPad *pad, GstElement *element,
|
gst_pad_event_default_dispatch (GstPad *pad, GstElement *element,
|
||||||
GstEvent *event)
|
GstEvent *event)
|
||||||
{
|
{
|
||||||
GList *pads = element->pads;
|
GList *orig, *pads;
|
||||||
|
|
||||||
|
orig = pads = gst_pad_get_internal_links (pad);
|
||||||
|
|
||||||
while (pads) {
|
while (pads) {
|
||||||
GstPad *eventpad = GST_PAD (pads->data);
|
GstPad *eventpad = GST_PAD (pads->data);
|
||||||
pads = g_list_next (pads);
|
pads = g_list_next (pads);
|
||||||
|
|
||||||
/* for all pads in the opposite direction that are linked */
|
/* for all pads in the opposite direction that are linked */
|
||||||
if (GST_PAD_DIRECTION (eventpad) != GST_PAD_DIRECTION (pad)
|
if (GST_PAD_IS_LINKED (eventpad)) {
|
||||||
&& GST_PAD_IS_LINKED (eventpad)) {
|
|
||||||
if (GST_PAD_DIRECTION (eventpad) == GST_PAD_SRC) {
|
if (GST_PAD_DIRECTION (eventpad) == GST_PAD_SRC) {
|
||||||
/* increase the refcount */
|
/* increase the refcount */
|
||||||
gst_event_ref (event);
|
gst_event_ref (event);
|
||||||
|
@ -2810,11 +2811,13 @@ gst_pad_event_default_dispatch (GstPad *pad, GstElement *element,
|
||||||
|
|
||||||
/* 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 */
|
||||||
|
g_list_free (orig);
|
||||||
return gst_pad_send_event (peerpad, event);
|
return gst_pad_send_event (peerpad, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
|
g_list_free (orig);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3152,4 +3155,3 @@ gst_pad_get_formats (GstPad *pad)
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue