Adjust secondary detection

This commit is contained in:
MrDave
2019-11-20 20:34:50 -07:00
committed by Mr-Dave
parent 1cffc3c39c
commit 0533da7d3b
10 changed files with 269 additions and 334 deletions

View File

@@ -468,6 +468,20 @@ static void event_camera_lost(struct ctx_cam *cam, motion_event evnt
exec_command(cam, cam->conf->on_camera_lost.c_str(), NULL, 0);
}
static void event_secondary_detect(struct ctx_cam *cam, motion_event evnt
,struct ctx_image_data *img_data, char *fname
,void *ftype, struct timespec *ts1) {
(void)evnt;
(void)img_data;
(void)fname;
(void)ftype;
(void)ts1;
if (cam->conf->on_secondary_detect != "")
exec_command(cam, cam->conf->on_secondary_detect.c_str(), NULL, 0);
}
static void event_camera_found(struct ctx_cam *cam, motion_event evnt
,struct ctx_image_data *img_data, char *fname
,void *ftype, struct timespec *ts1) {
@@ -895,6 +909,10 @@ struct event_handlers event_handlers[] = {
EVENT_CAMERA_FOUND,
event_camera_found
},
{
EVENT_SECDETECT,
event_secondary_detect
},
{(motion_event)0, NULL}
};