mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
context: improve settings and defaults
Make structure with defaults that holds the defaults as they are loaded from the config file or initialized with default values. Copy this structure to a settings version that is used at runtime. Add a force-quantum and force-rate field in the settings that can be used to force a quantum and samplerate if != 0.
This commit is contained in:
parent
2ad202b8e8
commit
d8ad87fd09
8 changed files with 70 additions and 46 deletions
|
|
@ -1219,11 +1219,11 @@ static struct pw_proxy *node_export(struct pw_core *core, void *object, bool do_
|
|||
data->client_node = (struct pw_client_node *)client_node;
|
||||
data->remote_id = SPA_ID_INVALID;
|
||||
|
||||
data->allow_mlock = data->context->defaults.mem_allow_mlock;
|
||||
data->allow_mlock = data->context->settings.mem_allow_mlock;
|
||||
if ((str = pw_properties_get(node->properties, "mem.allow-mlock")) != NULL)
|
||||
data->allow_mlock = pw_properties_parse_bool(str);
|
||||
|
||||
data->warn_mlock = data->context->defaults.mem_warn_mlock;
|
||||
data->warn_mlock = data->context->settings.mem_warn_mlock;
|
||||
if ((str = pw_properties_get(node->properties, "mem.warn-mlock")) != NULL)
|
||||
data->warn_mlock = pw_properties_parse_bool(str);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue