Create camera extensions with Core Media IO

RSS for tag

Discuss the WWDC22 Session Create camera extensions with Core Media IO

Posts under wwdc2022-10022 tag

7 Posts
Sort by:
Post not yet marked as solved
5 Replies
183 Views
_streamSinkIn = [[CMIOExtensionStream alloc] initWithLocalizedName:localizedName streamID:streamInputID direction:CMIOExtensionStreamDirectionSink clockType:CMIOExtensionStreamClockTypeHostTime source:self]; Attempting to publish a CMIOExtensionStream with the 'sink' direction (i.e. print-to-tape) as alluded to in Brad Ford's presentation. Any attempt to create such a stream yields and invalid argument exception and if you examine the header files all the init methods are described as returning stream instances that source data (ie camera publishers). *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid argument'
Posted
by DrXibber.
Last updated
.
Post not yet marked as solved
1 Replies
245 Views
While trying to re-create the CIFilterCam demo shown in the WWDC session, I hit a roadblock when trying to access a hardware camera from inside my extension. Can I simply use an AVCaptureSession + AVCaptureDeviceInput + AVCaptureVideoDataOutput to get frames from an actual hardware camera and pass them to the extension's stream? If yes, when should I ask for camera access permissions? It seems the extension code is run as soon as I install the extension, but I never get prompted for access permission. Do I need to set up the capture session lazily? What's the best practice for this use case?
Posted Last updated
.
Post not yet marked as solved
5 Replies
333 Views
I struggle to add custom properties to my streams as described in the WWDC22 video https://developer.apple.com/videos/play/wwdc2022/10022/ minute 28:17 The speaker describes using this technique in his CIFilterCam demo (would the source code be available please?) to let the app control which filter the extension should apply. Presumably, there's thus a way to: 1 - define a custom property in the camera extension's stream/device/provider? 2 - be able to use CoreMediaIO (from Swift?) in the app in order to set values of that custom property. This is not documented anywhere I could find. Help and sample code would be greatly appreciated. Thank you. Laurent
Posted
by ldenoue.
Last updated
.
Post not yet marked as solved
0 Replies
126 Views
It’d be nice if the extension could inherit the permissions given to the main app by the user, in my case screen capture. Alternatively, is there a way to send data to the extension from the app, or vice versa? Especially image or video data. thanks! laurent
Posted
by ldenoue.
Last updated
.
Post not yet marked as solved
2 Replies
220 Views
Hi, I have been following the steps presented in https://developer.apple.com/documentation/coremediaio/creating_a_camera_extension_with_core_media_i_o to create a core media I/O camera. However when calling let activationRequest = OSSystemExtensionRequest.activationRequest( forExtensionWithIdentifier: identifier, queue: .main ) activationRequest.delegate = installDelegate OSSystemExtensionManager.shared.submitRequest(activationRequest) The delegate's request(_ request: OSSystemExtensionRequest, didFailWithError error: Error) method is being called with error code 9 (OSSystemExtensionError.Code.validationFailed) and the system dialog does not appear.
Posted
by yonator.
Last updated
.