mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
add a log line for type deserialization
Original commit message from CVS: add a log line for type deserialization
This commit is contained in:
parent
bdc643ddb9
commit
8952d2c571
2 changed files with 13 additions and 2 deletions
|
@ -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):
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue