mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-03 14:16:36 -05:00
UI: Add option to auto remux
This commit is contained in:
committed by
Clayton Groeneveld
parent
14ae6351d4
commit
2fedcab987
@@ -5003,6 +5003,23 @@ void OBSBasic::StreamingStop(int code, QString last_error)
|
||||
}
|
||||
}
|
||||
|
||||
void OBSBasic::AutoRemux()
|
||||
{
|
||||
const char *mode = config_get_string(basicConfig, "Output", "Mode");
|
||||
const char *path = strcmp(mode, "Advanced") ?
|
||||
config_get_string(basicConfig, "SimpleOutput", "FilePath") :
|
||||
config_get_string(basicConfig, "AdvOut", "RecFilePath");
|
||||
std::string s(path);
|
||||
s += "/";
|
||||
s += remuxFilename;
|
||||
const QString &str = QString::fromStdString(s);
|
||||
QString file = str.section(".", 0, 0);
|
||||
|
||||
OBSRemux *remux = new OBSRemux(path, this, true);
|
||||
remux->show();
|
||||
remux->AutoRemux(str, file + ".mp4");
|
||||
}
|
||||
|
||||
void OBSBasic::StartRecording()
|
||||
{
|
||||
if (outputHandler->RecordingActive())
|
||||
@@ -5101,6 +5118,9 @@ void OBSBasic::RecordingStop(int code)
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_RECORDING_STOPPED);
|
||||
|
||||
if (remuxAfterRecord)
|
||||
AutoRemux();
|
||||
|
||||
OnDeactivate();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user