We have two different bitrate calculation algorithms
Categories
(Core :: WebRTC: Audio/Video, task, P3)
Tracking
()
People
(Reporter: bwc, Unassigned)
References
(Blocks 1 open bug)
Details
We have one in WebrtcVideoConduit::OnControlConfigChange, and another in SelectBitrates (which is used by VideoStreamFactory). These are implemented somewhat differently, which is probably not what we want. See https://bugzilla.mozilla.org/show_bug.cgi?id=1706917#c35
Also, note that if we handle bug 1746477 by making the "factory" just a passthrough, the SelectBitrates implementation will simply go away; we want to think this one through and decide how we want to reconcile before we do that.
Reporter | ||
Comment 2•3 years ago
|
||
Also, while we're looking at this, I should note that it looks like VideoStreamFactory::mMinBitrate is probably unnecessary; the site where we use this, we have a webrtc::VideoEncoderConfig, which has the same value in min_transmit_bitrate_bps.
Reporter | ||
Comment 3•3 years ago
|
||
I should also note that SelectBitrates does not use mPrefMaxBitrate (except to assert that it is either not set, or set to a large enough value that it would not have imposed any additional constraint):
The code in OnControlConfigChange does seem to take the pref max into account.
Comment 4•3 years ago
|
||
One reason these are inherently different is that the SelectBitrates logic depends on the input frame resolution. And that involves setting the target bitrate. We need to look into what options we have here -- can we skip setting that and upstream will do something reasonable? Doesn't seem like it at first glance.
Description
•