core: inherit the default.clock.quantum-limit from the server

Copy the server value to the context so that the locally allocated
buffers match the server quantum-limit and we don't cause xruns because
of too small buffers.

See #4490
This commit is contained in:
Wim Taymans 2025-01-09 11:38:07 +01:00
parent 48416b32ad
commit 509e769aa5

View file

@ -23,6 +23,18 @@
PW_LOG_TOPIC_EXTERN(log_core);
#define PW_LOG_TOPIC_DEFAULT log_core
static void core_event_info(void *data, const struct pw_core_info *info)
{
struct pw_core *this = data;
if (info && info->props) {
static const char * const keys[] = {
"default.clock.quantum-limit",
NULL
};
pw_properties_update_keys(this->context->properties, info->props, keys);
}
}
static void core_event_ping(void *data, uint32_t id, int seq)
{
struct pw_core *this = data;
@ -114,6 +126,7 @@ static void core_event_remove_mem(void *data, uint32_t id)
static const struct pw_core_events core_events = {
PW_VERSION_CORE_EVENTS,
.info = core_event_info,
.error = core_event_error,
.ping = core_event_ping,
.done = core_event_done,