summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2020-08-07 15:09:15 +0200
committerWim Taymans <wtaymans@redhat.com>2020-08-07 15:15:40 +0200
commitb89e07f8c0b1ecc9d46e779d54d5600d89c39e10 (patch)
tree39bc21bb68e90689eb7211a1c903637b4c487cdc
parent5fda46fdb96484e36c78363557bc15ffe8523f3f (diff)
stream: use PIPEWIRE_LATENCY env as fallback
-rw-r--r--src/pipewire/filter.c4
-rw-r--r--src/pipewire/stream.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/pipewire/filter.c b/src/pipewire/filter.c
index 7db8076b..4442c54b 100644
--- a/src/pipewire/filter.c
+++ b/src/pipewire/filter.c
@@ -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;
diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c
index ec82839a..e26d08cf 100644
--- a/src/pipewire/stream.c
+++ b/src/pipewire/stream.c
@@ -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;