From 374b7a318388974f83c3819550cc42eadd6c1ac2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 31 Jul 2005 11:59:33 +0000 Subject: [PATCH] gst/gstpad.h: Fix inline docs for GstPadLinkReturn. 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 | 10 ++++++++++ docs/gst/gstreamer-sections.txt | 1 + gst/gstpad.h | 14 +++++++------- gst/gststructure.c | 22 +++++++++++++++++++++- gst/gststructure.h | 2 ++ 5 files changed, 41 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 340cf14..c56b7d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-07-31 Tim-Philipp Müller + + * 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 * configure.ac: diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index bb85c27..ac7f877 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -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 diff --git a/gst/gstpad.h b/gst/gstpad.h index 1623a14..793610d 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -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, diff --git a/gst/gststructure.c b/gst/gststructure.c index cac3e8f..3d5941c 100644 --- a/gst/gststructure.c +++ b/gst/gststructure.c @@ -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. diff --git a/gst/gststructure.h b/gst/gststructure.h index 1658f47..81eeed6 100644 --- a/gst/gststructure.h +++ b/gst/gststructure.h @@ -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); -- 2.7.4