Skip to content

PhotoOutput now has public 'avCapturePhotoOutput',#12

Open
drewster99 wants to merge 5 commits intoFluidGroup:mainfrom
drewster99:main
Open

PhotoOutput now has public 'avCapturePhotoOutput',#12
drewster99 wants to merge 5 commits intoFluidGroup:mainfrom
drewster99:main

Conversation

@drewster99
Copy link
Copy Markdown

Added avCapturePhotoOutput to PhotoOutput so you can more reasonably configure your settings during capture, including information like isShutterSoundSuppressionSupported.

Added public access to AVCapturePhotoOutput. Why?

My app wanted to set the option in AVCaptureSettings of isShutterSoundSuppressionEnabled to true, but this resulted in a crash for some users with the error:

Fatal Exception: NSInvalidArgumentException
*** -[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] settings.shutterSoundSuppressionEnabled may not be set to YES unless self.shutterSoundSuppressionSupported is YES

I didn't rename anything, but just added this extra public,

…nably configure your settings during capture without information like `isShutterSoundSuppressionSupported`.
- PixelBufferView: Use @mainactor Task with explicit capture to avoid
  sending parameter data race warning on pixelBuffer handler
- PhotoTools: Mark completion handler @sendable to satisfy strict
  concurrency checking for cross-isolation capture
CoreImageFilter is constructed once and passed to an actor-isolated
context. Adding @unchecked Sendable satisfies the generic Sendable
constraint on AnyCVPixelBufferOutput without requiring CIFilter to
be Sendable.
Use weak self captures instead of unowned self in Task and addHandler
closures to satisfy strict concurrency sending requirements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant