UI: Move reconnect options to advanced settings

This is mostly just to remove the unnecessary clutter from the output
sections.  The reconnect settings are generally rarely modified by users
as it is.
This commit is contained in:
jp9000 2015-09-10 19:10:40 -07:00
parent 981ead18a3
commit a4f8d18948
5 changed files with 288 additions and 351 deletions

View file

@ -430,6 +430,42 @@
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_45">
<property name="text">
<string>Basic.Settings.Output.Format</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="simpleOutRecFormat">
<item>
<property name="text">
<string notr="true">flv</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">mp4</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">mov</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">mkv</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">ts</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
@ -520,47 +556,6 @@
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="simpleOutReconnect">
<property name="text">
<string>Basic.Settings.Output.Reconnect</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Basic.Settings.Output.RetryDelay</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="simpleOutRetryDelay">
<property name="maximum">
<number>30</number>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_22">
<property name="text">
<string>Basic.Settings.Output.MaxRetries</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="simpleOutMaxRetries">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QCheckBox" name="simpleOutAdvanced">
<property name="text">
<string>Basic.Settings.Output.Advanced</string>
@ -570,7 +565,7 @@
</property>
</widget>
</item>
<item row="8" column="1">
<item row="5" column="1">
<widget class="QCheckBox" name="simpleOutUseCBR">
<property name="text">
<string>Basic.Settings.Output.UseCBR</string>
@ -580,7 +575,7 @@
</property>
</widget>
</item>
<item row="9" column="0">
<item row="6" column="0">
<widget class="QLabel" name="label_24">
<property name="enabled">
<bool>true</bool>
@ -590,7 +585,7 @@
</property>
</widget>
</item>
<item row="9" column="1">
<item row="6" column="1">
<widget class="QComboBox" name="simpleOutPreset">
<item>
<property name="text">
@ -634,7 +629,7 @@
</item>
</widget>
</item>
<item row="10" column="0">
<item row="7" column="0">
<widget class="QCheckBox" name="simpleOutUseBufsize">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
@ -650,7 +645,7 @@
</property>
</widget>
</item>
<item row="10" column="1">
<item row="7" column="1">
<widget class="QSpinBox" name="simpleOutVBufsize">
<property name="enabled">
<bool>false</bool>
@ -666,52 +661,16 @@
</property>
</widget>
</item>
<item row="11" column="0">
<item row="8" column="0">
<widget class="QLabel" name="label_23">
<property name="text">
<string>Basic.Settings.Output.CustomEncoderSettings</string>
</property>
</widget>
</item>
<item row="11" column="1">
<item row="8" column="1">
<widget class="QLineEdit" name="simpleOutCustom"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_45">
<property name="text">
<string>Basic.Settings.Output.Format</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="simpleOutRecFormat">
<item>
<property name="text">
<string notr="true">flv</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">mp4</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">mov</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">mkv</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">ts</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
@ -792,18 +751,8 @@
<property name="labelAlignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<item row="0" column="1">
<widget class="QCheckBox" name="advOutReconnect">
<property name="text">
<string>Basic.Settings.Output.Reconnect</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_27">
<widget class="QLabel" name="label_28">
<property name="minimumSize">
<size>
<width>170</width>
@ -811,7 +760,7 @@
</size>
</property>
<property name="text">
<string>Basic.Settings.Output.RetryDelay</string>
<string>Basic.Settings.Output.Adv.AudioTrack</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@ -819,73 +768,6 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="advOutRetryDelay">
<property name="maximum">
<number>30</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_26">
<property name="text">
<string>Basic.Settings.Output.MaxRetries</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="advOutMaxRetries">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="advOutEncLabel">
<property name="text">
<string>Basic.Settings.Output.Encoder</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="advOutEncoder"/>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="advOutUseRescale">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Basic.Settings.Output.Adv.Rescale</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QComboBox" name="advOutRescale">
<property name="enabled">
<bool>false</bool>
</property>
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_28">
<property name="text">
<string>Basic.Settings.Output.Adv.AudioTrack</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QWidget" name="widget_8" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
@ -940,7 +822,17 @@
</layout>
</widget>
</item>
<item row="6" column="1">
<item row="2" column="0">
<widget class="QLabel" name="advOutEncLabel">
<property name="text">
<string>Basic.Settings.Output.Encoder</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="advOutEncoder"/>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="advOutApplyService">
<property name="text">
<string>Basic.Settings.Output.Adv.ApplyServiceSettings</string>
@ -950,6 +842,32 @@
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="advOutUseRescale">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Basic.Settings.Output.Adv.Rescale</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="advOutRescale">
<property name="enabled">
<bool>false</bool>
</property>
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -2882,6 +2800,59 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_7">
<property name="title">
<string>Basic.Settings.Output.Reconnect</string>
</property>
<layout class="QFormLayout" name="formLayout_19">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="1" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Basic.Settings.Output.RetryDelay</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="reconnectEnable">
<property name="text">
<string>Enable</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="reconnectRetryDelay">
<property name="maximum">
<number>30</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_22">
<property name="text">
<string>Basic.Settings.Output.MaxRetries</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="reconnectMaxRetries">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="advancedMsg">
<property name="styleSheet">
@ -2982,40 +2953,8 @@
<y>38</y>
</hint>
<hint type="destinationlabel">
<x>401</x>
<y>79</y>
</hint>
</hints>
</connection>
<connection>
<sender>simpleOutReconnect</sender>
<signal>toggled(bool)</signal>
<receiver>simpleOutRetryDelay</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>875</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>875</x>
<y>291</y>
</hint>
</hints>
</connection>
<connection>
<sender>simpleOutReconnect</sender>
<signal>toggled(bool)</signal>
<receiver>simpleOutMaxRetries</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>875</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>875</x>
<y>328</y>
<x>250</x>
<y>39</y>
</hint>
</hints>
</connection>
@ -3179,75 +3118,75 @@
</hint>
</hints>
</connection>
<connection>
<sender>advOutReconnect</sender>
<signal>toggled(bool)</signal>
<receiver>label_27</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>864</x>
<y>141</y>
</hint>
<hint type="destinationlabel">
<x>427</x>
<y>178</y>
</hint>
</hints>
</connection>
<connection>
<sender>advOutReconnect</sender>
<signal>toggled(bool)</signal>
<receiver>advOutRetryDelay</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>864</x>
<y>141</y>
</hint>
<hint type="destinationlabel">
<x>864</x>
<y>178</y>
</hint>
</hints>
</connection>
<connection>
<sender>advOutReconnect</sender>
<signal>toggled(bool)</signal>
<receiver>label_26</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>864</x>
<y>141</y>
</hint>
<hint type="destinationlabel">
<x>427</x>
<y>215</y>
</hint>
</hints>
</connection>
<connection>
<sender>advOutReconnect</sender>
<signal>toggled(bool)</signal>
<receiver>advOutMaxRetries</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>864</x>
<y>141</y>
</hint>
<hint type="destinationlabel">
<x>864</x>
<y>215</y>
</hint>
</hints>
</connection>
<connection>
<sender>advOutUseRescale</sender>
<signal>toggled(bool)</signal>
<receiver>advOutRescale</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>864</x>
<y>141</y>
</hint>
<hint type="destinationlabel">
<x>427</x>
<y>178</y>
</hint>
</hints>
</connection>
<connection>
<sender>advOutRecUseRescale</sender>
<signal>toggled(bool)</signal>
<receiver>advOutRecRescale</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>864</x>
<y>141</y>
</hint>
<hint type="destinationlabel">
<x>864</x>
<y>178</y>
</hint>
</hints>
</connection>
<connection>
<sender>advOutFFType</sender>
<signal>currentIndexChanged(int)</signal>
<receiver>stackedWidget_2</receiver>
<slot>setCurrentIndex(int)</slot>
<hints>
<hint type="sourcelabel">
<x>864</x>
<y>141</y>
</hint>
<hint type="destinationlabel">
<x>427</x>
<y>215</y>
</hint>
</hints>
</connection>
<connection>
<sender>streamDelayEnable</sender>
<signal>toggled(bool)</signal>
<receiver>label_56</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>864</x>
<y>141</y>
</hint>
<hint type="destinationlabel">
<x>864</x>
<y>215</y>
</hint>
</hints>
</connection>
<connection>
<sender>streamDelayEnable</sender>
<signal>toggled(bool)</signal>
<receiver>streamDelayPreserve</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>427</x>
@ -3260,9 +3199,9 @@
</hints>
</connection>
<connection>
<sender>advOutRecUseRescale</sender>
<sender>streamDelayEnable</sender>
<signal>toggled(bool)</signal>
<receiver>advOutRecRescale</receiver>
<receiver>widget_12</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
@ -3276,7 +3215,7 @@
</hints>
</connection>
<connection>
<sender>simpleOutReconnect</sender>
<sender>reconnectEnable</sender>
<signal>toggled(bool)</signal>
<receiver>label_17</receiver>
<slot>setEnabled(bool)</slot>
@ -3292,30 +3231,14 @@
</hints>
</connection>
<connection>
<sender>simpleOutReconnect</sender>
<sender>reconnectEnable</sender>
<signal>toggled(bool)</signal>
<receiver>label_22</receiver>
<receiver>reconnectRetryDelay</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>875</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>466</x>
<y>328</y>
</hint>
</hints>
</connection>
<connection>
<sender>advOutFFType</sender>
<signal>currentIndexChanged(int)</signal>
<receiver>stackedWidget_2</receiver>
<slot>setCurrentIndex(int)</slot>
<hints>
<hint type="sourcelabel">
<x>250</x>
<y>89</y>
<x>516</x>
<y>411</y>
</hint>
<hint type="destinationlabel">
<x>250</x>
@ -3324,9 +3247,9 @@
</hints>
</connection>
<connection>
<sender>streamDelayEnable</sender>
<sender>reconnectEnable</sender>
<signal>toggled(bool)</signal>
<receiver>label_56</receiver>
<receiver>label_22</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
@ -3340,25 +3263,9 @@
</hints>
</connection>
<connection>
<sender>streamDelayEnable</sender>
<sender>reconnectEnable</sender>
<signal>toggled(bool)</signal>
<receiver>streamDelayPreserve</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>578</x>
<y>275</y>
</hint>
<hint type="destinationlabel">
<x>593</x>
<y>339</y>
</hint>
</hints>
</connection>
<connection>
<sender>streamDelayEnable</sender>
<signal>toggled(bool)</signal>
<receiver>widget_12</receiver>
<receiver>reconnectMaxRetries</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">

