Created
June 15, 2018 15:46
-
-
Save onmyway133/40e78a45744e30be17d0d077e7e90e4a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cameraLayer.videoGravity = .resizeAspectFill | |
view.layer.addSublayer(cameraLayer) | |
// register to receive buffers from the camera | |
let videoOutput = AVCaptureVideoDataOutput() | |
videoOutput.setSampleBufferDelegate(self, queue: DispatchQueue(label: "MyQueue")) | |
self.captureSession.addOutput(videoOutput) | |
// begin the session | |
self.captureSession.startRunning() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment