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... | |
- (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: | (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
- (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: | (void(*)(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) setWidth: | (VuoInteger) | width | |
height: | (VuoInteger) | height | |
Specifies the desired image size.
- (void) startRunning |
Begins receiving frames.
- (void) stopRunning |
Stops receiving frames (starts ignoring/dropping them).
|
protected |
Called when a frame is received.
|
protected |
Fallback for when CVOpenGLTextureCacheRef fails.
|
protected |
The device the user has requested.
|
protected |
The timestamp at which the last frame was received.
|
protected |
A frame receiver.
|
protected |
The device from which to receive frames.
|
protected |
Manages a list of frame receivers.
|
protected |
The latest received frame.
|
protected |
?
|
protected |
All available video input devices.
|
protected |
GL_TEXTURE_RECTANGLEs from the video feed.
|
protected |
Was startRunning called (without calling stopRunning)?