mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
settings: remove link.min-buffers option again
The min should always be 1. We have other ways of bumping the number of buffers to 2, like the ASYNC allocation flag which we can set if we are also doing some async scheduling. We could make this an option later. Otherwise, we would also allocate 2 buffers by default between the mixer and the node, which is unnecessary.
This commit is contained in:
parent
dbedd09d42
commit
f366167278
7 changed files with 4 additions and 12 deletions
|
|
@ -217,10 +217,6 @@ Default video rate denominator
|
|||
@PAR@ pipewire.conf library.name.system = support/libspa-support
|
||||
The name of the shared library to use for the system functions for the main thread.
|
||||
|
||||
@PAR@ pipewire.conf link.min-buffers = 2
|
||||
The minimum number of buffers to negotiate between nodes. Using 1 buffer will consume
|
||||
less memory but might cause glitches when using async nodes.
|
||||
|
||||
@PAR@ pipewire.conf link.max-buffers = 64
|
||||
The maximum number of buffers to negotiate between nodes. Note that version < 3 clients
|
||||
can only support 16 buffers. More buffers is almost always worse than less, latency
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ context.properties = {
|
|||
#library.name.system = support/libspa-support
|
||||
#context.data-loop.library.name.system = support/libspa-support
|
||||
#support.dbus = true
|
||||
#link.min-buffers = 2
|
||||
#link.max-buffers = 64
|
||||
link.max-buffers = 16 # version < 3 clients can't handle more
|
||||
#mem.warn-mlock = false
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ context.properties = {
|
|||
#library.name.system = support/libspa-support
|
||||
#context.data-loop.library.name.system = support/libspa-support
|
||||
#support.dbus = true
|
||||
#link.min-buffers = 2
|
||||
#link.max-buffers = 64
|
||||
link.max-buffers = 16 # version < 3 clients can't handle more
|
||||
#mem.warn-mlock = false
|
||||
|
|
|
|||
|
|
@ -308,7 +308,6 @@ int pw_buffers_negotiate(struct pw_context *context, uint32_t flags,
|
|||
|
||||
if (SPA_FLAG_IS_SET(flags, PW_BUFFERS_FLAG_ASYNC))
|
||||
max_buffers = SPA_MAX(2u, max_buffers);
|
||||
max_buffers = SPA_MAX(context->settings.link_min_buffers, max_buffers);
|
||||
|
||||
if (SPA_FLAG_IS_SET(flags, PW_BUFFERS_FLAG_SHARED_MEM)) {
|
||||
if (types != SPA_ID_INVALID)
|
||||
|
|
|
|||
|
|
@ -588,6 +588,9 @@ static int do_allocation(struct pw_impl_link *this)
|
|||
flags = 0;
|
||||
/* always shared buffers for the link */
|
||||
alloc_flags = PW_BUFFERS_FLAG_SHARED;
|
||||
/* always enable async mode */
|
||||
alloc_flags |= PW_BUFFERS_FLAG_ASYNC;
|
||||
|
||||
if (output->node->remote || input->node->remote)
|
||||
alloc_flags |= PW_BUFFERS_FLAG_SHARED_MEM;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ struct settings {
|
|||
uint32_t clock_quantum_floor; /* quantum floor (lower bound) */
|
||||
struct spa_rectangle video_size;
|
||||
struct spa_fraction video_rate;
|
||||
uint32_t link_min_buffers;
|
||||
uint32_t link_max_buffers;
|
||||
unsigned int mem_warn_mlock:1;
|
||||
unsigned int mem_allow_mlock:1;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
#define DEFAULT_VIDEO_HEIGHT 480
|
||||
#define DEFAULT_VIDEO_RATE_NUM 25u
|
||||
#define DEFAULT_VIDEO_RATE_DENOM 1u
|
||||
#define DEFAULT_LINK_MIN_BUFFERS 2u
|
||||
#define DEFAULT_LINK_MAX_BUFFERS 64u
|
||||
#define DEFAULT_MEM_WARN_MLOCK false
|
||||
#define DEFAULT_MEM_ALLOW_MLOCK true
|
||||
|
|
@ -223,7 +222,6 @@ void pw_settings_init(struct pw_context *this)
|
|||
d->log_level = get_default_int(p, "log.level", pw_log_level);
|
||||
d->clock_power_of_two_quantum = get_default_bool(p, "clock.power-of-two-quantum",
|
||||
DEFAULT_CLOCK_POWER_OF_TWO_QUANTUM);
|
||||
d->link_min_buffers = get_default_int(p, "link.min-buffers", DEFAULT_LINK_MIN_BUFFERS);
|
||||
d->link_max_buffers = get_default_int(p, "link.max-buffers", DEFAULT_LINK_MAX_BUFFERS);
|
||||
d->mem_warn_mlock = get_default_bool(p, "mem.warn-mlock", DEFAULT_MEM_WARN_MLOCK);
|
||||
d->mem_allow_mlock = get_default_bool(p, "mem.allow-mlock", DEFAULT_MEM_ALLOW_MLOCK);
|
||||
|
|
@ -231,8 +229,7 @@ void pw_settings_init(struct pw_context *this)
|
|||
d->check_quantum = get_default_bool(p, "settings.check-quantum", DEFAULT_CHECK_QUANTUM);
|
||||
d->check_rate = get_default_bool(p, "settings.check-rate", DEFAULT_CHECK_RATE);
|
||||
|
||||
d->link_min_buffers = SPA_MAX(d->link_min_buffers, 1u);
|
||||
d->link_max_buffers = SPA_MAX(d->link_max_buffers, d->link_min_buffers);
|
||||
d->link_max_buffers = SPA_MAX(d->link_max_buffers, 1u);
|
||||
|
||||
d->clock_quantum_limit = SPA_CLAMP(d->clock_quantum_limit,
|
||||
CLOCK_QUANTUM_FLOOR, CLOCK_QUANTUM_LIMIT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue