? gst/.gstinfo.h.swp
? gst/gstbus.c.keep
? gst/parse/lex.backup
? gst/parse/parse.l.keep
Index: gst/Makefile.am
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/Makefile.am,v
retrieving revision 1.217
diff -u -p -u -r1.217 Makefile.am
--- gst/Makefile.am	18 Jul 2006 09:42:31 -0000	1.217
+++ gst/Makefile.am	8 Aug 2006 13:41:00 -0000
@@ -99,6 +99,7 @@ libgstreamer_@GST_MAJORMINOR@_la_SOURCES
 	gstpipeline.c		\
 	gstplugin.c		\
 	gstpluginfeature.c	\
+	gstquark.c		\
 	gstquery.c		\
 	gstregistry.c		\
 	gstsegment.c		\
@@ -208,6 +209,7 @@ noinst_HEADERS = 		\
 	glib-compat-private.h	\
 	gst-i18n-lib.h		\
 	gst-i18n-app.h		\
+	gstquark.h		\
 	gst_private.h
 
 gstmarshal.h: gstmarshal.list
Index: gst/gst.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gst.c,v
retrieving revision 1.214
diff -u -p -u -r1.214 gst.c
--- gst/gst.c	17 Jul 2006 17:40:52 -0000	1.214
+++ gst/gst.c	8 Aug 2006 13:41:01 -0000
@@ -767,6 +767,7 @@ init_post (void)
   llf = G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL;
   g_log_set_handler (g_log_domain_gstreamer, llf, debug_log_handler, NULL);
 
+  _priv_gst_quarks_initialize ();
   _gst_format_initialize ();
   _gst_query_initialize ();
   gst_object_get_type ();
Index: gst/gst_private.h
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gst_private.h,v
retrieving revision 1.29
diff -u -p -u -r1.29 gst_private.h
--- gst/gst_private.h	9 Apr 2006 16:57:34 -0000	1.29
+++ gst/gst_private.h	8 Aug 2006 13:41:01 -0000
@@ -41,6 +41,9 @@ G_BEGIN_DECLS
 
 gboolean __gst_in_valgrind (void);
 
+/* Initialize GStreamer private quark storage */
+void _priv_gst_quarks_initialize (void);
+
 /*** debugging categories *****************************************************/
 
 #ifndef GST_DISABLE_GST_DEBUG
Index: gst/gstquark.c
===================================================================
RCS file: gst/gstquark.c
diff -N gst/gstquark.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gst/gstquark.c	8 Aug 2006 13:41:01 -0000
@@ -0,0 +1,46 @@
+/* GStreamer
+ * Copyright (C) 2006 Jan Schmidt <thaytan@noraisin.net>
+ *
+ * gstquark.c: Registered quarks for the _priv_gst_quark_table, private to 
+ *   GStreamer
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gst_private.h"
+#include "gstquark.h"
+
+/* These strings must match order and number declared in the GstQuarkId
+ * enum in gstquark.h! */
+static const gchar *_quark_strings[] = {
+  "format", "current", "duration", "rate",
+  "seekable", "segment-start", "segment-end",
+  "src_format", "src_value", "dest_format", "dest_value",
+  "start_format", "start_value", "stop_format", "stop_value"
+};
+
+GQuark _priv_gst_quark_table[GST_QUARK_MAX];
+
+void
+_priv_gst_quarks_initialize (void)
+{
+  gint i;
+
+  for (i = 0; i < GST_QUARK_MAX; i++) {
+    _priv_gst_quark_table[i] = g_quark_from_static_string (_quark_strings[i]);
+  }
+}
+
Index: gst/gstquark.h
===================================================================
RCS file: gst/gstquark.h
diff -N gst/gstquark.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gst/gstquark.h	8 Aug 2006 13:41:01 -0000
@@ -0,0 +1,52 @@
+/* GStreamer
+ * Copyright (C) 2006 Jan Schmidt <thaytan@noraisin.net>
+ *
+ * gstquark.h: Private header for storing quark info 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GST_QUARK_H__
+#define __GST_QUARK_H__
+
+/* These enums need to match the number and order
+ * of strings declared in _quark_table, in gstquark.c */
+typedef enum _GstQuarkId
+{
+  GST_QUARK_FORMAT = 0,
+  GST_QUARK_CURRENT = 1,
+  GST_QUARK_DURATION = 2,
+  GST_QUARK_RATE = 3,
+  GST_QUARK_SEEKABLE = 4,
+  GST_QUARK_SEGMENT_START = 5,
+  GST_QUARK_SEGMENT_END = 6,
+  GST_QUARK_SRC_FORMAT = 7,
+  GST_QUARK_SRC_VALUE = 8,
+  GST_QUARK_DEST_FORMAT = 9,
+  GST_QUARK_DEST_VALUE = 10,
+  GST_QUARK_START_FORMAT = 11,
+  GST_QUARK_START_VALUE = 12,
+  GST_QUARK_STOP_FORMAT = 13,
+  GST_QUARK_STOP_VALUE = 14,
+
+  GST_QUARK_MAX = 15
+} GstQuarkId;
+
+extern GQuark _priv_gst_quark_table[GST_QUARK_MAX];
+
+#define GST_QUARK(q) _priv_gst_quark_table[GST_QUARK_##q]
+
+#endif
Index: gst/gstquery.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gstquery.c,v
retrieving revision 1.32
diff -u -p -u -r1.32 gstquery.c
--- gst/gstquery.c	8 May 2006 17:12:08 -0000	1.32
+++ gst/gstquery.c	8 Aug 2006 13:41:01 -0000
@@ -64,6 +64,7 @@
 #include "gstquery.h"
 #include "gstvalue.h"
 #include "gstenumtypes.h"
