mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Cleanup
This commit is contained in:
parent
56494480ba
commit
7403a18e96
|
|
@ -323,7 +323,7 @@ AdvSceneSwitcher.condition.scene.previousSceneTransitionBehaviour="During transi
|
|||
AdvSceneSwitcher.condition.scene.entry.line1="{{sceneType}}{{scenes}}{{pattern}}{{regex}}"
|
||||
AdvSceneSwitcher.condition.scene.entry.line2="{{useTransitionTargetScene}}"
|
||||
AdvSceneSwitcher.condition.window="Window"
|
||||
AdvSceneSwitcher.condition.window.entry.window="{{checkTitle}}Window title matches{{windowRegex}}{{windows}}"
|
||||
AdvSceneSwitcher.condition.window.entry.window="{{checkTitle}}Window title matches{{windows}}{{windowRegex}}"
|
||||
AdvSceneSwitcher.condition.window.entry.fullscreen="{{fullscreen}}Window is fullscreen"
|
||||
AdvSceneSwitcher.condition.window.entry.maximized="{{maximized}}Window is maximized"
|
||||
AdvSceneSwitcher.condition.window.entry.focused="{{focused}}Window is focused"
|
||||
|
|
|
|||
|
|
@ -259,7 +259,8 @@ void AudioSwitch::setVolumeLevel(void *data, const float *,
|
|||
}
|
||||
}
|
||||
|
||||
obs_volmeter_t *AddVolmeterToSource(AudioSwitch *entry, obs_weak_source *source)
|
||||
static obs_volmeter_t *addVolmeterToSource(AudioSwitch *entry,
|
||||
obs_weak_source *source)
|
||||
{
|
||||
obs_volmeter_t *volmeter = obs_volmeter_create(OBS_FADER_LOG);
|
||||
obs_volmeter_add_callback(volmeter, AudioSwitch::setVolumeLevel, entry);
|
||||
|
|
@ -279,7 +280,7 @@ void AudioSwitch::resetVolmeter()
|
|||
obs_volmeter_remove_callback(volmeter, setVolumeLevel, this);
|
||||
obs_volmeter_destroy(volmeter);
|
||||
|
||||
volmeter = AddVolmeterToSource(this, audioSource);
|
||||
volmeter = addVolmeterToSource(this, audioSource);
|
||||
}
|
||||
|
||||
bool AudioSwitch::initialized()
|
||||
|
|
@ -318,7 +319,7 @@ void AudioSwitch::load(obs_data_t *obj)
|
|||
duration.Load(obj, "duration");
|
||||
ignoreInactiveSource = obs_data_get_bool(obj, "ignoreInactiveSource");
|
||||
|
||||
volmeter = AddVolmeterToSource(this, audioSource);
|
||||
volmeter = addVolmeterToSource(this, audioSource);
|
||||
}
|
||||
|
||||
void AudioSwitchFallback::save(obs_data_t *obj)
|
||||
|
|
@ -349,7 +350,7 @@ AudioSwitch::AudioSwitch(const AudioSwitch &other)
|
|||
condition(other.condition),
|
||||
duration(other.duration)
|
||||
{
|
||||
volmeter = AddVolmeterToSource(this, other.audioSource);
|
||||
volmeter = addVolmeterToSource(this, other.audioSource);
|
||||
}
|
||||
|
||||
AudioSwitch::AudioSwitch(AudioSwitch &&other) noexcept
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ static bool posIsInScrollbar(const QScrollBar *scrollbar, const QPoint &pos)
|
|||
if (!scrollbar->isVisible()) {
|
||||
return false;
|
||||
}
|
||||
const auto geo = scrollbar->geometry();
|
||||
const auto &geo = scrollbar->geometry();
|
||||
const auto globalGeo = QRect(scrollbar->mapToGlobal(geo.topLeft()),
|
||||
scrollbar->mapToGlobal(geo.bottomRight()));
|
||||
return globalGeo.contains(pos);
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ MacroActionAudioEdit::MacroActionAudioEdit(
|
|||
QWidget::connect(_fadeTypes, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(FadeTypeChanged(int)));
|
||||
|
||||
std::unordered_map<std::string, QWidget *> widgetPlaceholders = {
|
||||
const std::unordered_map<std::string, QWidget *> widgetPlaceholders = {
|
||||
{"{{audioSources}}", _sources},
|
||||
{"{{actions}}", _actions},
|
||||
{"{{syncOffset}}", _syncOffset},
|
||||
|
|
|
|||
|
|
@ -185,8 +185,8 @@ void MacroActionFilter::ResolveVariablesToFixedValues()
|
|||
|
||||
static inline void populateActionSelection(QComboBox *list)
|
||||
{
|
||||
for (auto entry : actionTypes) {
|
||||
list->addItem(obs_module_text(entry.second.c_str()));
|
||||
for (const auto &[_, name] : actionTypes) {
|
||||
list->addItem(obs_module_text(name.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -292,8 +292,8 @@ bool MacroConditionAudio::Save(obs_data_t *obj) const
|
|||
return true;
|
||||
}
|
||||
|
||||
obs_volmeter_t *AddVolmeterToSource(MacroConditionAudio *entry,
|
||||
obs_weak_source *source)
|
||||
static obs_volmeter_t *addVolmeterToSource(MacroConditionAudio *entry,
|
||||
obs_weak_source *source)
|
||||
{
|
||||
obs_volmeter_t *volmeter = obs_volmeter_create(OBS_FADER_LOG);
|
||||
obs_volmeter_add_callback(volmeter, MacroConditionAudio::SetVolumeLevel,
|
||||
|
|
@ -328,7 +328,7 @@ bool MacroConditionAudio::Load(obs_data_t *obj)
|
|||
obs_data_get_int(obj, "outputCondition"));
|
||||
_volumeCondition = static_cast<VolumeCondition>(
|
||||
obs_data_get_int(obj, "volumeCondition"));
|
||||
_volmeter = AddVolmeterToSource(this, _audioSource.GetSource());
|
||||
_volmeter = addVolmeterToSource(this, _audioSource.GetSource());
|
||||
|
||||
if (obs_data_get_int(obj, "version") < 2) {
|
||||
// Set default values for dB handling
|
||||
|
|
@ -379,7 +379,7 @@ void MacroConditionAudio::ResetVolmeter()
|
|||
obs_volmeter_remove_callback(_volmeter, SetVolumeLevel, this);
|
||||
obs_volmeter_destroy(_volmeter);
|
||||
|
||||
_volmeter = AddVolmeterToSource(this, _audioSource.GetSource());
|
||||
_volmeter = addVolmeterToSource(this, _audioSource.GetSource());
|
||||
}
|
||||
|
||||
void MacroConditionAudio::SetupTempVars()
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ void MacroConditionMedia::SetTempVarValues(
|
|||
const auto state = std::get<obs_media_state>(value);
|
||||
SetTempVarValue("state", std::to_string(state));
|
||||
} else {
|
||||
const auto timeInfo = std::get<MediaTimeInfo>(value);
|
||||
const auto &timeInfo = std::get<MediaTimeInfo>(value);
|
||||
SetTempVarValue("time", std::to_string(timeInfo.time));
|
||||
SetTempVarValue("duration", std::to_string(timeInfo.duration));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ MacroConditionWindowEdit::MacroConditionWindowEdit(
|
|||
|
||||
PopulateWindowSelection(_windowSelection);
|
||||
|
||||
std::unordered_map<std::string, QWidget *> widgetPlaceholders = {
|
||||
const std::unordered_map<std::string, QWidget *> widgetPlaceholders = {
|
||||
{"{{windows}}", _windowSelection},
|
||||
{"{{windowRegex}}", _windowRegex},
|
||||
{"{{checkTitle}}", _checkTitle},
|
||||
|
|
|
|||
|
|
@ -558,7 +558,7 @@ static bool populateSceneItemSelectionHelper(obs_scene_t *,
|
|||
return true;
|
||||
}
|
||||
|
||||
QStringList GetSceneItemsList(SceneSelection &s)
|
||||
static QStringList getSceneItemsList(SceneSelection &s)
|
||||
{
|
||||
QStringList names;
|
||||
if (s.GetType() != SceneSelection::Type::SCENE) {
|
||||
|
|
@ -589,8 +589,8 @@ QStringList GetSceneItemsList(SceneSelection &s)
|
|||
|
||||
void SceneItemSelectionWidget::PopulateItemSelection()
|
||||
{
|
||||
const QStringList sceneItmes = GetSceneItemsList(_scene);
|
||||
AddSelectionGroup(_sources, sceneItmes, false);
|
||||
const QStringList sceneItems = getSceneItemsList(_scene);
|
||||
AddSelectionGroup(_sources, sceneItems, false);
|
||||
_sources->setCurrentIndex(-1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ const static std::map<tesseract::PageSegMode, std::string> pageSegModes = {
|
|||
"AdvSceneSwitcher.condition.video.ocrMode.sparseTextOSD"},
|
||||
};
|
||||
|
||||
cv::CascadeClassifier initObjectCascade(std::string &path)
|
||||
static cv::CascadeClassifier initObjectCascade(std::string &path)
|
||||
{
|
||||
cv::CascadeClassifier cascade;
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user