Video Part is a simple video display part that demonstrates, among other things, idle-time updating.
• How do I set up the video input device?
Choose “Settings…” from the “Video” menu — if you’re lucky it won’t crash.
• How is it different from HelloPart?
• All QuickTime and GWorld-related setup is done in PrivInitializeQuickTime (incoming video frames are buffered in an offscreen GWorld for beautiful drawing with multiple facets, etc.).
• RegisterIdle is called from within the DisplayFrameAdded method.
• Idle-time drawing is done in HandleEvent whenever a nullEvent is received. The part steps through each facet in its facet list and updates their contents.
• What’s cool about it?
Try embedding video in the puzzle part.
• What’s lame about it?
The offscreen GWorld is hard-coded as 16-bit. If you have a macho-AV card, you’ll want increase the kPixelDepth constant.