FrameNotificationSink

The FrameNotificationSink is the most direct way to get images from a video capture device. This means that no copy will be done from driver memory to application memory.

This sink is most useful when the application needs to copy the image data into buffers of a third-party image processing library, because it is possible to avoid a copy operation.

A simple example is shown here:

class Listener : IFrameNotificationSinkListener
{
    public void SinkConnected(FrameType frameType) { }
    public void SinkDisconnected() { }
    public void FrameReceived(IFrame frame)
    {
        // do something with frame
    }
}

var listener = new Listener();
var sink = new FrameNotificationSink(listener);
ICImagingControl1.Sink = sink;

The sink constructor FrameNotificationSink is passed an instance of a class implementing the IFrameNotificationSinkListener interface. When images are received from the device, the listener's FrameReceived method is called.

It is imperative for the code inside the callback function to return quickly, because there is no buffering in the sink. There is no guarantee for the callback to be called for every frame if the system load is high, or the function takes a long time to complete compared to the frame interval.

Information

    Namespace: TIS.Imaging
    Introduced in version 3.5

Inheritance

    BaseSink
            FrameNotificationSink

Properties

Property Description
OutputFrameType

Returns the FrameType of the IFrames used by this sink.

Methods

Method Description
FrameNotificationSink

Creates a new FrameNotificationSink.

<< Classes