pod: rename context to flags in spa_pod_prop

Flags are more useful when we can use them to describe how to
filter properties later.
This commit is contained in:
Wim Taymans 2019-11-15 12:02:00 +01:00
parent e620412034
commit 18974f90f6
3 changed files with 4 additions and 4 deletions

View file

@ -142,8 +142,8 @@ spa_debug_pod_value(int indent, const struct spa_type_info *info,
SPA_POD_OBJECT_BODY_FOREACH(b, size, p) { SPA_POD_OBJECT_BODY_FOREACH(b, size, p) {
ii = spa_debug_type_find(info, p->key); ii = spa_debug_type_find(info, p->key);
spa_debug("%*s" "Prop: key %s (%d), context %d", indent+2, "", spa_debug("%*s" "Prop: key %s (%d), flags %08x", indent+2, "",
ii ? ii->name : "unknown", p->key, p->context); ii ? ii->name : "unknown", p->key, p->flags);
spa_debug_pod_value(indent + 4, ii ? ii->values : NULL, spa_debug_pod_value(indent + 4, ii ? ii->values : NULL,
p->value.type, p->value.type,

View file

@ -193,7 +193,7 @@ struct spa_pod_fd {
struct spa_pod_prop { struct spa_pod_prop {
uint32_t key; /**< key of property, list of valid keys depends on the uint32_t key; /**< key of property, list of valid keys depends on the
* object type */ * object type */
uint32_t context; /**< context for property */ uint32_t flags; /**< flags for property */
struct spa_pod value; struct spa_pod value;
/* value follows */ /* value follows */
}; };

View file

@ -810,7 +810,7 @@ static int process_control(struct impl *this, struct spa_pod_sequence *control)
if ((control_id = prop_to_control_id(prop->key)) == 0) if ((control_id = prop_to_control_id(prop->key)) == 0)
continue; continue;
port = GET_OUT_PORT(this, prop->context); port = GET_OUT_PORT(this, 0);
set_control(this, port, control_id, set_control(this, port, control_id,
SPA_POD_VALUE(struct spa_pod_float, &prop->value)); SPA_POD_VALUE(struct spa_pod_float, &prop->value));
} }