diff --git a/src/event.cpp b/src/event.cpp index f8b30352..271b8709 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -390,14 +390,7 @@ static void event_image_snapshot(struct ctx_cam *cam, motion_event evnt offset = len - 8; if (mystrne(cam->conf->snapshot_filename+offset, "lastsnap")) { - /* - * conf.snapshot_filename would normally be defined but if someone deleted it by control interface - * it is better to revert to the default than fail - */ - if (cam->conf->snapshot_filename) - snappath = cam->conf->snapshot_filename; - else - snappath = DEF_SNAPPATH; + snappath = cam->conf->snapshot_filename; mystrftime(cam, filepath, sizeof(filepath), snappath, ts1, NULL, 0); snprintf(filename, PATH_MAX, "%.*s.%s" @@ -561,16 +554,7 @@ static void event_create_extpipe(struct ctx_cam *cam, motion_event evnt (void)ftype; if ((cam->conf->movie_extpipe_use) && (cam->conf->movie_extpipe)) { - /* - * conf.mpegpath would normally be defined but if someone deleted it by control interface - * it is better to revert to the default than fail - */ - if (cam->conf->movie_filename) { - moviepath = cam->conf->movie_filename; - } else { - moviepath = DEF_MOVIEPATH; - MOTION_LOG(NTC, TYPE_EVENTS, NO_ERRNO, _("moviepath: %s"), moviepath); - } + moviepath = cam->conf->movie_filename; mystrftime(cam, stamp, sizeof(stamp), moviepath, ts1, NULL, 0); snprintf(cam->extpipefilename, PATH_MAX - 4, "%.*s/%.*s" diff --git a/src/motion.hpp b/src/motion.hpp index 27562a63..435e4676 100644 --- a/src/motion.hpp +++ b/src/motion.hpp @@ -61,46 +61,11 @@ struct ctx_algsec; struct ctx_config; struct ctx_track; -#define DEF_PALETTE 17 - -/* Default picture settings */ -#define DEF_WIDTH 640 -#define DEF_HEIGHT 480 -#define DEF_QUALITY 75 -#define DEF_CHANGES 1500 - -#define DEF_MAXFRAMERATE 15 -#define DEF_NOISELEVEL 32 - -/* Minimum time between two 'actions' (email, sms, external) */ -#define DEF_EVENT_GAP 60 /* 1 minutes */ - -#define DEF_INPUT -1 -#define DEF_VIDEO_DEVICE "/dev/video0" - #define THRESHOLD_TUNE_LENGTH 256 - -#define MISSING_FRAMES_TIMEOUT 30 /* When failing to get picture frame from camera - we reuse the previous frame until - MISSING_FRAMES_TIMEOUT seconds has passed - and then we show a grey image instead - */ - +#define MISSING_FRAMES_TIMEOUT 30 /* Frame count before grey lost image is used */ #define WATCHDOG_TMO 30 /* 30 sec max motion_loop interval */ #define WATCHDOG_KILL -10 /* 10 sec grace period before calling thread cancel */ -#define DEF_MAXSTREAMS 10 /* Maximum number of stream clients per camera */ -#define DEF_MAXWEBQUEUE 10 /* Maximum number of stream client in queue */ - -#define DEF_TIMESTAMP "%Y-%m-%d\\n%T" -#define DEF_EVENTSTAMP "%Y%m%d%H%M%S" - -#define DEF_SNAPPATH "%v-%Y%m%d%H%M%S-snapshot" -#define DEF_IMAGEPATH "%v-%Y%m%d%H%M%S-%q" -#define DEF_MOVIEPATH "%v-%Y%m%d%H%M%S" -#define DEF_TIMEPATH "%Y%m%d-timelapse" - -#define DEF_TIMELAPSE_MODE "daily" /* Filetype defines */ #define FTYPE_IMAGE 1 @@ -134,9 +99,9 @@ struct ctx_track; #define UPDATE_REF_FRAME 1 #define RESET_REF_FRAME 2 -#define TRUE 1 -#define FALSE 0 -#define AVGCNT 30 +#define TRUE 1 +#define FALSE 0 +#define AVGCNT 30 /* * Structure to hold images information diff --git a/src/video_v4l2.cpp b/src/video_v4l2.cpp index a713eda6..ef95988b 100644 --- a/src/video_v4l2.cpp +++ b/src/video_v4l2.cpp @@ -397,7 +397,7 @@ static int v4l2_input_select(struct ctx_cam *cam, struct video_dev *curdev) { (!curdev->starting)) return 0; memset(&input, 0, sizeof (struct v4l2_input)); - if (cam->conf->input == DEF_INPUT) { + if (cam->conf->input == -1) { input.index = 0; } else { input.index = cam->conf->input;