UI: Add "Bind to IP" setting to advanced settings
This commit is contained in:
parent
289ccee447
commit
2a343955a2
5 changed files with 66 additions and 4 deletions
|
|
@ -372,6 +372,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||
HookWidget(ui->reconnectRetryDelay, SCROLL_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->reconnectMaxRetries, SCROLL_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->processPriority, COMBO_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->bindToIP, COMBO_CHANGED, ADV_CHANGED);
|
||||
|
||||
#ifdef _WIN32
|
||||
uint32_t winVer = GetWindowsVersion();
|
||||
|
|
@ -522,6 +523,20 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||
connect(ui->listWidget, SIGNAL(currentRowChanged(int)),
|
||||
this, SLOT(SimpleRecordingEncoderChanged()));
|
||||
|
||||
// Get Bind to IP Addresses
|
||||
obs_properties_t *ppts = obs_get_output_properties("rtmp_output");
|
||||
obs_property_t *p = obs_properties_get(ppts, "bind_ip");
|
||||
|
||||
size_t 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->bindToIP->addItem(QT_UTF8(name), val);
|
||||
}
|
||||
|
||||
obs_properties_destroy(ppts);
|
||||
|
||||
LoadSettings(false);
|
||||
|
||||
// Add warning checks to advanced output recording section controls
|
||||
|
|
@ -1810,6 +1825,8 @@ void OBSBasicSettings::LoadAdvancedSettings()
|
|||
"FilenameFormatting");
|
||||
bool overwriteIfExists = config_get_bool(main->Config(), "Output",
|
||||
"OverwriteIfExists");
|
||||
const char *bindIP = config_get_string(main->Config(), "Output",
|
||||
"BindIP");
|
||||
|
||||
loading = true;
|
||||
|
||||
|
|
@ -1830,6 +1847,8 @@ void OBSBasicSettings::LoadAdvancedSettings()
|
|||
SetComboByName(ui->colorSpace, videoColorSpace);
|
||||
SetComboByValue(ui->colorRange, videoColorRange);
|
||||
|
||||
SetComboByValue(ui->bindToIP, bindIP);
|
||||
|
||||
if (video_output_active(obs_get_video())) {
|
||||
ui->advancedVideoContainer->setEnabled(false);
|
||||
}
|
||||
|
|
@ -2315,6 +2334,7 @@ void OBSBasicSettings::SaveAdvancedSettings()
|
|||
SaveCheckBox(ui->reconnectEnable, "Output", "Reconnect");
|
||||
SaveSpinBox(ui->reconnectRetryDelay, "Output", "RetryDelay");
|
||||
SaveSpinBox(ui->reconnectMaxRetries, "Output", "MaxRetries");
|
||||
SaveComboData(ui->bindToIP, "Output", "BindIP");
|
||||
}
|
||||
|
||||
static inline const char *OutputModeFromIdx(int idx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue