diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 01dc3255f9..27fa7fc70d 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -1596,8 +1596,7 @@ gst_pad_get_pad_template_caps gst_pad_set_caps gst_pad_get_peer -gst_pad_peer_get_caps -gst_pad_peer_get_caps_reffed +gst_pad_peer_query_caps gst_pad_use_fixed_caps gst_pad_has_current_caps @@ -1639,12 +1638,12 @@ GstPadLinkFunction gst_pad_set_unlink_function GstPadUnlinkFunction -gst_pad_accept_caps +gst_pad_query_accept_caps gst_pad_proxy_query_caps gst_pad_proxy_query_accept_caps -gst_pad_peer_accept_caps +gst_pad_peer_query_accept_caps gst_pad_set_activate_function GstPadActivateFunction diff --git a/gst/gstpad.c b/gst/gstpad.c index bc9be5e45d..2a86ac3e20 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -2198,7 +2198,7 @@ gst_pad_peer_query_caps (GstPad * pad, GstCaps * filter) } /** - * gst_pad_accept_caps: + * gst_pad_query_accept_caps: * @pad: a #GstPad to check * @caps: a #GstCaps to check on the pad * @@ -2207,7 +2207,7 @@ gst_pad_peer_query_caps (GstPad * pad, GstCaps * filter) * Returns: TRUE if the pad can accept the caps. */ gboolean -gst_pad_accept_caps (GstPad * pad, GstCaps * caps) +gst_pad_query_accept_caps (GstPad * pad, GstCaps * caps) { gboolean res = TRUE; GstQuery *query; @@ -2228,7 +2228,7 @@ gst_pad_accept_caps (GstPad * pad, GstCaps * caps) } /** - * gst_pad_peer_accept_caps: + * gst_pad_peer_query_accept_caps: * @pad: a #GstPad to check the peer of * @caps: a #GstCaps to check on the pad * @@ -2238,7 +2238,7 @@ gst_pad_accept_caps (GstPad * pad, GstCaps * caps) * Returns: TRUE if the peer of @pad can accept the caps or @pad has no peer. */ gboolean -gst_pad_peer_accept_caps (GstPad * pad, GstCaps * caps) +gst_pad_peer_query_accept_caps (GstPad * pad, GstCaps * caps) { gboolean res = TRUE; GstQuery *query; diff --git a/gst/gstpad.h b/gst/gstpad.h index 781f9c41bc..ab9e5ab88c 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -835,11 +835,11 @@ GstCaps* gst_pad_get_pad_template_caps (GstPad *pad); GstCaps * gst_pad_get_current_caps (GstPad * pad); gboolean gst_pad_has_current_caps (GstPad * pad); GstCaps * gst_pad_query_caps (GstPad * pad, GstCaps *filter); -gboolean gst_pad_accept_caps (GstPad * pad, GstCaps *caps); +gboolean gst_pad_query_accept_caps (GstPad * pad, GstCaps *caps); gboolean gst_pad_set_caps (GstPad * pad, GstCaps *caps); GstCaps * gst_pad_peer_query_caps (GstPad * pad, GstCaps *filter); -gboolean gst_pad_peer_accept_caps (GstPad * pad, GstCaps *caps); +gboolean gst_pad_peer_query_accept_caps (GstPad * pad, GstCaps *caps); /* capsnego for linked pads */ GstCaps * gst_pad_get_allowed_caps (GstPad * pad); diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index ea9477808e..c195805404 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -1056,7 +1056,7 @@ gst_base_transform_find_transform (GstBaseTransform * trans, GstPad * pad, goto could_not_fixate; /* and peer should accept */ - if (otherpeer && !gst_pad_accept_caps (otherpeer, othercaps)) + if (otherpeer && !gst_pad_query_accept_caps (otherpeer, othercaps)) goto peer_no_accept; GST_DEBUG_OBJECT (trans, "Input caps were %" GST_PTR_FORMAT diff --git a/plugins/elements/gstcapsfilter.c b/plugins/elements/gstcapsfilter.c index f28b7d50f7..ceed308855 100644 --- a/plugins/elements/gstcapsfilter.c +++ b/plugins/elements/gstcapsfilter.c @@ -296,9 +296,13 @@ gst_capsfilter_accept_caps (GstBaseTransform * base, if (ret) { /* if we can intersect, see if the other end also accepts */ if (direction == GST_PAD_SRC) - ret = gst_pad_peer_accept_caps (GST_BASE_TRANSFORM_SINK_PAD (base), caps); + ret = + gst_pad_peer_query_accept_caps (GST_BASE_TRANSFORM_SINK_PAD (base), + caps); else - ret = gst_pad_peer_accept_caps (GST_BASE_TRANSFORM_SRC_PAD (base), caps); + ret = + gst_pad_peer_query_accept_caps (GST_BASE_TRANSFORM_SRC_PAD (base), + caps); GST_DEBUG_OBJECT (capsfilter, "peer accept: %d", ret); }