mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-06-07 15:25:21 -04:00
Merge pull request #1441 from cg2121/auto-remux-refactor
UI: Add option to auto remux
This commit is contained in:
@@ -5018,6 +5018,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())
|
||||
@@ -5116,6 +5133,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