New upstream version 22.0.3+dfsg1
This commit is contained in:
parent
665f64a933
commit
cdc9a9fc87
334 changed files with 14525 additions and 2639 deletions
|
|
@ -318,6 +318,9 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||
HookWidget(ui->snapDistance, DSCROLL_CHANGED,GENERAL_CHANGED);
|
||||
HookWidget(ui->doubleClickSwitch, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->studioPortraitLayout, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->multiviewMouseSwitch, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->multiviewDrawNames, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->multiviewDrawAreas, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->multiviewLayout, COMBO_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->outputMode, COMBO_CHANGED, OUTPUTS_CHANGED);
|
||||
HookWidget(ui->streamType, COMBO_CHANGED, STREAM1_CHANGED);
|
||||
|
|
@ -401,6 +404,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||
HookWidget(ui->channelSetup, COMBO_CHANGED, AUDIO_RESTART);
|
||||
HookWidget(ui->sampleRate, COMBO_CHANGED, AUDIO_RESTART);
|
||||
HookWidget(ui->meterDecayRate, COMBO_CHANGED, AUDIO_CHANGED);
|
||||
HookWidget(ui->peakMeterType, COMBO_CHANGED, AUDIO_CHANGED);
|
||||
HookWidget(ui->desktopAudioDevice1, COMBO_CHANGED, AUDIO_CHANGED);
|
||||
HookWidget(ui->desktopAudioDevice2, COMBO_CHANGED, AUDIO_CHANGED);
|
||||
HookWidget(ui->auxAudioDevice1, COMBO_CHANGED, AUDIO_CHANGED);
|
||||
|
|
@ -426,6 +430,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||
#endif
|
||||
#ifdef _WIN32
|
||||
HookWidget(ui->disableAudioDucking, CHECK_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->browserHWAccel, CHECK_CHANGED, ADV_RESTART);
|
||||
#endif
|
||||
HookWidget(ui->filenameFormatting, EDIT_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->overwriteIfExists, CHECK_CHANGED, ADV_CHANGED);
|
||||
|
|
@ -441,6 +446,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||
HookWidget(ui->bindToIP, COMBO_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->enableNewSocketLoop, CHECK_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->enableLowLatencyMode, CHECK_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->disableFocusHotkeys, CHECK_CHANGED, ADV_CHANGED);
|
||||
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
delete ui->enableAutoUpdates;
|
||||
|
|
@ -495,6 +501,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||
delete ui->advancedGeneralGroupBox;
|
||||
delete ui->enableNewSocketLoop;
|
||||
delete ui->enableLowLatencyMode;
|
||||
delete ui->browserHWAccel;
|
||||
delete ui->sourcesGroup;
|
||||
#if defined(__APPLE__) || HAVE_PULSEAUDIO
|
||||
delete ui->disableAudioDucking;
|
||||
#endif
|
||||
|
|
@ -507,6 +515,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||
ui->advancedGeneralGroupBox = nullptr;
|
||||
ui->enableNewSocketLoop = nullptr;
|
||||
ui->enableLowLatencyMode = nullptr;
|
||||
ui->browserHWAccel = nullptr;
|
||||
ui->sourcesGroup = nullptr;
|
||||
#if defined(__APPLE__) || HAVE_PULSEAUDIO
|
||||
ui->disableAudioDucking = nullptr;
|
||||
#endif
|
||||
|
|
@ -701,11 +711,17 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||
SimpleRecordingQualityChanged();
|
||||
|
||||
UpdateAutomaticReplayBufferCheckboxes();
|
||||
|
||||
App()->EnableInFocusHotkeys(false);
|
||||
}
|
||||
|
||||
OBSBasicSettings::~OBSBasicSettings()
|
||||
{
|
||||
bool disableHotkeysInFocus = config_get_bool(App()->GlobalConfig(),
|
||||
"General", "DisableHotkeysInFocus");
|
||||
delete ui->filenameFormatting->completer();
|
||||
main->EnableOutputs(true);
|
||||
App()->EnableInFocusHotkeys(!disableHotkeysInFocus);
|
||||
}
|
||||
|
||||
void OBSBasicSettings::SaveCombo(QComboBox *widget, const char *section,
|
||||
|
|
@ -1092,30 +1108,37 @@ void OBSBasicSettings::LoadGeneralSettings()
|
|||
"BasicWindow", "StudioPortraitLayout");
|
||||
ui->studioPortraitLayout->setChecked(studioPortraitLayout);
|
||||
|
||||
bool multiviewMouseSwitch = config_get_bool(GetGlobalConfig(),
|
||||
"BasicWindow", "MultiviewMouseSwitch");
|
||||
ui->multiviewMouseSwitch->setChecked(multiviewMouseSwitch);
|
||||
|
||||
bool multiviewDrawNames = config_get_bool(GetGlobalConfig(),
|
||||
"BasicWindow", "MultiviewDrawNames");
|
||||
ui->multiviewDrawNames->setChecked(multiviewDrawNames);
|
||||
|
||||
bool multiviewDrawAreas = config_get_bool(GetGlobalConfig(),
|
||||
"BasicWindow", "MultiviewDrawAreas");
|
||||
ui->multiviewDrawAreas->setChecked(multiviewDrawAreas);
|
||||
|
||||
ui->multiviewLayout->addItem(QTStr(
|
||||
"Basic.Settings.General.MultiviewLayout.Horizontal.Top"),
|
||||
QT_UTF8("horizontaltop"));
|
||||
static_cast<int>(MultiviewLayout::HORIZONTAL_TOP_8_SCENES));
|
||||
ui->multiviewLayout->addItem(QTStr(
|
||||
"Basic.Settings.General.MultiviewLayout.Horizontal.Bottom"),
|
||||
QT_UTF8("horizontalbottom"));
|
||||
static_cast<int>(MultiviewLayout::HORIZONTAL_BOTTOM_8_SCENES));
|
||||
ui->multiviewLayout->addItem(QTStr(
|
||||
"Basic.Settings.General.MultiviewLayout.Vertical.Left"),
|
||||
QT_UTF8("verticalleft"));
|
||||
static_cast<int>(MultiviewLayout::VERTICAL_LEFT_8_SCENES));
|
||||
ui->multiviewLayout->addItem(QTStr(
|
||||
"Basic.Settings.General.MultiviewLayout.Vertical.Right"),
|
||||
QT_UTF8("verticalright"));
|
||||
static_cast<int>(MultiviewLayout::VERTICAL_RIGHT_8_SCENES));
|
||||
ui->multiviewLayout->addItem(QTStr(
|
||||
"Basic.Settings.General.MultiviewLayout.Horizontal.Extended.Top"),
|
||||
static_cast<int>(MultiviewLayout::HORIZONTAL_TOP_24_SCENES));
|
||||
|
||||
const char *multiviewLayoutText = config_get_string(GetGlobalConfig(),
|
||||
"BasicWindow", "MultiviewLayout");
|
||||
|
||||
if (astrcmpi(multiviewLayoutText, "horizontalbottom") == 0)
|
||||
ui->multiviewLayout->setCurrentIndex(1);
|
||||
else if (astrcmpi(multiviewLayoutText, "verticalleft") == 0)
|
||||
ui->multiviewLayout->setCurrentIndex(2);
|
||||
else if (astrcmpi(multiviewLayoutText, "verticalright") == 0)
|
||||
ui->multiviewLayout->setCurrentIndex(3);
|
||||
else
|
||||
ui->multiviewLayout->setCurrentIndex(0);
|
||||
ui->multiviewLayout->setCurrentIndex(
|
||||
config_get_int(GetGlobalConfig(), "BasicWindow",
|
||||
"MultiviewLayout"));
|
||||
|
||||
loading = false;
|
||||
}
|
||||
|
|
@ -2124,6 +2147,8 @@ void OBSBasicSettings::LoadAudioSettings()
|
|||
"ChannelSetup");
|
||||
double meterDecayRate = config_get_double(main->Config(), "Audio",
|
||||
"MeterDecayRate");
|
||||
uint32_t peakMeterTypeIdx = config_get_uint(main->Config(), "Audio",
|
||||
"PeakMeterType");
|
||||
|
||||
loading = true;
|
||||
|
||||
|
|
@ -2159,6 +2184,8 @@ void OBSBasicSettings::LoadAudioSettings()
|
|||
else
|
||||
ui->meterDecayRate->setCurrentIndex(0);
|
||||
|
||||
ui->peakMeterType->setCurrentIndex(peakMeterTypeIdx);
|
||||
|
||||
LoadAudioDevices();
|
||||
LoadAudioSources();
|
||||
|
||||
|
|
@ -2273,8 +2300,16 @@ void OBSBasicSettings::LoadAdvancedSettings()
|
|||
|
||||
ui->enableNewSocketLoop->setChecked(enableNewSocketLoop);
|
||||
ui->enableLowLatencyMode->setChecked(enableLowLatencyMode);
|
||||
|
||||
bool browserHWAccel = config_get_bool(App()->GlobalConfig(),
|
||||
"General", "BrowserHWAccel");
|
||||
ui->browserHWAccel->setChecked(browserHWAccel);
|
||||
#endif
|
||||
|
||||
bool disableFocusHotkeys = config_get_bool(App()->GlobalConfig(),
|
||||
"General", "DisableHotkeysInFocus");
|
||||
ui->disableFocusHotkeys->setChecked(disableFocusHotkeys);
|
||||
|
||||
loading = false;
|
||||
}
|
||||
|
||||
|
|
@ -2696,13 +2731,37 @@ void OBSBasicSettings::SaveGeneralSettings()
|
|||
main->ResetUI();
|
||||
}
|
||||
|
||||
if (WidgetChanged(ui->multiviewLayout)) {
|
||||
config_set_string(GetGlobalConfig(), "BasicWindow",
|
||||
"MultiviewLayout",
|
||||
QT_TO_UTF8(GetComboData(ui->multiviewLayout)));
|
||||
|
||||
OBSProjector::UpdateMultiviewProjectors();
|
||||
bool multiviewChanged = false;
|
||||
if (WidgetChanged(ui->multiviewMouseSwitch)) {
|
||||
config_set_bool(GetGlobalConfig(), "BasicWindow",
|
||||
"MultiviewMouseSwitch",
|
||||
ui->multiviewMouseSwitch->isChecked());
|
||||
multiviewChanged = true;
|
||||
}
|
||||
|
||||
if (WidgetChanged(ui->multiviewDrawNames)) {
|
||||
config_set_bool(GetGlobalConfig(), "BasicWindow",
|
||||
"MultiviewDrawNames",
|
||||
ui->multiviewDrawNames->isChecked());
|
||||
multiviewChanged = true;
|
||||
}
|
||||
|
||||
if (WidgetChanged(ui->multiviewDrawAreas)) {
|
||||
config_set_bool(GetGlobalConfig(), "BasicWindow",
|
||||
"MultiviewDrawAreas",
|
||||
ui->multiviewDrawAreas->isChecked());
|
||||
multiviewChanged = true;
|
||||
}
|
||||
|
||||
if (WidgetChanged(ui->multiviewLayout)) {
|
||||
config_set_int(GetGlobalConfig(), "BasicWindow",
|
||||
"MultiviewLayout",
|
||||
ui->multiviewLayout->currentData().toInt());
|
||||
multiviewChanged = true;
|
||||
}
|
||||
|
||||
if (multiviewChanged)
|
||||
OBSProjector::UpdateMultiviewProjectors();
|
||||
}
|
||||
|
||||
void OBSBasicSettings::SaveStream1Settings()
|
||||
|
|
@ -2782,8 +2841,16 @@ void OBSBasicSettings::SaveAdvancedSettings()
|
|||
|
||||
SaveCheckBox(ui->enableNewSocketLoop, "Output", "NewSocketLoopEnable");
|
||||
SaveCheckBox(ui->enableLowLatencyMode, "Output", "LowLatencyEnable");
|
||||
|
||||
bool browserHWAccel = ui->browserHWAccel->isChecked();
|
||||
config_set_bool(App()->GlobalConfig(), "General",
|
||||
"BrowserHWAccel", browserHWAccel);
|
||||
#endif
|
||||
|
||||
bool disableFocusHotkeys = ui->disableFocusHotkeys->isChecked();
|
||||
config_set_bool(App()->GlobalConfig(), "General",
|
||||
"DisableHotkeysInFocus", disableFocusHotkeys);
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (WidgetChanged(ui->disableOSXVSync)) {
|
||||
bool disable = ui->disableOSXVSync->isChecked();
|
||||
|
|
@ -3113,6 +3180,14 @@ void OBSBasicSettings::SaveAudioSettings()
|
|||
main->UpdateVolumeControlsDecayRate();
|
||||
}
|
||||
|
||||
if (WidgetChanged(ui->peakMeterType)) {
|
||||
uint32_t peakMeterTypeIdx = ui->peakMeterType->currentIndex();
|
||||
config_set_uint(main->Config(), "Audio", "PeakMeterType",
|
||||
peakMeterTypeIdx);
|
||||
|
||||
main->UpdateVolumeControlsPeakMeterType();
|
||||
}
|
||||
|
||||
for (auto &audioSource : audioSources) {
|
||||
auto source = OBSGetStrongRef(get<0>(audioSource));
|
||||
if (!source)
|
||||
|
|
@ -4123,6 +4198,9 @@ void OBSBasicSettings::AdvReplayBufferChanged()
|
|||
int vbitrate = (int)obs_data_get_int(settings, "bitrate");
|
||||
const char *rateControl = obs_data_get_string(settings, "rate_control");
|
||||
|
||||
if (!rateControl)
|
||||
rateControl = "";
|
||||
|
||||
bool lossless = strcmp(rateControl, "lossless") == 0 ||
|
||||
ui->advOutRecType->currentIndex() == 1;
|
||||
bool replayBufferEnabled = ui->advReplayBuf->isChecked();
|
||||
|
|
@ -4148,9 +4226,6 @@ void OBSBasicSettings::AdvReplayBufferChanged()
|
|||
if (memMB < 1)
|
||||
memMB = 1;
|
||||
|
||||
if (!rateControl)
|
||||
rateControl = "";
|
||||
|
||||
bool varRateControl = (astrcmpi(rateControl, "CBR") == 0 ||
|
||||
astrcmpi(rateControl, "VBR") == 0 ||
|
||||
astrcmpi(rateControl, "ABR") == 0);
|
||||
|
|
@ -4244,12 +4319,6 @@ void OBSBasicSettings::SimpleRecordingEncoderChanged()
|
|||
warning += "\n\n";
|
||||
warning += SIMPLE_OUTPUT_WARNING("Encoder");
|
||||
}
|
||||
|
||||
if (streamEnc == enc && enc == SIMPLE_ENCODER_QSV) {
|
||||
if (!warning.isEmpty())
|
||||
warning += "\n\n";
|
||||
warning += SIMPLE_OUTPUT_WARNING("MultipleQSV");
|
||||
}
|
||||
}
|
||||
|
||||
if (ui->simpleOutRecFormat->currentText().compare("mp4") == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue