mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
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:
parent
48416b32ad
commit
509e769aa5
1 changed files with 13 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue