update for _get_caps() -> _query_caps()
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 15 Nov 2011 15:48:15 +0000 (16:48 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 15 Nov 2011 17:04:17 +0000 (18:04 +0100)
20 files changed:
ext/libvisual/visual.c
ext/ogg/gstoggmux.c
ext/ogg/gstoggparse.c
ext/pango/gsttextrender.c
ext/theora/gsttheoraenc.c
ext/theora/gsttheoraparse.c
ext/vorbis/gstvorbisparse.c
gst-libs/gst/pbutils/gstdiscoverer.c
gst/encoding/gstencodebin.c
gst/playback/gstdecodebin2.c
gst/playback/gstplaybin2.c
gst/playback/gstplaysink.c
gst/playback/gstplaysinkconvertbin.c
gst/playback/gstsubtitleoverlay.c
gst/playback/gsturidecodebin.c
tests/check/elements/audioconvert.c
tests/examples/encoding/encoding.c
tests/icles/playback/test.c
tests/icles/playback/test5.c
tests/icles/playback/test6.c

index 8f79f28..5be9736 100644 (file)
@@ -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);
index db60913..95d8081 100644 (file)
@@ -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);
index 1c12bdf..bbc5cae 100644 (file)
@@ -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);
index 5675027..f506503 100644 (file)
@@ -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);
 
index 30e1ce1..15cc08a 100644 (file)
@@ -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);
index 25b046f..e6e2fa0 100644 (file)
@@ -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);
index f3fccfd..fbb7d9d 100644 (file)
@@ -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);
index 79aaee6..f974585 100644 (file)
@@ -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);
index b4d2c66..759d421 100644 (file)
@@ -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);
index fad166c..02b5628 100644 (file)
@@ -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;
 }
index 30f1b90..8a950f9 100644 (file)
@@ -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);
 
index 5056908..09c3539 100644 (file)
@@ -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++) {
index 2bf0218..e516681 100644 (file)
@@ -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);
 
index 815497c..34512d2 100644 (file)
@@ -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;
index 5ef87da..95d2bfc 100644 (file)
@@ -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;
 
index e849c4d..e101f67 100644 (file)
@@ -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));
 
index 497aa63..1fe34d0 100644 (file)
@@ -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);
index 282302f..1c65a9d 100644 (file)
@@ -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);
index 8badfd3..678a908 100644 (file)
@@ -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);
index 696767b..1d99dec 100644 (file)
@@ -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);