A wrapper for AVCaptureSession - The way easier to use the Camera.
let captureBody = CaptureBody(
configuration: .init {
$0.sessionPreset = .photo
}
)
let input = CameraInput.wideAngleCamera(position: .back)
await captureBody.attach(input: input)
let previewOutput = PreviewOutput()
let photoOutput = PhotoOutput()
await captureBody.attach(output: previewOutput)
await captureBody.attach(output: photoOutput)
let previewView = PixelBufferView()
previewView.attach(output: previewOutput)
captureBody.start()
MIT