if ((details & GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE) ||
(details & GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS)
) {
- caps = gst_pad_get_negotiated_caps (pad);
+ caps = gst_pad_get_current_caps (pad);
if (!caps)
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)
peer_caps = gst_caps_copy (gst_pad_get_pad_template_caps (peer_pad));
GValue item = { 0, };
GValue item2 = { 0, };
GstElement *element;
- GstPad *pad;
+ GstPad *pad = NULL;
guint src_pads, sink_pads;
gchar *element_name;
gchar *state_name = NULL;
}
/**
- * 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:
* @pad: the #GstPad to get the internal links of.
*
/* capsnego for linked pads */
GstCaps * gst_pad_get_allowed_caps (GstPad * pad);
-GstCaps * gst_pad_get_negotiated_caps (GstPad * pad);
/* pad offsets */
gint64 gst_pad_get_offset (GstPad *pad);