Added is_streaming method to camera.pi

This commit is contained in:
Fabio Manganiello 2019-12-27 17:10:36 +01:00
parent fb2ff7d1d6
commit f0999c7375

View file

@ -555,5 +555,13 @@ class CameraPiPlugin(CameraPlugin):
if self._streaming_thread: if self._streaming_thread:
self._streaming_thread.join() 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: # vim:sw=4:ts=4:et: