stream: use PIPEWIRE_LATENCY env as fallback

This commit is contained in:
Wim Taymans 2020-08-07 15:09:15 +02:00
parent 5fda46fdb9
commit b89e07f8c0
2 changed files with 8 additions and 0 deletions

View file

@ -969,6 +969,10 @@ filter_new(struct pw_context *context, const char *name,
str = name;
pw_properties_set(props, PW_KEY_NODE_NAME, str);
}
if (pw_properties_get(props, PW_KEY_NODE_LATENCY) == NULL) {
if ((str = getenv("PIPEWIRE_LATENCY")) != NULL)
pw_properties_set(props, PW_KEY_NODE_LATENCY, str);
}
spa_hook_list_init(&impl->hooks);
this->properties = props;

View file

@ -1118,6 +1118,10 @@ stream_new(struct pw_context *context, const char *name,
str = name;
pw_properties_set(props, PW_KEY_NODE_NAME, str);
}
if (pw_properties_get(props, PW_KEY_NODE_LATENCY) == NULL) {
if ((str = getenv("PIPEWIRE_LATENCY")) != NULL)
pw_properties_set(props, PW_KEY_NODE_LATENCY, str);
}
spa_hook_list_init(&impl->hooks);
this->properties = props;