diff --git a/src/eventhandler/EventHandler.cpp b/src/eventhandler/EventHandler.cpp
index 211fd750..07638dc0 100644
--- a/src/eventhandler/EventHandler.cpp
+++ b/src/eventhandler/EventHandler.cpp
@@ -135,12 +135,12 @@ void EventHandler::ConnectSourceSignals(obs_source_t *source) // Applies to inpu
signal_handler_connect(sh, "mute", HandleInputMuteStateChanged, this);
signal_handler_connect(sh, "volume", HandleInputVolumeChanged, this);
signal_handler_connect(sh, "audio_balance", HandleInputAudioBalanceChanged, this);
- signal_handler_connect(sh, "audio_sync", HandleInputAudioSyncOffsetChanged, this);
- signal_handler_connect(sh, "audio_mixers", HandleInputAudioTracksChanged, this);
- signal_handler_connect(sh, "audio_monitoring", HandleInputAudioMonitorTypeChanged, this);
- signal_handler_connect(sh, "filter_add", HandleSourceFilterCreated, this);
- signal_handler_connect(sh, "filter_remove", HandleSourceFilterRemoved, this);
- signal_handler_connect(sh, "reorder_filters", HandleSourceFilterListReindexed, this);
+ signal_handler_connect(sh, "audio_sync", HandleInputAudioSyncOffsetChanged, this);
+ signal_handler_connect(sh, "audio_mixers", HandleInputAudioTracksChanged, this);
+ signal_handler_connect(sh, "audio_monitoring", HandleInputAudioMonitorTypeChanged, this);
+ signal_handler_connect(sh, "filter_add", HandleSourceFilterCreated, this);
+ signal_handler_connect(sh, "filter_remove", HandleSourceFilterRemoved, this);
+ signal_handler_connect(sh, "reorder_filters", HandleSourceFilterListReindexed, this);
if (sourceType == OBS_SOURCE_TYPE_INPUT) {
signal_handler_connect(sh, "media_started", HandleMediaInputPlaybackStarted, this);
@@ -191,9 +191,9 @@ void EventHandler::DisconnectSourceSignals(obs_source_t *source)
signal_handler_disconnect(sh, "media_stopped", SourceMediaStopMultiHandler, this);
signal_handler_disconnect(sh, "media_next", SourceMediaNextMultiHandler, this);
signal_handler_disconnect(sh, "media_previous", SourceMediaPreviousMultiHandler, this);
- signal_handler_disconnect(sh, "filter_add", HandleSourceFilterCreated, this);
- signal_handler_disconnect(sh, "filter_remove", HandleSourceFilterRemoved, this);
- signal_handler_disconnect(sh, "reorder_filters", HandleSourceFilterListReindexed, this);
+ signal_handler_disconnect(sh, "filter_add", HandleSourceFilterCreated, this);
+ signal_handler_disconnect(sh, "filter_remove", HandleSourceFilterRemoved, this);
+ signal_handler_disconnect(sh, "reorder_filters", HandleSourceFilterListReindexed, this);
// Scenes
signal_handler_disconnect(sh, "item_add", HandleSceneItemCreated, this);
@@ -207,26 +207,26 @@ void EventHandler::DisconnectSourceSignals(obs_source_t *source)
void EventHandler::ConnectFilterSignals(obs_source_t *filter)
{
- if (!filter || obs_source_removed(filter))
- return;
+ if (!filter || obs_source_removed(filter))
+ return;
- DisconnectFilterSignals(filter);
+ DisconnectFilterSignals(filter);
- signal_handler_t* sh = obs_source_get_signal_handler(filter);
+ signal_handler_t* sh = obs_source_get_signal_handler(filter);
- signal_handler_connect(sh, "enable", HandleSourceFilterEnableStateChanged, this);
- signal_handler_connect(sh, "rename", HandleSourceFilterNameChanged, this);
+ signal_handler_connect(sh, "enable", HandleSourceFilterEnableStateChanged, this);
+ signal_handler_connect(sh, "rename", HandleSourceFilterNameChanged, this);
}
void EventHandler::DisconnectFilterSignals(obs_source_t *filter)
{
- if (!filter)
- return;
+ if (!filter)
+ return;
- signal_handler_t* sh = obs_source_get_signal_handler(filter);
+ signal_handler_t* sh = obs_source_get_signal_handler(filter);
- signal_handler_disconnect(sh, "enable", HandleSourceFilterEnableStateChanged, this);
- signal_handler_disconnect(sh, "rename", HandleSourceFilterNameChanged, this);
+ signal_handler_disconnect(sh, "enable", HandleSourceFilterEnableStateChanged, this);
+ signal_handler_disconnect(sh, "rename", HandleSourceFilterNameChanged, this);
}
void EventHandler::OnFrontendEvent(enum obs_frontend_event event, void *private_data)
diff --git a/src/eventhandler/EventHandler.h b/src/eventhandler/EventHandler.h
index 3f71caff..00ac4410 100644
--- a/src/eventhandler/EventHandler.h
+++ b/src/eventhandler/EventHandler.h
@@ -141,9 +141,9 @@ class EventHandler
void HandleMediaInputActionTriggered(obs_source_t *source, ObsMediaInputAction action);
// Filters
- static void HandleSourceFilterNameChanged(void *param, calldata_t *data); // Direct callback
- static void HandleSourceFilterCreated(void *param, calldata_t *data); // Direct callback
- static void HandleSourceFilterRemoved(void *param, calldata_t *data); // Direct callback
- static void HandleSourceFilterListReindexed(void *param, calldata_t *data); // Direct callback
- static void HandleSourceFilterEnableStateChanged(void *param, calldata_t *data); // Direct callback
+ static void HandleSourceFilterNameChanged(void *param, calldata_t *data); // Direct callback
+ static void HandleSourceFilterCreated(void *param, calldata_t *data); // Direct callback
+ static void HandleSourceFilterRemoved(void *param, calldata_t *data); // Direct callback
+ static void HandleSourceFilterListReindexed(void *param, calldata_t *data); // Direct callback
+ static void HandleSourceFilterEnableStateChanged(void *param, calldata_t *data); // Direct callback
};
diff --git a/src/eventhandler/EventHandler_Filters.cpp b/src/eventhandler/EventHandler_Filters.cpp
index 308b81b8..a66d5035 100644
--- a/src/eventhandler/EventHandler_Filters.cpp
+++ b/src/eventhandler/EventHandler_Filters.cpp
@@ -39,28 +39,28 @@ with this program. If not, see
*/
void EventHandler::HandleSourceFilterCreated(void *param, calldata_t *data)
{
- auto eventHandler = static_cast(param);
+ auto eventHandler = static_cast(param);
- obs_source_t *source = GetCalldataPointer(data, "source");
- obs_source_t *filter = GetCalldataPointer(data, "filter");
+ obs_source_t *source = GetCalldataPointer(data, "source");
+ obs_source_t *filter = GetCalldataPointer(data, "filter");
- if (!(source && filter))
- return;
+ if (!(source && filter))
+ return;
- eventHandler->ConnectFilterSignals(filter);
+ eventHandler->ConnectFilterSignals(filter);
- std::string filterKind = obs_source_get_id(filter);
- OBSDataAutoRelease filterSettings = obs_source_get_settings(filter);
- OBSDataAutoRelease defaultFilterSettings = obs_get_source_defaults(filterKind.c_str());
+ std::string filterKind = obs_source_get_id(filter);
+ OBSDataAutoRelease filterSettings = obs_source_get_settings(filter);
+ OBSDataAutoRelease defaultFilterSettings = obs_get_source_defaults(filterKind.c_str());
- json eventData;
- eventData["sourceName"] = obs_source_get_name(source);
- eventData["filterName"] = obs_source_get_name(filter);
- eventData["filterKind"] = filterKind;
- eventData["filterIndex"] = Utils::Obs::NumberHelper::GetSourceFilterIndex(source, filter);
- eventData["filterSettings"] = Utils::Json::ObsDataToJson(filterSettings);
- eventData["defaultFilterSettings"] = Utils::Json::ObsDataToJson(defaultFilterSettings, true);
- eventHandler->BroadcastEvent(EventSubscription::Filters, "SourceFilterCreated", eventData);
+ json eventData;
+ eventData["sourceName"] = obs_source_get_name(source);
+ eventData["filterName"] = obs_source_get_name(filter);
+ eventData["filterKind"] = filterKind;
+ eventData["filterIndex"] = Utils::Obs::NumberHelper::GetSourceFilterIndex(source, filter);
+ eventData["filterSettings"] = Utils::Json::ObsDataToJson(filterSettings);
+ eventData["defaultFilterSettings"] = Utils::Json::ObsDataToJson(defaultFilterSettings, true);
+ eventHandler->BroadcastEvent(EventSubscription::Filters, "SourceFilterCreated", eventData);
}
/**
@@ -79,27 +79,27 @@ void EventHandler::HandleSourceFilterCreated(void *param, calldata_t *data)
*/
void EventHandler::HandleSourceFilterRemoved(void *param, calldata_t *data)
{
- auto eventHandler = static_cast(param);
+ auto eventHandler = static_cast(param);
- obs_source_t *source = GetCalldataPointer(data, "source");
- obs_source_t *filter = GetCalldataPointer(data, "filter");
+ obs_source_t *source = GetCalldataPointer(data, "source");
+ obs_source_t *filter = GetCalldataPointer(data, "filter");
- if (!(source && filter))
- return;
+ if (!(source && filter))
+ return;
- eventHandler->DisconnectFilterSignals(filter);
+ eventHandler->DisconnectFilterSignals(filter);
- json eventData;
- eventData["sourceName"] = obs_source_get_name(source);
- eventData["filterName"] = obs_source_get_name(filter);
- eventHandler->BroadcastEvent(EventSubscription::Filters, "SourceFilterRemoved", eventData);
+ json eventData;
+ eventData["sourceName"] = obs_source_get_name(source);
+ eventData["filterName"] = obs_source_get_name(filter);
+ eventHandler->BroadcastEvent(EventSubscription::Filters, "SourceFilterRemoved", eventData);
}
/**
* A source's filter list has been reindexed.
*
- * @dataField sourceName | String | Name of the source
- * @dataField filters | Array