mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
app_confbridge/bridge_softmix: Add ability to force estimated bitrate
app_confbridge now has the ability to set the estimated bitrate on an SFU bridge. To use it, set a bridge profile's remb_behavior to "force" and set remb_estimated_bitrate to a rate in bits per second. The remb_estimated_bitrate parameter is ignored if remb_behavior is something other than "force". Change-Id: Idce6464ff014a37ea3b82944452e56cc4d75ab0a
This commit is contained in:
committed by
Friendly Automation
parent
374d18cb97
commit
3b0a53f257
@@ -1396,6 +1396,7 @@ static void remb_collect_report_all(struct ast_bridge *bridge, struct softmix_br
|
||||
case AST_BRIDGE_VIDEO_SFU_REMB_AVERAGE:
|
||||
case AST_BRIDGE_VIDEO_SFU_REMB_LOWEST:
|
||||
case AST_BRIDGE_VIDEO_SFU_REMB_HIGHEST:
|
||||
case AST_BRIDGE_VIDEO_SFU_REMB_FORCE:
|
||||
/* These will never actually get hit due to being handled by remb_collect_report below */
|
||||
break;
|
||||
}
|
||||
@@ -1417,6 +1418,12 @@ static void remb_collect_report(struct ast_bridge *bridge, struct ast_bridge_cha
|
||||
/* We evenly divide the available maximum bitrate across the video sources
|
||||
* to this receiver so each source gets an equal slice.
|
||||
*/
|
||||
|
||||
if (bridge->softmix.video_mode.mode_data.sfu_data.remb_behavior == AST_BRIDGE_VIDEO_SFU_REMB_FORCE) {
|
||||
softmix_data->bitrate = bridge->softmix.video_mode.mode_data.sfu_data.estimated_bitrate;
|
||||
return;
|
||||
}
|
||||
|
||||
bitrate = (sc->remb.br_mantissa << sc->remb.br_exp) / AST_VECTOR_SIZE(&sc->video_sources);
|
||||
|
||||
/* If this receiver has no bitrate yet ignore it */
|
||||
@@ -1462,6 +1469,9 @@ static void remb_collect_report(struct ast_bridge *bridge, struct ast_bridge_cha
|
||||
case AST_BRIDGE_VIDEO_SFU_REMB_HIGHEST_ALL:
|
||||
/* These will never actually get hit due to being handled by remb_collect_report_all above */
|
||||
break;
|
||||
case AST_BRIDGE_VIDEO_SFU_REMB_FORCE:
|
||||
/* Don't do anything, we've already forced it */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user