gst/gstpad.h: Fix inline docs for GstPadLinkReturn.
authorTim-Philipp Müller <tim@centricular.net>
Sun, 31 Jul 2005 11:59:33 +0000 (11:59 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Sun, 31 Jul 2005 11:59:33 +0000 (11:59 +0000)
Original commit message from CVS:
* gst/gstpad.h:
Fix inline docs for GstPadLinkReturn.
* gst/gststructure.c: (gst_structure_has_name):
* gst/gststructure.h:
* docs/gst/gstreamer-sections.txt:
New API: gst_structure_has_name().

ChangeLog
docs/gst/gstreamer-sections.txt
gst/gstpad.h
gst/gststructure.c
gst/gststructure.h

index 340cf14..c56b7d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-07-31  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * gst/gstpad.h:
+         Fix inline docs for GstPadLinkReturn.
+         
+       * gst/gststructure.c: (gst_structure_has_name):
+       * gst/gststructure.h:
+       * docs/gst/gstreamer-sections.txt:
+         New API: gst_structure_has_name().
+
 2005-07-30  Tim-Philipp Müller  <tim at centricular dot net>
 
        * configure.ac:
index bb85c27..ac7f877 100644 (file)
@@ -1226,6 +1226,7 @@ gst_structure_new_valist
 gst_structure_copy
 gst_structure_free
 gst_structure_get_name
+gst_structure_has_name
 gst_structure_set_name
 gst_structure_get_name_id
 gst_structure_id_get_value
index 1623a14..793610d 100644 (file)
@@ -58,13 +58,13 @@ typedef struct _GstStaticPadTemplate GstStaticPadTemplate;
 
 /**
  * GstPadLinkReturn:
- * #GST_PAD_LINK_OK            : link ok 
- * #GST_PAD_LINK_WRONG_HIERARCHY: pads have no common grandparent 
- * #GST_PAD_LINK_WAS_LINKED    : pad was already linked 
- * #GST_PAD_LINK_WRONG_DIRECTION: pads have wrong direction 
- * #GST_PAD_LINK_NOFORMAT      : pads do not have common format 
- * #GST_PAD_LINK_NOSCHED       : pads cannot cooperate in scheduling 
- * #GST_PAD_LINK_REFUSED       : refused for some reason 
+ * @GST_PAD_LINK_OK            : link ok 
+ * @GST_PAD_LINK_WRONG_HIERARCHY: pads have no common grandparent 
+ * @GST_PAD_LINK_WAS_LINKED    : pad was already linked 
+ * @GST_PAD_LINK_WRONG_DIRECTION: pads have wrong direction 
+ * @GST_PAD_LINK_NOFORMAT      : pads do not have common format 
+ * @GST_PAD_LINK_NOSCHED       : pads cannot cooperate in scheduling 
+ * @GST_PAD_LINK_REFUSED       : refused for some reason 
  */
 typedef enum {
   GST_PAD_LINK_OK               =  0,
index cac3e8f..3d5941c 100644 (file)
@@ -285,7 +285,27 @@ gst_structure_get_name (const GstStructure * structure)
 }
 
 /**
- * gst_structure_get_name:
+ * gst_structure_has_name:
+ * @structure: a #GstStructure
+ * @name: structure name to check for
+ *
+ * Returns: TRUE if @name matches the name of the structure.
+ */
+gboolean
+gst_structure_has_name (const GstStructure * structure, const gchar * name)
+{
+  const gchar *structure_name;
+
+  g_return_val_if_fail (structure != NULL, FALSE);
+  g_return_val_if_fail (name != NULL, FALSE);
+
+  structure_name = g_quark_to_string (structure->name);
+
+  return (structure_name && strcmp (structure_name, name) == 0);
+}
+
+/**
+ * gst_structure_get_name_id:
  * @structure: a #GstStructure
  *
  * Accessor fuction.
index 1658f47..81eeed6 100644 (file)
@@ -70,6 +70,8 @@ void                    gst_structure_free                 (GstStructure
 
 G_CONST_RETURN gchar *  gst_structure_get_name             (const GstStructure      *structure);
 GQuark                 gst_structure_get_name_id          (const GstStructure      *structure);
+gboolean                gst_structure_has_name             (const GstStructure      *structure,
+                                                           const gchar             *name);
 void                    gst_structure_set_name             (GstStructure            *structure,
                                                            const gchar             *name);