Add custom resolution option

This commit is contained in:
Cameron Gutman 2020-11-24 00:13:39 -06:00
commit 7325d5657d
3 changed files with 191 additions and 12 deletions

View file

@ -133,8 +133,14 @@ int StreamingPreferences::getDefaultBitrate(int width, int height, int fps)
// we don't want to bump those 16:10 resolutions up to the
// next 16:9 slot.
if (width * height <= 640 * 360) {
return static_cast<int>(1000 * (fps / 30.0));
}
else if (width * height <= 854 * 480) {
return static_cast<int>(1500 * (fps / 30.0));
}
// This covers 1280x720 and 1280x800 too
if (width * height <= 1366 * 768) {
else if (width * height <= 1366 * 768) {
return static_cast<int>(5000 * (fps / 30.0));
}
else if (width * height <= 1920 * 1200) {