From 7402d3a3d248b48e4ec9cfcfc9e669bfcd13fa55 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 15 Nov 2011 16:48:15 +0100 Subject: [PATCH] update for _get_caps() -> _query_caps() --- ext/libvisual/visual.c | 2 +- ext/ogg/gstoggmux.c | 2 +- ext/ogg/gstoggparse.c | 2 +- ext/pango/gsttextrender.c | 2 +- ext/theora/gsttheoraenc.c | 2 +- ext/theora/gsttheoraparse.c | 2 +- ext/vorbis/gstvorbisparse.c | 2 +- gst-libs/gst/pbutils/gstdiscoverer.c | 4 ++-- gst/encoding/gstencodebin.c | 2 +- gst/playback/gstdecodebin2.c | 2 +- gst/playback/gstplaybin2.c | 10 +++++----- gst/playback/gstplaysink.c | 2 +- gst/playback/gstplaysinkconvertbin.c | 6 +++--- gst/playback/gstsubtitleoverlay.c | 10 +++++----- gst/playback/gsturidecodebin.c | 2 +- tests/check/elements/audioconvert.c | 8 ++++---- tests/examples/encoding/encoding.c | 2 +- tests/icles/playback/test.c | 2 +- tests/icles/playback/test5.c | 2 +- tests/icles/playback/test6.c | 2 +- 20 files changed, 34 insertions(+), 34 deletions(-) diff --git a/ext/libvisual/visual.c b/ext/libvisual/visual.c index 8f79f2860a..5be97361da 100644 --- a/ext/libvisual/visual.c +++ b/ext/libvisual/visual.c @@ -423,7 +423,7 @@ gst_vis_src_negotiate (GstVisual * visual) GstBufferPool *pool = NULL; guint size, min, max, prefix, alignment; - caps = gst_pad_get_caps (visual->srcpad, NULL); + caps = gst_pad_query_caps (visual->srcpad, NULL); /* see what the peer can do */ othercaps = gst_pad_peer_get_caps (visual->srcpad, caps); diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index db6091316e..95d80818ea 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -1498,7 +1498,7 @@ gst_ogg_mux_send_headers (GstOggMux * mux) /* hbufs holds all buffers for the headers now */ /* create caps with the buffers */ - caps = gst_pad_get_caps (mux->srcpad, NULL); + caps = gst_pad_query_caps (mux->srcpad, NULL); if (caps) { caps = gst_ogg_mux_set_header_on_caps (caps, hbufs); gst_pad_set_caps (mux->srcpad, caps); diff --git a/ext/ogg/gstoggparse.c b/ext/ogg/gstoggparse.c index 1c12bdf9ef..bbc5caeab2 100644 --- a/ext/ogg/gstoggparse.c +++ b/ext/ogg/gstoggparse.c @@ -582,7 +582,7 @@ gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer) } } - caps = gst_pad_get_caps (ogg->srcpad, NULL); + caps = gst_pad_query_caps (ogg->srcpad, NULL); caps = gst_caps_make_writable (caps); structure = gst_caps_get_structure (caps, 0); diff --git a/ext/pango/gsttextrender.c b/ext/pango/gsttextrender.c index 5675027cfd..f5065036c3 100644 --- a/ext/pango/gsttextrender.c +++ b/ext/pango/gsttextrender.c @@ -495,7 +495,7 @@ gst_text_render_chain (GstPad * pad, GstBuffer * inbuf) gst_text_render_check_argb (render); - padcaps = gst_pad_get_caps (render->srcpad, NULL); + padcaps = gst_pad_query_caps (render->srcpad, NULL); caps = gst_pad_peer_get_caps (render->srcpad, padcaps); gst_caps_unref (padcaps); diff --git a/ext/theora/gsttheoraenc.c b/ext/theora/gsttheoraenc.c index 30e1ce13ce..15cc08a7c0 100644 --- a/ext/theora/gsttheoraenc.c +++ b/ext/theora/gsttheoraenc.c @@ -617,7 +617,7 @@ theora_enc_sink_getcaps (GstPad * pad, GstCaps * filter) GstStructure *s; guint i, n; - peer_caps = gst_pad_get_caps (peer, NULL); + peer_caps = gst_pad_query_caps (peer, NULL); /* Translate peercaps to YUV */ peer_caps = gst_caps_make_writable (peer_caps); diff --git a/ext/theora/gsttheoraparse.c b/ext/theora/gsttheoraparse.c index 25b046fc2e..e6e2fa0fb7 100644 --- a/ext/theora/gsttheoraparse.c +++ b/ext/theora/gsttheoraparse.c @@ -287,7 +287,7 @@ theora_parse_set_streamheader (GstTheoraParse * parse) g_assert (!parse->streamheader_received); - caps = gst_caps_make_writable (gst_pad_get_caps (parse->srcpad, NULL)); + caps = gst_caps_make_writable (gst_pad_query_caps (parse->srcpad, NULL)); theora_parse_set_header_on_caps (parse, caps); GST_DEBUG_OBJECT (parse, "here are the caps: %" GST_PTR_FORMAT, caps); gst_pad_set_caps (parse->srcpad, caps); diff --git a/ext/vorbis/gstvorbisparse.c b/ext/vorbis/gstvorbisparse.c index f3fccfd191..fbb7d9dc7f 100644 --- a/ext/vorbis/gstvorbisparse.c +++ b/ext/vorbis/gstvorbisparse.c @@ -188,7 +188,7 @@ vorbis_parse_push_headers (GstVorbisParse * parse) gsize size; /* get the headers into the caps, passing them to vorbis as we go */ - caps = gst_caps_make_writable (gst_pad_get_caps (parse->srcpad, NULL)); + caps = gst_caps_make_writable (gst_pad_query_caps (parse->srcpad, NULL)); vorbis_parse_set_header_on_caps (parse, caps); GST_DEBUG_OBJECT (parse, "here are the caps: %" GST_PTR_FORMAT, caps); gst_pad_set_caps (parse->srcpad, caps); diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c index 79aaee6483..f9745853bb 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer.c +++ b/gst-libs/gst/pbutils/gstdiscoverer.c @@ -478,7 +478,7 @@ uridecodebin_pad_added_cb (GstElement * uridecodebin, GstPad * pad, g_object_set (ps->sink, "silent", TRUE, NULL); g_object_set (ps->queue, "max-size-buffers", 1, "silent", TRUE, NULL); - caps = gst_pad_get_caps (pad, NULL); + caps = gst_pad_query_caps (pad, NULL); if (is_subtitle_caps (caps)) { /* Subtitle streams are sparse and may not provide any information - don't @@ -593,7 +593,7 @@ collect_stream_information (GstDiscoverer * dc, PrivateStream * ps, guint idx) if (!caps) { GST_WARNING ("Couldn't get negotiated caps from %s:%s", GST_DEBUG_PAD_NAME (ps->pad)); - caps = gst_pad_get_caps (ps->pad, NULL); + caps = gst_pad_query_caps (ps->pad, NULL); } if (caps) { GST_DEBUG ("Got caps %" GST_PTR_FORMAT, caps); diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c index b4d2c6600f..759d4217e5 100644 --- a/gst/encoding/gstencodebin.c +++ b/gst/encoding/gstencodebin.c @@ -1158,7 +1158,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof, /* Check if stream format is compatible */ srcpad = gst_element_get_static_pad (sgroup->smartencoder, "src"); - tmpcaps = gst_pad_get_caps (srcpad, NULL); + tmpcaps = gst_pad_query_caps (srcpad, NULL); if (!gst_caps_can_intersect (tmpcaps, format)) { GST_DEBUG ("We don't have a smart encoder for the stream format"); gst_object_unref (sgroup->smartencoder); diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index fad166c9f3..02b5628298 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -2048,7 +2048,7 @@ get_pad_caps (GstPad * pad) * be fixed in some cases, in which case analyze_new_pad will set up a * notify::caps signal to continue autoplugging. */ if (caps == NULL) - caps = gst_pad_get_caps (pad, NULL); + caps = gst_pad_query_caps (pad, NULL); return caps; } diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 30f1b90f88..8a950f9c57 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -2515,7 +2515,7 @@ pad_added_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group) playbin = group->playbin; - caps = gst_pad_get_caps (pad, NULL); + caps = gst_pad_query_caps (pad, NULL); s = gst_caps_get_structure (caps, 0); name = gst_structure_get_name (s); @@ -3115,7 +3115,7 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps, if (GST_STATE (sink) < GST_STATE_READY) gst_element_set_state (sink, GST_STATE_READY); - sinkcaps = gst_pad_get_caps (sinkpad, NULL); + sinkcaps = gst_pad_query_caps (sinkpad, NULL); if (!gst_caps_is_any (sinkcaps)) ret = !gst_pad_accept_caps (sinkpad, caps); gst_caps_unref (sinkcaps); @@ -3147,7 +3147,7 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps, if (GST_STATE (sink) < GST_STATE_READY) gst_element_set_state (sink, GST_STATE_READY); - sinkcaps = gst_pad_get_caps (sinkpad, NULL); + sinkcaps = gst_pad_query_caps (sinkpad, NULL); if (!gst_caps_is_any (sinkcaps)) ret = !gst_pad_accept_caps (sinkpad, caps); gst_caps_unref (sinkcaps); @@ -3168,7 +3168,7 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps, if (GST_STATE (sink) < GST_STATE_READY) gst_element_set_state (sink, GST_STATE_READY); - sinkcaps = gst_pad_get_caps (sinkpad, NULL); + sinkcaps = gst_pad_query_caps (sinkpad, NULL); if (!gst_caps_is_any (sinkcaps)) ret = !gst_pad_accept_caps (sinkpad, caps); gst_caps_unref (sinkcaps); @@ -3261,7 +3261,7 @@ autoplug_select_cb (GstElement * decodebin, GstPad * pad, sink = group->video_sink; if ((sinkpad = gst_element_get_static_pad (sink, "sink"))) { - caps = gst_pad_get_caps (sinkpad, NULL); + caps = gst_pad_query_caps (sinkpad, NULL); compatible = gst_element_factory_can_src_any_caps (factory, caps); diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index 5056908e09..09c35391fa 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -2903,7 +2903,7 @@ is_raw_pad (GstPad * pad) if (!caps) { guint i, n; - caps = gst_pad_get_caps (peer, NULL); + caps = gst_pad_query_caps (peer, NULL); n = gst_caps_get_size (caps); for (i = 0; i < n; i++) { diff --git a/gst/playback/gstplaysinkconvertbin.c b/gst/playback/gstplaysinkconvertbin.c index 2bf0218799..e5166811d6 100644 --- a/gst/playback/gstplaysinkconvertbin.c +++ b/gst/playback/gstplaysinkconvertbin.c @@ -211,7 +211,7 @@ pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) peer = gst_pad_get_peer (self->sinkpad); caps = gst_pad_get_current_caps (peer); if (!caps) - caps = gst_pad_get_caps (peer, NULL); + caps = gst_pad_query_caps (peer, NULL); gst_object_unref (peer); raw = is_raw_caps (caps, self->audio); @@ -384,7 +384,7 @@ gst_play_sink_convert_bin_getcaps (GstPad * pad, GstCaps * filter) if (otherpad) { peer = gst_pad_get_peer (otherpad); if (peer) { - GstCaps *peer_caps = gst_pad_get_caps (peer, filter); + GstCaps *peer_caps = gst_pad_query_caps (peer, filter); gst_object_unref (peer); if (self->converter_caps) { peer_caps = gst_caps_make_writable (peer_caps); @@ -481,7 +481,7 @@ gst_play_sink_convert_bin_cache_converter_caps (GstPlaySinkConvertBin * self) return; } - self->converter_caps = gst_pad_get_caps (pad, NULL); + self->converter_caps = gst_pad_query_caps (pad, NULL); GST_INFO_OBJECT (self, "Converter caps: %" GST_PTR_FORMAT, self->converter_caps); diff --git a/gst/playback/gstsubtitleoverlay.c b/gst/playback/gstsubtitleoverlay.c index 815497ccf9..34512d2bcd 100644 --- a/gst/playback/gstsubtitleoverlay.c +++ b/gst/playback/gstsubtitleoverlay.c @@ -768,7 +768,7 @@ _pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) if (peer) { subcaps = gst_pad_get_current_caps (peer); if (!subcaps) { - subcaps = gst_pad_get_caps (peer, NULL); + subcaps = gst_pad_query_caps (peer, NULL); if (!gst_caps_is_fixed (subcaps)) { gst_caps_unref (subcaps); subcaps = NULL; @@ -900,7 +900,7 @@ _pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) video_caps = gst_pad_get_current_caps (video_peer); if (!video_caps) { - video_caps = gst_pad_get_caps (video_peer, NULL); + video_caps = gst_pad_query_caps (video_peer, NULL); if (!gst_caps_is_fixed (video_caps)) { gst_caps_unref (video_caps); video_caps = NULL; @@ -1208,7 +1208,7 @@ _pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) if (video_peer) { video_caps = gst_pad_get_current_caps (video_peer); if (!video_caps) { - video_caps = gst_pad_get_caps (video_peer, NULL); + video_caps = gst_pad_query_caps (video_peer, NULL); } gst_object_unref (video_peer); } @@ -1218,7 +1218,7 @@ _pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) GST_WARNING_OBJECT (self, "Can't get video sink from renderer"); continue; } - allowed_caps = gst_pad_get_caps (sink, NULL); + allowed_caps = gst_pad_query_caps (sink, NULL); gst_object_unref (sink); if (allowed_caps && video_caps) @@ -1918,7 +1918,7 @@ gst_subtitle_overlay_subtitle_sink_link (GstPad * pad, GstPad * peer) caps = gst_pad_get_current_caps (peer); if (!caps) { - caps = gst_pad_get_caps (peer, NULL); + caps = gst_pad_query_caps (peer, NULL); if (!gst_caps_is_fixed (caps)) { gst_caps_unref (caps); caps = NULL; diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c index 5ef87da476..95d2bfc26e 100644 --- a/gst/playback/gsturidecodebin.c +++ b/gst/playback/gsturidecodebin.c @@ -1307,7 +1307,7 @@ has_all_raw_caps (GstPad * pad, GstCaps * rawcaps, gboolean * all_raw) gint capssize; gboolean res = FALSE; - caps = gst_pad_get_caps (pad, NULL); + caps = gst_pad_query_caps (pad, NULL); if (caps == NULL) return FALSE; diff --git a/tests/check/elements/audioconvert.c b/tests/check/elements/audioconvert.c index e849c4d05e..e101f675e7 100644 --- a/tests/check/elements/audioconvert.c +++ b/tests/check/elements/audioconvert.c @@ -1304,8 +1304,8 @@ GST_START_TEST (test_caps_negotiation) fail_if (gst_element_get_state (pipeline, NULL, NULL, GST_CLOCK_TIME_NONE) != GST_STATE_CHANGE_SUCCESS, "Failed to set test pipeline to PAUSED"); - caps1 = gst_pad_get_caps (ac3_src, NULL); - fail_if (caps1 == NULL, "gst_pad_get_caps returned NULL"); + caps1 = gst_pad_query_caps (ac3_src, NULL); + fail_if (caps1 == NULL, "gst_pad_query_caps returned NULL"); GST_DEBUG ("Caps size 1 : %d", gst_caps_get_size (caps1)); fail_if (gst_element_set_state (pipeline, GST_STATE_READY) == @@ -1323,9 +1323,9 @@ GST_START_TEST (test_caps_negotiation) fail_if (gst_element_get_state (pipeline, NULL, NULL, GST_CLOCK_TIME_NONE) != GST_STATE_CHANGE_SUCCESS, "Failed to set test pipeline back to PAUSED"); - caps2 = gst_pad_get_caps (ac3_src, NULL); + caps2 = gst_pad_query_caps (ac3_src, NULL); - fail_if (caps2 == NULL, "gst_pad_get_caps returned NULL"); + fail_if (caps2 == NULL, "gst_pad_query_caps returned NULL"); GST_DEBUG ("Caps size 2 : %d", gst_caps_get_size (caps2)); fail_unless (gst_caps_get_size (caps1) == gst_caps_get_size (caps2)); diff --git a/tests/examples/encoding/encoding.c b/tests/examples/encoding/encoding.c index 497aa63dfb..1fe34d084a 100644 --- a/tests/examples/encoding/encoding.c +++ b/tests/examples/encoding/encoding.c @@ -225,7 +225,7 @@ pad_added_cb (GstElement * uridecodebin, GstPad * pad, GstElement * encodebin) GstCaps *caps; /* Ask encodebin for a compatible pad */ - caps = gst_pad_get_caps (pad, NULL); + caps = gst_pad_query_caps (pad, NULL); g_signal_emit_by_name (encodebin, "request-pad", caps, &sinkpad); if (caps) gst_caps_unref (caps); diff --git a/tests/icles/playback/test.c b/tests/icles/playback/test.c index 282302f817..1c65a9d19f 100644 --- a/tests/icles/playback/test.c +++ b/tests/icles/playback/test.c @@ -85,7 +85,7 @@ cb_newpad (GstElement * decodebin, GstPad * pad, gboolean last, gpointer data) GstPadLinkReturn lret; /* check media type */ - caps = gst_pad_get_caps (pad, NULL); + caps = gst_pad_query_caps (pad, NULL); str = gst_caps_get_structure (caps, 0); name = gst_structure_get_name (str); diff --git a/tests/icles/playback/test5.c b/tests/icles/playback/test5.c index 8badfd320f..678a908bf7 100644 --- a/tests/icles/playback/test5.c +++ b/tests/icles/playback/test5.c @@ -71,7 +71,7 @@ dump_element_stats (GstElement * element) g_print ("stream %s:\n", GST_OBJECT_NAME (pad)); - caps = gst_pad_get_caps (pad, NULL); + caps = gst_pad_query_caps (pad, NULL); str = gst_caps_to_string (caps); g_print (" caps: %s\n", str); g_free (str); diff --git a/tests/icles/playback/test6.c b/tests/icles/playback/test6.c index 696767b3df..1d99dec9c5 100644 --- a/tests/icles/playback/test6.c +++ b/tests/icles/playback/test6.c @@ -140,7 +140,7 @@ main (gint argc, gchar * argv[]) g_print ("stream %s:\n", GST_OBJECT_NAME (pad)); - caps = gst_pad_get_caps (pad, NULL); + caps = gst_pad_query_caps (pad, NULL); str = gst_caps_to_string (caps); g_print (" caps: %s\n", str); g_free (str);