mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
buffers: make max buffers a config option
This commit is contained in:
parent
e0f79bcbb8
commit
0978343e44
2 changed files with 7 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#set-prop library.name.system support/libspa-support
|
||||
#set-prop core.data-loop.library.name.system support/libspa-support
|
||||
#set-prop link.max-buffers 64
|
||||
|
||||
add-spa-lib audio.convert* audioconvert/libspa-audioconvert
|
||||
add-spa-lib api.alsa.* alsa/libspa-alsa
|
||||
|
|
|
|||
|
|
@ -225,6 +225,7 @@ int pw_buffers_negotiate(struct pw_core *core, uint32_t flags,
|
|||
uint32_t data_aligns[1];
|
||||
struct port output = { outnode, SPA_DIRECTION_OUTPUT, out_port_id };
|
||||
struct port input = { innode, SPA_DIRECTION_INPUT, in_port_id };
|
||||
const char *str;
|
||||
int res;
|
||||
|
||||
n_params = param_filter(result, &input, &output, SPA_PARAM_Buffers, &b);
|
||||
|
|
@ -240,7 +241,11 @@ int pw_buffers_negotiate(struct pw_core *core, uint32_t flags,
|
|||
offset += SPA_ROUND_UP_N(SPA_POD_SIZE(params[i]), 8);
|
||||
}
|
||||
|
||||
max_buffers = MAX_BUFFERS;
|
||||
if ((str = pw_properties_get(core->properties, "link.max-buffers")) != NULL)
|
||||
max_buffers = pw_properties_parse_int(str);
|
||||
else
|
||||
max_buffers = MAX_BUFFERS;
|
||||
|
||||
minsize = stride = 0;
|
||||
align = 8;
|
||||
param = find_param(params, n_params, SPA_TYPE_OBJECT_ParamBuffers);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue