Graphics Reference
In-Depth Information
CHAPTER
7
IN THIS CHAPTER
.
Working with QTMovieLayer
.
Working with QTCaptureLayer
T
his chapter takes a close look at
QTMovieLayer
, a light-
weight Core Animation layer that provides a simple mecha-
nism for playing QuickTime movies using
QTMovie
objects
from the QTKit framework.
We also look at the
QTCaptureLayer
, a lightweight Core
Animation layer that provides a framework for capturing
frames from an imaging device, such as the built-in iSight
camera found in most Macs today. Setting up the capture
session is the hard part, but after you have it set up, you
can use the layer anywhere you want to capture live
camera images.
The QuickTime layers provide all the functionality you
need at a higher level than their view-based counter parts.
This chapter shows you just how much you gain by using
layers to take advantage of the QuickTime technologies.
The API for
QTMovieLayer
is simple. There are only three
unique items to a
QTMovieLayer
:
.
+ layerWithMovie:
.
- initWithMovie:
.
- movie
The first two initialize the layer, and the third gets a refer-
ence back to the
QTMovie
object used to initialize the layer.
Everything else is simply what you get from the parent
CALayer
class.