FrameNotificationSink.FrameNotificationSink Method

Creates a new FrameNotificationSink.
Syntax:
[C#]
public FrameNotificationSink( IFrameNotificationSinkListener listener ); public FrameNotificationSink( IFrameNotificationSinkListener listener, Guid mediaSubType ); public FrameNotificationSink( IFrameNotificationSinkListener listener, FrameType frameType ); public FrameNotificationSink( IFrameNotificationSinkListener listener, FrameTypes frameTypeList ); public FrameNotificationSink( Action<IFrame> frameRecvFunc ); public FrameNotificationSink( Action<IFrame> frameRecvFunc, Guid mediaSubType ); public FrameNotificationSink( Action<IFrame> frameRecvFunc, FrameType frameType ); public FrameNotificationSink( Action<IFrame> frameRecvFunc, FrameTypes frameTypeList );
Parameter Description
listener

The IFrameNotificationSinkListener derived object that will receive all sink events.

frameRecvFunc

The event function object which receives the IFrame objects. This event is equivalent to IFrameNotificationSinkListener.FrameReceived and its restrictions apply to this function object too. All other events of are IFrameNotificationSinkListener not raised. The signature of the function object is:

[C#]
void funcName( IFrame frm );

mediaSubType

Specifies the FrameType.Subtype which will be accepted by this sink. All other types will be rejected.

frameType

Specifies the FrameType which will be accepted by this sink. All other types will be rejected.

frameTypeList

Specifies a list of FrameTypes which will be accepted by this sink. All other types will be rejected.

Example:

This example shows how to build a simple FrameNotificationSink.

[C#]
Action<IFrame> recvFrame = new Action<IFrame>(( img ) => { /* Do something with the img */ }); FrameNotificationSink sink = new FrameNotificationSink(recvFrame, MediaSubtypes.RGB32); ICImagingControl1.Sink = sink; ICImagingControl1.LiveStart(); // here calls to recvFrame will be generated for each frame incoming
See also : FrameNotificationSink, IFrameNotificationSinkListener, FrameType, FrameTypes, MediaSubtypes

<< FrameNotificationSink