mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-28 16:16:21 -04:00
UI: Use protocol to enable network options
This commit is contained in:
@@ -1232,23 +1232,6 @@ bool OBSBasicSettings::UpdateResFPSLimits()
|
||||
return true;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
static bool service_supports_codec(const char **codecs, const char *codec)
|
||||
{
|
||||
if (!codecs)
|
||||
|
||||
@@ -5621,7 +5621,7 @@ void OBSBasicSettings::RecreateOutputResolutionWidget()
|
||||
|
||||
void OBSBasicSettings::UpdateAdvNetworkGroup()
|
||||
{
|
||||
bool enabled = IsServiceOutputHasNetworkFeatures();
|
||||
bool enabled = protocol.contains("RTMP");
|
||||
|
||||
ui->advNetworkDisabled->setVisible(!enabled);
|
||||
|
||||
|
||||
@@ -377,8 +377,6 @@ private:
|
||||
|
||||
OBSService GetStream1Service();
|
||||
|
||||
bool IsServiceOutputHasNetworkFeatures();
|
||||
|
||||
bool ServiceAndCodecCompatible();
|
||||
bool ServiceSupportsCodecCheck();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user