View file

@ -1317,6 +1317,54 @@ static bool update_ffmpeg_output(ConfigFile &config)
return true;
}
static bool move_reconnect_settings(ConfigFile &config, const char *sec)
{
bool changed = false;
if (config_has_user_value(config, sec, "Reconnect")) {
bool reconnect = config_get_bool(config, sec, "Reconnect");
config_set_bool(config, "Output", "Reconnect", reconnect);
changed = true;
}
if (config_has_user_value(config, sec, "RetryDelay")) {
int delay = (int)config_get_uint(config, sec, "RetryDelay");
config_set_uint(config, "Output", "RetryDelay", delay);
changed = true;
}
if (config_has_user_value(config, sec, "MaxRetries")) {
int retries = (int)config_get_uint(config, sec, "MaxRetries");
config_set_uint(config, "Output", "MaxRetries", retries);
changed = true;
}
return changed;
}
static bool update_reconnect(ConfigFile &config)
{
if (!config_has_user_value(config, "Output", "Mode"))
return false;
const char *mode = config_get_string(config, "Output", "Mode");
if (!mode)
return false;
const char *section = (strcmp(mode, "Advanced") == 0) ?
"AdvOut" : "SimpleOutput";
if (move_reconnect_settings(config, section)) {
config_remove_value(config, "SimpleOutput", "Reconnect");
config_remove_value(config, "SimpleOutput", "RetryDelay");
config_remove_value(config, "SimpleOutput", "MaxRetries");
config_remove_value(config, "AdvOut", "Reconnect");
config_remove_value(config, "AdvOut", "RetryDelay");
config_remove_value(config, "AdvOut", "MaxRetries");
return true;
}
return false;
}
static void upgrade_settings(void)
{
char path[512];
@ -1344,7 +1392,8 @@ static void upgrade_settings(void)
ret = config.Open(path, CONFIG_OPEN_EXISTING);
if (ret == CONFIG_SUCCESS) {
if (update_ffmpeg_output(config)) {
if (update_ffmpeg_output(config) ||
update_reconnect(config)) {
config_save_safe(config, "tmp",
nullptr);
}

View file

@ -237,11 +237,11 @@ bool SimpleOutput::StartStreaming(obs_service_t *service)
obs_output_set_audio_encoder(streamOutput, aac, 0);
obs_output_set_service(streamOutput, service);
bool reconnect = config_get_bool(main->Config(), "SimpleOutput",
bool reconnect = config_get_bool(main->Config(), "Output",
"Reconnect");
int retryDelay = config_get_uint(main->Config(), "SimpleOutput",
int retryDelay = config_get_uint(main->Config(), "Output",
"RetryDelay");
int maxRetries = config_get_uint(main->Config(), "SimpleOutput",
int maxRetries = config_get_uint(main->Config(), "Output",
"MaxRetries");
bool useDelay = config_get_bool(main->Config(), "Output",
"DelayEnable");
@ -735,9 +735,9 @@ bool AdvancedOutput::StartStreaming(obs_service_t *service)
obs_output_set_service(streamOutput, service);
bool reconnect = config_get_bool(main->Config(), "AdvOut", "Reconnect");
int retryDelay = config_get_int(main->Config(), "AdvOut", "RetryDelay");
int maxRetries = config_get_int(main->Config(), "AdvOut", "MaxRetries");
bool reconnect = config_get_bool(main->Config(), "Output", "Reconnect");
int retryDelay = config_get_int(main->Config(), "Output", "RetryDelay");
int maxRetries = config_get_int(main->Config(), "Output", "MaxRetries");
bool useDelay = config_get_bool(main->Config(), "Output",
"DelayEnable");
int delaySec = config_get_int(main->Config(), "Output",

View file

@ -635,12 +635,6 @@ bool OBSBasic::InitBasicConfigDefaults()
config_set_default_uint (basicConfig, "SimpleOutput", "VBitrate",
2500);
config_set_default_uint (basicConfig, "SimpleOutput", "ABitrate", 160);
config_set_default_bool (basicConfig, "SimpleOutput", "Reconnect",
true);
config_set_default_uint (basicConfig, "SimpleOutput", "RetryDelay",
10);
config_set_default_uint (basicConfig, "SimpleOutput", "MaxRetries",
20);
config_set_default_bool (basicConfig, "SimpleOutput", "UseAdvanced",
false);
config_set_default_bool (basicConfig, "SimpleOutput", "UseCBR", true);
@ -650,9 +644,6 @@ bool OBSBasic::InitBasicConfigDefaults()
config_set_default_string(basicConfig, "SimpleOutput", "Preset",
"veryfast");
config_set_default_bool (basicConfig, "AdvOut", "Reconnect", true);
config_set_default_uint (basicConfig, "AdvOut", "RetryDelay", 10);
config_set_default_uint (basicConfig, "AdvOut", "MaxRetries", 20);
config_set_default_bool (basicConfig, "AdvOut", "ApplyServiceSettings",
true);
config_set_default_bool (basicConfig, "AdvOut", "UseRescale", false);
@ -693,6 +684,10 @@ bool OBSBasic::InitBasicConfigDefaults()
config_set_default_uint (basicConfig, "Output", "DelaySec", 20);
config_set_default_bool (basicConfig, "Output", "DelayPreserve", true);
config_set_default_bool (basicConfig, "Output", "Reconnect", true);
config_set_default_uint (basicConfig, "Output", "RetryDelay", 10);
config_set_default_uint (basicConfig, "Output", "MaxRetries", 20);
int i = 0;
uint32_t scale_cx = cx;
uint32_t scale_cy = cy;

View file

@ -269,9 +269,6 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget(ui->simpleOutRecFormat, COMBO_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->simpleOutputVBitrate, SCROLL_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->simpleOutputABitrate, COMBO_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->simpleOutReconnect, CHECK_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->simpleOutRetryDelay, SCROLL_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->simpleOutMaxRetries, SCROLL_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->simpleOutAdvanced, CHECK_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->simpleOutUseCBR, CHECK_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->simpleOutPreset, COMBO_CHANGED, OUTPUTS_CHANGED);
@ -279,9 +276,6 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget(ui->simpleOutPreset, COMBO_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->simpleOutVBufsize, SCROLL_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->simpleOutCustom, EDIT_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->advOutReconnect, CHECK_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->advOutRetryDelay, SCROLL_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->advOutMaxRetries, SCROLL_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->advOutEncoder, COMBO_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->advOutUseRescale, CHECK_CHANGED, OUTPUTS_CHANGED);
HookWidget(ui->advOutRescale, CBEDIT_CHANGED, OUTPUTS_CHANGED);
@ -349,6 +343,9 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget(ui->streamDelayEnable, CHECK_CHANGED, ADV_CHANGED);
HookWidget(ui->streamDelaySec, SCROLL_CHANGED, ADV_CHANGED);
HookWidget(ui->streamDelayPreserve, CHECK_CHANGED, ADV_CHANGED);
HookWidget(ui->reconnectEnable, CHECK_CHANGED, ADV_CHANGED);
HookWidget(ui->reconnectRetryDelay, SCROLL_CHANGED, ADV_CHANGED);
HookWidget(ui->reconnectMaxRetries, SCROLL_CHANGED, ADV_CHANGED);
#ifdef _WIN32
uint32_t winVer = GetWindowsVersion();
@ -1008,12 +1005,6 @@ void OBSBasicSettings::LoadSimpleOutputSettings()
"VBufsize");
int audioBitrate = config_get_uint(main->Config(), "SimpleOutput",
"ABitrate");
bool reconnect = config_get_bool(main->Config(), "SimpleOutput",
"Reconnect");
int retryDelay = config_get_uint(main->Config(), "SimpleOutput",
"RetryDelay");
int maxRetries = config_get_uint(main->Config(), "SimpleOutput",
"MaxRetries");
bool advanced = config_get_bool(main->Config(), "SimpleOutput",
"UseAdvanced");
bool useCBR = config_get_bool(main->Config(), "SimpleOutput",
@ -1037,9 +1028,6 @@ void OBSBasicSettings::LoadSimpleOutputSettings()
SetComboByName(ui->simpleOutputABitrate,
std::to_string(audioBitrate).c_str());
ui->simpleOutReconnect->setChecked(reconnect);
ui->simpleOutRetryDelay->setValue(retryDelay);
ui->simpleOutMaxRetries->setValue(maxRetries);
ui->simpleOutAdvanced->setChecked(advanced);
ui->simpleOutUseCBR->setChecked(useCBR);
ui->simpleOutPreset->setCurrentText(preset);
@ -1048,12 +1036,6 @@ void OBSBasicSettings::LoadSimpleOutputSettings()
void OBSBasicSettings::LoadAdvOutputStreamingSettings()
{
bool reconnect = config_get_bool(main->Config(), "AdvOut",
"Reconnect");
int retryDelay = config_get_int(main->Config(), "AdvOut",
"RetryDelay");
int maxRetries = config_get_int(main->Config(), "AdvOut",
"MaxRetries");
bool rescale = config_get_bool(main->Config(), "AdvOut",
"Rescale");
const char *rescaleRes = config_get_string(main->Config(), "AdvOut",
@ -1063,9 +1045,6 @@ void OBSBasicSettings::LoadAdvOutputStreamingSettings()
bool applyServiceSettings = config_get_bool(main->Config(), "AdvOut",
"ApplyServiceSettings");
ui->advOutReconnect->setChecked(reconnect);
ui->advOutRetryDelay->setValue(retryDelay);
ui->advOutMaxRetries->setValue(maxRetries);
ui->advOutApplyService->setChecked(applyServiceSettings);
ui->advOutUseRescale->setChecked(rescale);
ui->advOutRescale->setEnabled(rescale);
@ -1579,9 +1558,19 @@ void OBSBasicSettings::LoadAdvancedSettings()
"DelaySec");
bool preserveDelay = config_get_bool(main->Config(), "Output",
"DelayPreserve");
bool reconnect = config_get_bool(main->Config(), "Output",
"Reconnect");
int retryDelay = config_get_int(main->Config(), "Output",
"RetryDelay");
int maxRetries = config_get_int(main->Config(), "Output",
"MaxRetries");
loading = true;
ui->reconnectEnable->setChecked(reconnect);
ui->reconnectRetryDelay->setValue(retryDelay);
ui->reconnectMaxRetries->setValue(maxRetries);
ui->streamDelaySec->setValue(delaySec);
ui->streamDelayPreserve->setChecked(preserveDelay);
ui->streamDelayEnable->setChecked(enableDelay);
@ -1992,6 +1981,9 @@ void OBSBasicSettings::SaveAdvancedSettings()
SaveCheckBox(ui->streamDelayEnable, "Output", "DelayEnable");
SaveSpinBox(ui->streamDelaySec, "Output", "DelaySec");
SaveCheckBox(ui->streamDelayPreserve, "Output", "DelayPreserve");
SaveCheckBox(ui->reconnectEnable, "Output", "Reconnect");
SaveSpinBox(ui->reconnectRetryDelay, "Output", "RetryDelay");
SaveSpinBox(ui->reconnectMaxRetries, "Output", "MaxRetries");
}
static inline const char *OutputModeFromIdx(int idx)
@ -2093,9 +2085,6 @@ void OBSBasicSettings::SaveOutputSettings()
SaveCombo(ui->simpleOutputABitrate, "SimpleOutput", "ABitrate");
SaveEdit(ui->simpleOutputPath, "SimpleOutput", "FilePath");
SaveCombo(ui->simpleOutRecFormat, "SimpleOutput", "RecFormat");
SaveCheckBox(ui->simpleOutReconnect, "SimpleOutput", "Reconnect");
SaveSpinBox(ui->simpleOutRetryDelay, "SimpleOutput", "RetryDelay");
SaveSpinBox(ui->simpleOutMaxRetries, "SimpleOutput", "MaxRetries");
SaveCheckBox(ui->simpleOutAdvanced, "SimpleOutput", "UseAdvanced");
SaveCheckBox(ui->simpleOutUseCBR, "SimpleOutput", "UseCBR");
SaveCheckBox(ui->simpleOutUseBufsize, "SimpleOutput", "UseBufsize");
@ -2105,9 +2094,6 @@ void OBSBasicSettings::SaveOutputSettings()
if (ui->simpleOutUseBufsize->isChecked())
SaveSpinBox(ui->simpleOutVBufsize, "SimpleOutput", "VBufsize");
SaveCheckBox(ui->advOutReconnect, "AdvOut", "Reconnect");
SaveSpinBox(ui->advOutRetryDelay, "AdvOut", "RetryDelay");
SaveSpinBox(ui->advOutMaxRetries, "AdvOut", "MaxRetries");
SaveCheckBox(ui->advOutApplyService, "AdvOut", "ApplyServiceSettings");
SaveComboData(ui->advOutEncoder, "AdvOut", "Encoder");
SaveCheckBox(ui->advOutUseRescale, "AdvOut", "Rescale");