settings: use WpSpaJson to parse the settings
We need to use WpSpaJson to parse the values in WpSettings. This is because the wireplumber configuration is written in JSON, so WpSettings should only hold JSON values. To fix this, 2 API changes have been done: - wp_settings_get_int() only accepts gint values, instead of gint64 values. This is because the WpSpaJson API only parses int values, like spa_json_parse_int(). - wp_settings_get_string() now returns a newly allocated string, this is because the string needs to be decoded in case it has quotes.
This commit is contained in:
@@ -167,7 +167,7 @@ do_parse_settings (void *data, const char *location,
|
||||
}
|
||||
j = g_value_get_boxed (&item);
|
||||
|
||||
value = wp_spa_json_parse_string (j);
|
||||
value = wp_spa_json_to_string (j);
|
||||
len = wp_spa_json_get_size (j);
|
||||
g_value_unset (&item);
|
||||
|
||||
|
Reference in New Issue
Block a user