From 852b9d0a7636fd7fa34cb424a9992642af4826b9 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 5 Jan 2020 04:17:41 +0200 Subject: v4l2: camera_proxy: Store v4l2_pix_format instead of v4l2_format The V4L2 compatibility layer only uses the fmt.pix field of curV4L2Format_. There's no need to cache the full v4l2_format, store v4l2_pix_format only and rename the member variable from curV4L2Format_ to v4l2PixFormat_. While at it, group the V4L2-related member variables together in the V4L2CameraProxy class. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- src/v4l2/v4l2_camera_proxy.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/v4l2/v4l2_camera_proxy.h') diff --git a/src/v4l2/v4l2_camera_proxy.h b/src/v4l2/v4l2_camera_proxy.h index 79eb87bc..92a79abb 100644 --- a/src/v4l2/v4l2_camera_proxy.h +++ b/src/v4l2/v4l2_camera_proxy.h @@ -73,13 +73,14 @@ private: unsigned int refcount_; unsigned int index_; - struct v4l2_format curV4L2Format_; StreamConfiguration streamConfig_; - struct v4l2_capability capabilities_; unsigned int bufferCount_; unsigned int currentBuf_; unsigned int sizeimage_; + struct v4l2_capability capabilities_; + struct v4l2_pix_format v4l2PixFormat_; + std::vector buffers_; std::map mmaps_; -- cgit v1.2.1