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().
This commit is contained in:
Tim-Philipp Müller 2005-07-31 11:59:33 +00:00
parent 96e954852f
commit 374b7a3183
5 changed files with 41 additions and 8 deletions

View file

@ -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:

View 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

View 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,

View 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.

View 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);