obs-frontend-api: Add event for video reset #11685
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
If obs_reset_video is called in OBS, for 3rd plugins, they should re-create the obs_output or video_output hold in their code. Otherwise, 3rd plugins will easily crash since their video_output and obs_output::video_t have been deleted in obs_reset_video.
Motivation and Context
if a 3rd plugin hold their obs_output or video_output, crash will easily happen after below operation:
Except NDI plugin, I also found this kind of crash on other plugin, such as vertical-canvas, source-record.
If OBS provide this new front event, 3rd plugin has the chance to reset their obs_output or video_output.
How Has This Been Tested?
settings -> video -> modify resolution -> click OK -> check if this event can be sent
Types of changes
New feature (non-breaking change which adds functionality)
Checklist: