diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-03-24 23:53:53 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-04-26 21:04:41 +0300 |
commit | 205f1f13814018e3d0511c797b9399529efe9a59 (patch) | |
tree | 3e3c8c1645e93fe62c498d113bb2fb6491752e25 /src/libcamera/include | |
parent | 43e8c5a93def93044a92713cbd8e3d7010eff5f3 (diff) |
libcamera: v4l2_videodevice: Add support for frame start events
Extend the V4L2VideoDevice to support notifying of frame start events.
The events are received from the device through the V4L2 event API, and
passed to users of the class through a signal.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/include')
-rw-r--r-- | src/libcamera/include/v4l2_videodevice.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libcamera/include/v4l2_videodevice.h b/src/libcamera/include/v4l2_videodevice.h index ee63d28d..a0409e59 100644 --- a/src/libcamera/include/v4l2_videodevice.h +++ b/src/libcamera/include/v4l2_videodevice.h @@ -224,6 +224,9 @@ public: int queueBuffer(FrameBuffer *buffer); Signal<FrameBuffer *> bufferReady; + int setFrameStartEnabled(bool enable); + Signal<uint32_t> frameStart; + int streamOn(); int streamOff(); @@ -262,6 +265,8 @@ private: void bufferAvailable(EventNotifier *notifier); FrameBuffer *dequeueBuffer(); + void eventAvailable(EventNotifier *notifier); + V4L2Capability caps_; enum v4l2_buf_type bufferType_; @@ -271,6 +276,9 @@ private: std::map<unsigned int, FrameBuffer *> queuedBuffers_; EventNotifier *fdBufferNotifier_; + EventNotifier *fdEventNotifier_; + + bool frameStartEnabled_; }; class V4L2M2MDevice |