mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-29 20:55:28 -05:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
214821b69f | ||
|
|
7edb6eb6c1 |
@@ -221,13 +221,6 @@ bool isInFocus(const QString &executable);
|
||||
/********************************************************************************
|
||||
* Sceneswitch helper
|
||||
********************************************************************************/
|
||||
struct obs_weak_source;
|
||||
typedef struct obs_weak_source obs_weak_source_t;
|
||||
|
||||
typedef struct transitionData {
|
||||
std::string name = "";
|
||||
int duration = 0;
|
||||
} transitionData;
|
||||
|
||||
void setNextTransition(OBSWeakSource &targetScene, obs_source_t *currentSource,
|
||||
OBSWeakSource &transition,
|
||||
|
||||
@@ -30,6 +30,12 @@ typedef enum {
|
||||
RECORINDGSTREAMING = 2
|
||||
} AutoStartType;
|
||||
|
||||
typedef struct transitionData {
|
||||
std::string name = "";
|
||||
int duration = 0;
|
||||
|
||||
} transitionData;
|
||||
|
||||
class SwitcherThread;
|
||||
|
||||
/********************************************************************************
|
||||
|
||||
@@ -17,8 +17,9 @@ void SceneSwitcherEntry::logMatch()
|
||||
{
|
||||
const char *sceneName = previous_scene_name;
|
||||
if (!usePreviousScene) {
|
||||
OBSSource s = obs_weak_source_get_source(scene);
|
||||
obs_source_t *s = obs_weak_source_get_source(scene);
|
||||
sceneName = obs_source_get_name(s);
|
||||
obs_source_release(s);
|
||||
}
|
||||
blog(LOG_INFO, "match for '%s' - switch to scene '%s'", getType(),
|
||||
sceneName);
|
||||
@@ -74,6 +75,8 @@ void SwitchWidget::SceneChanged(const QString &text)
|
||||
return;
|
||||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switchData->usePreviousScene = text.compare(previous_scene_name) == 0;
|
||||
if (switchData->usePreviousScene)
|
||||
return;
|
||||
switchData->scene = GetWeakSourceByQString(text);
|
||||
}
|
||||
|
||||
|
||||
@@ -333,9 +333,9 @@ MediaSwitch::MediaSwitch(MediaSwitch &&other)
|
||||
other.usePreviousScene),
|
||||
source(other.source),
|
||||
state(other.state),
|
||||
anyState(other.anyState),
|
||||
restriction(other.restriction),
|
||||
time(other.time),
|
||||
anyState(other.anyState)
|
||||
time(other.time)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user