UI: Add option to auto remux

This commit is contained in:
cg2121
2017-05-08 06:53:35 -05:00
committed by Clayton Groeneveld
parent 14ae6351d4
commit 2fedcab987
9 changed files with 395 additions and 281 deletions

View File

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