summaryrefslogtreecommitdiff
path: root/sbhs_server/tables/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'sbhs_server/tables/models.py')
-rw-r--r--sbhs_server/tables/models.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/sbhs_server/tables/models.py b/sbhs_server/tables/models.py
index 7500c68..813e6cc 100644
--- a/sbhs_server/tables/models.py
+++ b/sbhs_server/tables/models.py
@@ -258,3 +258,18 @@ class Experiment(TrashableMixin):
created_at = models.DateTimeField(auto_now_add=True, editable=False)
updated_at = models.DateTimeField(auto_now=True, editable=False)
+
+class Webcam():
+ """
+ Utility function to capture webcam feeds using streamer
+ """
+ def __init__(self):
+ pass
+
+ @classmethod
+ def load_image(className,mid):
+
+ if int(mid) :
+ command = "timeout 2s streamer -q -f jpeg -c /dev/video" + str(mid)
+ command += " -o " + settings.WEBCAM_DIR + "image" + str(mid) + ".jpeg"
+ os.system(command) \ No newline at end of file