? .gdb_history
? cscope.in.out
? cscope.out
? cscope.po.out
? docs/faq/faq.tex
? po/de.mo
? po/es.mo
? po/nl.mo
? po/no.mo
Index: gst/gststructure.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/gststructure.c,v
retrieving revision 1.5
diff -u -r1.5 gststructure.c
--- gst/gststructure.c	29 Nov 2003 06:31:10 -0000	1.5
+++ gst/gststructure.c	31 May 2004 20:21:54 -0000
@@ -659,6 +659,28 @@
 }
 
 /**
+ * gst_structure_field_foreach_const:
+ * @structure: a const #GstStructure
+ * @func: a function to call for each field
+ * @user_data: private data
+ *
+ * Calls the provided function once for each field in the #GstStructure.
+ */
+void
+gst_structure_field_foreach_const (const GstStructure *structure,
+    GstStructureForeachConstFunc func, gpointer user_data)
+{
+  int i;
+  GstStructureField *field;
+
+  for(i=0;i<structure->fields->len;i++){
+    field = GST_STRUCTURE_FIELD(structure, i);
+
+    func (structure, field->name, &field->value, user_data);
+  }
+}
+
+/**
  * gst_structure_has_field:
  * @structure: a #GstStructure
  * @fieldname: the name of a field
Index: gst/gststructure.h
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/gststructure.h,v
retrieving revision 1.5
diff -u -r1.5 gststructure.h
--- gst/gststructure.h	29 Nov 2003 06:31:10 -0000	1.5
+++ gst/gststructure.h	31 May 2004 20:21:54 -0000
@@ -30,6 +30,8 @@
 
 typedef void (*GstStructureForeachFunc) (GstStructure *structure,
     GQuark field_id, GValue *value, gpointer user_data);
+typedef void (*GstStructureForeachConstFunc) (const GstStructure *structure,
+    GQuark field_id, const GValue *value, gpointer user_data);
 
 struct _GstStructure {
   int len;
@@ -86,6 +88,8 @@
     const gchar *field);
 void gst_structure_field_foreach (GstStructure *structure,
     GstStructureForeachFunc func, gpointer user_data);
+void gst_structure_field_foreach_const (const GstStructure *structure,
+    GstStructureForeachConstFunc func, gpointer user_data);
 gint gst_structure_n_fields(const GstStructure *structure);
 gboolean gst_structure_has_field(const GstStructure *structure, const gchar *field);
 gboolean gst_structure_has_field_typed(const GstStructure *structure,
Index: gst/gsttag.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/gsttag.c,v
retrieving revision 1.4
diff -u -r1.4 gsttag.c
--- gst/gsttag.c	18 Dec 2003 04:28:43 -0000	1.4
+++ gst/gsttag.c	31 May 2004 20:21:54 -0000
@@ -387,7 +387,7 @@
   GstTagMergeMode	mode;
 } GstTagCopyData;
 static void
-gst_tag_list_add_value_internal (GstStructure *list, GstTagMergeMode mode, GQuark tag, GValue *value)
+gst_tag_list_add_value_internal (GstStructure *list, GstTagMergeMode mode, GQuark tag, const GValue *value)
 {
   GstTagInfo *info = gst_tag_lookup (tag);
   GstStructureField *field;
@@ -439,7 +439,7 @@
   }
 }
 static void
-gst_tag_list_copy_foreach (GstStructure *structure, GQuark tag, GValue *value, gpointer user_data)
+gst_tag_list_copy_foreach (const GstStructure *structure, GQuark tag, const GValue *value, gpointer user_data)
 {
   GstTagCopyData *copy = (GstTagCopyData *) user_data;
 
@@ -467,7 +467,7 @@
   if (mode == GST_TAG_MERGE_REPLACE_ALL) {
     gst_structure_remove_all_fields (data.list);
   }
-  gst_structure_field_foreach ((GstStructure *) from, gst_tag_list_copy_foreach, &data);
+  gst_structure_field_foreach_const ((const GstStructure *) from, gst_tag_list_copy_foreach, &data);
 }
 /**
  * gst_tag_list_copy:
@@ -634,8 +634,8 @@
   gpointer		data;
 } TagForeachData;
 static void 
-structure_foreach_wrapper (GstStructure *structure, GQuark field_id, 
-	GValue *value, gpointer user_data)
+structure_foreach_wrapper (const GstStructure *structure, GQuark field_id, 
+	const GValue *value, gpointer user_data)
 {
   TagForeachData *data = (TagForeachData *) user_data;
   data->func (GST_TAG_LIST (structure), g_quark_to_string (field_id), data->data);
@@ -650,7 +650,7 @@
  * is no tag, the function won't be called at all.
  */
 void
-gst_tag_list_foreach (GstTagList *list, GstTagForeachFunc func, gpointer user_data)
+gst_tag_list_foreach (const GstTagList *list, GstTagForeachFunc func, gpointer user_data)
 {
   TagForeachData data;
 
@@ -659,7 +659,7 @@
   
   data.func = func;
   data.data = user_data;
-  gst_structure_field_foreach ((GstStructure *) list, structure_foreach_wrapper, &data);
+  gst_structure_field_foreach_const ((const GstStructure *) list, structure_foreach_wrapper, &data);
 }
 
 /***** tag events *****/
Index: gst/gsttag.h
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/gsttag.h,v
retrieving revision 1.2
diff -u -r1.2 gsttag.h
--- gst/gsttag.h	29 Nov 2003 06:34:05 -0000	1.2
+++ gst/gsttag.h	31 May 2004 20:21:54 -0000
@@ -94,7 +94,7 @@
 						 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);
 
