mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-28 16:16:21 -04:00
libobs: Allow last encoder error for last output error
(This commit also modifies UI) This makes it more trivial for encoder plugins to communicate to users why specifically an encoder error might have occurred mid-stream.
This commit is contained in:
@@ -6800,9 +6800,13 @@ void OBSBasic::StreamingStop(int code, QString last_error)
|
||||
blog(LOG_INFO, STREAMING_STOP);
|
||||
|
||||
if (encode_error) {
|
||||
QString msg =
|
||||
last_error.isEmpty()
|
||||
? QTStr("Output.StreamEncodeError.Msg")
|
||||
: QTStr("Output.StreamEncodeError.Msg.LastError")
|
||||
.arg(last_error);
|
||||
OBSMessageBox::information(
|
||||
this, QTStr("Output.StreamEncodeError.Title"),
|
||||
QTStr("Output.StreamEncodeError.Msg"));
|
||||
this, QTStr("Output.StreamEncodeError.Title"), msg);
|
||||
|
||||
} else if (code != OBS_OUTPUT_SUCCESS && isVisible()) {
|
||||
OBSMessageBox::information(this,
|
||||
@@ -6949,9 +6953,13 @@ void OBSBasic::RecordingStop(int code, QString last_error)
|
||||
QTStr("Output.RecordFail.Unsupported"));
|
||||
|
||||
} else if (code == OBS_OUTPUT_ENCODE_ERROR && isVisible()) {
|
||||
OBSMessageBox::warning(
|
||||
this, QTStr("Output.RecordError.Title"),
|
||||
QTStr("Output.RecordError.EncodeErrorMsg"));
|
||||
QString msg =
|
||||
last_error.isEmpty()
|
||||
? QTStr("Output.RecordError.EncodeErrorMsg")
|
||||
: QTStr("Output.RecordError.EncodeErrorMsg.LastError")
|
||||
.arg(last_error);
|
||||
OBSMessageBox::warning(this, QTStr("Output.RecordError.Title"),
|
||||
msg);
|
||||
|
||||
} else if (code == OBS_OUTPUT_NO_SPACE && isVisible()) {
|
||||
OBSMessageBox::warning(this,
|
||||
|
||||
Reference in New Issue
Block a user