diff --git a/src/eventhandler/EventHandler_Inputs.cpp b/src/eventhandler/EventHandler_Inputs.cpp
index fde33e60..4275f9ff 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 96c3a8c7..e77d470a 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 63c2b99c..bad16632 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