I've written my custom camera. I get a pixelBuffer from AVCaptureVideoDataOutput
delegate, create MTLTexture from it and display using Metal. I've got ~ 20% CPU usage. Apple's public project AVCamFilter built on the same principle have the same CPU usage.
! But AVCaptureVideoPreviewLayer
and other AVFoundation classes like AVCaptureMovieFileOutput
have 0 CPU usage, how?
! And how can I achieve this result ?