Follow these steps to add audio input capability and video input from DV cameras.
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 |
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; |
Last updated: 2007-10-31