I am working on a project and I would like to configure this device with more than 30fps but it shows me an error:
Is it possible some configuration to be able to increase this, I need the trueDepth, I am using AVFoundation.
This is the code with which I am validating the maximum and if I use another format the trueDepth stops working.
I hope that if it can be used at more than 30fps.
Code Block [AVCaptureDevice _setActiveFormat:resetVideoZoomFactorAndMinMaxFrameDurations:sessionPreset:] Unsupported format (<AVCaptureDeviceFormat: 0x282aac390 'dpth'/'hdep' 640x 360, { 2- 30 fps}, HRSI: 640x 360, fov:61.161>) - use -formats to discover valid formats'
Is it possible some configuration to be able to increase this, I need the trueDepth, I am using AVFoundation.
This is the code with which I am validating the maximum and if I use another format the trueDepth stops working.
Code Block do { try videoDevice.lockForConfiguration() videoDevice.activeDepthDataFormat = selectedFormat if let format = videoDevice.activeDepthDataFormat, let range = format.videoSupportedFrameRateRanges.last { if fps.timescale <= range.minFrameDuration.timescale { videoDevice.activeVideoMinFrameDuration = fps videoDevice.activeVideoMaxFrameDuration = fps }else{ let alert = UIAlertController(title: "Sorry", message: "Your device does not support this configuration.", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: nil)) self.present(alert, animated: true) throw createError(reason: "Your device does not support \(fps.timescale) fps") } } videoDevice.unlockForConfiguration() } catch { print("Could not lock device for configuration: \(error)") session.commitConfiguration() return } session.commitConfiguration()
I hope that if it can be used at more than 30fps.