code: def captureOutput(output, didFinishProcessingPhotoSampleBuffer: photo_sample_buffer, previewPhotoSampleBuffer: preview_photo_sample_buffer, resolvedSettings: resolved_settings, bracketSettings: bracket_settings, error: error)
      if error
        error_callback.call(error)
      else
        jpeg_data = AVCapturePhotoOutput.jpegPhotoDataRepresentation(
          forJPEGSampleBuffer: photo_sample_buffer,
          previewPhotoSampleBuffer: preview_photo_sample_buffer
        )
        @capture_callback.call(jpeg_data)
      end
    end
docs: iOS 10 AVCapturePhotoCaptureDelegate method