mac-capture: Add button to reactivate stopped capture #9107
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
Adds a "Restart Capture" button to the SCK source that reenables the capture if it has previously failed, e.g. because of the computer going to sleep, or more importantly with macOS 14 if the user stops the stream from outside of OBS.
Bildschirmaufnahme.2023-06-19.um.16.50.53.mov
This button is disabled if there has been no recorded failure (or if the button has been pressed and the capture restarted).
This UX was a suggestion from @Warchamp7.
Motivation and Context
macOS 14 introduces a button to stop a capture, and we have no real way of reenabling it. Current fix would be updating something, e.g. toggling "Show Cursor", but this is suboptimal.
In the future, this button would also be added to the context bar once that exists for SCK.
How Has This Been Tested?
macOS 14
Shut down the SCK source in multiple configurations via the menu bar and pressed the button to reenable.
Made sure the button enables even if the properties window is already open.
Made sure there are no memory leaks.
Types of changes
Checklist: