Created
March 21, 2020 03:00
-
-
Save christianselig/014f5383d882dd529b6f6395989e8874 to your computer and use it in GitHub Desktop.
This file contains 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
let operationQueue = OperationQueue() | |
operationQueue.maxConcurrentOperationCount = 1 | |
while (sample != nil) { | |
if let newSample = sample { | |
let cgImage = self.cgImageFromSampleBuffer(newSample)! | |
operationQueue.addOperation { // Problematic son of a | |
CGImageDestinationAddImage(destination, cgImage, frameProperties as CFDictionary) | |
} | |
} | |
sample = readerOutput.copyNextSampleBuffer() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment