I was following the WWDC demo and I was able to get the virtual camera running pretty easily. Now I am trying to convert this into a hardware camera and I am not finding any examples. In my ExtensionProvider.Swift file I am attempting the following
let session = AVCaptureSession()
session.sessionPreset = .hd1920x1080
session.startRunning()
guard let captureDevice = AVCaptureDevice.default(for: .video) else {
return
}
guard let deviceInput = try? AVCaptureDeviceInput(device: captureDevice) else {
return
}
session.addInput(deviceInput)
let deviceID = UUID() // replace this with your device UUID
I have my AVFoundation stuff but am I will changing my device ID (UUID) actually change the stream to originate from the hardware camera?
Post
Replies
Boosts
Views
Activity
Hello,
I am getting the following errors when building a Mac Camera Extension with web sockets. I am using URLSessionWebsocketTask as my web socket library. I built a test program for my code and in there I can see my web sockets are working properly, but when I run it from the System Extension I get the following errors. The socket opens for two - three messages then crashes. I couldnt find any documentation online for the following errors
CMIOExtensionProvider.m:1975:-[CMIOExtensionProvider removeProviderContext:]_block_invoke Unregistered provider context <CMIOExtensionProviderContext: ->, don't be surprised if things go badly
CMIOExtensionProviderContext.m:64:-[CMIOExtensionProviderContext initWithConnection:]_block_invoke [391] received Connection invalid``
I built a Camera Extension that augments the Facetime hd camera stream and I have noticed that it works just fine with Facetime and Photobooth but when I choose my camera from the camera picker of a non Apple application the camera becomes extremely laggy. Is this a known issue because the non Apple apps have yet to be optimized for mac os 13?