Sink objects provide programmatic access to the image data acquired from video capture devices.  
More...
|  | 
|  | 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. 
 | 
|  | 
|  | 
| struct | IC4_SINK | 
|  | Represents a sink, allowing programmatic access to image data.  More... 
 | 
|  | 
Sink objects provide programmatic access to the image data acquired from video capture devices. 
There are multiple sink types available:
- A Queue Sink is recommended when a program needs to process all or most images received from the device.
- A snap sink can be used to capture images or short image sequences on demand.
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. 
◆ 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.  | 
 
 
◆ ic4_sink_get_mode()
Gets the current sink mode of a sink. 
- Parameters
- 
  
  
- Returns
- A IC4_SINK_MODE value describing the current sink mode.
 If an error occurred, the return value isIC4_SINK_MODE_INVALID. Use ic4_get_last_error() to query error information.
 
 
◆ ic4_sink_get_type()
Returns the actual type of the sink. 
- Parameters
- 
  
  
- Returns
- The type of the sink, or IC4_SINK_TYPE_INVALIDin 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
- 
  
  
- Returns
- true, if the sink is attached, otherwise- false.
 
 
◆ ic4_sink_ref()
Increases the sink's internal reference count by one. 
- Parameters
- 
  
    | [in] | pSink | A pointer to a sink |  
 
- Returns
- The pointer passed via pSink 
- See also
- ic4_sink_unref 
 
 
◆ ic4_sink_set_mode()
Sets the sink mode for a sink. 
- Parameters
- 
  
    | [in] | pSink | A sink |  | [in] | mode | The new sink mode |  
 
- Returns
- trueon 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] | pSink | A pointer to a sink |  
 
- See also
- ic4_sink_ref