提交 556fde66 编写于 作者: J jp9000

UI: Warn user if recording format unsupported

If the recording format is unsupported or doesn't support multiple
tracks, warn the user to check their settings.
上级 2679c8c3
......@@ -62,6 +62,10 @@ Output.ConnectFail.InvalidStream="Could not access the specified channel or stre
Output.ConnectFail.Error="An unexpected error occurred when trying to connect to the server. More information in the log file."
Output.ConnectFail.Disconnected="Disconnected from server."
# output recording-related messages
Output.RecordFail.Title="Failed to start recording"
Output.RecordFail.Unsupported="The output format is either unsupported or does not support more than one audio track. Please check your settings and try again."
# output recording messages
Output.BadPath.Title="Bad File Path"
Output.BadPath.Text="The configured file output path is invalid. Please check your settings to confirm that a valid file path has been set."
......
......@@ -35,8 +35,10 @@ static void OBSStartRecording(void *data, calldata_t *params)
static void OBSStopRecording(void *data, calldata_t *params)
{
BasicOutputHandler *output = static_cast<BasicOutputHandler*>(data);
int code = (int)calldata_int(params, "code");
QMetaObject::invokeMethod(output->main, "RecordingStop");
QMetaObject::invokeMethod(output->main,
"RecordingStop", Q_ARG(int, code));
output->activeRefs--;
UNUSED_PARAMETER(params);
......
......@@ -2712,10 +2712,15 @@ void OBSBasic::RecordingStart()
ui->recordButton->setText(QTStr("Basic.Main.StopRecording"));
}
void OBSBasic::RecordingStop()
void OBSBasic::RecordingStop(int code)
{
ui->statusbar->RecordingStopped();
ui->recordButton->setText(QTStr("Basic.Main.StartRecording"));
if (code == OBS_OUTPUT_UNSUPPORTED)
QMessageBox::information(this,
QTStr("Output.RecordFail.Title"),
QTStr("Output.RecordFail.Unsupported"));
}
void OBSBasic::on_streamButton_clicked()
......
......@@ -165,7 +165,7 @@ public slots:
void StopRecording();
void RecordingStart();
void RecordingStop();
void RecordingStop(int code);
void SaveProject();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册