mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
parent
caaec5d97f
commit
ef4142fe75
@ -602,6 +602,9 @@ void EventHandler::SourceUpdatedMultiHandler(void *param, calldata_t *data)
|
||||
case OBS_SOURCE_TYPE_INPUT:
|
||||
eventHandler->HandleInputSettingsChanged(source);
|
||||
break;
|
||||
case OBS_SOURCE_TYPE_FILTER:
|
||||
eventHandler->HandleSourceFilterSettingsChanged(source);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -147,6 +147,7 @@ private:
|
||||
void HandleSourceFilterRemoved(obs_source_t *source, obs_source_t *filter);
|
||||
static void HandleSourceFilterNameChanged(void *param,
|
||||
calldata_t *data); // Direct callback
|
||||
void HandleSourceFilterSettingsChanged(obs_source_t *source);
|
||||
static void HandleSourceFilterEnableStateChanged(void *param, calldata_t *data); // Direct callback
|
||||
|
||||
// Outputs
|
||||
|
@ -163,6 +163,32 @@ void EventHandler::HandleSourceFilterNameChanged(void *param, calldata_t *data)
|
||||
eventHandler->BroadcastEvent(EventSubscription::Filters, "SourceFilterNameChanged", eventData);
|
||||
}
|
||||
|
||||
/**
|
||||
* An source filter's settings have changed (been updated).
|
||||
*
|
||||
* @dataField sourceName | String | Name of the source the filter is on
|
||||
* @dataField filterName | String | Name of the filter
|
||||
* @dataField filterSettings | Object | New settings object of the filter
|
||||
*
|
||||
* @eventType SourceFilterSettingsChanged
|
||||
* @eventSubscription Filters
|
||||
* @complexity 3
|
||||
* @rpcVersion -1
|
||||
* @initialVersion 5.4.0
|
||||
* @api events
|
||||
* @category filters
|
||||
*/
|
||||
void EventHandler::HandleSourceFilterSettingsChanged(obs_source_t *source)
|
||||
{
|
||||
OBSDataAutoRelease filterSettings = obs_source_get_settings(source);
|
||||
|
||||
json eventData;
|
||||
eventData["sourceName"] = obs_source_get_name(obs_filter_get_parent(source));
|
||||
eventData["filterName"] = obs_source_get_name(source);
|
||||
eventData["filterSettings"] = Utils::Json::ObsDataToJson(filterSettings);
|
||||
BroadcastEvent(EventSubscription::Filters, "SourceFilterSettingsChanged", eventData);
|
||||
}
|
||||
|
||||
/**
|
||||
* A source filter's enable state has changed.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user