+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),
* @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.
* @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.
* 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;
#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 */
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);