From 25b52e35a6826735e63b1dabcd6995a44bc418a6 Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Thu, 11 Jun 2020 17:23:08 +0900 Subject: v4l2: v4l2_camera_proxy: Implement VIDIOC_G/S_PRIORITY Implement VIDIOC_G_PRIORITY and VIDIOC_S_PRIORITY. The behaviour documented in the V4L2 specification doesn't match the implementation in the Linux kernel, implement the latter. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- src/v4l2/v4l2_camera_proxy.h | 5 +++++ 1 file changed, 5 insertions(+) (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 86c1a7df..8de306b4 100644 --- a/src/v4l2/v4l2_camera_proxy.h +++ b/src/v4l2/v4l2_camera_proxy.h @@ -43,6 +43,7 @@ private: unsigned int calculateSizeImage(StreamConfiguration &streamConfig); void querycap(std::shared_ptr camera); void tryFormat(struct v4l2_format *arg); + enum v4l2_priority maxPriority(); void updateBuffers(); void freeBuffers(); @@ -51,6 +52,8 @@ private: int vidioc_g_fmt(V4L2CameraFile *file, struct v4l2_format *arg); int vidioc_s_fmt(V4L2CameraFile *file, struct v4l2_format *arg); int vidioc_try_fmt(V4L2CameraFile *file, struct v4l2_format *arg); + int vidioc_g_priority(V4L2CameraFile *file, enum v4l2_priority *arg); + int vidioc_s_priority(V4L2CameraFile *file, enum v4l2_priority *arg); int vidioc_reqbufs(V4L2CameraFile *file, struct v4l2_requestbuffers *arg); int vidioc_querybuf(V4L2CameraFile *file, struct v4l2_buffer *arg); int vidioc_qbuf(V4L2CameraFile *file, struct v4l2_buffer *arg); @@ -84,6 +87,8 @@ private: std::vector buffers_; std::map mmaps_; + std::set files_; + std::unique_ptr vcam_; /* -- cgit v1.2.1