summaryrefslogtreecommitdiff
path: root/src/libcamera/byte_stream_buffer.cpp
AgeCommit message (Collapse)Author
2020-03-06libcamera: byte_stream_buffer: Add zero-copy read() variantLaurent Pinchart
Add a read() function to ByteStreamBuffer that returns a pointer to the data instead of copying it. Overflow check is still handled by the class, but the caller must check the returned pointer explicitly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-03-06libcamera: byte_stream_buffer: Add Span<> supportJacopo Mondi
Add support to write and read a Span<> to and from the ByteStreamBuffer class. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-03-06libcamera: byte_stream_buffer: Fix documentation of read() and write()Jacopo Mondi
The documentation of the read() and write() functions refer to non existent 'size' and 'data' parameters in their brief. Fix them. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-11-20libcamera: Add ByteStreamBufferJacopo Mondi
The ByteStreamBuffer class wraps a memory area, expected to be allocated by the user of the class and provides operations to perform sequential access in read and write modes. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>