Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mac-capture: Add button to reactivate stopped capture #9107

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

gxalpha
Copy link
Member

@gxalpha gxalpha commented Jun 19, 2023

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

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@gxalpha gxalpha added Enhancement Improvement to existing functionality macOS Affects macOS labels Jun 19, 2023
@derrod
Copy link
Member

derrod commented Jun 19, 2023

Is there anything that prevents us from just restarting the capture without the user having to manually do it?

@gxalpha
Copy link
Member Author

gxalpha commented Jun 19, 2023

Yes, the fact that the user explicitly chose to stop the capture.
I guess for the other failures (sleep etc) that could be an option.

Copy link
Member

@PatTheMav PatTheMav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I'd rather hide the button if a restart is not necessary instead of disabling that, but I leave that to warchamp to decide.

@gxalpha
Copy link
Member Author

gxalpha commented Jul 1, 2023

Rebased to fix conflicts with and include the recently added macOS Audio Capture source.

@PatTheMav PatTheMav merged commit e860289 into obsproject:master Jul 3, 2023
9 checks passed
@gxalpha gxalpha deleted the mac-capture-reactivate branch July 3, 2023 13:41
@RytoEX RytoEX added this to the OBS Studio (Next Release) milestone Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality macOS Affects macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants