Image Manager (CVCDriver.dll) 14.0
IFlowSetPoolOwner

Interface for setting up buffer memory for image data acquisition. More...

Functions

cvbbool_t CVDCanFlowSetPoolOwner (CVDSTREAM Stream)
 This function verifies if the handle implements IFlowSetPoolOwner. More...
 
cvbres_t CVDStreamRegisterExternalFlowSetPool (CVDSTREAM Stream, const CVDFlowSet Pool[], size_t PoolSize, CVDReleaseFlowSetPool OnRelease, void *pPrivate)
 Registers user-defined memory locations, and registers a callback function that is called when a single flow set turned ready to be referenced by the consumers. More...
 
cvbres_t CVDStreamRegisterManagedFlowSetPool (CVDSTREAM Stream, size_t Count)
 Declares the number of flow sets the data stream module uses for data acquisition. More...
 
cvbres_t CVDStreamUnregisterFlowSetPool (CVDSTREAM Stream)
 Unregisters a previously registered flow set pool. More...
 

Detailed Description

Interface for setting up buffer memory for image data acquisition.

This collection provides features that aim to set up memory where acquired data is delivered to.

Function Documentation

◆ CVDCanFlowSetPoolOwner()

cvbbool_t CVDCanFlowSetPoolOwner ( CVDSTREAM  Stream)

This function verifies if the handle implements IFlowSetPoolOwner.

Parameters
[in]StreamHandle to be examined.
Returns
TRUE if the handle implements IFlowSetPoolOwner, FALSE otherwise.
Supported platforms:
Win32
Win64
Linux

◆ CVDStreamRegisterExternalFlowSetPool()

cvbres_t CVDStreamRegisterExternalFlowSetPool ( CVDSTREAM  Stream,
const CVDFlowSet  Pool[],
size_t  PoolSize,
CVDReleaseFlowSetPool  OnRelease,
void *  pPrivate 
)

Registers user-defined memory locations, and registers a callback function that is called when a single flow set turned ready to be referenced by the consumers.

The memory locations that are defined by Pool are used as the places where the consumers can access the acquired data. Depending on the data stream module that is used, there is a case where the data stream module has to set its internal memory as the primal destination. In such a case, copy process is involved until it turns ready to be referenced by consumers.

If the data stream module does not accept any user-defined memory locations as the primal destination of the acquired data then the acquired data will be delivered to the internal memory that the data stream module owns. And then the acquired data will be copied to the user-defined memory locations so that consumers can refer to the data.

OnRelease will be called by the data stream module once a flow set turned ready to be referenced by consumers.

When OnRelease is called pPrivate will be passed to it so note that the lifetime of the given object that is specified by pPrivate should be managed by the original caller; in the most cases, at least it does not make sense to use any object that will die once the program steps out from the current scope where this function was called.

Note that once OnRelease is called, the ownership of the presented flow set will be moved from the library to the caller so he/she has to be responsible for maintaining the lifetime of the flow set; if the memory has to be freed then he/she has to free it.

Parameters
[in]StreamThe handle of a target data stream module.
[in]PoolAn array of single flow set information.
[in]PoolSizeThe number of sets of flow set information, i.e., the number of elements of Pool.
[in]OnReleaseThe pointer to a function that is called when a flow set pool is released.
[in]pPrivateThe pointer to an arbitrary object; it will be passed to OnRelease when it is called. The pointer can be NULL.
Returns
  • #CVC_ERROR (#CVC_E_OK) No error.
  • #CVC_ERROR (#CVC_E_WRONGOBJECT) Stream is not a CVDSTREAM.
See also

◆ CVDStreamRegisterManagedFlowSetPool()

cvbres_t CVDStreamRegisterManagedFlowSetPool ( CVDSTREAM  Stream,
size_t  Count 
)

Declares the number of flow sets the data stream module uses for data acquisition.

A flow is the minimal logical streaming unit that consists of memory as a buffer and a flow set is a set that consists of flows. A flow set composes a single image data. In a classic application, a 2D image can be achieved as a flow set that consists of a single flow.

Parameters
[in]StreamThe handle of a target data stream module.
[out]CountThe number of flow sets that the data stream module uses for data acquisition; the number must be greater than or equal to the number that CVDStreamFlowSetInfoGetFlowSetMinCount returns.
Returns
  • #CVC_ERROR (#CVC_E_OK) No error.
  • #CVC_ERROR (#CVC_E_WRONGOBJECT) Stream is not a CVDSTREAM.
  • #CVC_ERROR (#CVC_E_PARAMETER) Count is smaller then FlowSetMinCount.

◆ CVDStreamUnregisterFlowSetPool()

cvbres_t CVDStreamUnregisterFlowSetPool ( CVDSTREAM  Stream)

Unregisters a previously registered flow set pool.

After reconfiguring device or stream parameters the required flow set pool size may change. Therefore unregister will remove the previously registered flow set pool from Stream. This may result in CVDReleaseFlowSetPool being called, but only if Stream was the only owner of the flow set pool.

Calling unregister during an active acquisition is not allowed and will result in an error. If there is no previously registered flow set pool the call will still succeed.

Parameters
[in]StreamThe handle of a target data stream module.
Returns
  • #CVC_ERROR (#CVC_E_OK) No error.
  • #CVC_ERROR (#CVC_E_WRONGOBJECT) Stream is not a CVDSTREAM.
  • #CVC_ERROR (#CVC_E_NOTSUPPORTED) If acquisition is currently running.
See also