summaryrefslogtreecommitdiff
path: root/src/v4l2/v4l2_camera_proxy.h
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2020-06-11 17:23:08 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2020-06-25 23:47:13 +0900
commit25b52e35a6826735e63b1dabcd6995a44bc418a6 (patch)
tree80dac8d0b9d604c052ac7abaf784c2132074ab14 /src/v4l2/v4l2_camera_proxy.h
parent012cfab9b17ffd084ef8fa5fcc1eb8d651ff85dc (diff)
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 <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/v4l2/v4l2_camera_proxy.h')
-rw-r--r--src/v4l2/v4l2_camera_proxy.h5
1 files changed, 5 insertions, 0 deletions
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> 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<struct v4l2_buffer> buffers_;
std::map<void *, unsigned int> mmaps_;
+ std::set<V4L2CameraFile *> files_;
+
std::unique_ptr<V4L2Camera> vcam_;
/*