Add filter and stream properties

Mostly latency but also adapter properties for streams.
This commit is contained in:
Wim Taymans 2021-02-20 21:03:38 +01:00
parent 149319819a
commit 5738cb74ef
4 changed files with 26 additions and 0 deletions

View file

@ -63,3 +63,14 @@ context.modules = {
# Provides factories to make session manager objects. # Provides factories to make session manager objects.
libpipewire-module-session-manager = null libpipewire-module-session-manager = null
} }
filter.properties = {
#node.latency = 1024/48000
}
stream.properties = {
#node.latency = 1024/48000
#resample.quality = 4
#channelmix.normalize = false
#channelmix.mix-lfe = false
}

View file

@ -52,3 +52,14 @@ context.modules = {
# Provides factories to make session manager objects. # Provides factories to make session manager objects.
libpipewire-module-session-manager = null libpipewire-module-session-manager = null
} }
filter.properties = {
#node.latency = 1024/48000
}
stream.properties = {
#node.latency = 1024/48000
#resample.quality = 4
#channelmix.normalize = false
#channelmix.mix-lfe = false
}

View file

@ -994,6 +994,8 @@ filter_new(struct pw_context *context, const char *name,
res = -errno; res = -errno;
goto error_properties; goto error_properties;
} }
if ((str = pw_context_get_conf_section(context, "filter.properties")) != NULL)
pw_properties_update_string(props, str, strlen(str));
if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL && extra) { if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL && extra) {
str = pw_properties_get(extra, PW_KEY_APP_NAME); str = pw_properties_get(extra, PW_KEY_APP_NAME);

View file

@ -1176,6 +1176,8 @@ stream_new(struct pw_context *context, const char *name,
res = -errno; res = -errno;
goto error_properties; goto error_properties;
} }
if ((str = pw_context_get_conf_section(context, "stream.properties")) != NULL)
pw_properties_update_string(props, str, strlen(str));
if (pw_properties_get(props, PW_KEY_STREAM_IS_LIVE) == NULL) if (pw_properties_get(props, PW_KEY_STREAM_IS_LIVE) == NULL)
pw_properties_set(props, PW_KEY_STREAM_IS_LIVE, "true"); pw_properties_set(props, PW_KEY_STREAM_IS_LIVE, "true");