Sink Class Referenceabstract
Abstract base class for sinks. More...
Inheritance diagram for Sink:
![](common/img/classic4_sink.png)
Public Types
enum class | SinkMode { Run = c_interface::IC4_SINK_MODE_RUN
, Pause = c_interface::IC4_SINK_MODE_PAUSE
} Defines the possible sink modes. More... |
Public Member Functions
bool | setSinkMode (SinkMode mode, Error &err=Error::Default()) noexcept Sets the sink mode for a sink. |
SinkMode | sinkMode () const noexcept Gets the current sink mode of a sink. |
bool | isAttached () const noexcept Checks whether a sink is currently attached to a Grabber as part of a data stream. |
virtual SinkType | sinkType () const noexcept=0 Returns the type of this sink. |
Detailed Description
Abstract base class for sinks.
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 creation function, e.g. QueueSink::create() or SnapSink::create().
A sink is connected to a video capture device using the Grabber::streamSetup() function.
Member Enumeration Documentation
◆ SinkMode
|
strong |
Member Function Documentation
◆ isAttached()
|
inlinenoexcept |
◆ setSinkMode()
|
inlinenoexcept |
Sets the sink mode for a sink.
- Parameters
-
[in] mode The new sink mode [out] err Reference to an error handler. See Error Handling for details.
- Returns
true
on success, otherwisefalse
.
Check the err output parameter for error code and error message.
◆ sinkMode()
|
inlinenoexcept |
Gets the current sink mode of a sink.
- Returns
- The current sink mode