context: make a new node.max-latency property

node.latency also influences the pipeline latency in that it can
push the latency above the default value.
node.max-latency, instead, is only used to clamp the final latency
of the pipeline.
This commit is contained in:
Wim Taymans 2021-03-03 13:24:22 +01:00
parent 4389e44903
commit c8804c3d6d
7 changed files with 38 additions and 11 deletions

View file

@ -284,7 +284,7 @@ static void emit_node_info(struct state *this, bool full)
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_DRIVER, "true");
if (this->have_format) {
snprintf(latency, sizeof(latency), "%lu/%d", this->buffer_frames / 4, this->rate);
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_LATENCY, latency);
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_MAX_LATENCY, latency);
}
this->info.props = &SPA_DICT_INIT(items, n_items);

View file

@ -285,7 +285,7 @@ static void emit_node_info(struct state *this, bool full)
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_DRIVER, "true");
if (this->have_format) {
snprintf(latency, sizeof(latency), "%lu/%d", this->buffer_frames / 4, this->rate);
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_LATENCY, latency);
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_MAX_LATENCY, latency);
}
this->info.props = &SPA_DICT_INIT(items, n_items);