diff --git a/PROTOCOL.md b/PROTOCOL.md
index 59b63c01..fe5f0a2e 100644
--- a/PROTOCOL.md
+++ b/PROTOCOL.md
@@ -17,7 +17,6 @@ The protocol in general is based on the OBS Remote protocol created by Bill Hami
- ["TransitionDurationChanged"](#transitiondurationchanged)
- ["TransitionListChanged"](#transitionlistchanged)
- ["TransitionBegin"](#transitionbegin)
- - ["TransitionEnd"](#transitionend)
- ["ProfileChanged"](#profilechanged)
- ["ProfileListChanged"](#profilelistchanged)
- ["StreamStarting"](#streamstarting)
@@ -109,12 +108,7 @@ The list of available transitions has been modified (Transitions have been added
---
#### "TransitionBegin"
-A non-fixed transition has begun.
-
----
-
-#### "TransitionEnd"
-A non-fixed transition has ended.
+A transition other than "Cut" has begun.
---
diff --git a/WSEvents.cpp b/WSEvents.cpp
index c68d0fef..e9554482 100644
--- a/WSEvents.cpp
+++ b/WSEvents.cpp
@@ -22,6 +22,20 @@ with this program. If not, see
#include "Utils.h"
#include "WSEvents.h"
+bool transition_is_cut(obs_source_t *transition)
+{
+ if (!transition)
+ return false;
+
+ if (obs_source_get_type(transition) == OBS_SOURCE_TYPE_TRANSITION
+ && strcmp(obs_source_get_id(transition), "cut_transition") == 0)
+ {
+ return true;
+ }
+
+ return false;
+}
+
WSEvents::WSEvents(WSServer *srv)
{
_srv = srv;
@@ -147,12 +161,10 @@ void WSEvents::broadcastUpdate(const char *updateType, obs_data_t *additionalFie
void WSEvents::connectTransitionSignals(obs_source_t* current_transition)
{
- if (!obs_transition_fixed(current_transition))
+ if (!transition_is_cut(current_transition))
{
transition_handler = obs_source_get_signal_handler(current_transition);
- signal_handler_connect(transition_handler, "transition_start", OnTransitionBegin, this);
- signal_handler_connect(transition_handler, "transition_stop", OnTransitionEnd, this);
- }
+ signal_handler_connect(transition_handler, "transition_start", OnTransitionBegin, this); }
else
{
transition_handler = nullptr;
@@ -193,7 +205,6 @@ void WSEvents::OnTransitionChange()
if (transition_handler)
{
signal_handler_disconnect(transition_handler, "transition_start", OnTransitionBegin, this);
- signal_handler_disconnect(transition_handler, "transition_stop", OnTransitionEnd, this);
}
obs_source_t* current_transition = obs_frontend_get_current_transition();
@@ -370,21 +381,4 @@ void WSEvents::OnTransitionBegin(void* param, calldata_t* data)
instance->broadcastUpdate("TransitionBegin");
blog(LOG_INFO, "transition begin");
-}
-
-void WSEvents::OnTransitionEnd(void* param, calldata_t* data)
-{
- UNUSED_PARAMETER(data);
-
- WSEvents* instance = static_cast(param);
- instance->broadcastUpdate("TransitionEnd");
-
- blog(LOG_INFO, "transition end");
-}
-
-void WSEvents::OnTransitionStopped(void* param, calldata_t* data)
-{
-
-
- blog(LOG_INFO, "transition stopped");
}
\ No newline at end of file
diff --git a/WSEvents.h b/WSEvents.h
index b94713ab..9c24fb02 100644
--- a/WSEvents.h
+++ b/WSEvents.h
@@ -72,8 +72,6 @@ class WSEvents : public QObject
void OnExit();
static void OnTransitionBegin(void *param, calldata_t *data);
- static void OnTransitionEnd(void *param, calldata_t *data);
- static void OnTransitionStopped(void *param, calldata_t *data);
};
#endif // WSEVENTS_H
\ No newline at end of file
diff --git a/WSServer.cpp b/WSServer.cpp
index 555609c6..5e8193db 100644
--- a/WSServer.cpp
+++ b/WSServer.cpp
@@ -97,10 +97,6 @@ void WSServer::broadcast(QString message)
}
_clMutex.unlock();
-
- // Dirty hack because several quick successive calls to sendTextMessage()
- // can deadlock the socket
- QThread::msleep(50);
}
void WSServer::onNewConnection()
@@ -130,10 +126,6 @@ void WSServer::textMessageReceived(QString message)
{
WSRequestHandler handler(pSocket);
handler.processIncomingMessage(message);
-
- // Dirty hack because several quick successive calls to sendTextMessage()
- // can deadlock the socket
- QThread::msleep(50);
}
}