From f18f46543b402fbe16d4a8ef6e1f58605bce66e1 Mon Sep 17 00:00:00 2001 From: tt2468 Date: Thu, 18 Jan 2024 16:58:40 -0800 Subject: [PATCH] eventhandler: Implement input, scene, and transition UUID support Adds `inputUuid` next to `inputName` etc. --- src/eventhandler/EventHandler_Inputs.cpp | 28 +++++++++++++++++-- src/eventhandler/EventHandler_MediaInputs.cpp | 6 ++++ src/eventhandler/EventHandler_SceneItems.cpp | 18 ++++++++++++ src/eventhandler/EventHandler_Scenes.cpp | 12 +++++++- src/eventhandler/EventHandler_Transitions.cpp | 8 ++++++ 5 files changed, 69 insertions(+), 3 deletions(-) diff --git a/src/eventhandler/EventHandler_Inputs.cpp b/src/eventhandler/EventHandler_Inputs.cpp index fde33e60f..4275f9ff7 100644 --- a/src/eventhandler/EventHandler_Inputs.cpp +++ b/src/eventhandler/EventHandler_Inputs.cpp @@ -23,6 +23,7 @@ with this program. If not, see * An input has been created. * * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * @dataField inputKind | String | The kind of the input * @dataField unversionedInputKind | String | The unversioned kind of input (aka no `_v2` stuff) * @dataField inputSettings | Object | The settings configured to the input when it was created @@ -44,6 +45,7 @@ void EventHandler::HandleInputCreated(obs_source_t *source) json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); eventData["inputKind"] = inputKind; eventData["unversionedInputKind"] = obs_source_get_unversioned_id(source); eventData["inputSettings"] = Utils::Json::ObsDataToJson(inputSettings); @@ -55,6 +57,7 @@ void EventHandler::HandleInputCreated(obs_source_t *source) * An input has been removed. * * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * * @eventType InputRemoved * @eventSubscription Inputs @@ -68,12 +71,14 @@ void EventHandler::HandleInputRemoved(obs_source_t *source) { json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); BroadcastEvent(EventSubscription::Inputs, "InputRemoved", eventData); } /** * The name of an input has changed. * + * @dataField inputUuid | String | UUID of the input * @dataField oldInputName | String | Old name of the input * @dataField inputName | String | New name of the input * @@ -85,9 +90,10 @@ void EventHandler::HandleInputRemoved(obs_source_t *source) * @api events * @category inputs */ -void EventHandler::HandleInputNameChanged(obs_source_t *, std::string oldInputName, std::string inputName) +void EventHandler::HandleInputNameChanged(obs_source_t *source, std::string oldInputName, std::string inputName) { json eventData; + eventData["inputUuid"] = obs_source_get_uuid(source); eventData["oldInputName"] = oldInputName; eventData["inputName"] = inputName; BroadcastEvent(EventSubscription::Inputs, "InputNameChanged", eventData); @@ -99,6 +105,7 @@ void EventHandler::HandleInputNameChanged(obs_source_t *, std::string oldInputNa * Note: On some inputs, changing values in the properties dialog will cause an immediate update. Pressing the "Cancel" button will revert the settings, resulting in another event being fired. * * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * @dataField inputSettings | Object | New settings object of the input * * @eventType InputSettingsChanged @@ -115,6 +122,7 @@ void EventHandler::HandleInputSettingsChanged(obs_source_t *source) json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); eventData["inputSettings"] = Utils::Json::ObsDataToJson(inputSettings); BroadcastEvent(EventSubscription::Inputs, "InputSettingsChanged", eventData); } @@ -125,6 +133,7 @@ void EventHandler::HandleInputSettingsChanged(obs_source_t *source) * When an input is active, it means it's being shown by the program feed. * * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * @dataField videoActive | Boolean | Whether the input is active * * @eventType InputActiveStateChanged @@ -151,6 +160,7 @@ void EventHandler::HandleInputActiveStateChanged(void *param, calldata_t *data) json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); eventData["videoActive"] = obs_source_active(source); eventHandler->BroadcastEvent(EventSubscription::InputActiveStateChanged, "InputActiveStateChanged", eventData); } @@ -161,6 +171,7 @@ void EventHandler::HandleInputActiveStateChanged(void *param, calldata_t *data) * When an input is showing, it means it's being shown by the preview or a dialog. * * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * @dataField videoShowing | Boolean | Whether the input is showing * * @eventType InputShowStateChanged @@ -187,6 +198,7 @@ void EventHandler::HandleInputShowStateChanged(void *param, calldata_t *data) json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); eventData["videoShowing"] = obs_source_showing(source); eventHandler->BroadcastEvent(EventSubscription::InputShowStateChanged, "InputShowStateChanged", eventData); } @@ -195,6 +207,7 @@ void EventHandler::HandleInputShowStateChanged(void *param, calldata_t *data) * An input's mute state has changed. * * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * @dataField inputMuted | Boolean | Whether the input is muted * * @eventType InputMuteStateChanged @@ -218,6 +231,7 @@ void EventHandler::HandleInputMuteStateChanged(void *param, calldata_t *data) json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); eventData["inputMuted"] = obs_source_muted(source); eventHandler->BroadcastEvent(EventSubscription::Inputs, "InputMuteStateChanged", eventData); } @@ -226,6 +240,7 @@ void EventHandler::HandleInputMuteStateChanged(void *param, calldata_t *data) * An input's volume level has changed. * * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * @dataField inputVolumeMul | Number | New volume level multiplier * @dataField inputVolumeDb | Number | New volume level in dB * @@ -257,6 +272,7 @@ void EventHandler::HandleInputVolumeChanged(void *param, calldata_t *data) json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); eventData["inputVolumeMul"] = inputVolumeMul; eventData["inputVolumeDb"] = inputVolumeDb; eventHandler->BroadcastEvent(EventSubscription::Inputs, "InputVolumeChanged", eventData); @@ -265,7 +281,8 @@ void EventHandler::HandleInputVolumeChanged(void *param, calldata_t *data) /** * The audio balance value of an input has changed. * - * @dataField inputName | String | Name of the affected input + * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * @dataField inputAudioBalance | Number | New audio balance value of the input * * @eventType InputAudioBalanceChanged @@ -291,6 +308,7 @@ void EventHandler::HandleInputAudioBalanceChanged(void *param, calldata_t *data) json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); eventData["inputAudioBalance"] = inputAudioBalance; eventHandler->BroadcastEvent(EventSubscription::Inputs, "InputAudioBalanceChanged", eventData); } @@ -299,6 +317,7 @@ void EventHandler::HandleInputAudioBalanceChanged(void *param, calldata_t *data) * The sync offset of an input has changed. * * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * @dataField inputAudioSyncOffset | Number | New sync offset in milliseconds * * @eventType InputAudioSyncOffsetChanged @@ -324,6 +343,7 @@ void EventHandler::HandleInputAudioSyncOffsetChanged(void *param, calldata_t *da json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); eventData["inputAudioSyncOffset"] = inputAudioSyncOffset / 1000000; eventHandler->BroadcastEvent(EventSubscription::Inputs, "InputAudioSyncOffsetChanged", eventData); } @@ -332,6 +352,7 @@ void EventHandler::HandleInputAudioSyncOffsetChanged(void *param, calldata_t *da * The audio tracks of an input have changed. * * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * @dataField inputAudioTracks | Object | Object of audio tracks along with their associated enable states * * @eventType InputAudioTracksChanged @@ -362,6 +383,7 @@ void EventHandler::HandleInputAudioTracksChanged(void *param, calldata_t *data) json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); eventData["inputAudioTracks"] = inputAudioTracks; eventHandler->BroadcastEvent(EventSubscription::Inputs, "InputAudioTracksChanged", eventData); } @@ -376,6 +398,7 @@ void EventHandler::HandleInputAudioTracksChanged(void *param, calldata_t *data) * - `OBS_MONITORING_TYPE_MONITOR_AND_OUTPUT` * * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * @dataField monitorType | String | New monitor type of the input * * @eventType InputAudioMonitorTypeChanged @@ -401,6 +424,7 @@ void EventHandler::HandleInputAudioMonitorTypeChanged(void *param, calldata_t *d json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); eventData["monitorType"] = monitorType; eventHandler->BroadcastEvent(EventSubscription::Inputs, "InputAudioMonitorTypeChanged", eventData); } diff --git a/src/eventhandler/EventHandler_MediaInputs.cpp b/src/eventhandler/EventHandler_MediaInputs.cpp index 96c3a8c76..e77d470ab 100644 --- a/src/eventhandler/EventHandler_MediaInputs.cpp +++ b/src/eventhandler/EventHandler_MediaInputs.cpp @@ -124,6 +124,7 @@ void EventHandler::SourceMediaPreviousMultiHandler(void *param, calldata_t *data * A media input has started playing. * * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * * @eventType MediaInputPlaybackStarted * @eventSubscription MediaInputs @@ -146,6 +147,7 @@ void EventHandler::HandleMediaInputPlaybackStarted(void *param, calldata_t *data json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); eventHandler->BroadcastEvent(EventSubscription::MediaInputs, "MediaInputPlaybackStarted", eventData); } @@ -153,6 +155,7 @@ void EventHandler::HandleMediaInputPlaybackStarted(void *param, calldata_t *data * A media input has finished playing. * * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * * @eventType MediaInputPlaybackEnded * @eventSubscription MediaInputs @@ -175,6 +178,7 @@ void EventHandler::HandleMediaInputPlaybackEnded(void *param, calldata_t *data) json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); eventHandler->BroadcastEvent(EventSubscription::MediaInputs, "MediaInputPlaybackEnded", eventData); } @@ -182,6 +186,7 @@ void EventHandler::HandleMediaInputPlaybackEnded(void *param, calldata_t *data) * An action has been performed on an input. * * @dataField inputName | String | Name of the input + * @dataField inputUuid | String | UUID of the input * @dataField mediaAction | String | Action performed on the input. See `ObsMediaInputAction` enum * * @eventType MediaInputActionTriggered @@ -196,6 +201,7 @@ void EventHandler::HandleMediaInputActionTriggered(obs_source_t *source, ObsMedi { json eventData; eventData["inputName"] = obs_source_get_name(source); + eventData["inputUuid"] = obs_source_get_uuid(source); eventData["mediaAction"] = GetMediaInputActionString(action); BroadcastEvent(EventSubscription::MediaInputs, "MediaInputActionTriggered", eventData); } diff --git a/src/eventhandler/EventHandler_SceneItems.cpp b/src/eventhandler/EventHandler_SceneItems.cpp index 63c2b99ce..bad166321 100644 --- a/src/eventhandler/EventHandler_SceneItems.cpp +++ b/src/eventhandler/EventHandler_SceneItems.cpp @@ -23,7 +23,9 @@ with this program. If not, see * A scene item has been created. * * @dataField sceneName | String | Name of the scene the item was added to + * @dataField sceneUuid | String | UUID of the scene the item was added to * @dataField sourceName | String | Name of the underlying source (input/scene) + * @dataField sourceUuid | String | UUID of the underlying source (input/scene) * @dataField sceneItemId | Number | Numeric ID of the scene item * @dataField sceneItemIndex | Number | Index position of the item * @@ -49,7 +51,9 @@ void EventHandler::HandleSceneItemCreated(void *param, calldata_t *data) json eventData; eventData["sceneName"] = obs_source_get_name(obs_scene_get_source(scene)); + eventData["sceneUuid"] = obs_source_get_uuid(obs_scene_get_source(scene)); eventData["sourceName"] = obs_source_get_name(obs_sceneitem_get_source(sceneItem)); + eventData["sourceUuid"] = obs_source_get_uuid(obs_sceneitem_get_source(sceneItem)); eventData["sceneItemId"] = obs_sceneitem_get_id(sceneItem); eventData["sceneItemIndex"] = obs_sceneitem_get_order_position(sceneItem); eventHandler->BroadcastEvent(EventSubscription::SceneItems, "SceneItemCreated", eventData); @@ -61,7 +65,9 @@ void EventHandler::HandleSceneItemCreated(void *param, calldata_t *data) * This event is not emitted when the scene the item is in is removed. * * @dataField sceneName | String | Name of the scene the item was removed from + * @dataField sceneUuid | String | UUID of the scene the item was removed from * @dataField sourceName | String | Name of the underlying source (input/scene) + * @dataField sourceUuid | String | UUID of the underlying source (input/scene) * @dataField sceneItemId | Number | Numeric ID of the scene item * * @eventType SceneItemRemoved @@ -86,7 +92,9 @@ void EventHandler::HandleSceneItemRemoved(void *param, calldata_t *data) json eventData; eventData["sceneName"] = obs_source_get_name(obs_scene_get_source(scene)); + eventData["sceneUuid"] = obs_source_get_uuid(obs_scene_get_source(scene)); eventData["sourceName"] = obs_source_get_name(obs_sceneitem_get_source(sceneItem)); + eventData["sourceUuid"] = obs_source_get_uuid(obs_sceneitem_get_source(sceneItem)); eventData["sceneItemId"] = obs_sceneitem_get_id(sceneItem); eventHandler->BroadcastEvent(EventSubscription::SceneItems, "SceneItemRemoved", eventData); } @@ -95,6 +103,7 @@ void EventHandler::HandleSceneItemRemoved(void *param, calldata_t *data) * A scene's item list has been reindexed. * * @dataField sceneName | String | Name of the scene + * @dataField sceneUuid | String | UUID of the scene * @dataField sceneItems | Array | Array of scene item objects * * @eventType SceneItemListReindexed @@ -115,6 +124,7 @@ void EventHandler::HandleSceneItemListReindexed(void *param, calldata_t *data) json eventData; eventData["sceneName"] = obs_source_get_name(obs_scene_get_source(scene)); + eventData["sceneUuid"] = obs_source_get_uuid(obs_scene_get_source(scene)); eventData["sceneItems"] = Utils::Obs::ArrayHelper::GetSceneItemList(scene, true); eventHandler->BroadcastEvent(EventSubscription::SceneItems, "SceneItemListReindexed", eventData); } @@ -123,6 +133,7 @@ void EventHandler::HandleSceneItemListReindexed(void *param, calldata_t *data) * A scene item's enable state has changed. * * @dataField sceneName | String | Name of the scene the item is in + * @dataField sceneUuid | String | UUID of the scene the item is in * @dataField sceneItemId | Number | Numeric ID of the scene item * @dataField sceneItemEnabled | Boolean | Whether the scene item is enabled (visible) * @@ -150,6 +161,7 @@ void EventHandler::HandleSceneItemEnableStateChanged(void *param, calldata_t *da json eventData; eventData["sceneName"] = obs_source_get_name(obs_scene_get_source(scene)); + eventData["sceneUuid"] = obs_source_get_uuid(obs_scene_get_source(scene)); eventData["sceneItemId"] = obs_sceneitem_get_id(sceneItem); eventData["sceneItemEnabled"] = sceneItemEnabled; eventHandler->BroadcastEvent(EventSubscription::SceneItems, "SceneItemEnableStateChanged", eventData); @@ -159,6 +171,7 @@ void EventHandler::HandleSceneItemEnableStateChanged(void *param, calldata_t *da * A scene item's lock state has changed. * * @dataField sceneName | String | Name of the scene the item is in + * @dataField sceneUuid | String | UUID of the scene the item is in * @dataField sceneItemId | Number | Numeric ID of the scene item * @dataField sceneItemLocked | Boolean | Whether the scene item is locked * @@ -186,6 +199,7 @@ void EventHandler::HandleSceneItemLockStateChanged(void *param, calldata_t *data json eventData; eventData["sceneName"] = obs_source_get_name(obs_scene_get_source(scene)); + eventData["sceneUuid"] = obs_source_get_uuid(obs_scene_get_source(scene)); eventData["sceneItemId"] = obs_sceneitem_get_id(sceneItem); eventData["sceneItemLocked"] = sceneItemLocked; eventHandler->BroadcastEvent(EventSubscription::SceneItems, "SceneItemLockStateChanged", eventData); @@ -195,6 +209,7 @@ void EventHandler::HandleSceneItemLockStateChanged(void *param, calldata_t *data * A scene item has been selected in the Ui. * * @dataField sceneName | String | Name of the scene the item is in + * @dataField sceneUuid | String | UUID of the scene the item is in * @dataField sceneItemId | Number | Numeric ID of the scene item * * @eventType SceneItemSelected @@ -219,6 +234,7 @@ void EventHandler::HandleSceneItemSelected(void *param, calldata_t *data) json eventData; eventData["sceneName"] = obs_source_get_name(obs_scene_get_source(scene)); + eventData["sceneUuid"] = obs_source_get_uuid(obs_scene_get_source(scene)); eventData["sceneItemId"] = obs_sceneitem_get_id(sceneItem); eventHandler->BroadcastEvent(EventSubscription::SceneItems, "SceneItemSelected", eventData); } @@ -227,6 +243,7 @@ void EventHandler::HandleSceneItemSelected(void *param, calldata_t *data) * The transform/crop of a scene item has changed. * * @dataField sceneName | String | The name of the scene the item is in + * @dataField sceneUuid | String | The UUID of the scene the item is in * @dataField sceneItemId | Number | Numeric ID of the scene item * @dataField sceneItemTransform | Object | New transform/crop info of the scene item * @@ -255,6 +272,7 @@ void EventHandler::HandleSceneItemTransformChanged(void *param, calldata_t *data json eventData; eventData["sceneName"] = obs_source_get_name(obs_scene_get_source(scene)); + eventData["sceneUuid"] = obs_source_get_uuid(obs_scene_get_source(scene)); eventData["sceneItemId"] = obs_sceneitem_get_id(sceneItem); eventData["sceneItemTransform"] = Utils::Obs::ObjectHelper::GetSceneItemTransform(sceneItem); eventHandler->BroadcastEvent(EventSubscription::SceneItemTransformChanged, "SceneItemTransformChanged", eventData); diff --git a/src/eventhandler/EventHandler_Scenes.cpp b/src/eventhandler/EventHandler_Scenes.cpp index f7f818cfe..9dc221100 100644 --- a/src/eventhandler/EventHandler_Scenes.cpp +++ b/src/eventhandler/EventHandler_Scenes.cpp @@ -23,6 +23,7 @@ with this program. If not, see * A new scene has been created. * * @dataField sceneName | String | Name of the new scene + * @dataField sceneUuid | String | UUID of the new scene * @dataField isGroup | Boolean | Whether the new scene is a group * * @eventType SceneCreated @@ -37,6 +38,7 @@ void EventHandler::HandleSceneCreated(obs_source_t *source) { json eventData; eventData["sceneName"] = obs_source_get_name(source); + eventData["sceneUuid"] = obs_source_get_uuid(source); eventData["isGroup"] = obs_source_is_group(source); BroadcastEvent(EventSubscription::Scenes, "SceneCreated", eventData); } @@ -45,6 +47,7 @@ void EventHandler::HandleSceneCreated(obs_source_t *source) * A scene has been removed. * * @dataField sceneName | String | Name of the removed scene + * @dataField sceneUuid | String | UUID of the removed scene * @dataField isGroup | Boolean | Whether the scene was a group * * @eventType SceneRemoved @@ -59,6 +62,7 @@ void EventHandler::HandleSceneRemoved(obs_source_t *source) { json eventData; eventData["sceneName"] = obs_source_get_name(source); + eventData["sceneUuid"] = obs_source_get_uuid(source); eventData["isGroup"] = obs_source_is_group(source); BroadcastEvent(EventSubscription::Scenes, "SceneRemoved", eventData); } @@ -66,6 +70,7 @@ void EventHandler::HandleSceneRemoved(obs_source_t *source) /** * The name of a scene has changed. * + * @dataField sceneUuid | String | UUID of the scene * @dataField oldSceneName | String | Old name of the scene * @dataField sceneName | String | New name of the scene * @@ -77,9 +82,10 @@ void EventHandler::HandleSceneRemoved(obs_source_t *source) * @api events * @category scenes */ -void EventHandler::HandleSceneNameChanged(obs_source_t *, std::string oldSceneName, std::string sceneName) +void EventHandler::HandleSceneNameChanged(obs_source_t *source, std::string oldSceneName, std::string sceneName) { json eventData; + eventData["sceneUuid"] = obs_source_get_uuid(source); eventData["oldSceneName"] = oldSceneName; eventData["sceneName"] = sceneName; BroadcastEvent(EventSubscription::Scenes, "SceneNameChanged", eventData); @@ -89,6 +95,7 @@ void EventHandler::HandleSceneNameChanged(obs_source_t *, std::string oldSceneNa * The current program scene has changed. * * @dataField sceneName | String | Name of the scene that was switched to + * @dataField sceneUuid | String | UUID of the scene that was switched to * * @eventType CurrentProgramSceneChanged * @eventSubscription Scenes @@ -104,6 +111,7 @@ void EventHandler::HandleCurrentProgramSceneChanged() json eventData; eventData["sceneName"] = obs_source_get_name(currentScene); + eventData["sceneUuid"] = obs_source_get_uuid(currentScene); BroadcastEvent(EventSubscription::Scenes, "CurrentProgramSceneChanged", eventData); } @@ -111,6 +119,7 @@ void EventHandler::HandleCurrentProgramSceneChanged() * The current preview scene has changed. * * @dataField sceneName | String | Name of the scene that was switched to + * @dataField sceneUuid | String | UUID of the scene that was switched to * * @eventType CurrentPreviewSceneChanged * @eventSubscription Scenes @@ -130,6 +139,7 @@ void EventHandler::HandleCurrentPreviewSceneChanged() json eventData; eventData["sceneName"] = obs_source_get_name(currentPreviewScene); + eventData["sceneUuid"] = obs_source_get_uuid(currentPreviewScene); BroadcastEvent(EventSubscription::Scenes, "CurrentPreviewSceneChanged", eventData); } diff --git a/src/eventhandler/EventHandler_Transitions.cpp b/src/eventhandler/EventHandler_Transitions.cpp index 61865482a..eefb38873 100644 --- a/src/eventhandler/EventHandler_Transitions.cpp +++ b/src/eventhandler/EventHandler_Transitions.cpp @@ -23,6 +23,7 @@ with this program. If not, see * The current scene transition has changed. * * @dataField transitionName | String | Name of the new transition + * @dataField transitionUuid | String | UUID of the new transition * * @eventType CurrentSceneTransitionChanged * @eventSubscription Transitions @@ -38,6 +39,7 @@ void EventHandler::HandleCurrentSceneTransitionChanged() json eventData; eventData["transitionName"] = obs_source_get_name(transition); + eventData["transitionUuid"] = obs_source_get_uuid(transition); BroadcastEvent(EventSubscription::Transitions, "CurrentSceneTransitionChanged", eventData); } @@ -65,6 +67,7 @@ void EventHandler::HandleCurrentSceneTransitionDurationChanged() * A scene transition has started. * * @dataField transitionName | String | Scene transition name + * @dataField transitionUuid | String | Scene transition UUID * * @eventType SceneTransitionStarted * @eventSubscription Transitions @@ -84,6 +87,7 @@ void EventHandler::HandleSceneTransitionStarted(void *param, calldata_t *data) json eventData; eventData["transitionName"] = obs_source_get_name(source); + eventData["transitionUuid"] = obs_source_get_uuid(source); eventHandler->BroadcastEvent(EventSubscription::Transitions, "SceneTransitionStarted", eventData); } @@ -93,6 +97,7 @@ void EventHandler::HandleSceneTransitionStarted(void *param, calldata_t *data) * Note: Does not appear to trigger when the transition is interrupted by the user. * * @dataField transitionName | String | Scene transition name + * @dataField transitionUuid | String | Scene transition UUID * * @eventType SceneTransitionEnded * @eventSubscription Transitions @@ -112,6 +117,7 @@ void EventHandler::HandleSceneTransitionEnded(void *param, calldata_t *data) json eventData; eventData["transitionName"] = obs_source_get_name(source); + eventData["transitionUuid"] = obs_source_get_uuid(source); eventHandler->BroadcastEvent(EventSubscription::Transitions, "SceneTransitionEnded", eventData); } @@ -124,6 +130,7 @@ void EventHandler::HandleSceneTransitionEnded(void *param, calldata_t *data) * Note: Appears to be called by every transition, regardless of relevance. * * @dataField transitionName | String | Scene transition name + * @dataField transitionUuid | String | Scene transition UUID * * @eventType SceneTransitionVideoEnded * @eventSubscription Transitions @@ -143,5 +150,6 @@ void EventHandler::HandleSceneTransitionVideoEnded(void *param, calldata_t *data json eventData; eventData["transitionName"] = obs_source_get_name(source); + eventData["transitionUuid"] = obs_source_get_uuid(source); eventHandler->BroadcastEvent(EventSubscription::Transitions, "SceneTransitionVideoEnded", eventData); }