From f0999c7375187e33bf72bc73799e3bf13450784a Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 27 Dec 2019 17:10:36 +0100 Subject: [PATCH] Added is_streaming method to camera.pi --- platypush/plugins/camera/pi.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/platypush/plugins/camera/pi.py b/platypush/plugins/camera/pi.py index a833a1e05..bac516254 100644 --- a/platypush/plugins/camera/pi.py +++ b/platypush/plugins/camera/pi.py @@ -555,5 +555,13 @@ class CameraPiPlugin(CameraPlugin): if self._streaming_thread: self._streaming_thread.join() + @action + def is_streaming(self): + """ + :return: True if the Pi Camera network streaming thread is running, + False otherwise. + """ + return self._streaming_thread is not None + # vim:sw=4:ts=4:et: