Zero-copy wrapper for native camera capture buffers. More...
Functions | |
| RawBuffer () | |
| Default constructor. More... | |
| ~RawBuffer () | |
| Destructor - automatically releases the buffer. More... | |
| RawBuffer (RawBuffer &&other) noexcept | |
| RawBuffer & | operator= (RawBuffer &&other) noexcept |
| RawBuffer (const RawBuffer &)=delete | |
| RawBuffer & | operator= (const RawBuffer &)=delete |
| RAW_BUFFER_TYPE | getType () const |
| Get the type of the raw buffer. More... | |
| void * | getRawBuffer () const |
| Get the left camera NvBufSurface pointer. More... | |
| void * | getRawBufferRight () const |
| Get the right camera NvBufSurface pointer. More... | |
| RawBufferFd | getFd () const |
| Get the dmabuf file descriptor handle backing the left camera buffer. More... | |
| RawBufferFd | getFdRight () const |
| Get the dmabuf file descriptor handle backing the right camera buffer. More... | |
| uint64_t | getTimestamp () const |
| Get the timestamp of the buffer. More... | |
| unsigned int | getWidth () const |
| Get the width of the image. More... | |
| unsigned int | getHeight () const |
| Get the height of the image. More... | |
| bool | isValid () const |
| Check if the buffer is valid and contains data. More... | |
| void | release () |
| Manually release the buffer reference. More... | |
Zero-copy wrapper for native camera capture buffers.
This structure provides access to the raw NvBufSurface buffer without copying data. The buffer is automatically released when the RawBuffer goes out of scope or when release() is called, allowing the camera pipeline to reuse the buffer for the next capture.
| RawBuffer | ( | ) |
Default constructor.
| ~RawBuffer | ( | ) |
Destructor - automatically releases the buffer.
| RAW_BUFFER_TYPE getType | ( | ) | const |
Get the type of the raw buffer.
| void* getRawBuffer | ( | ) | const |
Get the left camera NvBufSurface pointer.
| void* getRawBufferRight | ( | ) | const |
Get the right camera NvBufSurface pointer.
| RawBufferFd getFd | ( | ) | const |
Get the dmabuf file descriptor handle backing the left camera buffer.
The descriptor identifies which entry of the capture pool (see Camera::getRawBufferPoolFds) holds this frame: match it by fd value within the same generation.
| RawBufferFd getFdRight | ( | ) | const |
Get the dmabuf file descriptor handle backing the right camera buffer.
| uint64_t getTimestamp | ( | ) | const |
Get the timestamp of the buffer.
| unsigned int getWidth | ( | ) | const |
Get the width of the image.
| unsigned int getHeight | ( | ) | const |
Get the height of the image.
| bool isValid | ( | ) | const |
Check if the buffer is valid and contains data.
| void release | ( | ) |
Manually release the buffer reference.
This allows the capture system to reuse the buffer. After calling this, the buffer is no longer valid.