mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
context: pass quantum_limit when loading plugins
This commit is contained in:
parent
676bed734c
commit
4e5ab4bcbe
2 changed files with 15 additions and 2 deletions
|
|
@ -242,6 +242,13 @@ struct pw_impl_node *pw_spa_node_load(struct pw_context *context,
|
|||
int res;
|
||||
struct spa_handle *handle;
|
||||
void *iface;
|
||||
const struct pw_properties *p;
|
||||
|
||||
if (properties) {
|
||||
p = pw_context_get_properties(context);
|
||||
pw_properties_set(properties, "clock.quantum-limit",
|
||||
pw_properties_get(p, "default.clock.quantum-limit"));
|
||||
}
|
||||
|
||||
handle = pw_context_load_spa_handle(context,
|
||||
factory_name,
|
||||
|
|
|
|||
|
|
@ -583,8 +583,10 @@ static int setup_mixer(struct pw_impl_port *port, const struct spa_pod *param)
|
|||
int res;
|
||||
const char *fallback_lib, *factory_name;
|
||||
struct spa_handle *handle;
|
||||
struct spa_dict_item items[1];
|
||||
struct spa_dict_item items[2];
|
||||
char quantum_limit[16];
|
||||
void *iface;
|
||||
struct pw_context *context = port->node->context;
|
||||
|
||||
if ((res = spa_format_parse(param, &media_type, &media_subtype)) < 0)
|
||||
return res;
|
||||
|
|
@ -634,7 +636,11 @@ static int setup_mixer(struct pw_impl_port *port, const struct spa_pod *param)
|
|||
}
|
||||
|
||||
items[0] = SPA_DICT_ITEM_INIT(SPA_KEY_LIBRARY_NAME, fallback_lib);
|
||||
handle = pw_context_load_spa_handle(port->node->context, factory_name,
|
||||
spa_scnprintf(quantum_limit, sizeof(quantum_limit), "%u",
|
||||
context->settings.clock_quantum_limit);
|
||||
items[1] = SPA_DICT_ITEM_INIT("clock.quantum-limit", quantum_limit);
|
||||
|
||||
handle = pw_context_load_spa_handle(context, factory_name,
|
||||
&SPA_DICT_INIT_ARRAY(items));
|
||||
if (handle == NULL)
|
||||
return -errno;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue