Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
CocoaVideoFrameToNSImage
Last Revision: | Version 1.0, 2003-01-14 Demonstrates how to create an NSImage for each frame of a QuickTime movie. |
Build Requirements: | Mac OS X |
Runtime Requirements: | Mac OS X Mac OS X |
This sample demonstrates how to step frame-by-frame through a QuickTime movie using the GetNextInterestingTime function, drawing each frame of the movie into a GWorld using a decompression sequence. The contents of the GWorld are then converted into a NSImage object. Finally, the NSImage is composited with a background image and drawn into a NSQuickDrawView using the NSImage drawRect method. Simply launch the application, and press the "NextFrame" button to advance frame-by-frame through the movie (note: for MPEG-4 movies the above technique will work, but not MPEG-1 or 2 because with these movie files all frames are treated as a single large sample in the movie). Requirements: Mac OS X Keywords: NSQuickDrawView NSImage GetNextInterestingTime video frame step
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14