Open eric-zenfire opened 12 years ago
Partial work in f53fa7e.
Needs ZMQ url on web. Needs ZMQ url maybe on cameras? Needs a better way to configure the base url.
GET /api/cameraname/snapshot/ could show the most recent picture. (maybe /apiv1/)
storage - local files since the demand is probably very small and then rotate files every now and then -- either wipe them out or archive them somwhere? s3 or something like that for long term and it would be cool to have all the stills because someone could have fun making things out of them.
Purpose
Take and temporarily store snapshot images of camera feeds. Return a URL that works for
n
minutes, prefixed withurl
from config (to work with frontend external proxies, etc). It must be an optional feature disabled by default. Snapshots previously taken should still be cleaned up if the feature is disabled... and serving images not just taking them must obey the current config.Perhaps, configuration must enable and disable this feature per-camera? Also, per-irc? Not sure. Should there be a throttle for max snapshots per time period, and if so should it be independent per camera?
Storage
Not sure. Perhaps a directory in the config to store images in temporarily. In memory, perhaps - wouldn't survive restarts, though.
Usage
If cameraname is not supplied and there is only one camera, use that camera. If cameraname is not supplied and there is more than one camera enabled for the feature, offer a list of available cameras. If camera does not exist, return relevant error. If camera exists but does not permit snapshots, return relevant error.