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.
This commit is contained in:
jp9000 2015-06-09 21:00:22 -07:00
parent 2679c8c3ad
commit 556fde66ae
4 changed files with 14 additions and 3 deletions

View file

@ -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."

View file

@ -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);

View file

@ -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()

View file

@ -165,7 +165,7 @@ public slots:
void StopRecording();
void RecordingStart();
void RecordingStop();
void RecordingStop(int code);
void SaveProject();