+#include "gstquark.h"
 
 GST_DEBUG_CATEGORY_STATIC (gst_query_debug);
 #define GST_CAT_DEFAULT gst_query_debug
@@ -73,7 +74,6 @@ static void gst_query_class_init (gpoint
 static void gst_query_finalize (GstQuery * query);
 static GstQuery *_gst_query_copy (GstQuery * query);
 
-
 static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
 static GList *_gst_queries = NULL;
 static GHashTable *_nick_to_query = NULL;
@@ -406,9 +406,11 @@ gst_query_new_position (GstFormat format
   GstQuery *query;
   GstStructure *structure;
 
-  structure = gst_structure_new ("GstQueryPosition",
-      "format", GST_TYPE_FORMAT, format,
-      "cur", G_TYPE_INT64, (gint64) - 1, NULL);
+  structure = gst_structure_empty_new ("GstQueryPosition");
+  gst_structure_id_set (structure,
+      GST_QUARK (FORMAT), GST_TYPE_FORMAT, format,
+      GST_QUARK (CURRENT), G_TYPE_INT64, (gint64) - 1, NULL);
+
   query = gst_query_new (GST_QUERY_POSITION, structure);
 
   return query;
@@ -430,8 +432,9 @@ gst_query_set_position (GstQuery * query
   g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_POSITION);
 
   structure = gst_query_get_structure (query);
-  gst_structure_set (structure,
-      "format", GST_TYPE_FORMAT, format, "cur", G_TYPE_INT64, cur, NULL);
+  gst_structure_id_set (structure,
+      GST_QUARK (FORMAT), GST_TYPE_FORMAT, format,
+      GST_QUARK (CURRENT), G_TYPE_INT64, cur, NULL);
 }
 
 /**
@@ -452,9 +455,11 @@ gst_query_parse_position (GstQuery * que
 
   structure = gst_query_get_structure (query);
   if (format)
-    *format = g_value_get_enum (gst_structure_get_value (structure, "format"));
+    *format = g_value_get_enum (gst_structure_id_get_value (structure,
+            GST_QUARK (FORMAT)));
   if (cur)
-    *cur = g_value_get_int64 (gst_structure_get_value (structure, "cur"));
+    *cur = g_value_get_int64 (gst_structure_id_get_value (structure,
+            GST_QUARK (CURRENT)));
 }
 
 
@@ -474,9 +479,11 @@ gst_query_new_duration (GstFormat format
   GstQuery *query;
   GstStructure *structure;
 
-  structure = gst_structure_new ("GstQueryDuration",
-      "format", GST_TYPE_FORMAT, format,
-      "duration", G_TYPE_INT64, (gint64) - 1, NULL);
+  structure = gst_structure_empty_new ("GstQueryDuration");
+  gst_structure_id_set (structure,
+      GST_QUARK (FORMAT), GST_TYPE_FORMAT, format,
+      GST_QUARK (DURATION), G_TYPE_INT64, (gint64) - 1, NULL);
+
   query = gst_query_new (GST_QUERY_DURATION, structure);
 
   return query;
@@ -498,9 +505,9 @@ gst_query_set_duration (GstQuery * query
   g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_DURATION);
 
   structure = gst_query_get_structure (query);
-  gst_structure_set (structure,
-      "format", GST_TYPE_FORMAT, format,
-      "duration", G_TYPE_INT64, duration, NULL);
+  gst_structure_id_set (structure,
+      GST_QUARK (FORMAT), GST_TYPE_FORMAT, format,
+      GST_QUARK (DURATION), G_TYPE_INT64, duration, NULL);
 }
 
 /**
@@ -522,10 +529,11 @@ gst_query_parse_duration (GstQuery * que
 
   structure = gst_query_get_structure (query);
   if (format)
-    *format = g_value_get_enum (gst_structure_get_value (structure, "format"));
+    *format = g_value_get_enum (gst_structure_id_get_value (structure,
+            GST_QUARK (FORMAT)));
   if (duration)
-    *duration =
-        g_value_get_int64 (gst_structure_get_value (structure, "duration"));
+    *duration = g_value_get_int64 (gst_structure_id_get_value (structure,
+            GST_QUARK (DURATION)));
 }
 
 /**
@@ -549,11 +557,13 @@ gst_query_new_convert (GstFormat src_for
 
   g_return_val_if_fail (value >= 0, NULL);
 
-  structure = gst_structure_new ("GstQueryConvert",
-      "src_format", GST_TYPE_FORMAT, src_format,
-      "src_value", G_TYPE_INT64, value,
-      "dest_format", GST_TYPE_FORMAT, dest_format,
-      "dest_value", G_TYPE_INT64, (gint64) - 1, NULL);
+  structure = gst_structure_empty_new ("GstQueryConvert");
+  gst_structure_id_set (structure,
+      GST_QUARK (SRC_FORMAT), GST_TYPE_FORMAT, src_format,
+      GST_QUARK (SRC_VALUE), G_TYPE_INT64, value,
+      GST_QUARK (DEST_FORMAT), GST_TYPE_FORMAT, dest_format,
+      GST_QUARK (DEST_VALUE), G_TYPE_INT64, (gint64) - 1, NULL);
+
   query = gst_query_new (GST_QUERY_CONVERT, structure);
 
   return query;
@@ -578,11 +588,11 @@ gst_query_set_convert (GstQuery * query,
   g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_CONVERT);
 
   structure = gst_query_get_structure (query);
-  gst_structure_set (structure,
-      "src_format", GST_TYPE_FORMAT, src_format,
-      "src_value", G_TYPE_INT64, src_value,
-      "dest_format", GST_TYPE_FORMAT, dest_format,
-      "dest_value", G_TYPE_INT64, dest_value, NULL);
+  gst_structure_id_set (structure,
+      GST_QUARK (SRC_FORMAT), GST_TYPE_FORMAT, src_format,
+      GST_QUARK (SRC_VALUE), G_TYPE_INT64, src_value,
+      GST_QUARK (DEST_FORMAT), GST_TYPE_FORMAT, dest_format,
+      GST_QUARK (DEST_VALUE), G_TYPE_INT64, (gint64) dest_value, NULL);
 }
 
 /**
@@ -606,17 +616,17 @@ gst_query_parse_convert (GstQuery * quer
 
   structure = gst_query_get_structure (query);
   if (src_format)
-    *src_format =
-        g_value_get_enum (gst_structure_get_value (structure, "src_format"));
+    *src_format = g_value_get_enum (gst_structure_id_get_value (structure,
+            GST_QUARK (SRC_FORMAT)));
   if (src_value)
-    *src_value =
-        g_value_get_int64 (gst_structure_get_value (structure, "src_value"));
+    *src_value = g_value_get_int64 (gst_structure_id_get_value (structure,
+            GST_QUARK (SRC_VALUE)));
   if (dest_format)
-    *dest_format =
-        g_value_get_enum (gst_structure_get_value (structure, "dest_format"));
+    *dest_format = g_value_get_enum (gst_structure_id_get_value (structure,
+            GST_QUARK (DEST_FORMAT)));
   if (dest_value)
-    *dest_value =
-        g_value_get_int64 (gst_structure_get_value (structure, "dest_value"));
+    *dest_value = g_value_get_int64 (gst_structure_id_get_value (structure,
+            GST_QUARK (DEST_VALUE)));
 }
 
 /**
@@ -635,8 +645,10 @@ gst_query_new_segment (GstFormat format)
   GstQuery *query;
   GstStructure *structure;
 
-  structure = gst_structure_new ("GstQuerySegment",
-      "format", GST_TYPE_FORMAT, format, NULL);
+  structure = gst_structure_empty_new ("GstQuerySegment");
+  gst_structure_id_set (structure,
+      GST_QUARK (FORMAT), GST_TYPE_FORMAT, format, NULL);
+
   query = gst_query_new (GST_QUERY_SEGMENT, structure);
 
   return query;
@@ -671,11 +683,11 @@ gst_query_set_segment (GstQuery * query,
   g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_SEGMENT);
 
   structure = gst_query_get_structure (query);
-  gst_structure_set (structure,
-      "rate", G_TYPE_DOUBLE, rate,
-      "format", GST_TYPE_FORMAT, format,
-      "start_value", G_TYPE_INT64, start_value,
-      "stop_value", G_TYPE_INT64, stop_value, NULL);
+  gst_structure_id_set (structure,
+      GST_QUARK (RATE), G_TYPE_DOUBLE, rate,
+      GST_QUARK (FORMAT), GST_TYPE_FORMAT, format,
+      GST_QUARK (START_VALUE), G_TYPE_INT64, start_value,
+      GST_QUARK (STOP_VALUE), G_TYPE_INT64, stop_value, NULL);
 }
 
 /**
@@ -701,15 +713,17 @@ gst_query_parse_segment (GstQuery * quer
 
   structure = gst_query_get_structure (query);
   if (rate)
-    *rate = g_value_get_double (gst_structure_get_value (structure, "rate"));
+    *rate = g_value_get_double (gst_structure_id_get_value (structure,
+            GST_QUARK (RATE)));
   if (format)
-    *format = g_value_get_enum (gst_structure_get_value (structure, "format"));
+    *format = g_value_get_enum (gst_structure_id_get_value (structure,
+            GST_QUARK (FORMAT)));
   if (start_value)
-    *start_value =
-        g_value_get_int64 (gst_structure_get_value (structure, "start_value"));
+    *start_value = g_value_get_int64 (gst_structure_id_get_value (structure,
+            GST_QUARK (START_VALUE)));
   if (stop_value)
-    *stop_value =
-        g_value_get_int64 (gst_structure_get_value (structure, "stop_value"));
+    *stop_value = g_value_get_int64 (gst_structure_id_get_value (structure,
+            GST_QUARK (STOP_VALUE)));
 }
 
 /**
@@ -763,11 +777,13 @@ gst_query_new_seeking (GstFormat format)
   GstQuery *query;
   GstStructure *structure;
 
-  structure = gst_structure_new ("GstQuerySeeking",
-      "format", GST_TYPE_FORMAT, format,
-      "seekable", G_TYPE_BOOLEAN, FALSE,
-      "segment-start", G_TYPE_INT64, (gint64) - 1,
-      "segment-end", G_TYPE_INT64, (gint64) - 1, NULL);
+  structure = gst_structure_empty_new ("GstQuerySeeking");
+  gst_structure_id_set (structure,
+      GST_QUARK (FORMAT), GST_TYPE_FORMAT, format,
+      GST_QUARK (SEEKABLE), G_TYPE_BOOLEAN, FALSE,
+      GST_QUARK (SEGMENT_START), G_TYPE_INT64, (gint64) - 1,
+      GST_QUARK (SEGMENT_END), G_TYPE_INT64, (gint64) - 1, NULL);
+
   query = gst_query_new (GST_QUERY_SEEKING, structure);
 
   return query;
@@ -792,11 +808,11 @@ gst_query_set_seeking (GstQuery * query,
   g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_SEEKING);
 
   structure = gst_query_get_structure (query);
-  gst_structure_set (structure,
-      "format", GST_TYPE_FORMAT, format,
-      "seekable", G_TYPE_BOOLEAN, seekable,
-      "segment-start", G_TYPE_INT64, segment_start,
-      "segment-end", G_TYPE_INT64, segment_end, NULL);
+  gst_structure_id_set (structure,
+      GST_QUARK (FORMAT), GST_TYPE_FORMAT, format,
+      GST_QUARK (SEEKABLE), G_TYPE_BOOLEAN, seekable,
+      GST_QUARK (SEGMENT_START), G_TYPE_INT64, segment_start,
+      GST_QUARK (SEGMENT_END), G_TYPE_INT64, segment_end, NULL);
 }
 
 /**
@@ -821,17 +837,17 @@ gst_query_parse_seeking (GstQuery * quer
 
   structure = gst_query_get_structure (query);
   if (format)
-    *format = g_value_get_enum (gst_structure_get_value (structure, "format"));
+    *format = g_value_get_enum (gst_structure_id_get_value (structure,
+            GST_QUARK (FORMAT)));
   if (seekable)
-    *seekable =
-        g_value_get_boolean (gst_structure_get_value (structure, "seekable"));
+    *seekable = g_value_get_boolean (gst_structure_id_get_value (structure,
+            GST_QUARK (SEEKABLE)));
   if (segment_start)
-    *segment_start =
-        g_value_get_int64 (gst_structure_get_value (structure,
-            "segment-start"));
+    *segment_start = g_value_get_int64 (gst_structure_id_get_value (structure,
+            GST_QUARK (SEGMENT_START)));
   if (segment_end)
-    *segment_end =
-        g_value_get_int64 (gst_structure_get_value (structure, "segment-end"));
+    *segment_end = g_value_get_int64 (gst_structure_id_get_value (structure,
+            GST_QUARK (SEGMENT_END)));
 }
 
 /**
