mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
Type changes
Only allow properties inside objects, this makes it easier to iterate the object, which is needed for efficiently processing control streams. Add a choice type to mark variable properties. SPA_TYPE_Enum -> SPA_TYPE_Id to avoid confusion with choice enum Make it easier to allocate and initialize properties on the stack Make more efficient methods to make objects.
This commit is contained in:
parent
03fdabd155
commit
cc842cbdc8
63 changed files with 2253 additions and 1880 deletions
|
|
@ -181,29 +181,29 @@ setup_props(struct pw_core *core, struct spa_node *spa_node, struct pw_propertie
|
|||
|
||||
pw_log_info("configure prop %s", key);
|
||||
|
||||
switch(prop->body.value.type) {
|
||||
switch(prop->value.type) {
|
||||
case SPA_TYPE_Bool:
|
||||
SPA_POD_VALUE(struct spa_pod_bool, &prop->body.value) =
|
||||
SPA_POD_VALUE(struct spa_pod_bool, &prop->value) =
|
||||
pw_properties_parse_bool(value);
|
||||
break;
|
||||
case SPA_TYPE_Enum:
|
||||
SPA_POD_VALUE(struct spa_pod_enum, &prop->body.value) =
|
||||
case SPA_TYPE_Id:
|
||||
SPA_POD_VALUE(struct spa_pod_id, &prop->value) =
|
||||
spa_debug_type_find_type(NULL, value);
|
||||
break;
|
||||
case SPA_TYPE_Int:
|
||||
SPA_POD_VALUE(struct spa_pod_int, &prop->body.value) =
|
||||
SPA_POD_VALUE(struct spa_pod_int, &prop->value) =
|
||||
pw_properties_parse_int(value);
|
||||
break;
|
||||
case SPA_TYPE_Long:
|
||||
SPA_POD_VALUE(struct spa_pod_long, &prop->body.value) =
|
||||
SPA_POD_VALUE(struct spa_pod_long, &prop->value) =
|
||||
pw_properties_parse_int64(value);
|
||||
break;
|
||||
case SPA_TYPE_Float:
|
||||
SPA_POD_VALUE(struct spa_pod_float, &prop->body.value) =
|
||||
SPA_POD_VALUE(struct spa_pod_float, &prop->value) =
|
||||
pw_properties_parse_float(value);
|
||||
break;
|
||||
case SPA_TYPE_Double:
|
||||
SPA_POD_VALUE(struct spa_pod_double, &prop->body.value) =
|
||||
SPA_POD_VALUE(struct spa_pod_double, &prop->value) =
|
||||
pw_properties_parse_double(value);
|
||||
break;
|
||||
case SPA_TYPE_String:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue