From: Andy Wingo Date: Sat, 19 Nov 2005 15:51:41 +0000 (+0000) Subject: gst/gsttaglist.*: Operates on a const X-Git-Tag: RELEASE-0_9_6~86 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e89aaa7e3000b39c164de6d1d06a612b3a16d136;p=platform%2Fupstream%2Fgstreamer.git gst/gsttaglist.*: Operates on a const Original commit message from CVS: 2005-11-19 Andy Wingo * 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. --- diff --git a/ChangeLog b/ChangeLog index 69eb580..203c1ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-11-19 Andy Wingo + + * 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 * gst/gstclock.c: (gst_clock_set_calibration), diff --git a/gst/gststructure.h b/gst/gststructure.h index 766ce02..1a73e21 100644 --- a/gst/gststructure.h +++ b/gst/gststructure.h @@ -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. diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index 86571e3..ac45359 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -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; diff --git a/gst/gsttaglist.h b/gst/gsttaglist.h index 20d66de..b1e5567 100644 --- a/gst/gsttaglist.h +++ b/gst/gsttaglist.h @@ -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);