Vuo  0.9.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Instance Methods | Protected Attributes | List of all members
VuoQtListener Class Reference

Description

Manages receiving video frames via a QTCaptureSession.

Instance Methods

(BOOL) - initWithDevice:id:callback:
 Initialize a QTListener with the device name or id.
 
(BOOL) - isInitialized
 Returns true if the capture session has been initialized.
 
(BOOL) - isRunning
 Reflects the actual running status of mCaptureSession, not whether or not the user wants isRunning.
 
(void) - setInputDevice:id:
 Set the input device - does not start or stop recording, just changes what the input device is.
 
(void) - startRunning
 Begins receiving frames.
 
(void) - stopRunning
 Stops receiving frames (starts ignoring/dropping them).
 
(void) - devicesDidChange:
 When a device is connected or disconnected, check if the device we're interested in has been found or lost.
 
(void) - refreshDevices
 Iterate through available input devices and search for one matching the desired device name or id, then set the input device (but don't start recording - only do that in startListening).
 
(void) - setCaptureDevice:
 Set the capture device.
 
(void) - setCallback:
 Set the callback to be triggered when a new image is available.
 

Protected Attributes

QTMovie * mMovie
 ?
 
QTCaptureSession * mCaptureSession
 Manages a list of frame receivers.
 
QTCaptureDeviceInput * mCaptureDeviceInput
 The device from which to receive frames.
 
QTCaptureDecompressedVideoOutput * mCaptureDecompressedVideoOutput
 A frame receiver.
 
CVImageBufferRef mCurrentImageBuffer
 The latest received frame.
 
void(* callback )(VuoVideoFrame)
 Called when a frame is received.
 
NSArray * mVideoInputDevices
 All available video input devices.
 
NSString * mDesiredDeviceName
 The desired device name.
 
NSString * mDesiredDeviceID
 The desired device id.
 
BOOL userWantsRunning
 Was startRunning called (without calling stopRunning)?
 

Method Documentation

- (void) devicesDidChange: (NSNotification *)  notification

When a device is connected or disconnected, check if the device we're interested in has been found or lost.

- (BOOL) initWithDevice: (NSString*)  name
id: (NSString*)  uniqueID
callback: (VuoVideoFrame receivedFrame 

Initialize a QTListener with the device name or id.

Initializes for listening to a specific device.

The listener will attempt to find the device first using ID, then name. If a matching device is not found, the listener will wait for a device matching the description until it is either registered, or told to stop.

- (BOOL) isInitialized

Returns true if the capture session has been initialized.

Does not reflect the status of capture session isRun

- (BOOL) isRunning

Reflects the actual running status of mCaptureSession, not whether or not the user wants isRunning.

- (void) refreshDevices

Iterate through available input devices and search for one matching the desired device name or id, then set the input device (but don't start recording - only do that in startListening).

If both name and id are empty strings, the first valid device is used. If name or id is set, a nil device will be set as the input until a matching device is detected.

- (void) setCallback: (VuoVideoFrame receivedFrame

Set the callback to be triggered when a new image is available.

- (void) setCaptureDevice: (QTCaptureDevice*)  device

Set the capture device.

- (void) setInputDevice: (NSString*)  name
id: (NSString*)  uniqueID 

Set the input device - does not start or stop recording, just changes what the input device is.

- (void) startRunning

Begins receiving frames.

- (void) stopRunning

Stops receiving frames (starts ignoring/dropping them).

Member Data Documentation

- (void(* callback)(VuoVideoFrame))
protected

Called when a frame is received.

- (QTCaptureDecompressedVideoOutput*) mCaptureDecompressedVideoOutput
protected

A frame receiver.

- (QTCaptureDeviceInput*) mCaptureDeviceInput
protected

The device from which to receive frames.

- (QTCaptureSession*) mCaptureSession
protected

Manages a list of frame receivers.

- (CVImageBufferRef) mCurrentImageBuffer
protected

The latest received frame.

- (NSString*) mDesiredDeviceID
protected

The desired device id.

- (NSString*) mDesiredDeviceName
protected

The desired device name.

- (QTMovie*) mMovie
protected

?

- (NSArray*) mVideoInputDevices
protected

All available video input devices.

Todo:
Make this a singleton?
- (BOOL) userWantsRunning
protected

Was startRunning called (without calling stopRunning)?


The documentation for this class was generated from the following files: