-1

Now I'm trying to figure out a way to capture camera frames of all supported resolutions concurrently.

For example, I need to capture camera frames for both resolutions (640x480, 1920x1080).

The thing is, I've failed to add multiple AVCaptureVideoDataOutput instances to AVCaptureDeviceInput per required resolution.

Is there any way to resolve this issue?

Pendulum
  • 1
  • 3
  • What does "capture camera frames of all supported resolutions concurrently" mean? – matt May 03 '19 at 02:34
  • Sorry for my bad English. So I'm going to capture frames of various resolutions. 640x480 frame would be used to preview camera. And higher res frame would be used to recognize something. – Pendulum May 03 '19 at 02:39

1 Answers1

-1

For sorry output ignores width/height keys , so you may have to declare 2
sessions with different presets

lowSession?.sessionPreset = AVCaptureSession.Preset.vga640x480
highSession?.sessionPreset = AVCaptureSession.Preset.hd1920x1080
Shehata Gamal
  • 98,760
  • 8
  • 65
  • 87
  • Thank you @Sh_Khan. One Question. Can I add multiple capture sessions for a camera device? Do they output equal frames (except resolution)? – Pendulum May 03 '19 at 02:56