mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
gstghostpad: Forward queries in both direction
Use the peer of the internal pad to forward them, instead of the target which only exists for the ghostpad (and not the internal proxy pad).
This commit is contained in:
parent
69d2f7a9f8
commit
75066960e3
1 changed files with 23 additions and 25 deletions
|
@ -191,10 +191,18 @@ gst_proxy_pad_query_default (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
g_return_val_if_fail (GST_IS_PROXY_PAD (pad), FALSE);
|
||||
g_return_val_if_fail (GST_IS_QUERY (query), FALSE);
|
||||
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_CAPS:
|
||||
{
|
||||
if (GST_IS_GHOST_PAD (pad))
|
||||
res = gst_proxy_pad_query_caps (pad, query);
|
||||
else
|
||||
res = gst_pad_peer_query (GST_PROXY_PAD_INTERNAL (pad), query);
|
||||
break;
|
||||
}
|
||||
case GST_QUERY_ACCEPT_CAPS:
|
||||
{
|
||||
if (GST_IS_GHOST_PAD (pad)) {
|
||||
target = gst_proxy_pad_get_target (pad);
|
||||
if (target) {
|
||||
res = gst_pad_query (target, query);
|
||||
|
@ -208,21 +216,11 @@ gst_proxy_pad_query_default (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case GST_QUERY_CAPS:
|
||||
{
|
||||
res = gst_proxy_pad_query_caps (pad, query);
|
||||
break;
|
||||
/* passthrough */
|
||||
}
|
||||
default:
|
||||
{
|
||||
target = gst_proxy_pad_get_target (pad);
|
||||
if (target) {
|
||||
res = gst_pad_query (target, query);
|
||||
gst_object_unref (target);
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (pad, "no target pad");
|
||||
res = FALSE;
|
||||
}
|
||||
res = gst_pad_peer_query (GST_PROXY_PAD_INTERNAL (pad), query);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue