docs/manual/: Avoid using a bad function in the example code.
authorWim Taymans <wim.taymans@gmail.com>
Wed, 21 May 2008 15:51:25 +0000 (15:51 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Wed, 21 May 2008 15:51:25 +0000 (15:51 +0000)
Original commit message from CVS:
* docs/manual/advanced-autoplugging.xml:
* docs/manual/basics-helloworld.xml:
* docs/manual/basics-pads.xml:
* docs/manual/highlevel-components.xml:
Avoid using a bad function in the example code.

ChangeLog
docs/manual/advanced-autoplugging.xml
docs/manual/basics-helloworld.xml
docs/manual/basics-pads.xml
docs/manual/highlevel-components.xml

index 67f7a9d..2ca8668 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2008-05-21  Wim Taymans  <wim.taymans@collabora.co.uk>
 
+       * docs/manual/advanced-autoplugging.xml:
+       * docs/manual/basics-helloworld.xml:
+       * docs/manual/basics-pads.xml:
+       * docs/manual/highlevel-components.xml:
+       Avoid using a bad function in the example code.
+
+2008-05-21  Wim Taymans  <wim.taymans@collabora.co.uk>
+
        * gst/gstclock.c: (gst_clock_set_calibration):
        Fix debug of the new clock rate.
 
index 118671c..6e86146 100644 (file)
@@ -366,7 +366,7 @@ close_link (GstPad      *srcpad,
     gst_bin_add (GST_BIN (pipeline), sinkelement);
     gst_element_set_state (sinkelement, GST_STATE_READY);
   }
-  pad = gst_element_get_pad (sinkelement, padname);
+  pad = gst_element_get_static_pad (sinkelement, padname);
   gst_pad_link (srcpad, pad);
   if (sinkelement != audiosink) {
     gst_element_set_state (sinkelement, GST_STATE_PAUSED);
@@ -386,7 +386,7 @@ close_link (GstPad      *srcpad,
 
     switch (templ->presence) {
       case GST_PAD_ALWAYS: {
-        GstPad *pad = gst_element_get_pad (sinkelement, templ->name_template);
+        GstPad *pad = gst_element_get_static_pad (sinkelement, templ->name_template);
         GstCaps *caps = gst_pad_get_caps (pad);
 
         /* link */
@@ -419,7 +419,7 @@ try_to_plug (GstPad        *pad,
   GstCaps *res, *audiocaps;
 
   /* don't plug if we're already plugged - FIXME: memleak for pad */
-  if (GST_PAD_IS_LINKED (gst_element_get_pad (audiosink, "sink"))) {
+  if (GST_PAD_IS_LINKED (gst_element_get_static_pad (audiosink, "sink"))) {
     g_print ("Omitting link for pad %s:%s because we're already linked\n",
             GST_OBJECT_NAME (parent), GST_OBJECT_NAME (pad));
     return;
@@ -434,7 +434,7 @@ try_to_plug (GstPad        *pad,
   }
 
   /* can it link to the audiopad? */
-  audiocaps = gst_pad_get_caps (gst_element_get_pad (audiosink, "sink"));
+  audiocaps = gst_pad_get_caps (gst_element_get_static_pad (audiosink, "sink"));
   res = gst_caps_intersect (caps, audiocaps);
   if (res &amp;&amp; !gst_caps_is_empty (res)) {
     g_print ("Found pad to link to audiosink - plugging is now done\n");
@@ -503,7 +503,7 @@ cb_typefound (GstElement *typefind,
   g_free (s);
 
   /* actually plug now */
-  pad = gst_element_get_pad (typefind, "src");
+  pad = gst_element_get_static_pad (typefind, "src");
   try_to_plug (pad, caps);
   gst_object_unref (GST_OBJECT (pad));
 }
index 890ed93..5aa9f12 100644 (file)
@@ -108,7 +108,7 @@ new_pad (GstElement *element,
   /* We can now link this pad with the audio decoder */
   g_print ("Dynamic pad created, linking parser/decoder\n");
 
-  sinkpad = gst_element_get_pad (decoder, "sink");
+  sinkpad = gst_element_get_static_pad (decoder, "sink");
   gst_pad_link (pad, sinkpad);
 
   gst_object_unref (sinkpad);
index af45559..cad954c 100644 (file)
@@ -656,7 +656,7 @@ main (int   argc,
   gst_bin_add (GST_BIN (bin), sink);
 
   /* add ghostpad */
-  pad = gst_element_get_pad (sink, "sink");
+  pad = gst_element_get_static_pad (sink, "sink");
   gst_element_add_pad (bin, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (GST_OBJECT (pad));
 <!-- example-end ghostpad.c a -->
index a56e19c..15adbe7 100644 (file)
@@ -243,7 +243,7 @@ cb_newpad (GstElement *decodebin,
   GstPad *audiopad;
 
   /* only link once */
-  audiopad = gst_element_get_pad (audio, "sink");
+  audiopad = gst_element_get_static_pad (audio, "sink");
   if (GST_PAD_IS_LINKED (audiopad)) {
     g_object_unref (audiopad);
     return;
@@ -299,7 +299,7 @@ main (gint   argc,
   /* create audio output */
   audio = gst_bin_new ("audiobin");
   conv = gst_element_factory_make ("audioconvert", "aconv");
-  audiopad = gst_element_get_pad (conv, "sink");
+  audiopad = gst_element_get_static_pad (conv, "sink");
   sink = gst_element_factory_make ("alsasink", "sink");
   gst_bin_add_many (GST_BIN (audio), conv, sink, NULL);
   gst_element_link (conv, sink);