Compare commits

..

2 Commits

Author SHA1 Message Date
WarmUpTill
214821b69f UI rework (#44)
* rework general tab UI

* rework audio tab UI

* rework media tab UI

* rework time tab UI

* rework random tab UI

* rework window tab UI

* rework sreen region tab UI

* rework sequence tab UI

* rework transition tab UI

* adjust log messages to new format

* fix include path and warning

* highlight widgets to guide users (can be disabled)

* add helper frame for screen region tab

* rename main SceneSwitcher widget to AdvSceneSwitcher to resolve naming conflicts with the frontend tools on certain platforms (e.g. Debian 10)

* add media state 'any'

* adjust media switch handling to support vlc source
2020-10-31 16:25:44 +01:00
WarmUpTill
7edb6eb6c1 add handling of window title of metro apps 2020-10-24 15:23:08 +02:00
4 changed files with 12 additions and 10 deletions

View File

@@ -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,

View File

@@ -30,6 +30,12 @@ typedef enum {
RECORINDGSTREAMING = 2
} AutoStartType;
typedef struct transitionData {
std::string name = "";
int duration = 0;
} transitionData;
class SwitcherThread;
/********************************************************************************

View File

@@ -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);
}

View File

@@ -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)
{
}