Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ import Foundation

extension AVCaptureDevice.Format {
func supportsOutput(_ output: AVCaptureOutput) -> Bool {
#if targetEnvironment(simulator)
// SimCam's DummyCaptureDeviceFormat doesn't implement isStreamingDisparitySupported,
// which is called internally by unsupportedCaptureOutputClasses, causing a SIGSEGV
// on the com.margelo.camera.session queue. On simulator all outputs are assumed
// supported since we're using a fake camera anyway.
return true
#else
let targetOutputClass = type(of: output)
return self.unsupportedCaptureOutputClasses.allSatisfy { $0 != targetOutputClass }
#endif
}
}
Loading