diff options
author | Hirokazu Honda <hiroh@chromium.org> | 2021-08-26 17:00:21 +0900 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-08-27 00:52:32 +0300 |
commit | 6453e75c7ab28622d948745a768f3cc0ad2a2882 (patch) | |
tree | ed9df8718183e9b263719a443be5de35fd58a4f8 /src/android/camera_buffer.h | |
parent | c5e2ed7806be482e682b7466beeff83130297a3f (diff) |
android: camera_buffer: Add stride/offset/size function
This adds getter functions of stride, offset and size to CameraBuffer
interface.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/android/camera_buffer.h')
-rw-r--r-- | src/android/camera_buffer.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/android/camera_buffer.h b/src/android/camera_buffer.h index 87df2570..226a8f5c 100644 --- a/src/android/camera_buffer.h +++ b/src/android/camera_buffer.h @@ -31,6 +31,10 @@ public: libcamera::Span<const uint8_t> plane(unsigned int plane) const; libcamera::Span<uint8_t> plane(unsigned int plane); + unsigned int stride(unsigned int plane) const; + unsigned int offset(unsigned int plane) const; + unsigned int size(unsigned int plane) const; + size_t jpegBufferSize(size_t maxJpegBufferSize) const; }; @@ -62,6 +66,18 @@ Span<uint8_t> CameraBuffer::plane(unsigned int plane) \ { \ return _d()->plane(plane); \ } \ +unsigned int CameraBuffer::stride(unsigned int plane) const \ +{ \ + return _d()->stride(plane); \ +} \ +unsigned int CameraBuffer::offset(unsigned int plane) const \ +{ \ + return _d()->offset(plane); \ +} \ +unsigned int CameraBuffer::size(unsigned int plane) const \ +{ \ + return _d()->size(plane); \ +} \ size_t CameraBuffer::jpegBufferSize(size_t maxJpegBufferSize) const \ { \ return _d()->jpegBufferSize(maxJpegBufferSize); \ |