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:
parent
04036f311e
commit
21f1c155ef
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user