mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
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:
parent
b60d7bf2bc
commit
c4b2be2aad
16 changed files with 28 additions and 28 deletions
|
|
@ -92,7 +92,7 @@ int main(int argc, char *argv[])
|
|||
properties = pw_properties_new(
|
||||
PW_KEY_CORE_NAME, daemon_name,
|
||||
PW_KEY_CONTEXT_PROFILE_MODULES, "none",
|
||||
PW_KEY_CORE_DAEMON, "1", NULL);
|
||||
PW_KEY_CORE_DAEMON, "true", NULL);
|
||||
|
||||
/* parse configuration */
|
||||
config = pw_daemon_config_new(properties);
|
||||
|
|
|
|||
|
|
@ -463,7 +463,7 @@ static void make_node(struct data *data)
|
|||
{
|
||||
struct pw_properties *props;
|
||||
|
||||
props = pw_properties_new(PW_KEY_NODE_AUTOCONNECT, "1", NULL);
|
||||
props = pw_properties_new(PW_KEY_NODE_AUTOCONNECT, "true", NULL);
|
||||
if (data->path)
|
||||
pw_properties_set(props, PW_KEY_NODE_TARGET, data->path);
|
||||
pw_properties_set(props, PW_KEY_MEDIA_CLASS, "Stream/Input/Video");
|
||||
|
|
|
|||
|
|
@ -469,8 +469,8 @@ static void make_node(struct data *data)
|
|||
{
|
||||
struct pw_properties *props;
|
||||
|
||||
props = pw_properties_new(PW_KEY_NODE_AUTOCONNECT, "1",
|
||||
PW_KEY_NODE_EXCLUSIVE, "1",
|
||||
props = pw_properties_new(PW_KEY_NODE_AUTOCONNECT, "true",
|
||||
PW_KEY_NODE_EXCLUSIVE, "true",
|
||||
PW_KEY_MEDIA_TYPE, "Audio",
|
||||
PW_KEY_MEDIA_CATEGORY, "Playback",
|
||||
PW_KEY_MEDIA_ROLE, "Music",
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ static int make_node(struct data *data)
|
|||
data->node = iface;
|
||||
|
||||
if (data->path) {
|
||||
pw_properties_set(props, PW_KEY_NODE_AUTOCONNECT, "1");
|
||||
pw_properties_set(props, PW_KEY_NODE_AUTOCONNECT, "true");
|
||||
pw_properties_set(props, PW_KEY_NODE_TARGET, data->path);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ int main(int argc, char *argv[])
|
|||
data.context = pw_context_new(
|
||||
pw_main_loop_get_loop(data.loop),
|
||||
pw_properties_new(
|
||||
PW_KEY_CORE_DAEMON, "0",
|
||||
PW_KEY_CORE_DAEMON, "false",
|
||||
NULL), 0);
|
||||
|
||||
spa_hook_list_init(&data.hooks);
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ int main(int argc, char *argv[])
|
|||
PW_KEY_MEDIA_TYPE, "Video",
|
||||
PW_KEY_MEDIA_CATEGORY, "Capture",
|
||||
PW_KEY_MEDIA_ROLE, "DSP",
|
||||
PW_KEY_NODE_AUTOCONNECT, "1",
|
||||
PW_KEY_NODE_AUTOCONNECT, data.target ? "true" : "false",
|
||||
PW_KEY_NODE_TARGET, data.target,
|
||||
PW_KEY_MEDIA_CLASS, "Stream/Input/Video",
|
||||
NULL),
|
||||
|
|
|
|||
|
|
@ -127,8 +127,8 @@ static void node_port_init(void *data, struct pw_impl_port *port)
|
|||
}
|
||||
if (direction == n->direction) {
|
||||
if (is_device) {
|
||||
pw_properties_set(new, PW_KEY_PORT_PHYSICAL, "1");
|
||||
pw_properties_set(new, PW_KEY_PORT_TERMINAL, "1");
|
||||
pw_properties_set(new, PW_KEY_PORT_PHYSICAL, "true");
|
||||
pw_properties_set(new, PW_KEY_PORT_TERMINAL, "true");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -388,9 +388,9 @@ struct pw_impl_port *pw_context_create_port(
|
|||
|
||||
if (info) {
|
||||
if (SPA_FLAG_IS_SET(info->flags, SPA_PORT_FLAG_PHYSICAL))
|
||||
pw_properties_set(properties, PW_KEY_PORT_PHYSICAL, "1");
|
||||
pw_properties_set(properties, PW_KEY_PORT_PHYSICAL, "true");
|
||||
if (SPA_FLAG_IS_SET(info->flags, SPA_PORT_FLAG_TERMINAL))
|
||||
pw_properties_set(properties, PW_KEY_PORT_TERMINAL, "1");
|
||||
pw_properties_set(properties, PW_KEY_PORT_TERMINAL, "true");
|
||||
this->spa_flags = info->flags;
|
||||
}
|
||||
|
||||
|
|
@ -855,7 +855,7 @@ int pw_impl_port_add(struct pw_impl_port *port, struct pw_impl_node *node)
|
|||
control = PW_IMPL_PORT_IS_CONTROL(port);
|
||||
if (control) {
|
||||
dir = port->direction == PW_DIRECTION_INPUT ? "control" : "notify";
|
||||
pw_properties_set(port->properties, PW_KEY_PORT_CONTROL, "1");
|
||||
pw_properties_set(port->properties, PW_KEY_PORT_CONTROL, "true");
|
||||
}
|
||||
else {
|
||||
dir = port->direction == PW_DIRECTION_INPUT ? "in" : "out";
|
||||
|
|
|
|||
|
|
@ -378,8 +378,8 @@ void pw_init(int *argc, char **argv[])
|
|||
support->registry = &global_registry;
|
||||
|
||||
n_items = 0;
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_COLORS, "1");
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_TIMESTAMP, "1");
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_COLORS, "true");
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_TIMESTAMP, "true");
|
||||
snprintf(level, sizeof(level), "%d", pw_log_level);
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_LEVEL, level);
|
||||
if ((str = getenv("PIPEWIRE_LOG")) != NULL)
|
||||
|
|
|
|||
|
|
@ -1073,7 +1073,7 @@ stream_new(struct pw_context *context, const char *name,
|
|||
}
|
||||
|
||||
if (pw_properties_get(props, PW_KEY_STREAM_IS_LIVE) == NULL)
|
||||
pw_properties_set(props, PW_KEY_STREAM_IS_LIVE, "1");
|
||||
pw_properties_set(props, PW_KEY_STREAM_IS_LIVE, "true");
|
||||
|
||||
if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL && extra) {
|
||||
str = pw_properties_get(extra, PW_KEY_APP_NAME);
|
||||
|
|
@ -1417,13 +1417,13 @@ pw_stream_connect(struct pw_stream *stream,
|
|||
if (target_id != PW_ID_ANY)
|
||||
pw_properties_setf(stream->properties, PW_KEY_NODE_TARGET, "%d", target_id);
|
||||
if (flags & PW_STREAM_FLAG_AUTOCONNECT)
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_AUTOCONNECT, "1");
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_AUTOCONNECT, "true");
|
||||
if (flags & PW_STREAM_FLAG_DRIVER)
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_DRIVER, "1");
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_DRIVER, "true");
|
||||
if (flags & PW_STREAM_FLAG_EXCLUSIVE)
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_EXCLUSIVE, "1");
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_EXCLUSIVE, "true");
|
||||
if (flags & PW_STREAM_FLAG_DONT_RECONNECT)
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_DONT_RECONNECT, "1");
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_DONT_RECONNECT, "true");
|
||||
|
||||
if ((pw_properties_get(stream->properties, PW_KEY_MEDIA_CLASS) == NULL)) {
|
||||
pw_properties_setf(stream->properties, PW_KEY_MEDIA_CLASS, "Stream/%s/%s",
|
||||
|
|
@ -1456,7 +1456,7 @@ pw_stream_connect(struct pw_stream *stream,
|
|||
|
||||
if ((str = pw_properties_get(props, PW_KEY_STREAM_MONITOR)) &&
|
||||
pw_properties_parse_bool(str)) {
|
||||
pw_properties_set(props, "resample.peaks", "1");
|
||||
pw_properties_set(props, "resample.peaks", "true");
|
||||
}
|
||||
|
||||
follower = pw_context_create_node(impl->context, pw_properties_copy(props), 0);
|
||||
|
|
|
|||
|
|
@ -6579,7 +6579,7 @@ int main(int argc, char *argv[])
|
|||
spa_list_init(&data.remotes);
|
||||
pw_map_init(&data.vars, 64, 16);
|
||||
|
||||
data.context = pw_context_new(l, pw_properties_new(PW_KEY_CORE_DAEMON, "1", NULL), 0);
|
||||
data.context = pw_context_new(l, pw_properties_new(PW_KEY_CORE_DAEMON, "true", NULL), 0);
|
||||
|
||||
pw_context_load_module(data.context, "libpipewire-module-link-factory", NULL, NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue