From 5967363c0b99a59f3526c51917572b807324e389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Thu, 21 Nov 2019 20:12:38 +0100 Subject: libcamera: buffer: Move captured metadata to FrameMetadata MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Laurent Pinchart --- src/v4l2/v4l2_camera.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/v4l2/v4l2_camera.cpp') diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp index b6e0bb76..e4a03c41 100644 --- a/src/v4l2/v4l2_camera.cpp +++ b/src/v4l2/v4l2_camera.cpp @@ -17,9 +17,11 @@ using namespace libcamera; LOG_DECLARE_CATEGORY(V4L2Compat); V4L2FrameMetadata::V4L2FrameMetadata(Buffer *buffer) - : index_(buffer->index()), bytesused_(buffer->bytesused()), - timestamp_(buffer->timestamp()), sequence_(buffer->sequence()), - status_(buffer->status()) + : index_(buffer->index()), + bytesused_(buffer->metadata().planes[0].bytesused), + timestamp_(buffer->metadata().timestamp), + sequence_(buffer->metadata().sequence), + status_(buffer->metadata().status) { } -- cgit v1.2.1