IC Imaging Control .NET

IFrameQueueSinkListener

IFrameQueueSinkListener

IFrameQueueSinkListener is the interface used by the FrameQueueSink to notfiy about state changes and provide a new frame callback.

Example

[C#]
class FrameQueueSinkListener : IFrameQueueSinkListener { public void SinkConnected(FrameQueueSink sink, FrameType frameType) { // here we allocate and queue 5 buffers which too already have the right type sink.AllocAndQueueBuffers(5); } public void SinkDisconnected(FrameQueueSink sink, IFrameQueueBuffer[] dequeuedInputBuffers) { foreach(IFrameQueueBuffer buf in dequeuedInputBuffers ) { // this is practically sink.PopInputQueueBuffers } // these are the already copied buffers for which we were not called for/didn't already pop IFrameQueueBuffer[] outputBuffers = sink.PopAllOutputQueueBuffers(); } public void FramesQueued(FrameQueueSink sink) { IFrameQueueBuffer[] buffers = sink.PopAllOutputQueueBuffers(); foreach (IFrameQueueBuffer buf in buffers) { // call your function on buf // do_something( buf ); // this sample expects do_something not to hold onto the buffer // because of this, we directly queue it back into the sink input queue sink.QueueBuffer(buf); } // we can exit here, because when new buffers arrived after we called PopAllOutputQueueBuffers, we are immediatly called again } }
[C#]
FrameQueueSinkListener listener = new FrameQueueSinkListener(); FrameQueueSink sink = new FrameQueueSink(listener, MediaSubtypes.RGB32); ICImagingControl1.Sink = sink;

Information

Namespace: TIS.Imaging
Introduced in version 3.5

Methods

Method Description
FramesQueued

This method is called when the FrameQueueSink receives a frame from the video capture device. If additional frames are received while FramesQueued is running, FramesQueued is immediately called again after it returns.

SinkConnected

This method is called when the FrameQueueSink gets connected during ICImagingControl.LiveStart or ICImagingControl.LivePrepare.

SinkDisconnected

This method is called when the FrameQueueSink gets disconnected during ICImagingControl.LiveStop.

<< Classes

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