aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/ArFeatures.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py
index 5ec6b7e..4e05764 100644
--- a/src/argaze/ArFeatures.py
+++ b/src/argaze/ArFeatures.py
@@ -1565,7 +1565,19 @@ class ArCamera(ArFrame):
kwargs: ArFrame.image parameters
"""
- return super().image(**kwargs)
+ # Can't use camera frame when it is locked
+ if self._frame_lock.locked():
+ return
+
+ # Lock camera frame exploitation
+ self._frame_lock.acquire()
+
+ _image = super().image(**kwargs)
+
+ # Unlock camera frame exploitation
+ self._frame_lock.release()
+
+ return _image
def to_json(self, json_filepath):
"""Save camera to .json file."""