Start main output and preview after other plugins have setup output#1399
Conversation
…plugins to configure their canvases
|
Could you list the steps needed to reproduce this issue in Aitum Stream Suite. I have downloaded and added a recording output, but have no problem loading the Aitum plugin with NDI Main Output turned on. Is there a specific Aitum setting needed or a bug report to reference? Also, what specifically in the OBS Output API is failing in Aitum Stream Suite when the NDI Main Output is created first? |
|
In Aitum Stream Suite have an extra canvas add a source to that canvas so you can see that gets rendered. Enable the main output in DistroAV. Restart OBS and see the extra canvas does not get rendered anymore. OBS does not allow updating canvases when an output is active. The call that fails is |
|
I was able to duplicate the issue, no source shown in "extra canvas". After incorporating this PR into the DistroAV plugin, I can see the source displayed in the "extra canvas" on startup. I also, turned NDI Main and Preview off/on, started OBS with and without outputs on, and everything continued to work as before. This PR seems to workaround a startup sequence issue with plugins in OBS, perhaps specific to the new Canvas API, by delaying the creation of OBS output until later. This workaround should be documented as other plugins which support output will also need to change. Another option is to provide a new event (eg. OBS_FRONTEND_EVENT_CANVASES_CREATED) to be a more friendly with Aitum type plugins and fit in better with the current startup sequence API. |
|
This PR works around the issue that DistroAV starts outputs on startup, not around an issue in OBS itself. |
BitRate27
left a comment
There was a problem hiding this comment.
This is straight forward workaround for DistroAV starting Main and Preview Output by default on startup (if saved in config). It keeps DistroAV from blocking Output settings modifications by other plugins while OBS is starting.
Start main output and preview queued on the UI thread to allow other plugins to configure their canvases
Aitum Stream Suite fails to configure its canvases because there is an output active. The configuration of the canvases is done on OBS_FRONTEND_EVENT_FINISHED_LOADING in Aitum Stream Suite, but OBS_FRONTEND_EVENT_FINISHED_LOADING is called on DistroAV before that.