mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
pad: don't forward scheduling query
The scheduling query should not be forwarded, because elements need to implement special code to handle different scheduling methods.
This commit is contained in:
parent
844e8aefaa
commit
a59defb90f
1 changed files with 19 additions and 9 deletions
28
gst/gstpad.c
28
gst/gstpad.c
|
@ -3318,7 +3318,12 @@ no_peer:
|
||||||
gboolean
|
gboolean
|
||||||
gst_pad_query_default (GstPad * pad, GstQuery * query)
|
gst_pad_query_default (GstPad * pad, GstQuery * query)
|
||||||
{
|
{
|
||||||
|
gboolean forward = TRUE, ret = FALSE;
|
||||||
|
|
||||||
switch (GST_QUERY_TYPE (query)) {
|
switch (GST_QUERY_TYPE (query)) {
|
||||||
|
case GST_QUERY_SCHEDULING:
|
||||||
|
forward = FALSE;
|
||||||
|
break;
|
||||||
case GST_QUERY_POSITION:
|
case GST_QUERY_POSITION:
|
||||||
case GST_QUERY_SEEKING:
|
case GST_QUERY_SEEKING:
|
||||||
case GST_QUERY_FORMATS:
|
case GST_QUERY_FORMATS:
|
||||||
|
@ -3327,9 +3332,14 @@ gst_pad_query_default (GstPad * pad, GstQuery * query)
|
||||||
case GST_QUERY_RATE:
|
case GST_QUERY_RATE:
|
||||||
case GST_QUERY_CONVERT:
|
case GST_QUERY_CONVERT:
|
||||||
default:
|
default:
|
||||||
return gst_pad_forward
|
break;
|
||||||
(pad, (GstPadForwardFunction) gst_pad_peer_query, query);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (forward) {
|
||||||
|
ret = gst_pad_forward
|
||||||
|
(pad, (GstPadForwardFunction) gst_pad_peer_query, query);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -4209,8 +4219,6 @@ gst_pad_push_event (GstPad * pad, GstEvent * event)
|
||||||
g_return_val_if_fail (event != NULL, FALSE);
|
g_return_val_if_fail (event != NULL, FALSE);
|
||||||
g_return_val_if_fail (GST_IS_EVENT (event), FALSE);
|
g_return_val_if_fail (GST_IS_EVENT (event), FALSE);
|
||||||
|
|
||||||
GST_LOG_OBJECT (pad, "event: %s", GST_EVENT_TYPE_NAME (event));
|
|
||||||
|
|
||||||
GST_OBJECT_LOCK (pad);
|
GST_OBJECT_LOCK (pad);
|
||||||
|
|
||||||
peerpad = GST_PAD_PEER (pad);
|
peerpad = GST_PAD_PEER (pad);
|
||||||
|
@ -4320,14 +4328,16 @@ gst_pad_push_event (GstPad * pad, GstEvent * event)
|
||||||
pad->priv->using++;
|
pad->priv->using++;
|
||||||
GST_OBJECT_UNLOCK (pad);
|
GST_OBJECT_UNLOCK (pad);
|
||||||
|
|
||||||
GST_LOG_OBJECT (pad, "sending event %s to peerpad %" GST_PTR_FORMAT,
|
GST_LOG_OBJECT (pad, "sending event %p (%s) to peerpad %" GST_PTR_FORMAT,
|
||||||
GST_EVENT_TYPE_NAME (event), peerpad);
|
event, GST_EVENT_TYPE_NAME (event), peerpad);
|
||||||
|
|
||||||
result = gst_pad_send_event (peerpad, event);
|
result = gst_pad_send_event (peerpad, event);
|
||||||
|
|
||||||
/* Note: we gave away ownership of the event at this point */
|
/* Note: we gave away ownership of the event at this point but we can still
|
||||||
GST_LOG_OBJECT (pad, "sent event to peerpad %" GST_PTR_FORMAT ", result %d",
|
* print the old pointer */
|
||||||
peerpad, result);
|
GST_LOG_OBJECT (pad,
|
||||||
|
"sent event %p to peerpad %" GST_PTR_FORMAT ", result %d", event, peerpad,
|
||||||
|
result);
|
||||||
|
|
||||||
gst_object_unref (peerpad);
|
gst_object_unref (peerpad);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue