Vuo  1.2.7
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. More...
 
(BOOL) - isInitialized
 Returns true if the capture session has been initialized. More...
 
(BOOL) - isRunning
 Reflects the actual running status of mCaptureSession, not whether or not the user wants isRunning. More...
 
(void) - setInputDevice:
 Set the input device - does not start or stop recording, just changes what the input device is. More...
 
(void) - startRunning
 Begins receiving frames. More...
 
(void) - stopRunning
 Stops receiving frames (starts ignoring/dropping them). More...
 
(void) - devicesDidChange:
 When a device is connected or disconnected, check if the device we're interested in has been found or lost. More...
 
(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). More...
 
(void) - setCaptureDevice:
 Set the capture device. More...
 
(void) - setCallback:
 Set the callback to be triggered when a new image is available. More...
 
(void) - setWidth:height:
 Specifies the desired image size. More...
 

Class Methods

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

Protected Attributes

QTMovie * mMovie
 ? More...
 
QTCaptureSession * mCaptureSession
 Manages a list of frame receivers. More...
 
QTCaptureDeviceInput * mCaptureDeviceInput
 The device from which to receive frames. More...
 
QTCaptureDecompressedVideoOutput * mCaptureDecompressedVideoOutput
 A frame receiver. More...
 
CVImageBufferRef mCurrentImageBuffer
 The latest received frame. More...
 
void(* callback )(VuoVideoFrame)
 Called when a frame is received. More...
 
double lastFrameReceived
 The timestamp at which the last frame was received. More...
 
NSArray * mVideoInputDevices
 All available video input devices. More...
 
VuoVideoInputDevice desiredDevice
 The device the user has requested. More...
 
BOOL userWantsRunning
 Was startRunning called (without calling stopRunning)? More...
 
CVOpenGLTextureCacheRef textureCache
 GL_TEXTURE_RECTANGLEs from the video feed. More...
 
CIContext * ciContext
 Fallback for when CVOpenGLTextureCacheRef fails. More...
 

Method Documentation

◆ devicesDidChange:()

- (void) devicesDidChange: (NSNotification *)  notification

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

◆ formatTypeString:()

+ (char *) formatTypeString: (int)  key

Returns a C string describing the specified pixel format.

◆ initWithDevice:callback:()

- (BOOL) initWithDevice: (VuoVideoInputDevice device
callback: (void(*)(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

◆ isInitialized()

- (BOOL) isInitialized

Returns true if the capture session has been initialized.

Does not reflect the status of capture session isRun

◆ isRunning()

- (BOOL) isRunning

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

◆ refreshDevices()

- (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.

◆ setCallback:()

- (void) setCallback: (void(*)(VuoVideoFrame))  receivedFrame

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

◆ setCaptureDevice:()

- (void) setCaptureDevice: (QTCaptureDevice*)  device

Set the capture device.

◆ setInputDevice:()

- (void) setInputDevice: (VuoVideoInputDevice device

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

◆ setWidth:height:()

- (void) setWidth: (VuoInteger width
height: (VuoInteger height 

Specifies the desired image size.

◆ startRunning()

- (void) startRunning

Begins receiving frames.

◆ stopRunning()

- (void) stopRunning

Stops receiving frames (starts ignoring/dropping them).

Member Data Documentation

◆ callback

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

Called when a frame is received.

◆ ciContext

- (CIContext*) ciContext
protected

Fallback for when CVOpenGLTextureCacheRef fails.

◆ desiredDevice

- (VuoVideoInputDevice) desiredDevice
protected

The device the user has requested.

◆ lastFrameReceived

- (double) lastFrameReceived
protected

The timestamp at which the last frame was received.

◆ mCaptureDecompressedVideoOutput

- (QTCaptureDecompressedVideoOutput*) mCaptureDecompressedVideoOutput
protected

A frame receiver.

◆ mCaptureDeviceInput

- (QTCaptureDeviceInput*) mCaptureDeviceInput
protected

The device from which to receive frames.

◆ mCaptureSession

- (QTCaptureSession*) mCaptureSession
protected

Manages a list of frame receivers.

◆ mCurrentImageBuffer

- (CVImageBufferRef) mCurrentImageBuffer
protected

The latest received frame.

◆ mMovie

- (QTMovie*) mMovie
protected

?

◆ mVideoInputDevices

- (NSArray*) mVideoInputDevices
protected

All available video input devices.

Todo:
Make this a singleton?

◆ textureCache

- (CVOpenGLTextureCacheRef) textureCache
protected

GL_TEXTURE_RECTANGLEs from the video feed.

◆ userWantsRunning

- (BOOL) userWantsRunning
protected

Was startRunning called (without calling stopRunning)?


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