gst/gsttaglist.*: Operates on a const

Original commit message from CVS:
2005-11-19  Andy Wingo  <wingo@pobox.com>

* gst/gsttaglist.c:
* gst/gsttaglist.h (gst_tag_list_foreach): Operates on a const
GstTagList*. Fixes #143472.

* gst/gststructure.h: Clarify what the foreach/map functions can
or can't do to their arguments.
This commit is contained in:
Andy Wingo 2005-11-19 15:51:41 +00:00
parent 3eb5b03dfd
commit e89aaa7e30
4 changed files with 31 additions and 5 deletions

View file

@ -1,3 +1,12 @@
2005-11-19 Andy Wingo <wingo@pobox.com>
* gst/gsttaglist.c:
* gst/gsttaglist.h (gst_tag_list_foreach): Operates on a const
GstTagList*. Fixes #143472.
* gst/gststructure.h: Clarify what the foreach/map functions can
or can't do to their arguments.
2005-11-18 Wim Taymans <wim@fluendo.com>
* gst/gstclock.c: (gst_clock_set_calibration),

View file

@ -38,7 +38,8 @@ typedef struct _GstStructure GstStructure;
* @value: the #GValue of the field
* @user_data: user data
*
* A function that will be called in gst_structure_foreach()
* A function that will be called in gst_structure_foreach(). The function may
* not modify @value.
*
* Returns: TRUE if the foreach operation should continue, FALSE if
* the foreach operation should stop with FALSE.
@ -53,7 +54,8 @@ typedef gboolean (*GstStructureForeachFunc) (GQuark field_id,
* @value: the #GValue of the field
* @user_data: user data
*
* A function that will be called in gst_structure_map_in_place()
* A function that will be called in gst_structure_map_in_place(). The function
* may modify @value.
*
* Returns: TRUE if the map operation should continue, FALSE if
* the map operation should stop with FALSE.

View file

@ -801,7 +801,7 @@ structure_foreach_wrapper (GQuark field_id, const GValue * value,
* is no tag, the function won't be called at all.
*/
void
gst_tag_list_foreach (GstTagList * list, GstTagForeachFunc func,
gst_tag_list_foreach (const GstTagList * list, GstTagForeachFunc func,
gpointer user_data)
{
TagForeachData data;

View file

@ -56,7 +56,22 @@ typedef GstStructure GstTagList;
#define GST_IS_TAG_LIST(x) (gst_is_tag_list (GST_TAG_LIST (x)))
#define GST_TYPE_TAG_LIST (gst_tag_list_get_type ())
typedef void (* GstTagForeachFunc) (const GstTagList *list, const gchar *tag, gpointer user_data);
/**
* GstTagForeachFunc:
* @list: the #GstTagList
* @tag: a name of a tag in @list
* @user_data: user data
*
* A function that will be called in gst_tag_list_foreach(). The function may
* not modify the tag list.
*
* Returns: TRUE if the foreach operation should continue, FALSE if
* the foreach operation should stop with FALSE.
*/
typedef gboolean (*GstTagForeachFunc) (const GstTagList *list,
const gchar * tag,
gpointer user_data);
typedef void (* GstTagMergeFunc) (GValue *dest, const GValue *src);
/* initialize tagging system */
@ -116,7 +131,7 @@ void gst_tag_list_add_valist_values (GstTagList * list,
va_list var_args);
void gst_tag_list_remove_tag (GstTagList * list,
const gchar * tag);
void gst_tag_list_foreach (GstTagList * list,
void gst_tag_list_foreach (const GstTagList * list,
GstTagForeachFunc func,
gpointer user_data);