piemonte/PBJVision — pull request #163 by despinoza (2014-06-27 17:40:01+00:00)
Title: added video thumbnail capture

This is fairly lightweight: it simply maintains a list of CMTimes to generate thumbnails in post-production. By default always generates a thumbnail for frame 0. Added some convenience routines to support setting by frame, time in seconds, or -- if someone wants to implement tap-to-snap -- the current frame. I only tested the default frame setter, but the other routines look right. You may want to double-check.

Note: Because I didn't want to mess with the callback flow in endVideoCapture I left this as a synchronous enumeration on the main thread, but you probably want to use generateCGImagesAsynchronouslyForTimes:completionHandler instead so you don't block in case someone is generating a lot of thumbnails.