Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Add Instance Variables

Follow these steps to add audio input capability and video input from DV cameras.

  1. Launch Xcode 3 and open your MyRecorder project. Click the MyRecorderController.h declaration file. You need to modify and add the following instance variables, so the code looks like this:

     
    #import <Cocoa/Cocoa.h>
    #import <QTKit/QTkit.h>
     
    @interface MyRecorderController : NSObject {
        IBOutlet QTCaptureView      *mCaptureView;
     
        QTCaptureSession            *mCaptureSession;
        QTCaptureMovieFileOutput    *mCaptureMovieFileOutput;
        QTCaptureDeviceInput        *mCaptureVideoDeviceInput;
        QTCaptureDeviceInput        *mCaptureAudioDeviceInput;
    }
    - (IBAction)startRecording:(id)sender;
    - (IBAction)stopRecording:(id)sender;
     
    @end
  2. Notably, you’ve added two instance variables that point to the QTCaptureDeviceInput class. These are the audio and video input device variables that enable you to capture audio, as well as video from external DV cameras.

        QTCaptureDeviceInput             *mCaptureVideoInputDevice;
        QTCaptureDeviceInput             *mCaptureAudioInputDevice;


< Previous PageNext Page > Hide TOC


Last updated: 2007-10-31




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.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice