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
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
iOS 10 AVCapturePhotoCaptureDelegate method