Package: motion
Version: 3.2.12-3.4
Severity: wishlist
Tags: upstream patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Under certain circumstances, it may be desiderable to have the motion detection
in paused state when starting motion. e.g.: if motion does real suveillance and
triggers serious actions when motion is detected, it is a good idea to make 
sure,
that motion detection is activated explicitely from the supervising system.

A new configuration parameter motion_detection (Default: on) would permit to 
specify,
if motion detection should be active or paused when starting up.

- -- System Information:
Debian Release: 7.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 
'stable')
Architecture: i386 (i586)

Kernel: Linux 3.2.0-4-486
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages motion depends on:
ii  adduser                3.113+nmu3
ii  debconf [debconf-2.0]  1.5.49
ii  libavcodec53           6:0.8.6-1
ii  libavformat53          6:0.8.6-1
ii  libavutil51            6:0.8.6-1
ii  libc6                  2.13-38
ii  libjpeg8               8d-1
ii  libmysqlclient18       5.5.31+dfsg-0+wheezy1
ii  libpq5                 9.1.9-1

Versions of packages motion recommends:
ii  ffmpeg  6:0.8.6-1

Versions of packages motion suggests:
pn  mysql-client       <none>
pn  postgresql-client  <none>

- -- Configuration Files:
/etc/default/motion changed [not included]
/etc/motion/motion.conf changed [not included]

- -- debconf information excluded

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlHK9m4ACgkQQPwM0mvxixUZHACeIboEirI8yJ7vPho75p1UnrBM
79kAningUJiEKmturLesPyA4TXSrJpYS
=tV4C
-----END PGP SIGNATURE-----
Description: New configuration option motion_detection permits to define if motion detection is active on startup
Author: Leo Moll <leo.m...@yeasoft.com>
Last-Update: 2013-06-26

--- motion-3.2.12.orig/conf.h	2010-06-01 08:48:23.000000000 +0200
+++ motion-3.2.12/conf.h	2013-06-26 13:10:13.325400656 +0200
@@ -122,6 +122,7 @@
     const char *area_detect;
     int minimum_motion_frames;
     char *pid_file;
+    int motion_detection;
     int argc;
     char **argv;
 };
--- motion-3.2.12.orig/conf.c	2010-06-01 08:48:23.000000000 +0200
+++ motion-3.2.12/conf.c	2013-06-26 13:31:29.009394618 +0200
@@ -147,6 +147,7 @@
     area_detect:                NULL,
     minimum_motion_frames:      1,
     pid_file:                   NULL,
+    motion_detection:           1,
 };
 
 
@@ -444,10 +445,18 @@
     print_bool
     },
     {
-    "threshold",
+    "motion_detection",
     "\n############################################################\n"
     "# Motion Detection Settings:\n"
     "############################################################\n\n"
+    "# Controls if motion detection is active on startup (default: on)",
+    0,
+    CONF_OFFSET(motion_detection),
+    copy_bool,
+    print_bool
+    },
+    {
+    "threshold",
     "# Threshold for number of changed pixels in an image that\n"
     "# triggers motion detection (default: 1500)",
     0,
--- motion-3.2.12.orig/motion.c	2010-06-01 08:48:23.000000000 +0200
+++ motion-3.2.12/motion.c	2013-06-26 13:50:07.761400221 +0200
@@ -751,6 +751,9 @@
     /* Set noise level */
     cnt->noise = cnt->conf.noise;
 
+    /* Activate or pause motion detection */
+    cnt->pause = cnt->conf.motion_detection ? 0 : 1;
+
     /* Set threshold value */
     cnt->threshold = cnt->conf.max_changes;
 
--- a/debian/motion.conf	2012-02-12 15:13:05.000000000 +0100
+++ b/debian/motion.conf	2013-06-26 15:29:29.809397824 +0200
@@ -118,6 +118,9 @@
 # Motion Detection Settings:
 ############################################################
 
+# Controls if motion detection is active on startup (default: on)
+motion_detection on
+
 # Threshold for number of changed pixels in an image that
 # triggers motion detection (default: 1500)
 threshold 1500
--- a/debian/motion.1	2012-02-12 15:13:05.000000000 +0100
+++ b/debian/motion.1	2013-06-26 14:08:34.789401999 +0200
@@ -191,6 +191,11 @@
 .br
 Picture frames must contain motion at least the specified number of frames in a row before they are detected as true motion. At the default of 1, all motion is detected. Valid range is 1 to thousands, but it is recommended to keep it within 1-5.
 .TP
+.B motion_detection
+Values:  on, off / Default: on
+.br
+If set to off, motion detection will be paused on startup
+.TP
 .B motion_video_pipe string
 Values: Max 4095 characters / Default: Not defined
 .br

Reply via email to