diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-11-21 20:12:38 +0100 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-01-12 16:10:37 +0100 |
commit | 5967363c0b99a59f3526c51917572b807324e389 (patch) | |
tree | 134a8e070813bca1dfbf72e10d4443e951757e8d /include | |
parent | dea689e1f260b904697a9c2f3d05b7b5068d85e1 (diff) |
libcamera: buffer: Move captured metadata to FrameMetadata
Move the metadata retrieved when dequeuing a V4L2 buffer into a
FrameMetadata object. This is done as a step to migrate to the
FrameBuffer interface as the functions added to Buffer around
FrameMetadata match the ones in FrameBuffer.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/buffer.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h index 55d08e27..0eb84c32 100644 --- a/include/libcamera/buffer.h +++ b/include/libcamera/buffer.h @@ -99,12 +99,6 @@ private: class Buffer final { public: - enum Status { - BufferSuccess, - BufferError, - BufferCancelled, - }; - Buffer(unsigned int index = -1, const Buffer *metadata = nullptr); Buffer(const Buffer &) = delete; Buffer &operator=(const Buffer &) = delete; @@ -113,11 +107,8 @@ public: const std::array<int, 3> &dmabufs() const { return dmabuf_; } BufferMemory *mem() { return mem_; } - unsigned int bytesused() const { return bytesused_; } - uint64_t timestamp() const { return timestamp_; } - unsigned int sequence() const { return sequence_; } + const FrameMetadata &metadata() const { return metadata_; }; - Status status() const { return status_; } Request *request() const { return request_; } Stream *stream() const { return stream_; } @@ -133,11 +124,8 @@ private: std::array<int, 3> dmabuf_; BufferMemory *mem_; - unsigned int bytesused_; - uint64_t timestamp_; - unsigned int sequence_; + FrameMetadata metadata_; - Status status_; Request *request_; Stream *stream_; }; |