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... | |
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.
CVB buffer handle.
The CVBUFFER is a reference counted OBJ handle. CVBUFFER objects at least provide the IBuffer or IPFNCBuffer interface.
cvbres_t CVCBufferGetBasePtr | ( | CVBUFFER | hBuffer, |
void *& | pBase | ||
) |
Gets the pointer to the first element in the hBuffer object's memory.
[in] | hBuffer | Buffer handle to query. |
[out] | pBase | Variable to receive the base pointer of the buffer. |
cvbres_t CVCBufferGetCapacity | ( | CVBUFFER | hBuffer, |
size_t & | Capacity | ||
) |
Gets the number of allocated bytes in the given hBuffer.
[in] | hBuffer | Buffer handle to query. |
[out] | Capacity | Variable to receive the number of allocated bytes. |
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 &).
[in] | hBuffer | Buffer handle to query. |
[out] | Size | Variable to receive the number of valid bytes in the hBuffer. |
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).
[in] | hBuffer | Buffer handle to check. |