From c0bad607ce16ea66aa9c4de892598793402281c6 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Tue, 12 Jan 2021 10:21:39 +0530 Subject: libcamera: v4l2_videodevice: Track streaming state Track the state of streamon/streamoff calls to simplify error paths. Ensuring that streamOff() can be called on non-streaming streams facilitates simpler error code paths, where a set of devices can all call streamOff regardless of their initialisation state. Signed-off-by: Kieran Bingham Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- include/libcamera/internal/v4l2_videodevice.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h index 529ca0e3..626dfbcd 100644 --- a/include/libcamera/internal/v4l2_videodevice.h +++ b/include/libcamera/internal/v4l2_videodevice.h @@ -249,6 +249,8 @@ private: std::map queuedBuffers_; EventNotifier *fdBufferNotifier_; + + bool streaming_; }; class V4L2M2MDevice -- cgit v1.2.1