IC Imaging Control .NET

FrameQueueSink.FrameQueueSink Method

FrameQueueSink.FrameQueueSink Method

Creates a new FrameQueueSink.
Syntax:
[C#]
public FrameQueueSink( IFrameQueueSinkListener listener ); public FrameQueueSink( IFrameQueueSinkListener listener, Guid mediaSubType ); public FrameQueueSink( IFrameQueueSinkListener listener, FrameType frameType ); public FrameQueueSink( IFrameQueueSinkListener listener, FrameTypes frameTypeList ); public FrameQueueSink( Func<IFrameQueueBuffer,FrameQueuedResult> frameQueuedFunc, int initialBufferCount ); public FrameQueueSink( Func<IFrameQueueBuffer,FrameQueuedResult> frameQueuedFunc, Guid mediaSubType, int initialBufferCount ); public FrameQueueSink( Func<IFrameQueueBuffer,FrameQueuedResult> frameQueuedFunc, FrameType frameType, int initialBufferCount ); public FrameQueueSink( Func<IFrameQueueBuffer,FrameQueuedResult> frameQueuedFunc, FrameTypes frameTypeList, int initialBufferCount );
Parameter Description
listener

The listener which will receive the according sink events.

frameQueuedFunc

The function object that will becalled when a new image arrives. This function object will receive a IFrameQueueBuffer which has to be used and requeued into the sink to retain a healthy buffer count.

The function object will have to return either FrameQueuedResult.SkipReQueue or FrameQueuedResult.ReQueue to indicate if the passed in IFrameQueueBuffer should automatically be re-enqueued in the FrameQueueSink that is calling.

The signature of this function must be:

[C#]
FrameQueuedResult FuncName( IFrameQueueBuffer img )
initialBufferCount

If the FrameQueueSink is created with a frameQueuedFunc parameter, you have to specify a count of frames that have to be queued directly after the sink gets connected. If you pass in 0 then no buffers get created automatically.

mediaSubType

This is a convienience parameter for

[C#]
new FrameQueueSink( ..., new FrameTypes( new FrameType( mediaSubType ) ) ... );
frameType

This is a convienience parameter for

[C#]
new FrameQueueSink( ..., new FrameTypes( frametype ) ... );
frameTypeList

The FrameTypes this sink accepts as connection types. If this list is empty, the sink accepts all connection types.

Information:

Introduced in version 3.5

Example:

The following example shows how create a FrameQueueSink which only accepts RGB32 uses a lambda function to receive incoming frames.

[C#]
FrameQueueSink sink = new FrameQueueSink(( img ) => { /* Do something with the IFrameQueueBuffer in img */ return FrameQueuedResult.ReQueue; }, MediaSubtypes.RGB32, 5); ICImagingControl1.Sink = sink; ICImagingControl1.LiveStart();
See also: FrameQueueSink, IFrameQueueSinkListener, FrameQueueBuffer, FrameType, FrameTypes, FrameQueuedResult

<< FrameQueueSink

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us