confbridge: Add support for specifying maximum sample rate.

ConfBridge has the ability to move between different sample
rates for mixing the conference bridge. Up until now there has
only been the ability to set the conference bridge to mix at
a specific sample rate, or to let it move between sample rates
as necessary. This change adds the ability to configure a
conference bridge with a maximum sample rate so it can move
between sample rates but only up to the configured maximum.

ASTERISK-28658

Change-Id: Idff80896ccfb8a58a816e4ce9ac4ebde785963ee
This commit is contained in:
Joshua C. Colp
2019-12-12 00:03:46 +00:00
parent 7e441d6b25
commit 89b7144fbd
8 changed files with 74 additions and 1 deletions

View File

@@ -3770,6 +3770,13 @@ void ast_bridge_set_internal_sample_rate(struct ast_bridge *bridge, unsigned int
ast_bridge_unlock(bridge);
}
void ast_bridge_set_maximum_sample_rate(struct ast_bridge *bridge, unsigned int sample_rate)
{
ast_bridge_lock(bridge);
bridge->softmix.maximum_sample_rate = sample_rate;
ast_bridge_unlock(bridge);
}
static void cleanup_video_mode(struct ast_bridge *bridge)
{
switch (bridge->softmix.video_mode.mode) {