API: add gst_bin_find_unlinked_pad()
authorTim-Philipp Müller <tim@centricular.net>
Tue, 27 May 2008 10:50:49 +0000 (10:50 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Tue, 27 May 2008 10:50:49 +0000 (10:50 +0000)
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.c: (element_find_unlinked_pad),
(gst_bin_find_unlinked_pad), (gst_bin_find_unconnected_pad),
* gst/gstutils.h:
API: add gst_bin_find_unlinked_pad()
API: deprecate gst_bin_find_unconnected_pad() (#401456)

ChangeLog
docs/gst/gstreamer-sections.txt
gst/gstutils.c
gst/gstutils.h

index f6da40c..949d4a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-05-27  Tim-Philipp Müller  <tim.muller at collabora co uk>
+
+       * docs/gst/gstreamer-sections.txt:
+       * gst/gstutils.c: (element_find_unlinked_pad),
+         (gst_bin_find_unlinked_pad), (gst_bin_find_unconnected_pad),
+       * gst/gstutils.h:
+         API: add gst_bin_find_unlinked_pad()
+         API: deprecate gst_bin_find_unconnected_pad() (#401456)
+
 2008-05-26  Peter Kjellerstedt  <pkj@axis.com>
 
        * gst/gstclock.c:
index f89e18a..b79a90a 100644 (file)
@@ -59,6 +59,7 @@ gst_bin_iterate_all_by_interface
 <SUBSECTION>
 gst_bin_add_many
 gst_bin_remove_many
+gst_bin_find_unlinked_pad
 gst_bin_find_unconnected_pad
 
 <SUBSECTION>
index c8350c1..5443b47 100644 (file)
@@ -3260,7 +3260,7 @@ element_find_unlinked_pad (GstElement * element, GstPadDirection direction)
 }
 
 /**
- * gst_bin_find_unconnected_pad:
+ * gst_bin_find_unlinked_pad:
  * @bin: bin in which to look for elements with unlinked pads
  * @direction: whether to look for an unlinked source or sink pad
  *
@@ -3272,10 +3272,10 @@ element_find_unlinked_pad (GstElement * element, GstPadDirection direction)
  *
  * Returns: unlinked pad of the given direction, or NULL.
  *
- * Since: 0.10.3
+ * Since: 0.10.20
  */
 GstPad *
-gst_bin_find_unconnected_pad (GstBin * bin, GstPadDirection direction)
+gst_bin_find_unlinked_pad (GstBin * bin, GstPadDirection direction)
 {
   GstIterator *iter;
   gboolean done;
@@ -3314,6 +3314,31 @@ gst_bin_find_unconnected_pad (GstBin * bin, GstPadDirection direction)
 }
 
 /**
+ * gst_bin_find_unconnected_pad:
+ * @bin: bin in which to look for elements with unlinked pads
+ * @direction: whether to look for an unlinked source or sink pad
+ *
+ * Recursively looks for elements with an unlinked pad of the given
+ * direction within the specified bin and returns an unlinked pad
+ * if one is found, or NULL otherwise. If a pad is found, the caller
+ * owns a reference to it and should use gst_object_unref() on the
+ * pad when it is not needed any longer.
+ *
+ * Returns: unlinked pad of the given direction, or NULL.
+ *
+ * Since: 0.10.3
+ *
+ * Deprecated: use gst_bin_find_unlinked_pad() instead.
+ */
+#ifndef GST_REMOVE_DEPRECATED
+GstPad *
+gst_bin_find_unconnected_pad (GstBin * bin, GstPadDirection direction)
+{
+  return gst_bin_find_unlinked_pad (bin, direction);
+}
+#endif
+
+/**
  * gst_parse_bin_from_description:
  * @bin_description: command line describing the bin
  * @ghost_unlinked_pads: whether to automatically create ghost pads
@@ -3393,11 +3418,11 @@ gst_parse_bin_from_description_full (const gchar * bin_description,
 
   /* find pads and ghost them if necessary */
   if (ghost_unlinked_pads) {
-    if ((pad = gst_bin_find_unconnected_pad (bin, GST_PAD_SRC))) {
+    if ((pad = gst_bin_find_unlinked_pad (bin, GST_PAD_SRC))) {
       gst_element_add_pad (GST_ELEMENT (bin), gst_ghost_pad_new ("src", pad));
       gst_object_unref (pad);
     }
-    if ((pad = gst_bin_find_unconnected_pad (bin, GST_PAD_SINK))) {
+    if ((pad = gst_bin_find_unlinked_pad (bin, GST_PAD_SINK))) {
       gst_element_add_pad (GST_ELEMENT (bin), gst_ghost_pad_new ("sink", pad));
       gst_object_unref (pad);
     }
index 9fa98e0..c4b3b69 100644 (file)
@@ -667,7 +667,10 @@ gboolean                gst_pad_query_peer_convert      (GstPad *pad, GstFormat
 /* bin functions */
 void                    gst_bin_add_many                (GstBin *bin, GstElement *element_1, ...) G_GNUC_NULL_TERMINATED;
 void                    gst_bin_remove_many             (GstBin *bin, GstElement *element_1, ...) G_GNUC_NULL_TERMINATED;
+GstPad *                gst_bin_find_unlinked_pad       (GstBin *bin, GstPadDirection direction);
+#ifndef GST_DISABLE_DEPRECATED
 GstPad *                gst_bin_find_unconnected_pad    (GstBin *bin, GstPadDirection direction);
+#endif
 
 /* buffer functions */
 GstBuffer *            gst_buffer_merge                (GstBuffer * buf1, GstBuffer * buf2);