Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add camera functionality #30

Open
5 tasks
matiasandina opened this issue Dec 20, 2021 · 1 comment
Open
5 tasks

Add camera functionality #30

matiasandina opened this issue Dec 20, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@matiasandina
Copy link
Owner

matiasandina commented Dec 20, 2021

The idea is to have the ability to respond to events by recording them to video.
We would have a camera initialized continuously dumping frames to a queue.
We would trigger the camera with actions that tell it to start recording and to stop recording.
The recording will happen with a buffer before the start signal is given.
The stop signal can be a finish() that flushes the whole queue. We don't have to have symmetrical buffers.
Note, the current implementation is for one fed and one camera.


There are a two classes that allow us to do this. One is the VideoFeedClipper (handle video and timestamping, pass frames to queues in the writer), and the other one is the KeyClipWriter (actually do the write).

It remains to be seen how/where to add this to fedwatcher.py itself.

We could use the f argument of the run function to give a function that processes the incoming line and decides whether it's a start or a stop signal.

TODO:

  • add with_video argument to fedwatcher.py init
  • with_video should initialize the VideoFeedClipper.py
    • if we don't pay the cost at the init, we will pay the cost of initializing cameras in the middle of the action
    • but should this be a separate thread?
  • Right now, clipper.run() needs to be run within a while loop, it can be migrated to manage the while loop itself. Make sure that it's always possible to do clipper.stop().
  • figure out a way to efficiently read the event type. is readPort the best place to do this? it is the place with f()
  • pass event type to a function that will determine if the event type needs to trigger or stop recording
@matiasandina matiasandina added the enhancement New feature or request label Dec 20, 2021
@matiasandina matiasandina self-assigned this Dec 20, 2021
@matiasandina
Copy link
Owner Author

Any suggestions @RedSweatshirt ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant