mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-15 07:44:10 +00:00
UI: Add IPv4 / IPv6 selection setting
This commit adds a field in Settings -> Advanced called 'IP Address Family' that allows users to select IPv4 and IPv6, IPv4 Only, or IPv6 Only.
This commit is contained in:
parent
cca1cbf11b
commit
488a96bc4b
|
@ -1241,6 +1241,7 @@ Basic.Settings.Advanced.StreamDelay.MemoryUsage="Estimated Memory Usage: %1 MB"
|
||||||
Basic.Settings.Advanced.Network="Network"
|
Basic.Settings.Advanced.Network="Network"
|
||||||
Basic.Settings.Advanced.Network.Disabled="The currently selected streaming protocol does not support changing network settings."
|
Basic.Settings.Advanced.Network.Disabled="The currently selected streaming protocol does not support changing network settings."
|
||||||
Basic.Settings.Advanced.Network.BindToIP="Bind to IP"
|
Basic.Settings.Advanced.Network.BindToIP="Bind to IP"
|
||||||
|
Basic.Settings.Advanced.Network.IPFamily="IP Family"
|
||||||
Basic.Settings.Advanced.Network.EnableNewSocketLoop="Enable network optimizations"
|
Basic.Settings.Advanced.Network.EnableNewSocketLoop="Enable network optimizations"
|
||||||
Basic.Settings.Advanced.Network.EnableLowLatencyMode="Enable TCP pacing"
|
Basic.Settings.Advanced.Network.EnableLowLatencyMode="Enable TCP pacing"
|
||||||
Basic.Settings.Advanced.Network.TCPPacing.Tooltip="Attempts to make RTMP output friendlier to other latency sensitive applications on the network by regulating the rate of transmission.\nIt may increase the risk of dropped frames on unstable connections."
|
Basic.Settings.Advanced.Network.TCPPacing.Tooltip="Attempts to make RTMP output friendlier to other latency sensitive applications on the network by regulating the rate of transmission.\nIt may increase the risk of dropped frames on unstable connections."
|
||||||
|
|
|
@ -7575,14 +7575,27 @@
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QComboBox" name="bindToIP"/>
|
<widget class="QComboBox" name="bindToIP"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="ipFamilyLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Basic.Settings.Advanced.Network.IPFamily</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>ipFamily</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="ipFamily"/>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
<widget class="QCheckBox" name="enableNewSocketLoop">
|
<widget class="QCheckBox" name="enableNewSocketLoop">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Basic.Settings.Advanced.Network.EnableNewSocketLoop</string>
|
<string>Basic.Settings.Advanced.Network.EnableNewSocketLoop</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QCheckBox" name="enableLowLatencyMode">
|
<widget class="QCheckBox" name="enableLowLatencyMode">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
|
@ -7592,7 +7605,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="4" column="0">
|
||||||
<spacer name="horizontalSpacer_7">
|
<spacer name="horizontalSpacer_7">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
|
@ -7605,7 +7618,7 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QCheckBox" name="dynBitrate">
|
<widget class="QCheckBox" name="dynBitrate">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Basic.Settings.Output.DynamicBitrate.TT</string>
|
<string>Basic.Settings.Output.DynamicBitrate.TT</string>
|
||||||
|
|
|
@ -249,6 +249,10 @@ void AutoConfigTestPage::TestBandwidthThread()
|
||||||
config_get_string(main->Config(), "Output", "BindIP");
|
config_get_string(main->Config(), "Output", "BindIP");
|
||||||
obs_data_set_string(output_settings, "bind_ip", bind_ip);
|
obs_data_set_string(output_settings, "bind_ip", bind_ip);
|
||||||
|
|
||||||
|
const char *ip_family =
|
||||||
|
config_get_string(main->Config(), "Output", "IPFamily");
|
||||||
|
obs_data_set_string(output_settings, "ip_family", ip_family);
|
||||||
|
|
||||||
/* -----------------------------------*/
|
/* -----------------------------------*/
|
||||||
/* determine which servers to test */
|
/* determine which servers to test */
|
||||||
|
|
||||||
|
|
|
@ -1198,6 +1198,8 @@ bool SimpleOutput::StartStreaming(obs_service_t *service)
|
||||||
config_get_bool(main->Config(), "Output", "DelayPreserve");
|
config_get_bool(main->Config(), "Output", "DelayPreserve");
|
||||||
const char *bindIP =
|
const char *bindIP =
|
||||||
config_get_string(main->Config(), "Output", "BindIP");
|
config_get_string(main->Config(), "Output", "BindIP");
|
||||||
|
const char *ipFamily =
|
||||||
|
config_get_string(main->Config(), "Output", "IPFamily");
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
bool enableNewSocketLoop = config_get_bool(main->Config(), "Output",
|
bool enableNewSocketLoop = config_get_bool(main->Config(), "Output",
|
||||||
"NewSocketLoopEnable");
|
"NewSocketLoopEnable");
|
||||||
|
@ -1209,6 +1211,7 @@ bool SimpleOutput::StartStreaming(obs_service_t *service)
|
||||||
|
|
||||||
OBSDataAutoRelease settings = obs_data_create();
|
OBSDataAutoRelease settings = obs_data_create();
|
||||||
obs_data_set_string(settings, "bind_ip", bindIP);
|
obs_data_set_string(settings, "bind_ip", bindIP);
|
||||||
|
obs_data_set_string(settings, "ip_family", ipFamily);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
obs_data_set_bool(settings, "new_socket_loop_enabled",
|
obs_data_set_bool(settings, "new_socket_loop_enabled",
|
||||||
enableNewSocketLoop);
|
enableNewSocketLoop);
|
||||||
|
@ -2150,6 +2153,8 @@ bool AdvancedOutput::StartStreaming(obs_service_t *service)
|
||||||
config_get_bool(main->Config(), "Output", "DelayPreserve");
|
config_get_bool(main->Config(), "Output", "DelayPreserve");
|
||||||
const char *bindIP =
|
const char *bindIP =
|
||||||
config_get_string(main->Config(), "Output", "BindIP");
|
config_get_string(main->Config(), "Output", "BindIP");
|
||||||
|
const char *ipFamily =
|
||||||
|
config_get_string(main->Config(), "Output", "IPFamily");
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
bool enableNewSocketLoop = config_get_bool(main->Config(), "Output",
|
bool enableNewSocketLoop = config_get_bool(main->Config(), "Output",
|
||||||
"NewSocketLoopEnable");
|
"NewSocketLoopEnable");
|
||||||
|
@ -2161,6 +2166,7 @@ bool AdvancedOutput::StartStreaming(obs_service_t *service)
|
||||||
|
|
||||||
OBSDataAutoRelease settings = obs_data_create();
|
OBSDataAutoRelease settings = obs_data_create();
|
||||||
obs_data_set_string(settings, "bind_ip", bindIP);
|
obs_data_set_string(settings, "bind_ip", bindIP);
|
||||||
|
obs_data_set_string(settings, "ip_family", ipFamily);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
obs_data_set_bool(settings, "new_socket_loop_enabled",
|
obs_data_set_bool(settings, "new_socket_loop_enabled",
|
||||||
enableNewSocketLoop);
|
enableNewSocketLoop);
|
||||||
|
|
|
@ -1674,6 +1674,8 @@ bool OBSBasic::InitBasicConfigDefaults()
|
||||||
config_set_default_uint(basicConfig, "Output", "MaxRetries", 25);
|
config_set_default_uint(basicConfig, "Output", "MaxRetries", 25);
|
||||||
|
|
||||||
config_set_default_string(basicConfig, "Output", "BindIP", "default");
|
config_set_default_string(basicConfig, "Output", "BindIP", "default");
|
||||||
|
config_set_default_string(basicConfig, "Output", "IPFamily",
|
||||||
|
"IPv4+IPv6");
|
||||||
config_set_default_bool(basicConfig, "Output", "NewSocketLoopEnable",
|
config_set_default_bool(basicConfig, "Output", "NewSocketLoopEnable",
|
||||||
false);
|
false);
|
||||||
config_set_default_bool(basicConfig, "Output", "LowLatencyEnable",
|
config_set_default_bool(basicConfig, "Output", "LowLatencyEnable",
|
||||||
|
|
|
@ -628,6 +628,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||||
HookWidget(ui->processPriority, COMBO_CHANGED, ADV_CHANGED);
|
HookWidget(ui->processPriority, COMBO_CHANGED, ADV_CHANGED);
|
||||||
HookWidget(ui->confirmOnExit, CHECK_CHANGED, ADV_CHANGED);
|
HookWidget(ui->confirmOnExit, CHECK_CHANGED, ADV_CHANGED);
|
||||||
HookWidget(ui->bindToIP, COMBO_CHANGED, ADV_CHANGED);
|
HookWidget(ui->bindToIP, COMBO_CHANGED, ADV_CHANGED);
|
||||||
|
HookWidget(ui->ipFamily, COMBO_CHANGED, ADV_CHANGED);
|
||||||
HookWidget(ui->enableNewSocketLoop, CHECK_CHANGED, ADV_CHANGED);
|
HookWidget(ui->enableNewSocketLoop, CHECK_CHANGED, ADV_CHANGED);
|
||||||
HookWidget(ui->enableLowLatencyMode, CHECK_CHANGED, ADV_CHANGED);
|
HookWidget(ui->enableLowLatencyMode, CHECK_CHANGED, ADV_CHANGED);
|
||||||
HookWidget(ui->hotkeyFocusType, COMBO_CHANGED, ADV_CHANGED);
|
HookWidget(ui->hotkeyFocusType, COMBO_CHANGED, ADV_CHANGED);
|
||||||
|
@ -899,6 +900,17 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||||
ui->bindToIP->addItem(QT_UTF8(name), val);
|
ui->bindToIP->addItem(QT_UTF8(name), val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add IP Family options
|
||||||
|
p = obs_properties_get(ppts, "ip_family");
|
||||||
|
|
||||||
|
count = obs_property_list_item_count(p);
|
||||||
|
for (size_t i = 0; i < count; i++) {
|
||||||
|
const char *name = obs_property_list_item_name(p, i);
|
||||||
|
const char *val = obs_property_list_item_string(p, i);
|
||||||
|
|
||||||
|
ui->ipFamily->addItem(QT_UTF8(name), val);
|
||||||
|
}
|
||||||
|
|
||||||
obs_properties_destroy(ppts);
|
obs_properties_destroy(ppts);
|
||||||
|
|
||||||
InitStreamPage();
|
InitStreamPage();
|
||||||
|
@ -2897,7 +2909,8 @@ void OBSBasicSettings::LoadAdvancedSettings()
|
||||||
App()->GlobalConfig(), "General", "HotkeyFocusType");
|
App()->GlobalConfig(), "General", "HotkeyFocusType");
|
||||||
bool dynBitrate =
|
bool dynBitrate =
|
||||||
config_get_bool(main->Config(), "Output", "DynamicBitrate");
|
config_get_bool(main->Config(), "Output", "DynamicBitrate");
|
||||||
|
const char *ipFamily =
|
||||||
|
config_get_string(main->Config(), "Output", "IPFamily");
|
||||||
bool confirmOnExit =
|
bool confirmOnExit =
|
||||||
config_get_bool(GetGlobalConfig(), "General", "ConfirmOnExit");
|
config_get_bool(GetGlobalConfig(), "General", "ConfirmOnExit");
|
||||||
ui->confirmOnExit->setChecked(confirmOnExit);
|
ui->confirmOnExit->setChecked(confirmOnExit);
|
||||||
|
@ -2936,6 +2949,7 @@ void OBSBasicSettings::LoadAdvancedSettings()
|
||||||
ui->sdrWhiteLevel->setValue(sdrWhiteLevel);
|
ui->sdrWhiteLevel->setValue(sdrWhiteLevel);
|
||||||
ui->hdrNominalPeakLevel->setValue(hdrNominalPeakLevel);
|
ui->hdrNominalPeakLevel->setValue(hdrNominalPeakLevel);
|
||||||
|
|
||||||
|
SetComboByValue(ui->ipFamily, ipFamily);
|
||||||
if (!SetComboByValue(ui->bindToIP, bindIP))
|
if (!SetComboByValue(ui->bindToIP, bindIP))
|
||||||
SetInvalidValue(ui->bindToIP, bindIP, bindIP);
|
SetInvalidValue(ui->bindToIP, bindIP, bindIP);
|
||||||
|
|
||||||
|
@ -3669,6 +3683,7 @@ void OBSBasicSettings::SaveAdvancedSettings()
|
||||||
SaveSpinBox(ui->reconnectRetryDelay, "Output", "RetryDelay");
|
SaveSpinBox(ui->reconnectRetryDelay, "Output", "RetryDelay");
|
||||||
SaveSpinBox(ui->reconnectMaxRetries, "Output", "MaxRetries");
|
SaveSpinBox(ui->reconnectMaxRetries, "Output", "MaxRetries");
|
||||||
SaveComboData(ui->bindToIP, "Output", "BindIP");
|
SaveComboData(ui->bindToIP, "Output", "BindIP");
|
||||||
|
SaveComboData(ui->ipFamily, "Output", "IPFamily");
|
||||||
SaveCheckBox(ui->autoRemux, "Video", "AutoRemux");
|
SaveCheckBox(ui->autoRemux, "Video", "AutoRemux");
|
||||||
SaveCheckBox(ui->dynBitrate, "Output", "DynamicBitrate");
|
SaveCheckBox(ui->dynBitrate, "Output", "DynamicBitrate");
|
||||||
|
|
||||||
|
@ -6235,6 +6250,8 @@ void OBSBasicSettings::UpdateAdvNetworkGroup()
|
||||||
ui->bindToIPLabel->setVisible(enabled);
|
ui->bindToIPLabel->setVisible(enabled);
|
||||||
ui->bindToIP->setVisible(enabled);
|
ui->bindToIP->setVisible(enabled);
|
||||||
ui->dynBitrate->setVisible(enabled);
|
ui->dynBitrate->setVisible(enabled);
|
||||||
|
ui->ipFamilyLabel->setVisible(enabled);
|
||||||
|
ui->ipFamily->setVisible(enabled);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
ui->enableNewSocketLoop->setVisible(enabled);
|
ui->enableNewSocketLoop->setVisible(enabled);
|
||||||
ui->enableLowLatencyMode->setVisible(enabled);
|
ui->enableLowLatencyMode->setVisible(enabled);
|
||||||
|
|
Loading…
Reference in a new issue