Image Manager (CVCore.dll) 15.0
IBuffer Interface

Single CVB buffer. More...

Typedefs

typedef void * CVBUFFER
 CVB buffer handle. More...
 

Functions

cvbres_t CVCBufferGetBasePtr (CVBUFFER hBuffer, void *&pBase)
 Gets the pointer to the first element in the hBuffer object's memory. More...
 
cvbres_t CVCBufferGetCapacity (CVBUFFER hBuffer, size_t &Capacity)
 Gets the number of allocated bytes in the given hBuffer. More...
 
cvbres_t CVCBufferGetSize (CVBUFFER hBuffer, size_t &Size)
 Gets the size of the given hBuffer in bytes. More...
 
cvbbool_t CVCIsBuffer (CVBUFFER hBuffer)
 Tests whether this a CVB buffer or PFNC buffer. More...
 

Detailed Description

Single CVB buffer.

A buffer is simply a contiguous block of memory.

The valid block of the buffer is defined by its starting point given by the BasePtr and its Size. The Capacity might differ from Size and denotes the actual allocated chunk of memory. Size might be smaller if e.g. a camera sends variable image sizes.

Attention
One logical CVB image (IImageVPA) can consist of several buffers (e.g. one buffer per plane).

Typedef Documentation

◆ CVBUFFER

CVB buffer handle.

The CVBUFFER is a reference counted OBJ handle. CVBUFFER objects at least provide the IBuffer or IPFNCBuffer interface.

Function Documentation

◆ CVCBufferGetBasePtr()

cvbres_t CVCBufferGetBasePtr ( CVBUFFER  hBuffer,
void *&  pBase 
)

Gets the pointer to the first element in the hBuffer object's memory.

Parameters
[in]hBufferBuffer handle to query.
[out]pBaseVariable to receive the base pointer of the buffer.
Returns

◆ CVCBufferGetCapacity()

cvbres_t CVCBufferGetCapacity ( CVBUFFER  hBuffer,
size_t &  Capacity 
)

Gets the number of allocated bytes in the given hBuffer.

Attention
This value denotes the allocated bytes, not necessarily the valid ones. For the valid number of bytes see CVCBufferGetSize(CVBUFFER, size_t &).
Parameters
[in]hBufferBuffer handle to query.
[out]CapacityVariable to receive the number of allocated bytes.
Returns

◆ CVCBufferGetSize()

cvbres_t CVCBufferGetSize ( CVBUFFER  hBuffer,
size_t &  Size 
)

Gets the size of the given hBuffer in bytes.

This value denotes the actually valid number of bytes starting from CVCBufferGetBasePtr(CVBUFFER, void * &). For the allocated size see CVCBufferGetCapacity(CVBUFFER, size_t &).

Parameters
[in]hBufferBuffer handle to query.
[out]SizeVariable to receive the number of valid bytes in the hBuffer.
Returns

◆ CVCIsBuffer()

cvbbool_t CVCIsBuffer ( CVBUFFER  hBuffer)

Tests whether this a CVB buffer or PFNC buffer.

A buffer is a congruent chunk of memory.

If you need to test whether the given hBuffer is of the more specialized PFNC buffer type call CVCIsPfncBuffer(CVBUFFER).

Parameters
[in]hBufferBuffer handle to check.
Returns
true if hBuffer is any CVB buffer; false if not.