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:
parent
96ef45cef5
commit
3bc4e8ecba
6 changed files with 99 additions and 0 deletions
|
|
@ -6300,6 +6300,9 @@ void OBSBasic::OnVirtualCamStart()
|
|||
vcamButton->setText(QTStr("Basic.Main.StopVirtualCam"));
|
||||
vcamButton->setChecked(true);
|
||||
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_VIRTUALCAM_STARTED);
|
||||
|
||||
OnActivate();
|
||||
|
||||
blog(LOG_INFO, VIRTUAL_CAM_START);
|
||||
|
|
@ -6313,6 +6316,9 @@ void OBSBasic::OnVirtualCamStop(int)
|
|||
vcamButton->setText(QTStr("Basic.Main.StartVirtualCam"));
|
||||
vcamButton->setChecked(false);
|
||||
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_VIRTUALCAM_STOPPED);
|
||||
|
||||
blog(LOG_INFO, VIRTUAL_CAM_STOP);
|
||||
|
||||
OnDeactivate();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue