Version: 1.0

Posted: 2008-06-06

Build Requirements: Xcode 3.x

Runtime Requirements: Leopard 10.5.x

View Source Code:

Download Sample (“QTCoreVideo201.zip”, 1.29M)
Download Sample (“QTCoreVideo201.dmg”, 1.28M)



Description

CoreVideo201 is a Cocoa application demonstrating how to render a QuickTime Movie using OpenGL FBO and the Core Video texture pipeline.

This sample is the third in a series of samples demonstrating the synergy between QTKit, CoreVideo, and OpenGL. QTCoreVideo201 makes use of the classes introduced in QTCoreVideo102 and introduces the OpenGL FBO framework.

Base Classes:

• OpenGLViewKit - Allows you to work with OpenGLViews, interact with objects in 3D space.

• QTCoreVideoController - Request broker between the OpenGL models and the OpenGL views.

• MemObject - Memory container class.

• AlertPanelKit - Utility class for displaying alerts.

Derived Classes:

• QTCoreVideoOpenGLView - Derived from OpenGLViewKit, concrete view class.

• QTVisualContextKit - Utility class for maintaining Core Video PixelBuffer and Core Video OpenGL textures.

• OpenGLFBOKit - Manages OpenGL FBOs.

• OpenGLFBOStatusKit - Derived from AlertPanelKit displays FBO status.

• OpenGLQuad - Allows you to instantiate a Quad object as a display list.

• OpenGLTeapot - Allows you to instantiate a Teapot object as a display list.

• OpenGLTeapotTextured - Derived from OpenGLTeapot maintains a texture associated with a Teapot surface.

This sample further demonstrates how to render videos, obtained from Core Video texture pipeline, to offscreen draw buffers with the use of FBOs. By capturing images that would normally be drawn to the screen, FBOs can be used to implement a large variety of image filters, and post processing effects. FBOs may be used in video processing applications for the post-processing of rendered images and composition between different scenes. Additional benefits for using FBOs in video processing is that they're easier to set up than most other methods, they do not require context switching, they're more efficient since resources are shared within the same context, and they're more flexible as one can acquire all depth buffers, stencil buffers, accumulation buffers, etc.

This sample is part of the QTCoreVideo group of samples. Also see QTCoreVideo101, QTCoreVideo102, QTCoreVideo103, QTCoreVideo202, and QTCoreVideo301.

Document Revision History

Date Notes
2008-06-06Demonstrates how to render a QuickTime Movie using OpenGL FBO and the Core Video texture pipeline.

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.