mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-04-04 23:04:20 -04:00
UI: Hide network features if a non-RTMP service is set
Reimplementation ofbc80d0candf2e6122, because they have to be reverted by0b9a8aa.
This commit is contained in:
@@ -96,6 +96,11 @@ void OBSBasicSettings::InitStreamPage()
|
||||
SLOT(UpdateResFPSLimits()));
|
||||
connect(ui->service, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(UpdateMoreInfoLink()));
|
||||
|
||||
connect(ui->service, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(UpdateAdvNetworkGroup()));
|
||||
connect(ui->customServer, SIGNAL(textChanged(const QString &)), this,
|
||||
SLOT(UpdateAdvNetworkGroup()));
|
||||
}
|
||||
|
||||
void OBSBasicSettings::LoadStream1Settings()
|
||||
@@ -1155,3 +1160,20 @@ void OBSBasicSettings::UpdateResFPSLimits()
|
||||
lastIgnoreRecommended = (int)ignoreRecommended;
|
||||
lastServiceIdx = idx;
|
||||
}
|
||||
|
||||
bool OBSBasicSettings::IsServiceOutputHasNetworkFeatures()
|
||||
{
|
||||
if (IsCustomService())
|
||||
return ui->customServer->text().startsWith("rtmp");
|
||||
|
||||
OBSServiceAutoRelease service = SpawnTempService();
|
||||
const char *output = obs_service_get_output_type(service);
|
||||
|
||||
if (!output)
|
||||
return true;
|
||||
|
||||
if (strcmp(output, "rtmp_output") == 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user