mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
UI: Add max cx/cy/fps clamp (if service specifies)
This commit is contained in:
parent
45ba3b0db3
commit
6af26d3290
|
@ -1013,6 +1013,22 @@ void AutoConfigTestPage::FinalizeResults()
|
||||||
obs_service_apply_encoder_settings(service, vencoder_settings,
|
obs_service_apply_encoder_settings(service, vencoder_settings,
|
||||||
nullptr);
|
nullptr);
|
||||||
|
|
||||||
|
int maxCX, maxCY, maxFPS;
|
||||||
|
obs_service_get_max_res_fps(service, &maxCX, &maxCY, &maxFPS);
|
||||||
|
|
||||||
|
if (maxCX && wiz->idealResolutionCX > maxCX)
|
||||||
|
wiz->idealResolutionCX = maxCX;
|
||||||
|
if (maxCY && wiz->idealResolutionCY > maxCY)
|
||||||
|
wiz->idealResolutionCY = maxCY;
|
||||||
|
if (maxFPS) {
|
||||||
|
double idealFPS = (double)wiz->idealFPSNum /
|
||||||
|
(double)wiz->idealFPSDen;
|
||||||
|
if (idealFPS > (double)maxFPS) {
|
||||||
|
wiz->idealFPSNum = maxFPS;
|
||||||
|
wiz->idealFPSDen = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wiz->idealBitrate =
|
wiz->idealBitrate =
|
||||||
(int)obs_data_get_int(vencoder_settings, "bitrate");
|
(int)obs_data_get_int(vencoder_settings, "bitrate");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue