mirror of
https://github.com/Motion-Project/motion.git
synced 2026-04-30 02:45:19 -04:00
Add eventid
This commit is contained in:
@@ -182,6 +182,9 @@ static void mlp_info_reset(ctx_cam *cam)
|
||||
/* Process the motion detected items*/
|
||||
static void mlp_detected_trigger(ctx_cam *cam, ctx_image_data *img)
|
||||
{
|
||||
time_t raw_time;
|
||||
struct tm evt_tm;
|
||||
|
||||
if (img->flags & IMAGE_TRIGGER) {
|
||||
if (cam->event_nr != cam->prev_event) {
|
||||
mlp_info_reset(cam);
|
||||
@@ -191,6 +194,11 @@ static void mlp_detected_trigger(ctx_cam *cam, ctx_image_data *img)
|
||||
cam->algsec->isdetected = false;
|
||||
}
|
||||
|
||||
time(&raw_time);
|
||||
localtime_r(&raw_time, &evt_tm);
|
||||
sprintf(cam->eventid, "%05d", cam->camera_id);
|
||||
strftime(cam->eventid+5, 15, "%Y%m%d%H%M%S", &evt_tm);
|
||||
|
||||
MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, _("Motion detected - starting event %d"),
|
||||
cam->event_nr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user