add a log line for type deserialization
authorThomas Vander Stichele <thomas@apestaart.org>
Wed, 22 Jun 2005 11:02:57 +0000 (11:02 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Wed, 22 Jun 2005 11:02:57 +0000 (11:02 +0000)
Original commit message from CVS:
add a log line for type deserialization

ChangeLog
gst/parse/grammar.y

index 85c4739..a07cb4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2005-06-22  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+       * gst/parse/grammar.y:
+         add a log line for type deserialization
+
+2005-06-22  Thomas Vander Stichele  <thomas at apestaart dot org>
+
        * check/gst/gstvalue.c: (START_TEST):
        * gst/gstvalue.c: (gst_value_deserialize):
          return long long, not int, so gint64 deserialization actually
index 1e5562d..dea8fae 100644 (file)
@@ -237,6 +237,8 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
   gchar *pos = value;
   GValue v = { 0, }; 
   GValue v2 = { 0, };
+  GType value_type;
+
   /* parse the string, so the property name is null-terminated an pos points
      to the beginning of the value */
   while (!g_ascii_isspace (*pos) && (*pos != '=')) pos++; 
@@ -254,8 +256,12 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
     pos[strlen (pos) - 1] = '\0';
   }
   gst_parse_unescape (pos); 
-  if ((pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (element), value))) { 
-    g_value_init (&v, G_PARAM_SPEC_VALUE_TYPE(pspec)); 
+  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (element), value);
+  if (pspec) {
+      value_type = G_PARAM_SPEC_VALUE_TYPE (pspec);
+      GST_LOG ("parsing property %s as a %s", pspec->name,
+        g_type_name (value_type));
+    g_value_init (&v, value_type);
     if (!gst_value_deserialize (&v, pos))
       goto error;
     g_object_set_property (G_OBJECT (element), value, &v);