                     videoSettings[String(kCVPixelBufferPixelFormatTypeKey)] = Int(kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange)
                 }
             }
-            self.videoOutput?.videoSettings = videoSettings
-        }
-
-        if let session = self.captureSession, let videoOutput = self.videoOutput {
+            self._videoOutput?.videoSettings = videoSettings
+        }
+
+        if let session = self.captureSession, let videoOutput = self._videoOutput {
             if session.canAddOutput(videoOutput) {
                 session.addOutput(videoOutput)
                 videoOutput.setSampleBufferDelegate(self, queue: self.sessionQueue)

extension NextLevel: AVCaptureVideoDataOutputSampleBufferDelegate, AVCaptureAudioDataOutputSampleBufferDelegate {
    
    public func captureOutput(_ captureOutput: AVCaptureOutput!, didOutputSampleBuffer sampleBuffer: CMSampleBuffer!, from connection: AVCaptureConnection!) {
        if let videoOutput = self.videoOutput, let audioOutput = self.audioOutput {
            switch captureOutput {
            case videoOutput:
                self.executeClosureAsyncOnMainQueueIfNecessary {

    internal var backInput: AVCaptureDeviceInput?
    internal var audioInput: AVCaptureDeviceInput?
    
    internal var _videoOutput: AVCaptureVideoDataOutput?
    internal var _audioOutput: AVCaptureAudioDataOutput?
    internal var _photoOutput: AVCapturePhotoOutput?
    
    internal var currentDevice: AVCaptureDevice?
    internal var requestedDevice: AVCaptureDevice?
