When a capture session is running, we can add another output object that will be notified each time a new, uncompressed, frame is captured. The output's delegate object can do whatever it wants to do to that captured frame, for example, save it to a file.
Select the iSight Recorder TARGET in the standard editor. In the Build Phases section titled Link Binary With Libraries, add the QuartzCore.framework.
Remember to drag the QuartzCore.framework to the Frameworks folder in the project navigator.
In the file named
BTSAppDelegate.h
, add a#define
for our captured image's width, height, and JPG file extension.// Define the image size for pictures #define D_BTS_SNAP_WIDTH 640 #define D_BTS_SNAP_HEIGHT 480 // Define the image type for pictures #define D_BTS_SNAP_TYPE @"jpg"
Then add a new
@property
of typeQTCaptureDecompressedVideoOutput
. The delegate of the object referenced by this property will receive uncompressed frame data.// Use this property to capture...