summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2020-06-18 17:24:37 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2020-06-25 23:47:13 +0900
commitd45d53cde0dce83f221728c8ced859773e64fca7 (patch)
treed9d2a9a16474c01ac783cdba6cd9ed090cc66f48 /src
parentc857ae3c89403e102b32b39bc12f228808100fa7 (diff)
v4l2: v4l2_camera: Add isRunning()
Add a method isRunning() to V4L2Camera so that V4L2CameraProxy can use it for checks. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/v4l2/v4l2_camera.cpp5
-rw-r--r--src/v4l2/v4l2_camera.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp
index 25573202..177b1ea5 100644
--- a/src/v4l2/v4l2_camera.cpp
+++ b/src/v4l2/v4l2_camera.cpp
@@ -227,3 +227,8 @@ int V4L2Camera::qbuf(unsigned int index)
return 0;
}
+
+bool V4L2Camera::isRunning()
+{
+ return isRunning_;
+}
diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h
index 30114ed5..ee53c2b0 100644
--- a/src/v4l2/v4l2_camera.h
+++ b/src/v4l2/v4l2_camera.h
@@ -57,6 +57,8 @@ public:
int qbuf(unsigned int index);
+ bool isRunning();
+
Semaphore bufferSema_;
private: