 protocol VSVideoReaderDelegate: NSObjectProtocol {
     func didStartReading(reader:VSVideoReader, track:AVAssetTrack)
     func didFailToRead(reader:VSVideoReader)
+    func didGetFrame(reader:VSVideoReader, texture:MTLTexture, presentationTime:CMTime)
     func didFinishReading(reader:VSVideoReader)
 }
 

        let status = CVMetalTextureCacheCreateTextureFromImage(nil, self.textureCache, pixelBuffer, nil,
                                                               pixelFormat, width, height, 0, &metalTextureFromPixelBuffer)
        guard let metalTexture = metalTextureFromPixelBuffer, status == kCVReturnSuccess else {
            print("VSVS: failed to create texture")
            return
        }
        
    }
}

        guard reader.status == .reading,
              let sampleBuffer = output.copyNextSampleBuffer(),
              let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else {
            print("VSVideoReader: Process Complete")
            self.delegate?.didFinishReading(reader: self)
            return
        }
