summaryrefslogtreecommitdiff
path: root/src/v4l2/v4l2_camera.h
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2020-06-04 18:13:52 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2020-06-08 17:11:43 +0900
commit8df593841dc81a015906f8273eccd3de2c99f5ca (patch)
tree3a31ec5891f09829eecbb91b0473f78b41712671 /src/v4l2/v4l2_camera.h
parent5c5481911a04c92de390cb63803aec6120ebdce6 (diff)
v4l2: v4l2_compat: Add eventfd signaling to support polling
To support polling, we need to be able to signal when data is available to be read (POLLIN), as well as events (POLLPRI). Add the necessary calls to eventfd to allow signaling POLLIN. We signal POLLIN by writing writing to the eventfd, and clear it by reading from the eventfd, upon VIDIOC_DQBUF. Note that eventfd does not support signaling POLLPRI, so we don't yet support V4L2 events. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/v4l2/v4l2_camera.h')
-rw-r--r--src/v4l2/v4l2_camera.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h
index 303eda44..33f5eb02 100644
--- a/src/v4l2/v4l2_camera.h
+++ b/src/v4l2/v4l2_camera.h
@@ -39,6 +39,7 @@ public:
int open();
void close();
+ void bind(int efd);
void getStreamConfig(StreamConfiguration *streamConfig);
std::vector<Buffer> completedBuffers();
@@ -70,6 +71,8 @@ private:
std::deque<std::unique_ptr<Request>> pendingRequests_;
std::deque<std::unique_ptr<Buffer>> completedBuffers_;
+
+ int efd_;
};
#endif /* __V4L2_CAMERA_H__ */