mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
pad: remove gst_pad_get_negotiated_caps()
Remove gst_pad_get_negotiated_caps(), it does not realy do what it says, gst_pad_get_current_caps() returns the currently negotiated caps on the pad correctly.
This commit is contained in:
parent
59bf122584
commit
1c16ff94fc
4 changed files with 3 additions and 55 deletions
|
@ -331,10 +331,10 @@ debug_dump_element_pad_link (GstPad * pad, GstElement * element,
|
||||||
if ((details & GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE) ||
|
if ((details & GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE) ||
|
||||||
(details & GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS)
|
(details & GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS)
|
||||||
) {
|
) {
|
||||||
caps = gst_pad_get_negotiated_caps (pad);
|
caps = gst_pad_get_current_caps (pad);
|
||||||
if (!caps)
|
if (!caps)
|
||||||
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
|
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
|
||||||
peer_caps = gst_pad_get_negotiated_caps (peer_pad);
|
peer_caps = gst_pad_get_current_caps (peer_pad);
|
||||||
if (!peer_caps)
|
if (!peer_caps)
|
||||||
peer_caps = gst_caps_copy (gst_pad_get_pad_template_caps (peer_pad));
|
peer_caps = gst_caps_copy (gst_pad_get_pad_template_caps (peer_pad));
|
||||||
|
|
||||||
|
@ -510,7 +510,7 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out,
|
||||||
GValue item = { 0, };
|
GValue item = { 0, };
|
||||||
GValue item2 = { 0, };
|
GValue item2 = { 0, };
|
||||||
GstElement *element;
|
GstElement *element;
|
||||||
GstPad *pad;
|
GstPad *pad = NULL;
|
||||||
guint src_pads, sink_pads;
|
guint src_pads, sink_pads;
|
||||||
gchar *element_name;
|
gchar *element_name;
|
||||||
gchar *state_name = NULL;
|
gchar *state_name = NULL;
|
||||||
|
|
50
gst/gstpad.c
50
gst/gstpad.c
|
@ -2932,56 +2932,6 @@ no_peer:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_pad_get_negotiated_caps:
|
|
||||||
* @pad: a #GstPad.
|
|
||||||
*
|
|
||||||
* Gets the capabilities of the media type that currently flows through @pad
|
|
||||||
* and its peer.
|
|
||||||
*
|
|
||||||
* This function can be used on both src and sinkpads. Note that srcpads are
|
|
||||||
* always negotiated before sinkpads so it is possible that the negotiated caps
|
|
||||||
* on the srcpad do not match the negotiated caps of the peer.
|
|
||||||
*
|
|
||||||
* Returns: (transfer full): the negotiated #GstCaps of the pad link. Unref
|
|
||||||
* the caps when you no longer need it. This function returns NULL when
|
|
||||||
* the @pad has no peer or is not negotiated yet.
|
|
||||||
*
|
|
||||||
* MT safe.
|
|
||||||
*/
|
|
||||||
GstCaps *
|
|
||||||
gst_pad_get_negotiated_caps (GstPad * pad)
|
|
||||||
{
|
|
||||||
GstCaps *caps = NULL;
|
|
||||||
GstPad *peer;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GST_IS_PAD (pad), NULL);
|
|
||||||
|
|
||||||
GST_OBJECT_LOCK (pad);
|
|
||||||
|
|
||||||
if (G_UNLIKELY ((peer = GST_PAD_PEER (pad)) == NULL))
|
|
||||||
goto no_peer;
|
|
||||||
|
|
||||||
GST_CAT_DEBUG_OBJECT (GST_CAT_PROPERTIES, pad, "getting negotiated caps");
|
|
||||||
|
|
||||||
if ((caps = get_pad_caps (pad)))
|
|
||||||
gst_caps_ref (caps);
|
|
||||||
|
|
||||||
GST_OBJECT_UNLOCK (pad);
|
|
||||||
|
|
||||||
GST_CAT_DEBUG_OBJECT (GST_CAT_CAPS, pad, "negotiated caps %" GST_PTR_FORMAT,
|
|
||||||
caps);
|
|
||||||
|
|
||||||
return caps;
|
|
||||||
|
|
||||||
no_peer:
|
|
||||||
{
|
|
||||||
GST_CAT_DEBUG_OBJECT (GST_CAT_PROPERTIES, pad, "no peer");
|
|
||||||
GST_OBJECT_UNLOCK (pad);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_pad_iterate_internal_links_default:
|
* gst_pad_iterate_internal_links_default:
|
||||||
* @pad: the #GstPad to get the internal links of.
|
* @pad: the #GstPad to get the internal links of.
|
||||||
|
|
|
@ -879,7 +879,6 @@ gboolean gst_pad_peer_accept_caps (GstPad * pad, GstCaps *caps);
|
||||||
|
|
||||||
/* capsnego for linked pads */
|
/* capsnego for linked pads */
|
||||||
GstCaps * gst_pad_get_allowed_caps (GstPad * pad);
|
GstCaps * gst_pad_get_allowed_caps (GstPad * pad);
|
||||||
GstCaps * gst_pad_get_negotiated_caps (GstPad * pad);
|
|
||||||
|
|
||||||
/* pad offsets */
|
/* pad offsets */
|
||||||
gint64 gst_pad_get_offset (GstPad *pad);
|
gint64 gst_pad_get_offset (GstPad *pad);
|
||||||
|
|
|
@ -661,7 +661,6 @@ EXPORTS
|
||||||
gst_pad_get_current_caps
|
gst_pad_get_current_caps
|
||||||
gst_pad_get_direction
|
gst_pad_get_direction
|
||||||
gst_pad_get_element_private
|
gst_pad_get_element_private
|
||||||
gst_pad_get_negotiated_caps
|
|
||||||
gst_pad_get_offset
|
gst_pad_get_offset
|
||||||
gst_pad_get_pad_template
|
gst_pad_get_pad_template
|
||||||
gst_pad_get_pad_template_caps
|
gst_pad_get_pad_template_caps
|
||||||
|
|
Loading…
Reference in a new issue