0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00

UI: Use signal vector for status bar

The stream output signals are now put inside of a vector.
This commit is contained in:
cg2121 2024-02-15 03:24:04 -06:00 committed by Matthew Gajownik
parent 04036f311e
commit 21f1c155ef
2 changed files with 7 additions and 11 deletions

View File

@ -509,11 +509,11 @@ void OBSBasicStatusBar::StreamStarted(obs_output_t *output)
{
streamOutput = output;
signal_handler_connect(obs_output_get_signal_handler(streamOutput),
"reconnect", OBSOutputReconnect, this);
signal_handler_connect(obs_output_get_signal_handler(streamOutput),
"reconnect_success", OBSOutputReconnectSuccess,
this);
streamSigs.emplace_back(obs_output_get_signal_handler(streamOutput),
"reconnect", OBSOutputReconnect, this);
streamSigs.emplace_back(obs_output_get_signal_handler(streamOutput),
"reconnect_success", OBSOutputReconnectSuccess,
this);
retries = 0;
lastBytesSent = 0;
@ -524,12 +524,7 @@ void OBSBasicStatusBar::StreamStarted(obs_output_t *output)
void OBSBasicStatusBar::StreamStopped()
{
if (streamOutput) {
signal_handler_disconnect(
obs_output_get_signal_handler(streamOutput),
"reconnect", OBSOutputReconnect, this);
signal_handler_disconnect(
obs_output_get_signal_handler(streamOutput),
"reconnect_success", OBSOutputReconnectSuccess, this);
streamSigs.clear();
ReconnectClear();
streamOutput = nullptr;

View File

@ -28,6 +28,7 @@ private:
StatusBarWidget *statusWidget = nullptr;
obs_output_t *streamOutput = nullptr;
std::vector<OBSSignal> streamSigs;
obs_output_t *recordOutput = nullptr;
bool active = false;
bool overloadedNotify = true;