![]() |
Imaging Control 4 C Library
1.2.0
|
Configures the behavior of a snap sink. More...
Data Fields | |
enum IC4_SNAPSINK_ALLOCATION_STRATEGY | strategy |
Specifies the sink's buffer allocation strategy. More... | |
size_t | num_buffers_alloc_on_connect |
Defines the number of buffers to auto-allocate when the stream is set up. More... | |
size_t | num_buffers_allocation_threshold |
Defines the minimum number of required free buffers. More... | |
size_t | num_buffers_free_threshold |
Defines the maximum number of free buffers. More... | |
size_t | num_buffers_max |
Defines the maximum total number of buffers this sink will allocate. More... | |
enum IC4_PIXEL_FORMAT * | pixel_formats |
An array of possible pixel formats that the sink can receive. More... | |
size_t | num_pixel_formats |
Length of the pixel_formats array. More... | |
struct IC4_ALLOCATOR_CALLBACKS | allocator |
A structure containing function pointers to customize the sink's allocator. More... | |
void * | allocator_context |
A user-defined value that is passed to the allocator callbacks. More... | |
Configures the behavior of a snap sink.
A pointer to a IC4_SNAPSINK_CONFIG
is passed to ic4_snapsink_create().
struct IC4_ALLOCATOR_CALLBACKS allocator |
A structure containing function pointers to customize the sink's allocator.
This parameter is optional, set all callback functions to to
use the default allocator.
If IC4_ALLOCATOR_CALLBACKS::allocate_buffer is set, IC4_ALLOCATOR_CALLBACKS::free_buffer must be set as well.
void* allocator_context |
A user-defined value that is passed to the allocator callbacks.
If callback_context
points to a memory location, and callback functions access that memory, the program has to make sure that the memory is valid until the IC4_ALLOCATOR_CALLBACKS::release callback is executed.
size_t num_buffers_alloc_on_connect |
Defines the number of buffers to auto-allocate when the stream is set up.
This value is ignored unless strategy is set to IC4_SNAPSINK_ALLOCATION_STRATEGY_CUSTOM.
size_t num_buffers_allocation_threshold |
Defines the minimum number of required free buffers.
If the number of free buffers falls below this, new buffers are allocated.
This value is ignored unless strategy is set to IC4_SNAPSINK_ALLOCATION_STRATEGY_CUSTOM.
size_t num_buffers_free_threshold |
Defines the maximum number of free buffers.
If the number of free buffers grows above this, buffers are freed.
If set to 0
, buffers are not freed automatically.
This value is ignored unless strategy is set to IC4_SNAPSINK_ALLOCATION_STRATEGY_CUSTOM.
num_buffers_free_threshold
is not 0
, it must be larger than num_buffers_allocation_threshold +
2
. size_t num_buffers_max |
Defines the maximum total number of buffers this sink will allocate.
This includes both free buffers managed by the sink and filled buffers owned by the program.
If set to 0
, there is no limit to the total number of buffers.
This value is ignored unless strategy is set to IC4_SNAPSINK_ALLOCATION_STRATEGY_CUSTOM.
size_t num_pixel_formats |
Length of the pixel_formats array.
If this value is 0
, the sink will accept any pixel format.
enum IC4_PIXEL_FORMAT* pixel_formats |
An array of possible pixel formats that the sink can receive.
The image types can be partially specified.
enum IC4_SNAPSINK_ALLOCATION_STRATEGY strategy |
Specifies the sink's buffer allocation strategy.
The buffer allocation strategy defines how many buffers are pre-allocated, when additional buffers are created, and when excess buffers are reclaimed.