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

Description

Manages receiving video frames via a QTCaptureSession.

Instance Methods

(BOOL) - initWithDevice: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:
 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.
 

Class Methods

(char *) + formatTypeString:
 Returns a C string describing the specified pixel format.
 

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.
 
double lastFrameReceived
 The timestamp at which the last frame was received.
 
NSArray * mVideoInputDevices
 All available video input devices.
 
VuoVideoInputDevice desiredDevice
 The device the user has requested.
 
BOOL userWantsRunning
 Was startRunning called (without calling stopRunning)?
 
CVOpenGLTextureCacheRef textureCache
 GL_TEXTURE_RECTANGLEs from the video feed.
 
VuoGlContext glContext
 The OpenGL context to convert CVImageBufferRef to gl textures with.
 

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.

+ (char *) formatTypeString: (int)  key

Returns a C string describing the specified pixel format.

- (BOOL) initWithDevice: (VuoVideoInputDevice device
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.

initialize texture cache for creating gl textures from CVPixelBuffer

https://developer.apple.com/library/mac/documentation/QuartzCore/Reference/CVPixelFormatDescriptionRef/#//apple_ref/doc/constant_group/Pixel_Format_Types

- (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: (VuoVideoInputDevice device

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.

- (VuoVideoInputDevice) desiredDevice
protected

The device the user has requested.

- (VuoGlContext) glContext
protected

The OpenGL context to convert CVImageBufferRef to gl textures with.

- (double) lastFrameReceived
protected

The timestamp at which the last frame was 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.

- (QTMovie*) mMovie
protected

?

- (NSArray*) mVideoInputDevices
protected

All available video input devices.

Todo:
Make this a singleton?
- (CVOpenGLTextureCacheRef) textureCache
protected

GL_TEXTURE_RECTANGLEs from the video feed.

- (BOOL) userWantsRunning
protected

Was startRunning called (without calling stopRunning)?


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