|
@@ -6,6 +6,7 @@
|
|
#include <QMessageBox>
|
|
#include <QMessageBox>
|
|
#include <QAction>
|
|
#include <QAction>
|
|
#include "auto-scene-switcher.hpp"
|
|
#include "auto-scene-switcher.hpp"
|
|
|
|
+#include "tool-helpers.hpp"
|
|
|
|
|
|
#include <condition_variable>
|
|
#include <condition_variable>
|
|
#include <chrono>
|
|
#include <chrono>
|
|
@@ -82,37 +83,6 @@ static inline QString MakeSwitchName(const QString &scene,
|
|
return QStringLiteral("[") + scene + QStringLiteral("]: ") + window;
|
|
return QStringLiteral("[") + scene + QStringLiteral("]: ") + window;
|
|
}
|
|
}
|
|
|
|
|
|
-static inline string GetWeakSourceName(obs_weak_source_t *weak_source)
|
|
|
|
-{
|
|
|
|
- string name;
|
|
|
|
-
|
|
|
|
- obs_source_t *source = obs_weak_source_get_source(weak_source);
|
|
|
|
- if (source) {
|
|
|
|
- name = obs_source_get_name(source);
|
|
|
|
- obs_source_release(source);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return name;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static inline OBSWeakSource GetWeakSourceByName(const char *name)
|
|
|
|
-{
|
|
|
|
- OBSWeakSource weak;
|
|
|
|
- obs_source_t *source = obs_get_source_by_name(name);
|
|
|
|
- if (source) {
|
|
|
|
- weak = obs_source_get_weak_source(source);
|
|
|
|
- obs_weak_source_release(weak);
|
|
|
|
- obs_source_release(source);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return weak;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static inline OBSWeakSource GetWeakSourceByQString(const QString &name)
|
|
|
|
-{
|
|
|
|
- return GetWeakSourceByName(name.toUtf8().constData());
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
SceneSwitcher::SceneSwitcher(QWidget *parent)
|
|
SceneSwitcher::SceneSwitcher(QWidget *parent)
|
|
: QDialog(parent),
|
|
: QDialog(parent),
|
|
ui(new Ui_SceneSwitcher)
|
|
ui(new Ui_SceneSwitcher)
|