-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
DifficultThis is a hard problemThis is a hard problemHigh PriorityThis task is required for MVPThis task is required for MVPbugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
Describe the bug
The main motion detection app and web app can't both access the camera at the same time.
To Reproduce
Steps to reproduce the behavior:
- Open 2 terminals
- From terminal 1 do: ./manage.py runserver
- From terminal 2 do: ./motiondetect.py
- navigate to the homepage of the web app (may need to hit the settings page first if this is the first time you are running)
- depending on which program accessed the camera first, (either motiondetect or home page of the web app) the other won't be able to access it.
Expected behavior
both programs should be able to take images as input
Additional context
-
After digging around, this seems to be a common issue. In order to fix it, we should have a 3rd program that reads images from the camera (a producer thread) and turn the other programs into consumers (pulling from a queue or Redis)
-
alternatively, we could pipe images from the main program (motiondetect.py) to the web app.
Metadata
Metadata
Assignees
Labels
DifficultThis is a hard problemThis is a hard problemHigh PriorityThis task is required for MVPThis task is required for MVPbugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed