use true and false for boolean properties

So that it's easier to convert them to booleans in introspection
code later.
This commit is contained in:
Wim Taymans 2020-03-03 18:17:46 +01:00
parent b60d7bf2bc
commit c4b2be2aad
16 changed files with 28 additions and 28 deletions

View file

@ -150,7 +150,7 @@ static void emit_port_info(struct impl *this, struct port *port, bool full)
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_FORMAT_DSP, "32 bit float mono audio");
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_AUDIO_CHANNEL, port->position);
if (port->direction == SPA_DIRECTION_OUTPUT)
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_PORT_MONITOR, "1");
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_PORT_MONITOR, "true");
}
port->info.props = &SPA_DICT_INIT(items, n_items);

View file

@ -928,7 +928,7 @@ impl_init(const struct spa_handle_factory *factory,
if ((str = spa_dict_lookup(info, "resample.quality")) != NULL)
this->props.quality = atoi(str);
if ((str = spa_dict_lookup(info, "resample.peaks")) != NULL)
this->peaks = atoi(str);
this->peaks = strcmp(str, "true") == 0 || atoi(str) == 1;
if ((str = spa_dict_lookup(info, "factory.mode")) != NULL) {
if (strcmp(str, "split") == 0)
this->mode = MODE_SPLIT;

View file

@ -196,7 +196,7 @@ static void emit_node_info(struct impl *this, bool full)
struct spa_dict_item items[1];
this->info.change_mask |= SPA_NODE_CHANGE_MASK_PROPS;
items[0] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_DRIVER, this->driver ? "1" : "0");
items[0] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_DRIVER, this->driver ? "true" : "false");
this->info.props = &SPA_DICT_INIT(items, 1);
spa_node_emit_info(&this->hooks, &this->info);