mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 09:05:57 -05:00
Add support for transition duration in switchScene() (#178)
This commit is contained in:
@@ -287,17 +287,11 @@ bool isInFocus(const QString &executable);
|
||||
* Sceneswitch helper
|
||||
******************************************************************************/
|
||||
|
||||
void setNextTransition(OBSWeakSource &targetScene, obs_source_t *currentSource,
|
||||
OBSWeakSource &transition,
|
||||
bool transitionOverrideOverride,
|
||||
bool adjustActiveTransitionType, transitionData &td);
|
||||
void overwriteTransitionOverride(obs_weak_source_t *sceneWs,
|
||||
obs_source_t *transition, int duration,
|
||||
transitionData &td);
|
||||
void setNextTransition(sceneSwitchInfo &ssi, obs_source_t *currentSource,
|
||||
transitionData &td);
|
||||
void overwriteTransitionOverride(sceneSwitchInfo ssi, transitionData &td);
|
||||
void restoreTransitionOverride(obs_source_t *scene, transitionData td);
|
||||
void switchScene(OBSWeakSource &scene, OBSWeakSource &transition,
|
||||
bool transitionOverrideOverride,
|
||||
bool adjustActiveTransitionType, bool verbose);
|
||||
void switchScene(sceneSwitchInfo ssi);
|
||||
|
||||
/******************************************************************************
|
||||
* Main SwitcherData
|
||||
|
||||
@@ -22,6 +22,8 @@ using websocketpp::connection_hdl;
|
||||
typedef websocketpp::server<websocketpp::config::asio> server;
|
||||
typedef websocketpp::client<websocketpp::config::asio_client> client;
|
||||
|
||||
struct sceneSwitchInfo;
|
||||
|
||||
class NetworkConfig {
|
||||
public:
|
||||
NetworkConfig();
|
||||
@@ -51,7 +53,7 @@ public:
|
||||
virtual ~WSServer();
|
||||
void start(quint16 port, bool lockToIPv4);
|
||||
void stop();
|
||||
void sendMessage(OBSWeakSource scene, OBSWeakSource transition);
|
||||
void sendMessage(sceneSwitchInfo sceneSwitch);
|
||||
QThreadPool *threadPool() { return &_threadPool; }
|
||||
|
||||
private:
|
||||
|
||||
@@ -41,6 +41,13 @@ enum class AutoStartEvent {
|
||||
RECORINDG_OR_STREAMING,
|
||||
};
|
||||
|
||||
typedef struct sceneSwitchInfo {
|
||||
OBSWeakSource scene;
|
||||
OBSWeakSource transition;
|
||||
int duration = 0;
|
||||
|
||||
} sceneSwitchInfo;
|
||||
|
||||
typedef struct transitionData {
|
||||
std::string name = "";
|
||||
int duration = 0;
|
||||
@@ -64,7 +71,7 @@ struct SwitcherData {
|
||||
bool verbose = false;
|
||||
bool disableHints = false;
|
||||
bool showFrame = false;
|
||||
bool tansitionOverrideOverride = false;
|
||||
bool transitionOverrideOverride = false;
|
||||
bool adjustActiveTransitionType = true;
|
||||
|
||||
int interval = default_interval;
|
||||
|
||||
Reference in New Issue
Block a user