aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSakari Kapanen <sakari.kapanen@optofidelity.com>2019-03-27 15:08:49 +0200
committerSakari Kapanen <sakari.kapanen@optofidelity.com>2019-03-27 15:08:49 +0200
commita8e4c01907c8d6a0e0dde5f5499d5580dc528e03 (patch)
tree88962d72fb6d31ccf0e8ff29c590038802e92580
parentcfd072caeb4a3f3225a22d39fd6151baec4d84d6 (diff)
downloadpymba-a8e4c01907c8d6a0e0dde5f5499d5580dc528e03.tar.gz
pymba-a8e4c01907c8d6a0e0dde5f5499d5580dc528e03.zip
Camera: allow specifying timeout in acquire_frame()
-rw-r--r--pymba/camera.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pymba/camera.py b/pymba/camera.py
index 3df3ebc..f9abdb3 100644
--- a/pymba/camera.py
+++ b/pymba/camera.py
@@ -221,7 +221,7 @@ class Camera(VimbaObject):
self.start_capture()
- def acquire_frame(self) -> Frame:
+ def acquire_frame(self, timeout_ms: Optional[int] = 2000) -> Frame:
"""
Acquire and return a single frame when the camera is armed in 'SingleFrame' acquisition
mode. Can be called multiple times in a row, but don't call again until the frame has been
@@ -233,7 +233,7 @@ class Camera(VimbaObject):
# capture a single frame
self._single_frame.queue_for_capture()
self.AcquisitionStart()
- self._single_frame.wait_for_capture()
+ self._single_frame.wait_for_capture(timeout_ms=timeout_ms)
self.AcquisitionStop()
return self._single_frame