Closed clone1018 closed 3 years ago
@haydenmc I wanted to get some code in for tweaking the default ms bitrate window we use. I copied the existing configuration code & used the feature flagging setup that nacks use. The latter was done so I could avoid accessing the configuration directly inside the FtlMediaConnection.cpp
. However I feel that this is entirely too much code for a simple feature, and it blows up the constructors of FtlServer, FtlStream, and JanusFtl. Let me know how it should be done better, and I will make the adjustments.
Yo - to be honest this is probably the best way we've got with our current architecture. It is a bummerino that we've got to plumb the configuration values down through so many classes, but given how the classes relate to one another I think it's okay. Publish and I'll approve!
Looks like we've got to fix the CI too... 👀
Did you modify the submodules in this PR?
Did you modify the submodules in this PR?
Only by accident :). Will test locally, revert those changes, and then mark it ready!
Tested using:
FTL_MAX_ALLOWED_BITS_PER_SECOND=4000000
FTL_ROLLING_SIZE_AVG_MS=10000 # Also tested 30000
and
OBS Video Bitrate: 3840 Kbps
OBS Audio Bitrate: 160 bps
and the stream was successful indefinitely. In production I suggest we use about 20-30 seconds as the rolling size, as the only real purpose of this is to prevent actual abuse.
I'm almost certain this is the wrong way to do it :)