UI: Refactor to make it easier to get service object
Refactors a bit of code to make it easier to get the current stream service object in the settingsmaster
parent
fb7747c56e
commit
005863a346
|
@ -650,3 +650,8 @@ void OBSBasicSettings::UpdateVodTrackSetting()
|
||||||
vodTrack[i]->setChecked((i + 1) == trackIndex);
|
vodTrack[i]->setChecked((i + 1) == trackIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OBSService OBSBasicSettings::GetStream1Service()
|
||||||
|
{
|
||||||
|
return stream1Changed ? SpawnTempService() : main->GetService();
|
||||||
|
}
|
||||||
|
|
|
@ -4604,13 +4604,7 @@ void OBSBasicSettings::SimpleRecordingEncoderChanged()
|
||||||
QString warning;
|
QString warning;
|
||||||
bool advanced = ui->simpleOutAdvanced->isChecked();
|
bool advanced = ui->simpleOutAdvanced->isChecked();
|
||||||
bool enforceBitrate = ui->simpleOutEnforce->isChecked() || !advanced;
|
bool enforceBitrate = ui->simpleOutEnforce->isChecked() || !advanced;
|
||||||
OBSService service;
|
OBSService service = GetStream1Service();
|
||||||
|
|
||||||
if (stream1Changed) {
|
|
||||||
service = SpawnTempService();
|
|
||||||
} else {
|
|
||||||
service = main->GetService();
|
|
||||||
}
|
|
||||||
|
|
||||||
delete simpleOutRecWarning;
|
delete simpleOutRecWarning;
|
||||||
|
|
||||||
|
|
|
@ -316,6 +316,8 @@ private:
|
||||||
|
|
||||||
int CurrentFLVTrack();
|
int CurrentFLVTrack();
|
||||||
|
|
||||||
|
OBSService GetStream1Service();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_theme_activated(int idx);
|
void on_theme_activated(int idx);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue