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:
parent
57c9844f15
commit
fc7af80f84
5 changed files with 57 additions and 7 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue