Imaging Control 4 C Library 1.2.0
Loading...
Searching...
No Matches
Sinks

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

Modules

 Queue Sink
 The queue sink is a sink implementation that allows a program to process all images received from a video capture device.
 
 Snap Sink
 The snap sink is a sink implementation that allows a program to capture single images or sequences of images on demand, while still having a display showing all images.
 

Data Structures

struct  IC4_SINK
 Represents a sink, allowing programmatic access to image data. More...
 

Enumerations

enum  IC4_SINK_TYPE { IC4_SINK_TYPE_QUEUESINK = 4 , IC4_SINK_TYPE_SNAPSINK = 5 , IC4_SINK_TYPE_INVALID = -1 }
 Identifies the type of a sink. More...
 
enum  IC4_SINK_MODE { IC4_SINK_MODE_RUN , IC4_SINK_MODE_PAUSE , IC4_SINK_MODE_INVALID = -1 }
 Defines the possible sink modes. More...
 

Functions

struct IC4_SINKic4_sink_ref (struct IC4_SINK *pSink)
 Increases the sink's internal reference count by one.
 
void ic4_sink_unref (struct IC4_SINK *pSink)
 Decreases the sink's internal reference count by one.
 
bool ic4_sink_set_mode (struct IC4_SINK *pSink, enum IC4_SINK_MODE mode)
 Sets the sink mode for a sink.
 
enum IC4_SINK_MODE ic4_sink_get_mode (struct IC4_SINK *pSink)
 Gets the current sink mode of a sink.
 
bool ic4_sink_is_attached (struct IC4_SINK *pSink)
 Checks whether a sink is currently attached to a Grabber.
 
enum IC4_SINK_TYPE ic4_sink_get_type (struct IC4_SINK *pSink)
 Returns the actual type of the sink.
 

Detailed Description

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

There are multiple sink types available:

To create a sink object, use its creation function, e.g. ic4_queuesink_create() or ic4_snapsink_create().

A sink is connected to a video capture device using the ic4_grabber_stream_setup() function.

All sink objects are referred to by pointers to the IC4_SINK type.

Enumeration Type Documentation

◆ IC4_SINK_MODE

Defines the possible sink modes.

Enumerator
IC4_SINK_MODE_RUN 

The sink is operational.

IC4_SINK_MODE_PAUSE 

The sink is paused, immediately returning all image buffers it receives to the device to the device driver.

IC4_SINK_MODE_INVALID 

Invalid sink mode, used to indicate an error.

◆ IC4_SINK_TYPE

Identifies the type of a sink.

Enumerator
IC4_SINK_TYPE_QUEUESINK 

Queue sink.

IC4_SINK_TYPE_SNAPSINK 

Snap sink.

IC4_SINK_TYPE_INVALID 

Not a sink type.

Function Documentation

◆ ic4_sink_get_mode()

enum IC4_SINK_MODE ic4_sink_get_mode ( struct IC4_SINK pSink)

Gets the current sink mode of a sink.

Parameters
[in]pSinkA sink
Returns
A IC4_SINK_MODE value describing the current sink mode.
If an error occurred, the return value is IC4_SINK_MODE_INVALID. Use ic4_get_last_error() to query error information.

◆ ic4_sink_get_type()

enum IC4_SINK_TYPE ic4_sink_get_type ( struct IC4_SINK pSink)

Returns the actual type of the sink.

Parameters
[in]pSinkA sink
Returns
The type of the sink, or IC4_SINK_TYPE_INVALID in case of an error.
Use ic4_get_last_error() to query error information.

◆ ic4_sink_is_attached()

bool ic4_sink_is_attached ( struct IC4_SINK pSink)

Checks whether a sink is currently attached to a Grabber.

Parameters
[in]pSink
Returns
true, if the sink is attached, otherwise false.

◆ ic4_sink_ref()

struct IC4_SINK * ic4_sink_ref ( struct IC4_SINK pSink)

Increases the sink's internal reference count by one.

Parameters
[in]pSinkA pointer to a sink
Returns
The pointer passed via pSink
Remarks
If pSink is NULL, the function returns NULL. An error value is not set.
See also
ic4_sink_unref

◆ ic4_sink_set_mode()

bool ic4_sink_set_mode ( struct IC4_SINK pSink,
enum IC4_SINK_MODE  mode 
)

Sets the sink mode for a sink.

Parameters
[in]pSinkA sink
[in]modeThe new sink mode
Returns
true on success, otherwise false.
Use ic4_get_last_error() to query error information.

◆ ic4_sink_unref()

void ic4_sink_unref ( struct IC4_SINK pSink)

Decreases the sink's internal reference count by one.

If the reference count reaches zero, the object is destroyed.

Parameters
[in]pSinkA pointer to a sink
Remarks
If pSink is NULL, the function does nothing. An error value is not set.
See also
ic4_sink_ref