add a log line for type deserialization

Original commit message from CVS:
add a log line for type deserialization
This commit is contained in:
Thomas Vander Stichele 2005-06-22 11:02:57 +00:00
parent bdc643ddb9
commit 8952d2c571
2 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,8 @@
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):

View 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);