Class Sink

Abstract base class for sinks.

Implements

Namespace: ic4
Assembly: ic4dotnet.dll
Syntax
public abstract class Sink : HandleObject, IDisposable
Remarks

Sink objects provide programmatic access to the image data acquired from video capture devices.

There are multiple sink types available:

  • A QueueSink is recommended when a program needs to process all or most images received from the device.
  • A SnapSink can be used to capture images or short image sequences on demand.

To create a sink object, use its constructor, e.g. QueueSink(IEnumerable<PixelFormat>, IBufferAllocator, int) or SnapSink(IEnumerable<PixelFormat>, SnapSinkAllocationStrategy, IBufferAllocator).

A sink is connected to a video capture device using StreamSetup(Sink, IDisplay, StreamSetupOption) or one of its overloads.

Properties

IsAttached

Indicates whether a sink is currently attached to a Grabber as part of a data stream.

Declaration

public bool IsAttached { get; }
Property Value
Type Description
bool

true, if the sink is attached to a Grabber as part of a data stream, otherwise false.

Mode

Gets or sets the sink mode.

The sink mode can be used to temporarily suspend sink operation.

Sinks are set to Run by default.

Declaration

public SinkMode Mode { get; set; }
Property Value
Type Description
SinkMode
Sink ModeDescription
RunNormal operation
PausePause operation. The sink will ignore all incoming frames.

Type

The type of the sink

Declaration

public abstract SinkType Type { get; }
Property Value
Type Description
SinkType

The type of the sink

Implements