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