FrameQueueSink::create Method

Creates a new FrameQueueSink.
Syntax:
static tFrameSnapSinkPtr    create( FrameQueueSinkListener& listener );
static tFrameSnapSinkPtr    create( FrameQueueSinkListener& listener, const FrameTypeInfo& type );
static tFrameSnapSinkPtr    create( FrameQueueSinkListener& listener, const FrameTypeInfoArray& acceptedFrameTypes );

Parameter Description
listener

Specifies the listener reference which gets the according framesQueued calls.

type

Specifies the FrameTypeInfo of the sink itself.

acceptedFrameTypes

Specifies a list of acceptable frame types for the sink.

Return Value:

A pointer to the new FrameQueueSink, or NULL,if an error occurred.

Examples:

This example creates a listener object (which must be derived from FrameQueueSinkListener ) and with this in hand then creates a FrameQueueSink object. Note that via the acceptedTypes parameter, this sink only accepts RGB formats.

sink_listener    listener_instance;
// Create a FrameTypeInfoArray data structure describing the allowed color formats.
FrameTypeInfoArray acceptedTypes = FrameTypeInfoArray::createRGBArray();
// Create the frame sink
tFrameQueueSinkPtr pSink = FrameQueueSink::create( listener_instance, acceptedTypes );
// Apply the sink to the grabber.
grabber.setSinkType( pSink );

See also: FrameQueueSink, tFrameQueueSinkPtr, FrameQueueSinkListener, FrameTypeInfo, FrameTypeInfoArray

<< FrameQueueSink