FrameSnapSink.FrameSnapSink Method

Creates a new FrameSnapSink instance.
Syntax:
[C#]
public FrameSnapSink(); public FrameSnapSink( Guid mediaSubType ); public FrameSnapSink( FrameType frameType ); public FrameSnapSink( FrameTypes frameTypeList );
Parameter Description
mediaSubType

This is a convienience overload for

[C#]
new FrameSnapSink( new FrameType( mediaSubType ) );

frameType

The FrameType this sink connects with.

frameTypeList

The list of FrameTypes this sink accepts as input type.

Information:

Introduced in version 3.5

Example:

The following example shows how create a FrameSnapSink which only accepts RGB32 images and uses SnapSequence to capture some frames.

[C#]
FrameSnapSink sink = new FrameSnapSink(MediaSubtypes.RGB32); ICImagingControl1.Sink = sink; ICImagingControl1.LiveStart(); int index = 0; IFrameQueueBuffer[] lst = sink.SnapSequence(5, TimeSpan.FromSeconds(5)); foreach( IFrameQueueBuffer frame in lst ) { // do something with each buffer frame.SaveAsBitmap(String.Format("test_{0}.bmp", index++)); } // reusing buffers in a snap sink IFrameQueueBuffer[] lst2 = sink.SnapSequence(lst, TimeSpan.FromSeconds(5)); // save the next buffer sequence foreach( IFrameQueueBuffer frame in lst2 ) { // do something with each buffer frame.SaveAsBitmap(String.Format("test_{0}.bmp", index++)); }
See also : FrameSnapSink, FrameType, FrameTypes

<< FrameSnapSink