Question

I'm working on an app that applies Quartz Composer effects to QuickTime movies. Think Photo Booth, except with a QuickTime movie for the input, not a camera. Currently, I am loading a quicktime movie as a QTMovie object, then have an NSTimer firing 30 times a second. At some point I'll switch to a CVDisplayLink, but NSTimer is okay for now. Every time the NSTimer fires, the app grabs one frame of the quicktime movie as an NSImage and passes it to one of the QCRenderer's image inputs. This works, but is extremely slow. I've tried pulling frames from the movie in all of the formats that [QTMovie frameImageAtTime:withAttributes:error:] supports. They are all either really slow, or don't work at all.

I'm assuming that the slowness is caused by moving the image data to main memory, then moving it back for QC to work on it.

Unfortunately, using QC's QuickTime movie patch is out of the question for this project, as I need more control of movie playback than that provides. So the question is, how can I move QuickTime movie images into my QCRenderer without leaving VRAM?

Was it helpful?

Solution

Check out the v002 Movie Player QCPlugin which is open source. Anyway, what more controls do you have exactly?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top