obs-frontend-api: Add frontend api functions for the virtual camera

This adds functions to the frontend api to start/stop the virtual
camera, to check if it is active and adds function to get the output
reference. It also adds api events for when the virtual camera is
started or stopped.
This commit is contained in:
Clayton Groeneveld
2021-01-13 09:46:04 -08:00
committed by Jim
parent 96ef45cef5
commit 3bc4e8ecba
6 changed files with 99 additions and 0 deletions
+33
View File
@@ -140,6 +140,15 @@ Structures/Enumerations
Triggered when the recording has been unpaused.
- **OBS_FRONTEND_EVENT_VIRTUALCAM_STARTED**
Triggered when the virtual camera is started.
- **OBS_FRONTEND_EVENT_VIRTUALCAM_STOPPED**
Triggered when the virtual camera is stopped.
.. type:: struct obs_frontend_source_list
- DARRAY(obs_source_t*) **sources**
@@ -556,3 +565,27 @@ Functions
Takes a screenshot of the specified source.
:param source: The source to take screenshot of.
---------------------------------------
.. function:: obs_output_t *obs_frontend_get_virtualcam_output(void)
:return: A new reference to the current virtual camera output.
---------------------------------------
.. function:: void obs_frontend_start_virtualcam(void)
Starts the virtual camera.
---------------------------------------
.. function:: void obs_frontend_stop_virtualcam(void)
Stops the virtual camera.
---------------------------------------
.. function:: bool obs_frontend_virtualcam_active(void)
:return: *true* if virtual camera is active, *false* otherwise.