From 1c16ff94fc705e658f3826fb90e75e9b7ddf31b6 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 15 Aug 2011 12:16:30 +0200 Subject: [PATCH] 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. --- gst/gstdebugutils.c | 6 +++--- gst/gstpad.c | 50 ------------------------------------------- gst/gstpad.h | 1 - win32/common/libgstreamer.def | 1 - 4 files changed, 3 insertions(+), 55 deletions(-) diff --git a/gst/gstdebugutils.c b/gst/gstdebugutils.c index 9ac08c7..41c7731 100644 --- a/gst/gstdebugutils.c +++ b/gst/gstdebugutils.c @@ -331,10 +331,10 @@ debug_dump_element_pad_link (GstPad * pad, GstElement * element, 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)); @@ -510,7 +510,7 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out, 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; diff --git a/gst/gstpad.c b/gst/gstpad.c index 1b63b59..0e8751a 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -2933,56 +2933,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: * @pad: the #GstPad to get the internal links of. * diff --git a/gst/gstpad.h b/gst/gstpad.h index 999a537..1fe6318 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -879,7 +879,6 @@ gboolean gst_pad_peer_accept_caps (GstPad * pad, GstCaps *caps); /* 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); diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def index 9029763..05a6348 100644 --- a/win32/common/libgstreamer.def +++ b/win32/common/libgstreamer.def @@ -661,7 +661,6 @@ EXPORTS gst_pad_get_current_caps gst_pad_get_direction gst_pad_get_element_private - gst_pad_get_negotiated_caps gst_pad_get_offset gst_pad_get_pad_template gst_pad_get_pad_template_caps -- 2.7.4