提交 473244da 编写于 作者: P Palana

UI: Release recording/streaming signals before outputs

上级 b0e8fe7b
......@@ -112,14 +112,14 @@ SimpleOutput::SimpleOutput(OBSBasic *main_) : BasicOutputHandler(main_)
if (!aac)
throw "Failed to create audio encoder (simple output)";
signal_handler_connect(obs_output_get_signal_handler(streamOutput),
startStreaming.Connect(obs_output_get_signal_handler(streamOutput),
"start", OBSStartStreaming, this);
signal_handler_connect(obs_output_get_signal_handler(streamOutput),
stopStreaming.Connect(obs_output_get_signal_handler(streamOutput),
"stop", OBSStopStreaming, this);
signal_handler_connect(obs_output_get_signal_handler(fileOutput),
startRecording.Connect(obs_output_get_signal_handler(fileOutput),
"start", OBSStartRecording, this);
signal_handler_connect(obs_output_get_signal_handler(fileOutput),
stopRecording.Connect(obs_output_get_signal_handler(fileOutput),
"stop", OBSStopRecording, this);
}
......@@ -393,14 +393,14 @@ AdvancedOutput::AdvancedOutput(OBSBasic *main_) : BasicOutputHandler(main_)
"(advanced output)";
}
signal_handler_connect(obs_output_get_signal_handler(streamOutput),
startStreaming.Connect(obs_output_get_signal_handler(streamOutput),
"start", OBSStartStreaming, this);
signal_handler_connect(obs_output_get_signal_handler(streamOutput),
stopStreaming.Connect(obs_output_get_signal_handler(streamOutput),
"stop", OBSStopStreaming, this);
signal_handler_connect(obs_output_get_signal_handler(fileOutput),
startRecording.Connect(obs_output_get_signal_handler(fileOutput),
"start", OBSStartRecording, this);
signal_handler_connect(obs_output_get_signal_handler(fileOutput),
stopRecording.Connect(obs_output_get_signal_handler(fileOutput),
"stop", OBSStopRecording, this);
}
......
......@@ -8,6 +8,11 @@ struct BasicOutputHandler {
int activeRefs = 0;
OBSBasic *main;
OBSSignal startRecording;
OBSSignal stopRecording;
OBSSignal startStreaming;
OBSSignal stopStreaming;
inline BasicOutputHandler(OBSBasic *main_) : main(main_) {}
virtual ~BasicOutputHandler() {};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册