mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 10:14:13 -05:00
UI: Add service res/fps limitation support to settings
Allows services to limit and enforce resolution and framerate values the user can select in the UI if "ignore service recommendations" is not checked. If the "ignore service recommendations" option is not checked, the user will not be able to select or use a resolution and/or framerate in the user interface that the service does not support. If "ignore service recommendations" is checked, it will work as it normally would, allowing any value to be used as per normal. Fortunately, and hopefully for the foreseeable future, there is only one service that enforces resolutions and framerates.
This commit is contained in:
@@ -122,6 +122,8 @@ private:
|
||||
int channelIndex = 0;
|
||||
|
||||
int lastSimpleRecQualityIdx = 0;
|
||||
int lastServiceIdx = -1;
|
||||
int lastIgnoreRecommended = -1;
|
||||
int lastChannelSetupIdx = 0;
|
||||
|
||||
OBSFFFormatDesc formats;
|
||||
@@ -175,6 +177,11 @@ private:
|
||||
void SaveEncoder(QComboBox *combo, const char *section,
|
||||
const char *value);
|
||||
|
||||
bool ResFPSValid(obs_service_resolution *res_list, size_t res_count,
|
||||
int max_fps);
|
||||
void ClosestResFPS(obs_service_resolution *res_list, size_t res_count,
|
||||
int max_fps, int &new_cx, int &new_cy, int &new_fps);
|
||||
|
||||
inline bool Changed() const
|
||||
{
|
||||
return generalChanged || outputsChanged || stream1Changed ||
|
||||
@@ -246,6 +253,8 @@ private slots:
|
||||
void UpdateKeyLink();
|
||||
void UpdateVodTrackSetting();
|
||||
void UpdateServiceRecommendations();
|
||||
void RecreateOutputResolutionWidget();
|
||||
void UpdateResFPSLimits();
|
||||
void UpdateMoreInfoLink();
|
||||
void DisplayEnforceWarning(bool checked);
|
||||
void on_show_clicked();
|
||||
|
||||
Reference in New Issue
Block a user