Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/dilfridge:master commit in: media-video/zoneminder/files/, media-video/zoneminder/, ...
Date: Wed, 31 Aug 2011 19:47:17
Message-Id: ee0ffaa29d57f961e69de8f6aaca6c08244e822f.dilfridge@gentoo
1 commit: ee0ffaa29d57f961e69de8f6aaca6c08244e822f
2 Author: Andreas K. Huettel <andreas.huettel <AT> physik <DOT> uni-r <DOT> de>
3 AuthorDate: Wed Aug 31 17:14:27 2011 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 31 17:14:27 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dilfridge.git;a=commit;h=ee0ffaa2
7
8 Remove again, rather revive version from main tree
9
10 ---
11 media-video/zoneminder/ChangeLog | 19 -
12 media-video/zoneminder/Manifest | 36 -
13 .../zoneminder/files/1.24.4/Makefile.am.patch | 15 -
14 .../files/1.24.4/db_upgrade_script_location.patch | 11 -
15 .../files/1.24.4/zm_remote_camera_http.patch | 55 -
16 media-video/zoneminder/files/10_zoneminder.conf | 18 -
17 .../zoneminder/files/9999/Makefile.am.patch | 15 -
18 .../zoneminder/files/9999/cvisionlab-plugins.patch | 2259 --------------------
19 .../files/9999/db_upgrade_script_location.patch | 11 -
20 .../files/9999/zm_remote_camera_http.patch | 55 -
21 .../9999/zoneminder-facedetector-plugin.tar.bz2 | Bin 63945 -> 0 bytes
22 media-video/zoneminder/files/conf.d | 6 -
23 media-video/zoneminder/files/init.d | 20 -
24 media-video/zoneminder/metadata.xml | 9 -
25 media-video/zoneminder/zoneminder-1.24.4.ebuild | 147 --
26 media-video/zoneminder/zoneminder-9999.ebuild | 165 --
27 16 files changed, 0 insertions(+), 2841 deletions(-)
28
29 diff --git a/media-video/zoneminder/ChangeLog b/media-video/zoneminder/ChangeLog
30 deleted file mode 100644
31 index 7c8eb66..0000000
32 --- a/media-video/zoneminder/ChangeLog
33 +++ /dev/null
34 @@ -1,19 +0,0 @@
35 -# ChangeLog for media-video/zoneminder
36 -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
37 -# $Header: $
38 -
39 -*zoneminder-9999 (31 Aug 2011)
40 -*zoneminder-1.24.4 (31 Aug 2011)
41 -
42 - 31 Aug 2011; Andreas K. Huettel <dilfridge@g.o>
43 - +files/1.24.4/Makefile.am.patch,
44 - +files/1.24.4/db_upgrade_script_location.patch,
45 - +files/1.24.4/zm_remote_camera_http.patch, +files/10_zoneminder.conf,
46 - +files/9999/Makefile.am.patch, +files/9999/cvisionlab-plugins.patch,
47 - +files/9999/db_upgrade_script_location.patch,
48 - +files/9999/zm_remote_camera_http.patch,
49 - +files/9999/zoneminder-facedetector-plugin.tar.bz2,
50 - +zoneminder-1.24.4.ebuild, +zoneminder-9999.ebuild, +files/conf.d,
51 - +files/init.d:
52 - Imported without changes from zugagina overlay
53 -
54
55 diff --git a/media-video/zoneminder/Manifest b/media-video/zoneminder/Manifest
56 deleted file mode 100644
57 index f836cb5..0000000
58 --- a/media-video/zoneminder/Manifest
59 +++ /dev/null
60 @@ -1,36 +0,0 @@
61 ------BEGIN PGP SIGNED MESSAGE-----
62 -Hash: SHA512
63 -
64 -AUX 1.24.4/Makefile.am.patch 1610 RMD160 f04f44a2773c9d66481db4597369058f955ed150 SHA1 2d7bc1294c9549127b2d57e41a1251fc53f3563d SHA256 d0446e2b957320e0a5c5eda0a782848001f73f52adfb89ff282b4bd5e161d358
65 -AUX 1.24.4/db_upgrade_script_location.patch 412 RMD160 368052be3fc8f32276cd59a146fd99a3b23b05f8 SHA1 a7a04bb212c0ca6ec693ca821d4c5de56b3e65c9 SHA256 3ffaa44c013dd27c3e5e937de77158c60b4cd37f28e1fc42dd7283f80075b067
66 -AUX 1.24.4/zm_remote_camera_http.patch 1566 RMD160 644a681789d0ecf424156cde4b4ea8f6c5065197 SHA1 74dbe274d129997826b9a775c672c28286b60e3f SHA256 f554f2bcc7977e5ac151bd87aa2b8a0b7a9eeb9099839afe0d8b2b60a37ce04e
67 -AUX 10_zoneminder.conf 462 RMD160 d032813c63f4676e06658da3668c50f88886efab SHA1 9c834372d5bab84fe3e368be94bd951c2122ed7a SHA256 96306fd39bcffeaf15db4309b8f5f08e54a2409029f92d4a84b6f3e42f05434f
68 -AUX 9999/Makefile.am.patch 1292 RMD160 59274d0bc7a01e42d0a2667ece7e5d1b2984e6be SHA1 60d6ea2de24fb2a72acaf5291e39d2e9aa3310f4 SHA256 81e49df5f7fd277e6264530e7e8ee2cfffa10c7781799a091e131265d74c1b7e
69 -AUX 9999/cvisionlab-plugins.patch 104381 RMD160 58013be56f1c6945f805b0629e452be6f2871f0d SHA1 cf868a45f3ce66dce1778c0c87e35528fa54f446 SHA256 7730da09668d9000dbc201a1562d1ca26dd52d99ef7b5adb9f716bb74e446fe8
70 -AUX 9999/db_upgrade_script_location.patch 412 RMD160 368052be3fc8f32276cd59a146fd99a3b23b05f8 SHA1 a7a04bb212c0ca6ec693ca821d4c5de56b3e65c9 SHA256 3ffaa44c013dd27c3e5e937de77158c60b4cd37f28e1fc42dd7283f80075b067
71 -AUX 9999/zm_remote_camera_http.patch 1566 RMD160 644a681789d0ecf424156cde4b4ea8f6c5065197 SHA1 74dbe274d129997826b9a775c672c28286b60e3f SHA256 f554f2bcc7977e5ac151bd87aa2b8a0b7a9eeb9099839afe0d8b2b60a37ce04e
72 -AUX 9999/zoneminder-facedetector-plugin.tar.bz2 63945 RMD160 2caee00449c819f3a0218f1ae5d4a3d9da264a62 SHA1 9405f2563484eccce592d11284aad9d17e1e34a3 SHA256 2fca44472589a3624789a62d203549ef4c51d9e74fda544715c1bdf85fe3a668
73 -AUX conf.d 138 RMD160 e7c71690bac83c1bee63c6b602b15910d3a8967c SHA1 719a2cb400a0a107accb28be3bd17f6269d41f76 SHA256 65e935cb63bf3d072b9317842944d808550ef3f933d834bb95aaacf3253bd85c
74 -AUX init.d 392 RMD160 96ac2e9ea5cd34a6aef26fe2c8fce91e6e551952 SHA1 7ef3e47e07cf7015d0c33f5a20d1994c94f0eb48 SHA256 83acb1cdc2c469a8fdfa13d9d80369b9b22535875491dfdfca498f6029cb290d
75 -DIST ZoneMinder-1.24.4.tar.gz 1061935 RMD160 8f736d94436e966b377a896c16d01e3efc869773 SHA1 cfbf0793d6b8a6d811fa1a1a60ac7faa02ca16fa SHA256 af4fa2fdb1e5287dbdea05b97e14376c9ec7ccaae0f1760e754a6a92595892c0
76 -EBUILD zoneminder-1.24.4.ebuild 3935 RMD160 821b72cb2cbf1a84d12e4fc34b60e99c8b9954dd SHA1 8e3bdbb03c1024247f7b8eedae3db3b92eb1508e SHA256 01a89429c91c6e3512a45eaab127fd84fe7c800e17249cbe83d3e0284cb9b384
77 -EBUILD zoneminder-9999.ebuild 4448 RMD160 be93f3004d0e1a866c9f083ef5fc8d456c58b26e SHA1 57cc23564151c98a334b3d2505c0ee66d7993931 SHA256 15dbdd933b5ada88f39c145a45946434cdddffc6985767fc7e8cfa0cf9adcc55
78 -MISC ChangeLog 754 RMD160 023cbc33d90c98d2ab40b7ff7c4c378c6d55a549 SHA1 7fbc66927d13de03e756c0f1d0a72745f95a4683 SHA256 a21eab1e5ec2cb69fb93d4173a859cb2224728c54513360dde1f67ba0ea37f03
79 -MISC metadata.xml 262 RMD160 24e1a7cfcbca1e2f41e8c062c448d9150f6320b8 SHA1 951224aa9eb92e898209936836a18e844ae1f169 SHA256 7e8dde52c550f9cfc6d74b78c19f6900a8cc241f2bf136610a4fc3b0aa95f3f5
80 ------BEGIN PGP SIGNATURE-----
81 -Version: GnuPG v2.0.17 (GNU/Linux)
82 -
83 -iQIcBAEBCgAGBQJOXmqgAAoJEEb+UGWnxTyHvccP/AmesNfuqM/jv45Du2H/PTEz
84 -5ECxScCTv58xDsBB/J9CRsXhd8AR7sy5APAiFHJ/YROLKKQ1QibtOexwdqSmkWrA
85 -TnLtMe3Ya/8KR7RLDuNeF0Uk3cL8EK+nm9AMDJOzUKG3dyIkUJ5knf/d5Edbw0xr
86 -m8zXc90ImWuQrzZ2tgR7oiLz4KiN0drbNp4QEqsnbS1NLcHN/iWet/Vlr+UXgevG
87 -EK8trWX0OUZAKlTm8pWanc37fFnTrpsMxth4TS9zR1p5bFGohQzdz1JFrCvqnRPL
88 -3KlIrkqxtv+7G2UI2jZLYlQOG6kiQac6s19pjIjLjdqxKZ9hCtttEeVa44lX7dFH
89 -hARFJOBtA7VRBGH8k7cKlkTeKMImDfxcfCs9FyZUDmdwsTfVM5yHPhKpULWyg6rX
90 -R831eLNmXUxN1HwPdcdsI8kXc8H7hgO+i1EZj/P17Am3QDT+T6V8dv1fNN9wdQW9
91 -gu30pQvOk8Fpf60jdd86EPPmiqceqNHmaWdRof9Az6vqVcjsiXGNYEl8zTR56r2N
92 -wNK3euitaDR9JbNhx80SRpw8mOTMFLnmT0wQ2PnrBAjgrgaaM/6jiR3XjGNnBjIC
93 -DEAw3z0E1VlM/szkXtND5kLKnfndoERpl7T6sFDpnuWE+FwQVTjtscHrWLINeZ42
94 -mfU/CtO+9bx+bie9Jel1
95 -=xQxS
96 ------END PGP SIGNATURE-----
97
98 diff --git a/media-video/zoneminder/files/1.24.4/Makefile.am.patch b/media-video/zoneminder/files/1.24.4/Makefile.am.patch
99 deleted file mode 100644
100 index 8d77ad2..0000000
101 --- a/media-video/zoneminder/files/1.24.4/Makefile.am.patch
102 +++ /dev/null
103 @@ -1,15 +0,0 @@
104 ---- Makefile.am.anc 2011-06-06 11:00:27.000000000 +0200
105 -+++ Makefile.am 2011-06-06 11:01:30.000000000 +0200
106 -@@ -21,9 +21,9 @@
107 - # Yes, you are correct. This is a HACK!
108 - install-data-hook:
109 - ( cd $(DESTDIR)$(sysconfdir); chown $(webuser):$(webgroup) $(sysconf_DATA); chmod 600 $(sysconf_DATA) )
110 -- ( if ! test -e $(ZM_RUNDIR); then mkdir -p $(ZM_RUNDIR); fi; if test "$(ZM_RUNDIR)" != "/var/run"; then chown $(webuser):$(webgroup) $(ZM_RUNDIR); chmod u+w $(ZM_RUNDIR); fi )
111 -- ( if ! test -e $(ZM_TMPDIR); then mkdir -m 700 -p $(ZM_TMPDIR); fi; if test "$(ZM_TMPDIR)" != "/tmp"; then chown $(webuser):$(webgroup) $(ZM_TMPDIR); chmod u+w $(ZM_TMPDIR); fi )
112 -- ( if ! test -e $(ZM_LOGDIR); then mkdir -p $(ZM_LOGDIR); fi; if test "$(ZM_LOGDIR)" != "/var/log"; then chown $(webuser):$(webgroup) $(ZM_LOGDIR); chmod u+w $(ZM_LOGDIR); fi )
113 -+ ( if ! test -e $(DESTDIR)$(ZM_RUNDIR); then mkdir -p $(DESTDIR)$(ZM_RUNDIR); fi; if test "$(DESTDIR)$(ZM_RUNDIR)" != "/var/run"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_RUNDIR); chmod u+w $(DESTDIR)$(ZM_RUNDIR); fi )
114 -+ ( if ! test -e $(DESTDIR)$(ZM_TMPDIR); then mkdir -m 700 -p $(DESTDIR)$(ZM_TMPDIR); fi; if test "$(DESTDIR)$(ZM_TMPDIR)" != "/tmp"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_TMPDIR); chmod u+w $(DESTDIR)$(ZM_TMPDIR); fi )
115 -+ ( if ! test -e $(DESTDIR)$(ZM_LOGDIR); then mkdir -p $(DESTDIR)$(ZM_LOGDIR); fi; if test "$(DESTDIR)$(ZM_LOGDIR)" != "/var/log"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_LOGDIR); chmod u+w $(DESTDIR)$(ZM_LOGDIR); fi )
116 -
117 - uninstall-hook:
118 - @-( cd $(DESTDIR)$(webdir); rm -rf events graphics images sounds temp )
119
120 diff --git a/media-video/zoneminder/files/1.24.4/db_upgrade_script_location.patch b/media-video/zoneminder/files/1.24.4/db_upgrade_script_location.patch
121 deleted file mode 100644
122 index 41b537c..0000000
123 --- a/media-video/zoneminder/files/1.24.4/db_upgrade_script_location.patch
124 +++ /dev/null
125 @@ -1,11 +0,0 @@
126 ---- ZoneMinder-1.24.1/zm.conf.in.orig 2009-03-23 13:55:43.000000000 +0000
127 -+++ ZoneMinder-1.24.1/zm.conf.in 2009-03-23 13:57:22.000000000 +0000
128 -@@ -13,7 +13,7 @@
129 - ZM_VERSION=@VERSION@
130 -
131 - # Path to build directory, used mostly for finding DB upgrade scripts
132 --ZM_PATH_BUILD=@PATH_BUILD@
133 -+ZM_PATH_BUILD=/usr/share/zoneminder
134 -
135 - # Build time, used to record when to trigger various checks
136 - ZM_TIME_BUILD=@TIME_BUILD@
137
138 diff --git a/media-video/zoneminder/files/1.24.4/zm_remote_camera_http.patch b/media-video/zoneminder/files/1.24.4/zm_remote_camera_http.patch
139 deleted file mode 100644
140 index ca937b6..0000000
141 --- a/media-video/zoneminder/files/1.24.4/zm_remote_camera_http.patch
142 +++ /dev/null
143 @@ -1,55 +0,0 @@
144 -Index: ZoneMinder-1.24.1/src/zm_remote_camera_http.cpp
145 -===================================================================
146 ---- ZoneMinder-1.24.1.orig/src/zm_remote_camera_http.cpp
147 -+++ ZoneMinder-1.24.1/src/zm_remote_camera_http.cpp
148 -@@ -356,6 +356,14 @@ int RemoteCamera::GetResponse()
149 - format = JPEG;
150 - state = CONTENT;
151 - }
152 -+ else if ( !strcasecmp( content_type, "image/mpeg" ) )
153 -+ {
154 -+ // Single image
155 -+ mode = SINGLE_IMAGE;
156 -+ format = JPEG;
157 -+ state = CONTENT;
158 -+
159 -+ }
160 - else if ( !strcasecmp( content_type, "image/x-rgb" ) )
161 - {
162 - // Single image
163 -@@ -453,6 +461,10 @@ int RemoteCamera::GetResponse()
164 - {
165 - format = JPEG;
166 - }
167 -+ else if ( !strcasecmp( content_type, "image/mpeg" ) )
168 -+ {
169 -+ format = JPEG;
170 -+ }
171 - else if ( !strcasecmp( content_type, "image/x-rgb" ) )
172 - {
173 - format = X_RGB;
174 -@@ -783,6 +795,13 @@ int RemoteCamera::GetResponse()
175 - format = JPEG;
176 - state = CONTENT;
177 - }
178 -+ else if ( !strcasecmp( content_type, "image/mpeg" ) )
179 -+ {
180 -+ // Single image
181 -+ mode = SINGLE_IMAGE;
182 -+ format = JPEG;
183 -+ state = CONTENT;
184 -+ }
185 - else if ( !strcasecmp( content_type, "image/x-rgb" ) )
186 - {
187 - // Single image
188 -@@ -947,6 +966,10 @@ int RemoteCamera::GetResponse()
189 - {
190 - format = JPEG;
191 - }
192 -+ else if ( !strcasecmp( content_type, "image/mpeg" ) )
193 -+ {
194 -+ format = JPEG;
195 -+ }
196 - else if ( !strcasecmp( content_type, "image/x-rgb" ) )
197 - {
198 - format = X_RGB;
199
200 diff --git a/media-video/zoneminder/files/10_zoneminder.conf b/media-video/zoneminder/files/10_zoneminder.conf
201 deleted file mode 100644
202 index 0ddb675..0000000
203 --- a/media-video/zoneminder/files/10_zoneminder.conf
204 +++ /dev/null
205 @@ -1,18 +0,0 @@
206 -ScriptAlias /cgi-bin/zms "/var/www/zoneminder/cgi-bin/zms"
207 -ScriptAlias /cgi-bin/nph-zms "/var/www/zoneminder/cgi-bin/nph-zms"
208 -
209 -<Directory "/var/www/zoneminder/cgi-bin">
210 - AllowOverride All
211 - Options ExecCGI
212 - Order allow,deny
213 - Allow from all
214 -</Directory>
215 -
216 -Alias /zoneminder "/var/www/zoneminder/htdocs"
217 -
218 -<Directory "/var/www/zoneminder/htdocs">
219 - Options -Indexes MultiViews FollowSymLinks
220 - AllowOverride All
221 - Order allow,deny
222 - Allow from all
223 -</Directory>
224
225 diff --git a/media-video/zoneminder/files/9999/Makefile.am.patch b/media-video/zoneminder/files/9999/Makefile.am.patch
226 deleted file mode 100644
227 index a22e93f..0000000
228 --- a/media-video/zoneminder/files/9999/Makefile.am.patch
229 +++ /dev/null
230 @@ -1,15 +0,0 @@
231 ---- Makefile.am.anc 2011-03-31 13:13:24.000000000 +0200
232 -+++ Makefile.am 2011-03-31 13:14:32.000000000 +0200
233 -@@ -20,9 +20,9 @@
234 - # Yes, you are correct. This is a HACK!
235 - install-data-hook:
236 - ( cd $(DESTDIR)$(sysconfdir); chown $(webuser):$(webgroup) $(sysconf_DATA); chmod 600 $(sysconf_DATA) )
237 -- ( if ! test -e $(ZM_RUNDIR); then mkdir -p $(ZM_RUNDIR); fi; chown $(webuser):$(webgroup) $(ZM_RUNDIR); chmod u+w $(ZM_RUNDIR) )
238 -- ( if ! test -e $(ZM_TMPDIR); then mkdir -p $(ZM_TMPDIR); fi; chown $(webuser):$(webgroup) $(ZM_TMPDIR); chmod u+w $(ZM_TMPDIR) )
239 -- ( if ! test -e $(ZM_LOGDIR); then mkdir -p $(ZM_LOGDIR); fi; chown $(webuser):$(webgroup) $(ZM_LOGDIR); chmod u+w $(ZM_LOGDIR) )
240 -+ ( if ! test -e $(DESTDIR)$(ZM_RUNDIR); then mkdir -p $(DESTDIR)$(ZM_RUNDIR); fi; chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_RUNDIR); chmod u+w $(DESTDIR)$(ZM_RUNDIR) )
241 -+ ( if ! test -e $(DESTDIR)$(ZM_TMPDIR); then mkdir -p $(DESTDIR)$(ZM_TMPDIR); fi; chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_TMPDIR); chmod u+w $(DESTDIR)$(ZM_TMPDIR) )
242 -+ ( if ! test -e $(DESTDIR)$(ZM_LOGDIR); then mkdir -p $(DESTDIR)$(ZM_LOGDIR); fi; chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_LOGDIR); chmod u+w $(DESTDIR)$(ZM_LOGDIR) )
243 -
244 - uninstall-hook:
245 - @-( cd $(DESTDIR)$(webdir); rm -rf events graphics images sounds temp )
246
247 diff --git a/media-video/zoneminder/files/9999/cvisionlab-plugins.patch b/media-video/zoneminder/files/9999/cvisionlab-plugins.patch
248 deleted file mode 100644
249 index 314ef53..0000000
250 --- a/media-video/zoneminder/files/9999/cvisionlab-plugins.patch
251 +++ /dev/null
252 @@ -1,2259 +0,0 @@
253 -diff -aurN zoneminder/trunk/configure zoneminder_new/trunk/configure
254 ---- zoneminder/trunk/configure 2011-04-01 17:08:37.000000000 +0200
255 -+++ zoneminder_new/trunk/configure 2011-04-01 21:14:15.000000000 +0200
256 -@@ -2999,6 +2999,7 @@
257 -
258 -
259 -
260 -+LDFLAGS="$LDFLAGS -rdynamic "
261 - LDFLAGS="${MYSQL_LIBS} $LDFLAGS"
262 -
263 - FFMPEG_PREFIX=/usr
264 -@@ -9324,7 +9325,7 @@
265 -
266 -
267 -
268 --ac_config_files="$ac_config_files Makefile zm.conf zmconfgen.pl db/Makefile db/zm_create.sql scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/ski
269 ns/classic/lang/Makefile web/skins/classic/views/Makefile web/skins/classic/views/css/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile web/zmApache.conf"
270 -+ac_config_files="$ac_config_files Makefile zm.conf db/Makefile db/zm_create.sql scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/skins/classic/la
271 ng/Makefile web/skins/classic/views/Makefile web/skins/classic/views/css/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile web/zmApache.conf"
272 -
273 -
274 - # Create the definitions for compilation and defaults for the database
275 -@@ -10054,7 +10055,6 @@
276 - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
277 - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
278 - "zm.conf") CONFIG_FILES="$CONFIG_FILES zm.conf" ;;
279 -- "zmconfgen.pl") CONFIG_FILES="$CONFIG_FILES zmconfgen.pl" ;;
280 - "db/Makefile") CONFIG_FILES="$CONFIG_FILES db/Makefile" ;;
281 - "db/zm_create.sql") CONFIG_FILES="$CONFIG_FILES db/zm_create.sql" ;;
282 - "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
283 -@@ -10795,7 +10795,6 @@
284 - done
285 - }
286 - ;;
287 -- "src/zm_config_defines.h":C) perl ./zmconfgen.pl ;;
288 - "scripts/ZoneMinder/Makefile":C) (cd scripts/ZoneMinder; echo "perl Makefile.PL $PERL_MM_PARMS"; perl Makefile.PL $PERL_MM_PARMS) ;;
289 -
290 - esac
291 -diff -aurN zoneminder/trunk/configure.ac zoneminder_new/trunk/configure.ac
292 ---- zoneminder/trunk/configure.ac 2011-04-01 17:08:37.000000000 +0200
293 -+++ zoneminder_new/trunk/configure.ac 2011-04-01 21:14:33.000000000 +0200
294 -@@ -372,10 +372,8 @@
295 - AC_SUBST(PERL_MM_PARMS)
296 - AC_SUBST(EXTRA_PERL_LIB)
297 -
298 --AC_CONFIG_FILES([Makefile zm.conf zmconfgen.pl db/Makefile db/zm_create.sql scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/skins/classic/lang/M
299 akefile web/skins/classic/views/Makefile web/skins/classic/views/css/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile web/zmApache.conf])
300 -+AC_CONFIG_FILES([Makefile zm.conf db/Makefile db/zm_create.sql scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/skins/classic/lang/Makefile web/s
301 kins/classic/views/Makefile web/skins/classic/views/css/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile web/zmApache.conf])
302 -
303 --# Create the definitions for compilation and defaults for the database
304 --AC_CONFIG_COMMANDS([src/zm_config_defines.h],[perl ./zmconfgen.pl])
305 - # Manually generate the perl Makefile maker
306 - AC_CONFIG_COMMANDS([scripts/ZoneMinder/Makefile],[(cd scripts/ZoneMinder; echo "perl Makefile.PL $PERL_MM_PARMS"; perl Makefile.PL $PERL_MM_PARMS)],[PERL_MM_PARMS=$PERL_MM_PARMS])
307 -
308 -diff -aurN zoneminder/trunk/db/Makefile.am zoneminder_new/trunk/db/Makefile.am
309 ---- zoneminder/trunk/db/Makefile.am 2011-04-01 17:08:29.000000000 +0200
310 -+++ zoneminder_new/trunk/db/Makefile.am 2011-04-01 20:01:20.000000000 +0200
311 -@@ -39,4 +39,5 @@
312 - zm_update-1.23.3.sql \
313 - zm_update-1.24.0.sql \
314 - zm_update-1.24.1.sql \
315 -- zm_update-1.24.2.sql
316 -+ zm_update-1.24.2.sql \
317 -+ zm_update-plugins.sql
318 -diff -aurN zoneminder/trunk/db/Makefile.in zoneminder_new/trunk/db/Makefile.in
319 ---- zoneminder/trunk/db/Makefile.in 2011-04-01 17:08:29.000000000 +0200
320 -+++ zoneminder_new/trunk/db/Makefile.in 2011-04-01 20:01:20.000000000 +0200
321 -@@ -221,7 +221,8 @@
322 - zm_update-1.23.3.sql \
323 - zm_update-1.24.0.sql \
324 - zm_update-1.24.1.sql \
325 -- zm_update-1.24.2.sql
326 -+ zm_update-1.24.2.sql \
327 -+ zm_update-plugins.sql
328 -
329 - all: all-am
330 -
331 -diff -aurN zoneminder/trunk/db/zm_create.sql.in zoneminder_new/trunk/db/zm_create.sql.in
332 ---- zoneminder/trunk/db/zm_create.sql.in 2011-04-01 17:08:29.000000000 +0200
333 -+++ zoneminder_new/trunk/db/zm_create.sql.in 2011-04-01 20:01:20.000000000 +0200
334 -@@ -351,6 +351,8 @@
335 - `SignalCheckColour` varchar(32) NOT NULL default '#0000BE',
336 - `WebColour` varchar(32) NOT NULL default 'red',
337 - `Sequence` smallint(5) unsigned default NULL,
338 -+ `UsedPl` varchar(88) NOT NULL default '',
339 -+ `DoNativeMotDet` varchar(5) NOT NULL default 'yes',
340 - PRIMARY KEY (`Id`)
341 - ) ENGINE=@ZM_MYSQL_ENGINE@;
342 -
343 -@@ -596,6 +598,13 @@
344 - INSERT INTO ZonePresets VALUES (5,'Best, medium sensitivity','Active','Percent','Blobs',40,NULL,16,NULL,5,5,12,NULL,10,NULL,1,NULL,0);
345 - INSERT INTO ZonePresets VALUES (6,'Best, high sensitivity','Active','Percent','Blobs',20,NULL,8,NULL,3,3,6,NULL,5,NULL,1,NULL,0);
346 -
347 -+insert into Config set Id=197, Name = 'ZM_PATH_PLUGINS', Value = '/usr/share/zoneminder', Type = 'string', DefaultValue = '/usr/share/zoneminder', Hint = '/absolute/path/to/somewhere', Pattern = '(?-xism:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'Path to the plugin folder', Help = '3d-party plugins have to be placed here.', Category = 'paths', Readonly = '0', Requires = '';
348 -+insert into Config set Id=198, Name = 'ZM_PLUGIN_EXTENSION', Value = '.zmpl', Type = 'string', DefaultValue = '.zmpl', Hint = '.bla', Pattern = '.(?-xism:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'Default extension of plugins to found', Help = '3d-party plugins extension.', Category = 'paths', Readonly = '0', Requires = '';
349 -+insert into Config set Id=199, Name = 'ZM_PLUGINS_CONFIG_FILE', Value = '/usr/share/zoneminder/plugins.conf', Type = 'string', DefaultValue = '/usr/share/zoneminder/plugins.conf', Hint = '/absolute/path/to/somewhere', Pattern = '(?-xism:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'Path to the config file for plugins', Help = 'Path to the config file for plugins.', Category = 'paths', Readonly = '0', Requires = '';
350 -+insert into Config set Id=200, Name = 'ZM_LOAD_PLUGINS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))', Format = ' $1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Load and use 3d-party plugins', Help = '3d-party plugins will be loaded and used for analysing.', Category = 'config', Readonly = '0', Requires = '';
351 -+insert into Config set Id=201, Name = 'ZM_TURNOFF_NATIVE_ANALYSIS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))', Format = ' $1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Turn native ZM\'s image analysis possibility off', Help = 'Image analysis with ZM\'s motion detected function will be turned off. Only detection functions from loaded plugins will be used. Note, that if no plugins have be loaded, no detection will be done', Category = 'config', Readonly = '0', Requires = '';
352 -+
353 -+
354 - --
355 - -- Apply the initial configuration
356 - --
357 -diff -aurN zoneminder/trunk/db/zm_update-plugins.sql zoneminder_new/trunk/db/zm_update-plugins.sql
358 ---- zoneminder/trunk/db/zm_update-plugins.sql 1970-01-01 01:00:00.000000000 +0100
359 -+++ zoneminder_new/trunk/db/zm_update-plugins.sql 2011-04-01 21:13:32.000000000 +0200
360 -@@ -0,0 +1,26 @@
361 -+--
362 -+-- This is update from 1.24.2 version to plugins supporting architecture.
363 -+--
364 -+
365 -+-- Add two columns to store plugins related information.
366 -+ALTER TABLE Monitors
367 -+ADD ( `UsedPl` varchar(88) NOT NULL default '',
368 -+ `DoNativeMotDet` varchar(5) NOT NULL default 'yes'
369 -+);
370 -+
371 -+-- Insert some values into `Config' table.
372 -+INSERT INTO Config SET Id = 197, Name = 'ZM_PATH_PLUGINS', Value = '/usr/share/zoneminder', Type = 'string', DefaultValue = '/usr/share/zoneminder', Hint = '/absolute/path/to/somewhere', Pattern = '(?-xism:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'Path to the plugin folder', Help = '3d-party plugins have to be placed here.', Category = 'paths', Readonly = '0', Requires = '';
373 -+INSERT INTO Config SET Id = 198, Name = 'ZM_PLUGIN_EXTENSION', Value = '.zmpl', Type = 'string', DefaultValue = '.zmpl', Hint = '.bla', Pattern = '.(?-xism:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'Default extension of plugins to found', Help = '3d-party plugins extension.', Category = 'paths', Readonly = '0', Requires = '';
374 -+INSERT INTO Config SET Id = 199, Name = 'ZM_PLUGINS_CONFIG_FILE', Value = '/usr/share/zoneminder/plugins.conf', Type = 'string', DefaultValue = '/usr/share/zoneminder/plugins.conf', Hint = '/absolute/path/to/somewhere', Pattern = '(?-xism:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'Path to the config file for plugins', Help = 'Path to the config file for plugins.', Category = 'paths', Readonly = '0', Requires = '';
375 -+INSERT INTO Config SET Id = 200, Name = 'ZM_LOAD_PLUGINS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))', Format = ' $1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Load and use 3d-party plugins', Help = '3d-party plugins will be loaded and used for analysing.', Category = 'config', Readonly = '0', Requires = '';
376 -+INSERT INTO Config SET Id = 201, Name = 'ZM_TURNOFF_NATIVE_ANALYSIS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))', Format = ' $1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Turn native ZM\'s image analysis possibility off', Help = 'Image analysis with ZM\'s motion detected function will be turned off. Only detection functions from loaded plugins will be used. Note, that if no plugins have be loaded, no detection will be done', Category = 'config', Readonly = '0', Requires = '';
377 -+
378 -+--
379 -+-- These are optional, but we might as well
380 -+--
381 -+optimize table Frames;
382 -+optimize table Events;
383 -+optimize table Filters;
384 -+optimize table Zones;
385 -+optimize table Monitors;
386 -+optimize table Stats;
387 -diff -aurN zoneminder/trunk/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in zoneminder_new/trunk/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
388 ---- zoneminder/trunk/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in 2011-04-01 17:08:31.000000000 +0200
389 -+++ zoneminder_new/trunk/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in 2011-04-01 20:00:17.000000000 +0200
390 -@@ -542,6 +542,46 @@
391 - category => "paths",
392 - },
393 - {
394 -+ name => "ZM_PATH_PLUGINS",
395 -+ default => "/usr/share/zoneminder",
396 -+ description => "Path to the plugin folder",
397 -+ help => "3d-party plugins have to be placed here.",
398 -+ type => $types{abs_path},
399 -+ category => "paths",
400 -+ },
401 -+ {
402 -+ name => "ZM_PLUGIN_EXTENSION",
403 -+ default => ".zmpl",
404 -+ description => "Default extension of plugins to found.",
405 -+ help => "Default extension of plugins to found.",
406 -+ type => $types{rel_path},
407 -+ category => "paths",
408 -+ },
409 -+ {
410 -+ name => "ZM_PLUGINS_CONFIG_FILE",
411 -+ default => "/usr/share/zoneminder/plugins.conf",
412 -+ description => "Path to the config file for plugins.",
413 -+ help => "Path to the config file for plugins.",
414 -+ type => $types{abs_path},
415 -+ category => "paths",
416 -+ },
417 -+ {
418 -+ name => "ZM_LOAD_PLUGINS",
419 -+ default => "no",
420 -+ description => "Load and use 3d-party plugins",
421 -+ help => "3d-party plugins will be loaded and used for analysing.",
422 -+ type => $types{boolean},
423 -+ category => "config",
424 -+ },
425 -+ {
426 -+ name => "ZM_TURNOFF_NATIVE_ANALYSIS",
427 -+ default => "no",
428 -+ description => "Turn native ZM\'s image analysis possibility off",
429 -+ help => "Image analysis with ZM\'s motion detected function will be turned off. Only detection functions from loaded plugins will be used. Note, that if no plugins have be loaded, no detection will be done.",
430 -+ type => $types{boolean},
431 -+ category => "config",
432 -+ },
433 -+ {
434 - name => "ZM_PATH_SWAP",
435 - default => "@ZM_TMPDIR@",
436 - description => "Path to location for temporary swap images used in streaming",
437 -diff -aurN zoneminder/trunk/src/Makefile.am zoneminder_new/trunk/src/Makefile.am
438 ---- zoneminder/trunk/src/Makefile.am 2011-04-01 17:08:30.000000000 +0200
439 -+++ zoneminder_new/trunk/src/Makefile.am 2011-04-01 17:10:30.000000000 +0200
440 -@@ -58,7 +58,11 @@
441 - zm_timer.cpp \
442 - zm_user.cpp \
443 - zm_utils.cpp \
444 -- zm_zone.cpp
445 -+ zm_zone.cpp \
446 -+ zm_detector.cpp \
447 -+ zm_plugin.cpp \
448 -+ zm_plugin_manager.cpp \
449 -+ zm_image_analyser.cpp
450 -
451 - zmc_SOURCES = zmc.cpp $(zm_SOURCES)
452 - zma_SOURCES = zma.cpp $(zm_SOURCES)
453 -@@ -113,7 +117,11 @@
454 - zm_timer.h \
455 - zm_user.h \
456 - zm_utils.h \
457 -- zm_zone.h
458 -+ zm_zone.h \
459 -+ zm_detector.h \
460 -+ zm_plugin.h \
461 -+ zm_plugin_manager.h \
462 -+ zm_image_analyser.h
463 -
464 - EXTRA_DIST = \
465 - zm_config.h.in \
466 -diff -aurN zoneminder/trunk/src/zm_config_defines.h zoneminder_new/trunk/src/zm_config_defines.h
467 ---- zoneminder/trunk/src/zm_config_defines.h 2011-04-01 17:08:30.000000000 +0200
468 -+++ zoneminder_new/trunk/src/zm_config_defines.h 2011-04-01 17:18:50.000000000 +0200
469 -@@ -198,9 +198,13 @@
470 - #define ZM_EYEZM_H264_DEFAULT_EVBR 194
471 - #define ZM_EYEZM_H264_TIMEOUT 195
472 - #define ZM_EYEZM_SEG_DURATION 196
473 -+#define ZM_PATH_PLUGINS 197
474 -+#define ZM_PLUGIN_EXTENSION 198
475 -+#define ZM_PLUGINS_CONFIG_FILE 199
476 -+#define ZM_LOAD_PLUGINS 200
477 -+#define ZM_TURNOFF_NATIVE_ANALYSIS 201
478 -
479 --
480 --#define ZM_MAX_CFG_ID 196
481 -+#define ZM_MAX_CFG_ID 201
482 -
483 - #define ZM_CFG_DECLARE_LIST \
484 - const char *lang_default;\
485 -@@ -257,6 +261,11 @@
486 - const char *path_map;\
487 - const char *path_socks;\
488 - const char *path_logs;\
489 -+ const char *path_plugins;\
490 -+ const char *plugin_extension;\
491 -+ const char *plugins_config_path;\
492 -+ bool load_plugins;\
493 -+ bool turnoff_native_analysis;\
494 - const char *path_swap;\
495 - const char *web_title_prefix;\
496 - bool web_resize_console;\
497 -@@ -457,6 +466,11 @@
498 - path_map = (const char *)config.Item( ZM_PATH_MAP );\
499 - path_socks = (const char *)config.Item( ZM_PATH_SOCKS );\
500 - path_logs = (const char *)config.Item( ZM_PATH_LOGS );\
501 -+ path_plugins = (const char *)config.Item( ZM_PATH_PLUGINS );\
502 -+ plugin_extension = (const char *)config.Item( ZM_PLUGIN_EXTENSION );\
503 -+ plugins_config_path = (const char *)config.Item( ZM_PLUGINS_CONFIG_FILE );\
504 -+ load_plugins = (bool)config.Item( ZM_LOAD_PLUGINS );\
505 -+ turnoff_native_analysis = (bool)config.Item( ZM_TURNOFF_NATIVE_ANALYSIS );\
506 - path_swap = (const char *)config.Item( ZM_PATH_SWAP );\
507 - web_title_prefix = (const char *)config.Item( ZM_WEB_TITLE_PREFIX );\
508 - web_resize_console = (bool)config.Item( ZM_WEB_RESIZE_CONSOLE );\
509 -diff -aurN zoneminder/trunk/src/zm_detector.cpp zoneminder_new/trunk/src/zm_detector.cpp
510 ---- zoneminder/trunk/src/zm_detector.cpp 1970-01-01 01:00:00.000000000 +0100
511 -+++ zoneminder_new/trunk/src/zm_detector.cpp 2011-04-01 17:10:30.000000000 +0200
512 -@@ -0,0 +1,200 @@
513 -+#include "zm_detector.h"
514 -+
515 -+
516 -+
517 -+/*!\fn Detector::Detector(const Detector& source)
518 -+ * \param source is the object to copy
519 -+ */
520 -+Detector::Detector(const Detector& source)
521 -+ : m_sDetectionCause(source.m_sDetectionCause),
522 -+ m_fMinAlarmScore(source.m_fMinAlarmScore),
523 -+ m_fMaxAlarmScore(source.m_fMaxAlarmScore),
524 -+ m_fImageScaleFactor(source.m_fImageScaleFactor),
525 -+ m_sLogPrefix(source.m_sLogPrefix),
526 -+ m_nNewWidth(source.m_nNewWidth),
527 -+ m_nNewHeight(source.m_nNewHeight),
528 -+ m_sConfigSectionName(source.m_sConfigSectionName)
529 -+{
530 -+ //setlogmask (LOG_UPTO (LOG_LEVEL));
531 -+ //openlog(m_sLogPrefix.c_str(), LOG_PID|LOG_CONS, LOG_USER);
532 -+}
533 -+
534 -+
535 -+
536 -+/*!\fn Detector& ImageAnalyser::Detector::operator=(const ImageAnalyser::Detector& source)
537 -+ * \param source is the object to copy
538 -+ */
539 -+Detector& Detector::operator=(const Detector& source)
540 -+{
541 -+ m_sDetectionCause = source.m_sDetectionCause;
542 -+ m_fMinAlarmScore = source.m_fMinAlarmScore;
543 -+ m_fMaxAlarmScore = source.m_fMaxAlarmScore;
544 -+ m_fImageScaleFactor = source.m_fImageScaleFactor;
545 -+ m_sLogPrefix = source.m_sLogPrefix;
546 -+ m_nNewWidth = source.m_nNewWidth;
547 -+ m_nNewHeight = source.m_nNewHeight;
548 -+ m_sConfigSectionName = source.m_sConfigSectionName;
549 -+
550 -+ //setlogmask (LOG_UPTO (LOG_LEVEL));
551 -+ //openlog(m_sLogPrefix.c_str(), LOG_PID|LOG_CONS, LOG_USER);
552 -+
553 -+ return *this;
554 -+}
555 -+
556 -+
557 -+
558 -+/*!\fn Detector::getDetectionCause()
559 -+ * return detection cause as string
560 -+ */
561 -+string Detector::getDetectionCause()
562 -+{
563 -+ return m_sDetectionCause;
564 -+}
565 -+
566 -+
567 -+
568 -+
569 -+/*! \fn Detector::log(int nLogLevel, string sMessage)
570 -+ */
571 -+void Detector::log(int nLogLevel, string sMessage)
572 -+{
573 -+ string sMessageToLog = m_sLogPrefix + string(" : ") + sMessage;
574 -+ syslog(nLogLevel, sMessageToLog.c_str());
575 -+}
576 -+
577 -+
578 -+//Detector::~Detector() {}
579 -+
580 -+
581 -+
582 -+
583 -+/*! \fn int FaceDetectorPlugin::Detect(const Image &image, Event::StringSet &zoneSet)
584 -+ * \param image is an image to detect faces on
585 -+ * \param zoneSet is set of zone names (see zm_zone.h)
586 -+ * \return detection score
587 -+ */
588 -+int Detector::Detect(const Image &zmImage, Zone** zones, int n_numZones, Event::StringSet &zoneSet)
589 -+{
590 -+ //log(LOG_LEVEL, "Detection invoking.");
591 -+ bool alarm = false;
592 -+ char szMessage[50];
593 -+ unsigned int score = 0;
594 -+
595 -+ if (n_numZones <= 0) return (alarm);
596 -+
597 -+
598 -+// // Blank out all exclusion zones
599 -+// for ( int n_zone = 0; n_zone < n_zones; n_zone++ )
600 -+// {
601 -+// Zone *zone = zones[n_zone];
602 -+// zone->ClearAlarm();
603 -+// if ( !zone->IsInactive() )
604 -+// {
605 -+// continue;
606 -+// }
607 -+// Debug( 3, "Blanking inactive zone %s", zone->Label() );
608 -+// delta_image->Fill( RGB_BLACK, zone->GetPolygon() );
609 -+// }
610 -+
611 -+ // Check preclusive zones first
612 -+ for (int n_zone = 0; n_zone < n_numZones; n_zone++)
613 -+ {
614 -+ Zone *zone = zones[n_zone];
615 -+ if (!zone->IsPreclusive())
616 -+ {
617 -+ continue;
618 -+ }
619 -+ sprintf(szMessage, "Checking preclusive zone %s", zone->Label());
620 -+ log(LOG_DEBUG, szMessage);
621 -+ if (checkZone(zone, &zmImage))
622 -+ {
623 -+ alarm = true;
624 -+ score += zone->Score();
625 -+ zone->SetAlarm();
626 -+ sprintf(szMessage, "Zone is alarmed, zone score = %d", zone->Score());
627 -+ log(LOG_DEBUG, szMessage);
628 -+ zoneSet.insert(zone->Label());
629 -+ }
630 -+ }
631 -+
632 -+ if ( alarm )
633 -+ {
634 -+ alarm = false;
635 -+ score = 0;
636 -+ }
637 -+ else
638 -+ {
639 -+ // Find all alarm pixels in active zones
640 -+ for (int n_zone = 0; n_zone < n_numZones; n_zone++)
641 -+ {
642 -+ Zone *zone = zones[n_zone];
643 -+ if (!zone->IsActive())
644 -+ {
645 -+ continue;
646 -+ }
647 -+ sprintf(szMessage, "Checking active zone %s", zone->Label());
648 -+ log(LOG_DEBUG, szMessage);
649 -+ if (checkZone(zone, &zmImage))
650 -+ {
651 -+ alarm = true;
652 -+ score += zone->Score();
653 -+ zone->SetAlarm();
654 -+ sprintf(szMessage, "Zone is alarmed, zone score = %d", zone->Score());
655 -+ log(LOG_DEBUG, szMessage);
656 -+ zoneSet.insert(zone->Label());
657 -+ }
658 -+ }
659 -+
660 -+ if ( alarm )
661 -+ {
662 -+ // Checking inclusive zones
663 -+ for (int n_zone = 0; n_zone < n_numZones; n_zone++)
664 -+ {
665 -+ Zone *zone = zones[n_zone];
666 -+ if (!zone->IsInclusive())
667 -+ {
668 -+ continue;
669 -+ }
670 -+ sprintf(szMessage, "Checking inclusive zone %s", zone->Label());
671 -+ log(LOG_DEBUG, szMessage);
672 -+ if (checkZone(zone, &zmImage))
673 -+ {
674 -+ alarm = true;
675 -+ score += zone->Score();
676 -+ zone->SetAlarm();
677 -+ sprintf(szMessage, "Zone is alarmed, zone score = %d", zone->Score());
678 -+ log(LOG_DEBUG, szMessage);
679 -+ zoneSet.insert(zone->Label());
680 -+ }
681 -+ }
682 -+ }
683 -+ else
684 -+ {
685 -+ // Find all alarm pixels in exclusive zones
686 -+ for (int n_zone = 0; n_zone < n_numZones; n_zone++)
687 -+ {
688 -+ Zone *zone = zones[n_zone];
689 -+ if (!zone->IsExclusive())
690 -+ {
691 -+ continue;
692 -+ }
693 -+ sprintf(szMessage, "Checking exclusive zone %s", zone->Label());
694 -+ log(LOG_DEBUG, szMessage);
695 -+ if (checkZone(zone, &zmImage))
696 -+ {
697 -+ alarm = true;
698 -+ score += zone->Score();
699 -+ zone->SetAlarm();
700 -+ sprintf(szMessage, "Zone is alarmed, zone score = %d", zone->Score());
701 -+ log(LOG_DEBUG, szMessage);
702 -+ zoneSet.insert(zone->Label());
703 -+ }
704 -+ }
705 -+ } //else if(alarm) : exclusive
706 -+ } //else if(alarm)
707 -+
708 -+
709 -+ return(score?score:alarm);
710 -+}
711 -+
712 -+
713 -diff -aurN zoneminder/trunk/src/zm_detector.h zoneminder_new/trunk/src/zm_detector.h
714 ---- zoneminder/trunk/src/zm_detector.h 1970-01-01 01:00:00.000000000 +0100
715 -+++ zoneminder_new/trunk/src/zm_detector.h 2011-04-01 17:10:30.000000000 +0200
716 -@@ -0,0 +1,129 @@
717 -+#ifndef ZM_DETECTOR_H
718 -+#define ZM_DETECTOR_H
719 -+
720 -+
721 -+#include <string>
722 -+#include <syslog.h>
723 -+#include <libgen.h>
724 -+
725 -+#include "zm_image.h"
726 -+#include "zm_zone.h"
727 -+#include "zm_event.h"
728 -+
729 -+
730 -+
731 -+#define DEFAULT_DETECTION_CAUSE "Object Detected"
732 -+#define DEFAULT_MIN_ALARM_SCORE 1.0
733 -+#define DEFAULT_MAX_ALARM_SCORE 99.0
734 -+#define DEFAULT_IMAGE_SCALE_FACTOR 1.0
735 -+
736 -+#define DEFAULT_LOG_PREFIX "ZM PLUGIN"
737 -+#define LOG_LEVEL LOG_NOTICE
738 -+#define DEFAULT_CONFIGFILE_SECTION "libzm_vscvl_plugin"
739 -+
740 -+using namespace std;
741 -+
742 -+
743 -+//! Base class for object detectors, defined in plugins.
744 -+class Detector
745 -+{
746 -+
747 -+public:
748 -+
749 -+ //! Destructor
750 -+ virtual ~Detector() { closelog(); }
751 -+
752 -+ //! Default constructor
753 -+ Detector()
754 -+{
755 -+ m_sLogPrefix = DEFAULT_LOG_PREFIX;
756 -+
757 -+ //setlogmask (LOG_UPTO (LOG_LEVEL));
758 -+ //openlog(m_sLogPrefix.c_str(), LOG_PID|LOG_CONS, LOG_USER);
759 -+
760 -+ m_sDetectionCause = DEFAULT_DETECTION_CAUSE;
761 -+ m_fMinAlarmScore = DEFAULT_MIN_ALARM_SCORE;
762 -+ m_fMaxAlarmScore = DEFAULT_MAX_ALARM_SCORE;
763 -+ m_fImageScaleFactor = DEFAULT_IMAGE_SCALE_FACTOR;
764 -+ m_sConfigSectionName = DEFAULT_CONFIGFILE_SECTION;
765 -+ m_nNewWidth = 0;
766 -+ m_nNewHeight = 0;
767 -+}
768 -+
769 -+ //! Constructor with section name parameter.
770 -+ Detector(string sPluginFileName)
771 -+{
772 -+ m_sLogPrefix = DEFAULT_LOG_PREFIX;
773 -+
774 -+ char* szPluginFileName = strdup(sPluginFileName.c_str());
775 -+
776 -+ string sPluginFileNameName = string(basename(szPluginFileName));
777 -+
778 -+ size_t idx = sPluginFileNameName.rfind('.');
779 -+
780 -+ if (idx == string::npos)
781 -+ m_sConfigSectionName = sPluginFileNameName;
782 -+ else
783 -+ m_sConfigSectionName = sPluginFileNameName.substr(0, idx);
784 -+
785 -+ m_sDetectionCause = DEFAULT_DETECTION_CAUSE;
786 -+ m_fMinAlarmScore = DEFAULT_MIN_ALARM_SCORE;
787 -+ m_fMaxAlarmScore = DEFAULT_MAX_ALARM_SCORE;
788 -+ m_fImageScaleFactor = DEFAULT_IMAGE_SCALE_FACTOR;
789 -+ m_nNewWidth = 0;
790 -+ m_nNewHeight = 0;
791 -+}
792 -+
793 -+ //! Copy constructor
794 -+ Detector(const Detector& source);
795 -+
796 -+ //! Assignment operator
797 -+ Detector& operator=(const Detector& source);
798 -+
799 -+ //! Detect (in an image later)
800 -+ int Detect(const Image &image, Zone** zones, int n_numZones, Event::StringSet &zoneSet);
801 -+
802 -+ //! Load detector's parameters from a config file.
803 -+ virtual void loadConfig(string sConfigFileName) = 0;
804 -+
805 -+ //! Returns detection case string.
806 -+ string getDetectionCause();
807 -+
808 -+protected:
809 -+
810 -+ //! Do detection inside one given zone.
811 -+ virtual bool checkZone(Zone *zone, const Image *zmImage) = 0;
812 -+
813 -+ //! Log messages to the SYSLOG.
814 -+ void log(int, string sMessage);
815 -+
816 -+ //! String to be shown as detection cause for event.
817 -+ string m_sDetectionCause;
818 -+
819 -+ //! Minimum score value to consider frame as to be alarmed.
820 -+ double m_fMinAlarmScore;
821 -+
822 -+ //! Maximum score value to consider frame as to be alarmed.
823 -+ double m_fMaxAlarmScore;
824 -+
825 -+ //! Maximum allowed width of frame image.
826 -+ double m_fImageScaleFactor;
827 -+
828 -+ //! Width of image to resize.
829 -+ int m_nNewWidth;
830 -+
831 -+ //! Height of image to resize.
832 -+ int m_nNewHeight;
833 -+//
834 -+// //! Output stream for logging errors.
835 -+// ofstream m_outStream;
836 -+
837 -+ //! String prefix for SYSLOG messages.
838 -+ string m_sLogPrefix;
839 -+
840 -+ //! Name of config file section to search parameters.
841 -+ string m_sConfigSectionName;
842 -+};
843 -+
844 -+
845 -+#endif // ZM_DETECTOR_H
846 -diff -aurN zoneminder/trunk/src/zm_event.h zoneminder_new/trunk/src/zm_event.h
847 ---- zoneminder/trunk/src/zm_event.h 2011-04-01 17:08:30.000000000 +0200
848 -+++ zoneminder_new/trunk/src/zm_event.h 2011-04-01 17:10:30.000000000 +0200
849 -@@ -41,7 +41,7 @@
850 - class Zone;
851 - class Monitor;
852 -
853 --#define MAX_PRE_ALARM_FRAMES 16 // Maximum number of prealarm frames that can be stored
854 -+#define MAX_PRE_ALARM_FRAMES 16 // Maximum number of prealarm frames that can be stored
855 -
856 - //
857 - // Class describing events, i.e. captured periods of activity.
858 -diff -aurN zoneminder/trunk/src/zm_image_analyser.cpp zoneminder_new/trunk/src/zm_image_analyser.cpp
859 ---- zoneminder/trunk/src/zm_image_analyser.cpp 1970-01-01 01:00:00.000000000 +0100
860 -+++ zoneminder_new/trunk/src/zm_image_analyser.cpp 2011-04-01 17:10:30.000000000 +0200
861 -@@ -0,0 +1,86 @@
862 -+#include "zm_image_analyser.h"
863 -+
864 -+
865 -+
866 -+/*!\fn ImageAnalyser::ImageAnalyser(const ImageAnalyser& source)
867 -+ * \param source is the object to copy
868 -+ */
869 -+ImageAnalyser::ImageAnalyser(const ImageAnalyser& source)
870 -+{
871 -+ m_Detectors = source.m_Detectors;
872 -+}
873 -+
874 -+
875 -+
876 -+/*!\fn ImageAnalyser::operator=(const ImageAnalyser& source)
877 -+ * \param source is the object to copy
878 -+ */
879 -+ImageAnalyser& ImageAnalyser::operator=(const ImageAnalyser& source)
880 -+{
881 -+ m_Detectors = source.m_Detectors;
882 -+ return *this;
883 -+}
884 -+
885 -+
886 -+
887 -+ImageAnalyser::~ImageAnalyser()
888 -+{
889 -+ for(DetectorsList::reverse_iterator It = m_Detectors.rbegin();
890 -+ It != m_Detectors.rend();
891 -+ ++It)
892 -+ delete *It;
893 -+}
894 -+
895 -+
896 -+
897 -+/*!\fn ImageAnalyser::DoDetection(const Image &comp_image, Zone** zones, int n_numZones, Event::StringSetMap noteSetMap, std::string& det_cause)
898 -+ * \param comp_image is the image to analyse
899 -+ * \param zones is the zones array to analyse
900 -+ * \param n_numZones is the number of zones
901 -+ * \param noteSetMap is the map of events descriptions
902 -+ * \param det_cause is a string describing detection cause
903 -+ */
904 -+int ImageAnalyser::DoDetection(const Image &comp_image, Zone** zones, int n_numZones, Event::StringSetMap noteSetMap, std::string& det_cause)
905 -+{
906 -+ Event::StringSet zoneSet;
907 -+ int score = 0;
908 -+
909 -+ for(DetectorsList::iterator It = m_Detectors.begin();
910 -+ It != m_Detectors.end();
911 -+ ++It)
912 -+ {
913 -+ int detect_score = (*It)->Detect(comp_image, zones, n_numZones, zoneSet);
914 -+ if (detect_score)
915 -+ {
916 -+ score += detect_score;
917 -+ noteSetMap[(*It)->getDetectionCause()] = zoneSet;
918 -+ if (det_cause.length())
919 -+ det_cause += ", ";
920 -+ det_cause += (*It)->getDetectionCause();
921 -+ }
922 -+ }
923 -+ return score;
924 -+}
925 -+
926 -+
927 -+
928 -+/*!\fn ImageAnalyser::configurePlugins(string sConfigFileName)
929 -+ * \param sConfigFileName is the path to the configuration file, where parameters for all plugins are given.
930 -+ */
931 -+void ImageAnalyser::configurePlugins(string sConfigFileName)
932 -+{
933 -+ for(DetectorsList::iterator It = m_Detectors.begin();
934 -+ It != m_Detectors.end();
935 -+ ++It)
936 -+ {
937 -+ try
938 -+ {
939 -+ (*It)->loadConfig(sConfigFileName);
940 -+ }
941 -+ catch(...)
942 -+ {
943 -+ Info("ERROR: Plugin \"%s\" couldn\'t load config file \"%s\".", (*It)->getDetectionCause(), sConfigFileName.c_str());
944 -+ }
945 -+ }
946 -+
947 -+}
948 -diff -aurN zoneminder/trunk/src/zm_image_analyser.h zoneminder_new/trunk/src/zm_image_analyser.h
949 ---- zoneminder/trunk/src/zm_image_analyser.h 1970-01-01 01:00:00.000000000 +0100
950 -+++ zoneminder_new/trunk/src/zm_image_analyser.h 2011-04-01 17:10:30.000000000 +0200
951 -@@ -0,0 +1,65 @@
952 -+#ifndef ZM_IMAGE_ANALYSER_H
953 -+#define ZM_IMAGE_ANALYSER_H
954 -+
955 -+
956 -+
957 -+#include <list>
958 -+#include <string>
959 -+#include <stdexcept>
960 -+#include <iostream>
961 -+#include <memory>
962 -+
963 -+#include "zm.h"
964 -+#include "zm_detector.h"
965 -+#include "zm_image.h"
966 -+#include "zm_zone.h"
967 -+#include "zm_event.h"
968 -+
969 -+
970 -+
971 -+using namespace std;
972 -+
973 -+
974 -+//! List of available detectors.
975 -+typedef std::list<Detector *> DetectorsList;
976 -+
977 -+
978 -+//! Class for handling image detection.
979 -+/*! Contains all detectors loaded from plugins.
980 -+ */
981 -+class ImageAnalyser {
982 -+ public:
983 -+
984 -+ //!Default constructor.
985 -+ ImageAnalyser() {};
986 -+
987 -+ //! Destructor.
988 -+ ~ImageAnalyser();
989 -+
990 -+ //! Copy constructor.
991 -+ ImageAnalyser(const ImageAnalyser& source);
992 -+
993 -+ //! Overloaded operator=.
994 -+ ImageAnalyser& operator=(const ImageAnalyser& source);
995 -+
996 -+ //! Adds new plugin's detector to the list of detectors.
997 -+ void addDetector(std::auto_ptr<Detector> Det)
998 -+ {
999 -+ m_Detectors.push_back(Det.release());
1000 -+ }
1001 -+
1002 -+ //! Do detection in an image by calling all available detectors.
1003 -+ int DoDetection(const Image &comp_image, Zone** zones, int n_numZones, Event::StringSetMap noteSetMap, std::string& det_cause);
1004 -+
1005 -+ //! Configure all loaded plugins using given configuration file.
1006 -+ void configurePlugins(string sConfigFileName);
1007 -+
1008 -+private:
1009 -+
1010 -+ //! All available detectors.
1011 -+ DetectorsList m_Detectors;
1012 -+};
1013 -+
1014 -+
1015 -+
1016 -+#endif //ZM_IMAGE_ANALYSER_H
1017 -diff -aurN zoneminder/trunk/src/zm_monitor.cpp zoneminder_new/trunk/src/zm_monitor.cpp
1018 ---- zoneminder/trunk/src/zm_monitor.cpp 2011-04-01 17:08:30.000000000 +0200
1019 -+++ zoneminder_new/trunk/src/zm_monitor.cpp 2011-04-01 17:35:20.000000000 +0200
1020 -@@ -49,6 +49,37 @@
1021 - #include <sys/shm.h>
1022 - #endif // ZM_MEM_MAPPED
1023 -
1024 -+
1025 -+//=============================================================================
1026 -+std::string trimSpaces(std::string str)
1027 -+{
1028 -+ // Trim Both leading and trailing spaces
1029 -+ size_t startpos = str.find_first_not_of(" \t"); // Find the first character position after excluding leading blank spaces
1030 -+ size_t endpos = str.find_last_not_of(" \t"); // Find the first character position from reverse af
1031 -+
1032 -+ // if all spaces or empty return an empty string
1033 -+ if(( std::string::npos == startpos ) || ( std::string::npos == endpos))
1034 -+ {
1035 -+ return std::string("");
1036 -+ }
1037 -+ else
1038 -+ return str.substr( startpos, endpos-startpos+1 );
1039 -+}
1040 -+
1041 -+
1042 -+std::vector<std::string> split(const std::string &s, char delim) {
1043 -+ std::vector<std::string> elems;
1044 -+ std::stringstream ss(s);
1045 -+ std::string item;
1046 -+ while(std::getline(ss, item, delim)) {
1047 -+ elems.push_back(trimSpaces(item));
1048 -+ }
1049 -+ return elems;
1050 -+}
1051 -+//=============================================================================
1052 -+
1053 -+
1054 -+
1055 - Monitor::MonitorLink::MonitorLink( int p_id, const char *p_name ) : id( p_id )
1056 - {
1057 - strncpy( name, p_name, sizeof(name) );
1058 -@@ -263,7 +294,9 @@
1059 - Rgb p_signal_check_colour,
1060 - Purpose p_purpose,
1061 - int p_n_zones,
1062 -- Zone *p_zones[]
1063 -+ Zone *p_zones[],
1064 -+ std::string p_sPlugins,
1065 -+ bool p_DoNativeMotDet
1066 - ) : id( p_id ),
1067 - function( (Function)p_function ),
1068 - enabled( p_enabled ),
1069 -@@ -290,7 +323,8 @@
1070 - purpose( p_purpose ),
1071 - camera( p_camera ),
1072 - n_zones( p_n_zones ),
1073 -- zones( p_zones )
1074 -+ zones( p_zones ),
1075 -+ m_bDoNativeMotDet(p_DoNativeMotDet)
1076 - {
1077 - strncpy( name, p_name, sizeof(name) );
1078 -
1079 -@@ -392,6 +426,12 @@
1080 - trigger_data = (TriggerData *)((char *)shared_data + sizeof(SharedData));
1081 - struct timeval *shared_timestamps = (struct timeval *)((char *)trigger_data + sizeof(TriggerData));
1082 - unsigned char *shared_images = (unsigned char *)((char *)shared_timestamps + (image_buffer_count*sizeof(struct timeval)));
1083 -+
1084 -+ //========================================================================================
1085 -+ // Get from string with plugins names particular names.
1086 -+ m_sPluginNames = split(p_sPlugins, ';');
1087 -+
1088 -+ //========================================================================================
1089 -
1090 - if ( purpose == CAPTURE )
1091 - {
1092 -@@ -425,6 +465,32 @@
1093 - shared_data->last_read_time = 0;
1094 - shared_data->alarm_x = -1;
1095 - shared_data->alarm_y = -1;
1096 -+
1097 -+ //========================================================================================
1098 -+ Info("In the constructor of Monitor class with ID=%d:", p_id);
1099 -+ if (config.load_plugins)
1100 -+ {
1101 -+ Info("Load plugins from the directory %s ... ", config.path_plugins);
1102 -+ std::string sPluginExt = std::string(config.plugin_extension);
1103 -+ ThePluginManager.setPluginExt(sPluginExt);
1104 -+ for (std::vector<std::string>::iterator it = m_sPluginNames.begin() ; it < m_sPluginNames.end(); it++ )
1105 -+ {
1106 -+ std::string sFullPluginPath = join_paths(config.path_plugins, *it + config.plugin_extension);
1107 -+ Info("Plugin path %s", sFullPluginPath.c_str());
1108 -+ ThePluginManager.loadPlugin(sFullPluginPath);
1109 -+ }
1110 -+
1111 -+// int count_plugins = ThePluginManager.findPlugins(config.path_plugins);
1112 -+// Info("Number of found plugins is %d", count_plugins);
1113 -+// if (count_plugins > 0)
1114 -+// {
1115 -+ std::string sPluginsConfig = std::string(config.plugins_config_path);
1116 -+ Info("Configure plugins with \'%s\' config file.", config.plugins_config_path);
1117 -+ ThePluginManager.configurePlugins(sPluginsConfig);
1118 -+// }
1119 -+
1120 -+ }
1121 -+ //========================================================================================
1122 - }
1123 -
1124 - if ( !shared_data->valid )
1125 -@@ -1209,23 +1275,52 @@
1126 - }
1127 - else if ( signal && Active() && function != RECORD && function != NODECT )
1128 - {
1129 -- Event::StringSet zoneSet;
1130 -- int motion_score = DetectMotion( *snap_image, zoneSet );
1131 -- if ( motion_score )
1132 -- {
1133 -- if ( !event )
1134 -- {
1135 -- score += motion_score;
1136 -- if ( cause.length() )
1137 -- cause += ", ";
1138 -- cause += MOTION_CAUSE;
1139 -+ if ((config.turnoff_native_analysis && !config.load_plugins) || (!config.turnoff_native_analysis && (m_bDoNativeMotDet || (!m_bDoNativeMotDet && !config.load_plugins))) )
1140 -+ {
1141 -+ Event::StringSet zoneSet;
1142 -+ int motion_score = DetectMotion( *snap_image, zoneSet );
1143 -+ //int motion_score = DetectBlack( *snap_image, zoneSet );
1144 -+ if ( motion_score )
1145 -+ {
1146 -+ if ( !event )
1147 -+ {
1148 -+ score += motion_score;
1149 -+ if ( cause.length() )
1150 -+ cause += ", ";
1151 -+ cause += MOTION_CAUSE;
1152 -+ }
1153 -+ else
1154 -+ {
1155 -+ score += motion_score;
1156 -+ }
1157 -+ noteSetMap[MOTION_CAUSE] = zoneSet;
1158 - }
1159 -- else
1160 -+ }
1161 -+ //====================================================================
1162 -+ else
1163 -+ {
1164 -+
1165 -+ for ( int n_zone = 0; n_zone < n_zones; n_zone++ )
1166 - {
1167 -- score += motion_score;
1168 -+ zones[n_zone]->ResetStats();
1169 - }
1170 -- noteSetMap[MOTION_CAUSE] = zoneSet;
1171 - }
1172 -+
1173 -+ if (config.load_plugins)
1174 -+ {
1175 -+ std::string det_cause; // detection cause to fill in plugin's detectors
1176 -+ score += ThePluginManager.getImageAnalyser().DoDetection(*snap_image, zones, n_zones, noteSetMap, det_cause);
1177 -+ if (!event)
1178 -+ {
1179 -+ if (det_cause.length())
1180 -+ {
1181 -+ if (cause.length())
1182 -+ cause += ", ";
1183 -+ cause += det_cause;
1184 -+ }
1185 -+ }
1186 -+ }
1187 -+ //====================================================================
1188 - shared_data->active = signal;
1189 - }
1190 - if ( n_linked_monitors > 0 )
1191 -@@ -1547,7 +1642,7 @@
1192 - closeEvent();
1193 -
1194 - static char sql[ZM_SQL_MED_BUFSIZ];
1195 -- snprintf( sql, sizeof(sql), "select Function+0, Enabled, LinkedMonitors, EventPrefix, LabelFormat, LabelX, LabelY, WarmupCount, PreEventCount, PostEventCount, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Id = '%d'", id );
1196 -+ snprintf( sql, sizeof(sql), "select Function+0, Enabled, LinkedMonitors, EventPrefix, LabelFormat, LabelX, LabelY, WarmupCount, PreEventCount, PostEventCount, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, UsedPl, DoNativeMotDet, SignalCheckColour from Monitors where Id = '%d'", id );
1197 - if ( mysql_query( &dbconn, sql ) )
1198 - {
1199 - Error( "Can't run query: %s", mysql_error( &dbconn ) );
1200 -@@ -1587,6 +1682,14 @@
1201 - fps_report_interval = atoi(dbrow[index++]);
1202 - ref_blend_perc = atoi(dbrow[index++]);
1203 - track_motion = atoi(dbrow[index++]);
1204 -+
1205 -+ //============================================================================
1206 -+ std::string plugins = dbrow[index]; index++;
1207 -+ m_sPluginNames = split(plugins ,';');
1208 -+ std::string sDoNativeMotDet = dbrow[index]; index++;
1209 -+ m_bDoNativeMotDet = !sDoNativeMotDet.compare("yes") ? true : false;
1210 -+ //============================================================================
1211 -+
1212 - if ( dbrow[index][0] == '#' )
1213 - signal_check_colour = strtol(dbrow[index]+1,0,16);
1214 - else
1215 -@@ -1733,11 +1836,11 @@
1216 - static char sql[ZM_SQL_MED_BUFSIZ];
1217 - if ( !device[0] )
1218 - {
1219 -- strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, Method, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Function != 'None' and Type = 'Local' order by Device, Channel", sizeof(sql) );
1220 -+ strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, Method, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, UsedPl, DoNativeMotDet, SignalCheckColour from Monitors where Function != 'None' and Type = 'Local' order by Device, Channel", sizeof(sql) );
1221 - }
1222 - else
1223 - {
1224 -- snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, Method, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Function != 'None' and Type = 'Local' and Device = '%s' order by Channel", device );
1225 -+ snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, Method, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, UsedPl, DoNativeMotDet, SignalCheckColour from Monitors where Function != 'None' and Type = 'Local' and Device = '%s' order by Channel", device );
1226 - }
1227 - if ( mysql_query( &dbconn, sql ) )
1228 - {
1229 -@@ -1798,6 +1901,13 @@
1230 - int fps_report_interval = atoi(dbrow[col]); col++;
1231 - int ref_blend_perc = atoi(dbrow[col]); col++;
1232 - int track_motion = atoi(dbrow[col]); col++;
1233 -+
1234 -+ //============================================================================
1235 -+ std::string plugins = dbrow[col]; col++;
1236 -+ std::string sDoNativeMotDet = dbrow[col]; col++;
1237 -+ bool doNativeMotDet = !sDoNativeMotDet.compare("yes") ? true : false;
1238 -+ //============================================================================
1239 -+
1240 - int signal_check_colour;
1241 - if ( dbrow[col][0] == '#' )
1242 - signal_check_colour = strtol(dbrow[col]+1,0,16);
1243 -@@ -1849,7 +1959,11 @@
1244 - ref_blend_perc,
1245 - track_motion,
1246 - signal_check_colour,
1247 -- purpose
1248 -+ purpose,
1249 -+ 0,
1250 -+ 0,
1251 -+ plugins,
1252 -+ doNativeMotDet
1253 - );
1254 - Zone **zones = 0;
1255 - int n_zones = Zone::Load( monitors[i], zones );
1256 -@@ -1873,11 +1987,11 @@
1257 - static char sql[ZM_SQL_MED_BUFSIZ];
1258 - if ( !protocol )
1259 - {
1260 -- strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Protocol, Method, Host, Port, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Remote'", sizeof(sql) );
1261 -+ strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Protocol, Method, Host, Port, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, UsedPl, DoNativeMotDet from Monitors where Function != 'None' and Type = 'Remote'", sizeof(sql) );
1262 - }
1263 - else
1264 - {
1265 -- snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Protocol, Method, Host, Port, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Remote' and Protocol = '%s' and Host = '%s' and Port = '%s' and Path = '%s'", protocol, host, port, path );
1266 -+ snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Protocol, Method, Host, Port, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, UsedPl, DoNativeMotDet from Monitors where Function != 'None' and Type = 'Remote' and Protocol = '%s' and Host = '%s' and Port = '%s' and Path = '%s'", protocol, host, port, path );
1267 - }
1268 - if ( mysql_query( &dbconn, sql ) )
1269 - {
1270 -@@ -1939,6 +2053,13 @@
1271 - int fps_report_interval = atoi(dbrow[col]); col++;
1272 - int ref_blend_perc = atoi(dbrow[col]); col++;
1273 - int track_motion = atoi(dbrow[col]); col++;
1274 -+
1275 -+ //============================================================================
1276 -+ std::string plugins = dbrow[col]; col++;
1277 -+ std::string sDoNativeMotDet = dbrow[col]; col++;
1278 -+ bool doNativeMotDet = !sDoNativeMotDet.compare("yes") ? true : false;
1279 -+ //============================================================================
1280 -+
1281 -
1282 - int cam_width = ((orientation==ROTATE_90||orientation==ROTATE_270)?height:width);
1283 - int cam_height = ((orientation==ROTATE_90||orientation==ROTATE_270)?width:height);
1284 -@@ -2012,7 +2133,11 @@
1285 - ref_blend_perc,
1286 - track_motion,
1287 - RGB_WHITE,
1288 -- purpose
1289 -+ purpose,
1290 -+ 0,
1291 -+ 0,
1292 -+ plugins,
1293 -+ doNativeMotDet
1294 - );
1295 - Zone **zones = 0;
1296 - int n_zones = Zone::Load( monitors[i], zones );
1297 -@@ -2035,11 +2160,11 @@
1298 - static char sql[ZM_SQL_MED_BUFSIZ];
1299 - if ( !file[0] )
1300 - {
1301 -- strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'File'", sizeof(sql) );
1302 -+ strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, UsedPl, DoNativeMotDet from Monitors where Function != 'None' and Type = 'File'", sizeof(sql) );
1303 - }
1304 - else
1305 - {
1306 -- snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'File' and Path = '%s'", file );
1307 -+ snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, UsedPl, DoNativeMotDet from Monitors where Function != 'None' and Type = 'File' and Path = '%s'", file );
1308 - }
1309 - if ( mysql_query( &dbconn, sql ) )
1310 - {
1311 -@@ -2097,6 +2222,13 @@
1312 - int fps_report_interval = atoi(dbrow[col]); col++;
1313 - int ref_blend_perc = atoi(dbrow[col]); col++;
1314 - int track_motion = atoi(dbrow[col]); col++;
1315 -+
1316 -+ //============================================================================
1317 -+ std::string plugins = dbrow[col]; col++;
1318 -+ std::string sDoNativeMotDet = dbrow[col]; col++;
1319 -+ bool doNativeMotDet = !sDoNativeMotDet.compare("yes") ? true : false;
1320 -+ //============================================================================
1321 -+
1322 -
1323 - int cam_width = ((orientation==ROTATE_90||orientation==ROTATE_270)?height:width);
1324 - int cam_height = ((orientation==ROTATE_90||orientation==ROTATE_270)?width:height);
1325 -@@ -2139,7 +2271,11 @@
1326 - ref_blend_perc,
1327 - track_motion,
1328 - RGB_WHITE,
1329 -- purpose
1330 -+ purpose,
1331 -+ 0,
1332 -+ 0,
1333 -+ plugins,
1334 -+ doNativeMotDet
1335 - );
1336 - Zone **zones = 0;
1337 - int n_zones = Zone::Load( monitors[i], zones );
1338 -@@ -2163,11 +2299,11 @@
1339 - static char sql[ZM_SQL_MED_BUFSIZ];
1340 - if ( !file[0] )
1341 - {
1342 -- strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg'", sizeof(sql) );
1343 -+ strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, UsedPl, DoNativeMotDet from Monitors where Function != 'None' and Type = 'Ffmpeg'", sizeof(sql) );
1344 - }
1345 - else
1346 - {
1347 -- snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg' and Path = '%s'", file );
1348 -+ snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, UsedPl, DoNativeMotDet from Monitors where Function != 'None' and Type = 'Ffmpeg' and Path = '%s'", file );
1349 - }
1350 - if ( mysql_query( &dbconn, sql ) )
1351 - {
1352 -@@ -2225,6 +2361,13 @@
1353 - int fps_report_interval = atoi(dbrow[col]); col++;
1354 - int ref_blend_perc = atoi(dbrow[col]); col++;
1355 - int track_motion = atoi(dbrow[col]); col++;
1356 -+
1357 -+ //============================================================================
1358 -+ std::string plugins = dbrow[col]; col++;
1359 -+ std::string sDoNativeMotDet = dbrow[col]; col++;
1360 -+ bool doNativeMotDet = !sDoNativeMotDet.compare("yes") ? true : false;
1361 -+ //============================================================================
1362 -+
1363 -
1364 - int cam_width = ((orientation==ROTATE_90||orientation==ROTATE_270)?height:width);
1365 - int cam_height = ((orientation==ROTATE_90||orientation==ROTATE_270)?width:height);
1366 -@@ -2267,7 +2410,11 @@
1367 - ref_blend_perc,
1368 - track_motion,
1369 - RGB_WHITE,
1370 -- purpose
1371 -+ purpose,
1372 -+ 0,
1373 -+ 0,
1374 -+ plugins,
1375 -+ doNativeMotDet
1376 - );
1377 - Zone **zones = 0;
1378 - int n_zones = Zone::Load( monitors[i], zones );
1379 -@@ -2288,8 +2435,9 @@
1380 -
1381 - Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose )
1382 - {
1383 -+Info("Load monitor %d, purpose = %d", id, purpose);
1384 - static char sql[ZM_SQL_MED_BUFSIZ];
1385 -- snprintf( sql, sizeof(sql), "select Id, Name, Type, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, Protocol, Method, Host, Port, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Id = %d", id );
1386 -+ snprintf( sql, sizeof(sql), "select Id, Name, Type, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, Protocol, Method, Host, Port, Path, Width, Height, Palette, Orientation+0, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, TrackMotion, UsedPl, DoNativeMotDet, SignalCheckColour from Monitors where Id = %d", id );
1387 - if ( mysql_query( &dbconn, sql ) )
1388 - {
1389 - Error( "Can't run query: %s", mysql_error( &dbconn ) );
1390 -@@ -2305,6 +2453,7 @@
1391 - int n_monitors = mysql_num_rows( result );
1392 - Debug( 1, "Got %d monitors", n_monitors );
1393 - Monitor *monitor = 0;
1394 -+
1395 - for( int i = 0; MYSQL_ROW dbrow = mysql_fetch_row( result ); i++ )
1396 - {
1397 - int col = 0;
1398 -@@ -2354,6 +2503,13 @@
1399 - int fps_report_interval = atoi(dbrow[col]); col++;
1400 - int ref_blend_perc = atoi(dbrow[col]); col++;
1401 - int track_motion = atoi(dbrow[col]); col++;
1402 -+
1403 -+ //============================================================================
1404 -+ std::string plugins = dbrow[col]; col++;
1405 -+ std::string sDoNativeMotDet = dbrow[col]; col++;
1406 -+ bool doNativeMotDet = !sDoNativeMotDet.compare("yes") ? true : false;
1407 -+ //============================================================================
1408 -+
1409 - int signal_check_colour;
1410 - if ( dbrow[col][0] == '#' )
1411 - signal_check_colour = strtol(dbrow[col]+1,0,16);
1412 -@@ -2496,7 +2652,11 @@
1413 - ref_blend_perc,
1414 - track_motion,
1415 - signal_check_colour,
1416 -- purpose
1417 -+ purpose,
1418 -+ 0,
1419 -+ 0,
1420 -+ plugins,
1421 -+ doNativeMotDet
1422 - );
1423 -
1424 - int n_zones = 0;
1425 -@@ -2680,6 +2840,166 @@
1426 - return( false );
1427 - }
1428 -
1429 -+//-----------------------------------------
1430 -+
1431 -+bool Monitor::OurCheckAlarms( Zone *zone, const Image *pImage )
1432 -+{
1433 -+ Info("Entering OurCheckAlarms >>>>>>>>>>>>>>>>>>>>>>>>>>>>");
1434 -+ unsigned char black_thr = 23;
1435 -+ int min_alarm_score = 10;
1436 -+ int max_alarm_score = 99;
1437 -+ //bool alarm = false;
1438 -+ unsigned int score;
1439 -+ Polygon zone_polygon = zone->GetPolygon();
1440 -+ Info("Got polygon of a zone. It has %d vertices.", zone_polygon.getNumCoords());
1441 -+
1442 -+ zone->ResetStats();
1443 -+ Info("ResetStats done.");
1444 -+
1445 -+ if ( !zone->CheckOverloadCount() )
1446 -+ {
1447 -+ Info("CheckOverloadCount() return false, we'll return false.");
1448 -+ return( false );
1449 -+ }
1450 -+
1451 -+ Image *pMaskImage = new Image(pImage->Width(), pImage->Height(), 1);
1452 -+ Info("Mask image created.");
1453 -+
1454 -+ pMaskImage->Fill(BLACK);
1455 -+ Info("Mask image filled with BLACK.");
1456 -+
1457 -+ if (pImage->Colours() == 1)
1458 -+ {
1459 -+ Info("Analysed image is not colored! Set score = 0.");
1460 -+ score = 0;
1461 -+ }
1462 -+ else
1463 -+ {
1464 -+ Info("Start processing image.");
1465 -+ //Process image
1466 -+ unsigned char *buffer = pImage->Buffer();
1467 -+ unsigned char *mask_buffer = pMaskImage->Buffer();
1468 -+
1469 -+ int black_pixels_count = 0;
1470 -+ Info("Loop for black pixels counting and mask filling.");
1471 -+
1472 -+ while (buffer < (pImage->Buffer() + pImage->Size()))
1473 -+ {
1474 -+ if ( (RED(buffer) < black_thr) && (GREEN(buffer) < black_thr) && (BLUE(buffer) < black_thr) )
1475 -+ {
1476 -+ *mask_buffer = WHITE;
1477 -+ black_pixels_count++;
1478 -+ }
1479 -+ buffer += 3;
1480 -+ mask_buffer++;
1481 -+ }
1482 -+
1483 -+ if ( !black_pixels_count )
1484 -+ {
1485 -+ delete pMaskImage;
1486 -+ return( false );
1487 -+ }
1488 -+
1489 -+ score = (100*black_pixels_count)/zone_polygon.Area();
1490 -+ Info("Number of black pixels is %d, zone polygon area is %d, score is %d", black_pixels_count, zone_polygon.Area(), score);
1491 -+
1492 -+ if ( min_alarm_score && ( score < min_alarm_score) )
1493 -+ {
1494 -+ delete pMaskImage;
1495 -+ return( false );
1496 -+ }
1497 -+ if ( max_alarm_score && (score > max_alarm_score) )
1498 -+ {
1499 -+ zone->SetOverloadCount(zone->GetOverloadFrames());
1500 -+ delete pMaskImage;
1501 -+ return( false );
1502 -+ }
1503 -+ }
1504 -+
1505 -+ zone->SetScore(score);
1506 -+ Info("Score have been set in zone.");
1507 -+
1508 -+ //Get mask
1509 -+ Rgb alarm_colour = RGB_RED;
1510 -+ Image *tempImage = pMaskImage->HighlightEdges(alarm_colour, &zone_polygon.Extent() );
1511 -+ Info("After HighlightEdges");
1512 -+
1513 -+ zone->SetAlarmImage(tempImage);
1514 -+ Info("After SetAlarmImage");
1515 -+ delete pMaskImage;
1516 -+ Info("After Delete pMaskImage");
1517 -+ delete tempImage;
1518 -+
1519 -+ Info("Leaving OurCheckAlarms >>>>>>>>>>>>>>>>>>>>>>>>>>>>");
1520 -+ return true;
1521 -+}
1522 -+
1523 -+
1524 -+unsigned int Monitor::DetectBlack(const Image &comp_image, Event::StringSet &zoneSet )
1525 -+{
1526 -+ Info("Entering DetectBlack >>>>>>>>>>>>>>>>>>>>>>>>>>");
1527 -+ bool alarm = false;
1528 -+ unsigned int score = 0;
1529 -+
1530 -+ if ( n_zones <= 0 ) return( alarm );
1531 -+
1532 -+// Coord alarm_centre;
1533 -+// int top_score = -1;
1534 -+
1535 -+ // Find all alarm pixels in active zones
1536 -+ Info("Number of zones to process %d", n_zones);
1537 -+ for ( int n_zone = 0; n_zone < n_zones; n_zone++ )
1538 -+ {
1539 -+ Zone *zone = zones[n_zone];
1540 -+ if ( !zone->IsActive() )
1541 -+ {
1542 -+ continue;
1543 -+ }
1544 -+ Debug( 3, "Checking active zone %s", zone->Label() );
1545 -+ Info( "Checking active zone %s", zone->Label() );
1546 -+ if ( OurCheckAlarms( zone, &comp_image ) )
1547 -+ {
1548 -+ Info("OurCheckAlarm is TRUE!!!!!!");
1549 -+ alarm = true;
1550 -+ score += zone->Score();
1551 -+ zone->SetAlarm();
1552 -+ Debug( 3, "Zone is alarmed, zone score = %d", zone->Score() );
1553 -+ Info( "Zone is alarmed, zone score = %d", zone->Score() );
1554 -+ zoneSet.insert( zone->Label() );
1555 -+// if ( config.opt_control && track_motion )
1556 -+// {
1557 -+// if ( (int)zone->Score() > top_score )
1558 -+// {
1559 -+// top_score = zone->Score();
1560 -+// alarm_centre = zone->GetAlarmCentre();
1561 -+// }
1562 -+// }
1563 -+ }
1564 -+ Info( "Finish checking active zone %s", zone->Label() );
1565 -+ }
1566 -+
1567 -+
1568 -+// if ( top_score > 0 )
1569 -+// {
1570 -+// shared_data->alarm_x = alarm_centre.X();
1571 -+// shared_data->alarm_y = alarm_centre.Y();
1572 -+//
1573 -+// Info( "Got alarm centre at %d,%d, at count %d", shared_data->alarm_x, shared_data->alarm_y, image_count );
1574 -+// }
1575 -+// else
1576 -+// {
1577 -+// shared_data->alarm_x = shared_data->alarm_y = -1;
1578 -+// }
1579 -+
1580 -+ // This is a small and innocent hack to prevent scores of 0 being returned in alarm state
1581 -+ Info("Leaving DetectBlack <<<<<<<<<<<<<<<<<<<<<<<<<<<");
1582 -+ return( score?score:alarm );
1583 -+}
1584 -+
1585 -+
1586 -+//-----------------------------------------------------------------------------------------------
1587 -+
1588 -+
1589 - unsigned int Monitor::DetectMotion( const Image &comp_image, Event::StringSet &zoneSet )
1590 - {
1591 - bool alarm = false;
1592 -diff -aurN zoneminder/trunk/src/zm_monitor.h zoneminder_new/trunk/src/zm_monitor.h
1593 ---- zoneminder/trunk/src/zm_monitor.h 2011-04-01 17:08:30.000000000 +0200
1594 -+++ zoneminder_new/trunk/src/zm_monitor.h 2011-04-01 17:10:30.000000000 +0200
1595 -@@ -20,6 +20,9 @@
1596 - #ifndef ZM_MONITOR_H
1597 - #define ZM_MONITOR_H
1598 -
1599 -+#include <vector>
1600 -+#include <sstream>
1601 -+
1602 - #include "zm.h"
1603 - #include "zm_coord.h"
1604 - #include "zm_image.h"
1605 -@@ -27,6 +30,9 @@
1606 - #include "zm_event.h"
1607 - #include "zm_camera.h"
1608 -
1609 -+#include "zm_plugin_manager.h"
1610 -+#include "zm_image_analyser.h"
1611 -+
1612 - #include <sys/time.h>
1613 -
1614 - #define SIGNAL_CAUSE "Signal"
1615 -@@ -124,6 +130,13 @@
1616 - Image *image;
1617 - };
1618 -
1619 -+ //=========================================================================
1620 -+ PluginManager ThePluginManager;
1621 -+
1622 -+ std::vector<std::string> m_sPluginNames;
1623 -+ bool m_bDoNativeMotDet;
1624 -+ //============================================================================
1625 -+
1626 - class MonitorLink
1627 - {
1628 - protected:
1629 -@@ -253,7 +266,10 @@
1630 - MonitorLink **linked_monitors;
1631 -
1632 - public:
1633 -- Monitor( int p_id, const char *p_name, int p_function, bool p_enabled, const char *p_linked_monitors, Camera *p_camera, int p_orientation, const char *p_event_prefix, const char *p_label_format, const Coord &p_label_coord, int p_image_buffer_count, int p_warmup_count, int p_pre_event_count, int p_post_event_count, int p_stream_replay_buffer, int p_alarm_frame_count, int p_section_length, int p_frame_skip, int p_capture_delay, int p_alarm_capture_delay, int p_fps_report_interval, int p_ref_blend_perc, bool p_track_motion, Rgb p_signal_check_colour, Purpose p_purpose, int p_n_zones=0, Zone *p_zones[]=0 );
1634 -+//============================================================================
1635 -+bool OurCheckAlarms( Zone *zone, const Image *pImage );
1636 -+//============================================================================
1637 -+ Monitor( int p_id, const char *p_name, int p_function, bool p_enabled, const char *p_linked_monitors, Camera *p_camera, int p_orientation, const char *p_event_prefix, const char *p_label_format, const Coord &p_label_coord, int p_image_buffer_count, int p_warmup_count, int p_pre_event_count, int p_post_event_count, int p_stream_replay_buffer, int p_alarm_frame_count, int p_section_length, int p_frame_skip, int p_capture_delay, int p_alarm_capture_delay, int p_fps_report_interval, int p_ref_blend_perc, bool p_track_motion, Rgb p_signal_check_colour, Purpose p_purpose, int p_n_zones=0, Zone *p_zones[]=0, std::string plugins = "", bool p_DoNativeMotDect = 1);
1638 - ~Monitor();
1639 -
1640 - void AddZones( int p_n_zones, Zone *p_zones[] );
1641 -@@ -342,6 +358,9 @@
1642 - }
1643 -
1644 - unsigned int DetectMotion( const Image &comp_image, Event::StringSet &zoneSet );
1645 -+ //==============================================================================
1646 -+ unsigned int DetectBlack( const Image &comp_image, Event::StringSet &zoneSet );
1647 -+ //==============================================================================
1648 - bool CheckSignal( const Image *image );
1649 - bool Analyse();
1650 - void DumpImage( Image *dump_image ) const;
1651 -diff -aurN zoneminder/trunk/src/zm_plugin.cpp zoneminder_new/trunk/src/zm_plugin.cpp
1652 ---- zoneminder/trunk/src/zm_plugin.cpp 1970-01-01 01:00:00.000000000 +0100
1653 -+++ zoneminder_new/trunk/src/zm_plugin.cpp 2011-04-01 17:10:30.000000000 +0200
1654 -@@ -0,0 +1,103 @@
1655 -+#include "zm_plugin.h"
1656 -+
1657 -+
1658 -+
1659 -+/*!\fn Plugin::Plugin(const std::string &sFilename)
1660 -+ * \param sFilename is the name of plugin file to load
1661 -+ */
1662 -+Plugin::Plugin(const std::string &sFilename)
1663 -+ : m_hDLL(0),
1664 -+ m_pfnGetEngineVersion(0),
1665 -+ m_pfnRegisterPlugin(0),
1666 -+ m_pDLLRefCount(0),
1667 -+ m_sPluginFileName(sFilename)
1668 -+{
1669 -+
1670 -+ // Try to load the plugin as a dynamic library
1671 -+ m_hDLL = dlopen(sFilename.c_str(), RTLD_LAZY|RTLD_GLOBAL);
1672 -+
1673 -+ if(!m_hDLL) // if library hasn't been loaded successfully
1674 -+ {
1675 -+ throw runtime_error(string("Could not load '") + sFilename + "'");
1676 -+ }
1677 -+
1678 -+ // Locate the plugin's exported functions
1679 -+ try
1680 -+ {
1681 -+ m_pfnGetEngineVersion = reinterpret_cast<fnGetEngineVersion *>(dlsym(m_hDLL, "getEngineVersion"));
1682 -+ m_pfnRegisterPlugin = reinterpret_cast<fnRegisterPlugin *>(dlsym(m_hDLL, "registerPlugin"));
1683 -+
1684 -+ // If the functions aren't found, we're going to assume this is
1685 -+ // a plain simple DLL and not one of our plugins
1686 -+ if(!m_pfnGetEngineVersion || ! m_pfnRegisterPlugin)
1687 -+ throw runtime_error(string("'") + sFilename + "' is not a valid plugin");
1688 -+
1689 -+ // Initialize a new DLL reference counter
1690 -+ m_pDLLRefCount = new size_t(1);
1691 -+ }
1692 -+ catch(runtime_error &ex)
1693 -+ {
1694 -+ dlclose(m_hDLL);
1695 -+ throw ex;
1696 -+ }
1697 -+ catch(...)
1698 -+ {
1699 -+ dlclose(m_hDLL);
1700 -+ throw runtime_error(string("Unknown exception while loading plugin '") + sFilename + string("'"));
1701 -+ }
1702 -+}
1703 -+
1704 -+
1705 -+
1706 -+/*!\fn Plugin::Plugin(const Plugin &Other)
1707 -+ * \param Other is the other plugin instance to copy
1708 -+ */
1709 -+Plugin::Plugin(const Plugin &Other)
1710 -+ : m_hDLL(Other.m_hDLL),
1711 -+ m_pfnGetEngineVersion(Other.m_pfnGetEngineVersion),
1712 -+ m_pfnRegisterPlugin(Other.m_pfnRegisterPlugin),
1713 -+ m_pDLLRefCount(Other.m_pDLLRefCount),
1714 -+ m_sPluginFileName(Other.m_sPluginFileName)
1715 -+{
1716 -+ // Increase DLL reference counter
1717 -+ ++*m_pDLLRefCount;
1718 -+}
1719 -+
1720 -+
1721 -+
1722 -+/*!\fn Plugin::operator=(const Plugin &Other)
1723 -+ * \param Other is the other plugin instance to copy
1724 -+ * return copy of object
1725 -+ */
1726 -+Plugin& Plugin::operator=(const Plugin &Other)
1727 -+{
1728 -+ m_hDLL = Other.m_hDLL;
1729 -+ m_pfnGetEngineVersion = Other.m_pfnGetEngineVersion;
1730 -+ m_pfnRegisterPlugin = Other.m_pfnRegisterPlugin;
1731 -+ m_pDLLRefCount = Other.m_pDLLRefCount;
1732 -+ m_sPluginFileName = Other.m_sPluginFileName;
1733 -+ // Increase DLL reference counter
1734 -+ ++*m_pDLLRefCount;
1735 -+}
1736 -+
1737 -+
1738 -+
1739 -+Plugin::~Plugin()
1740 -+{
1741 -+ // Only unload the DLL if there are no more references to it
1742 -+ if(!--*m_pDLLRefCount)
1743 -+ {
1744 -+ delete m_pDLLRefCount;
1745 -+ dlclose(m_hDLL);
1746 -+ }
1747 -+}
1748 -+
1749 -+
1750 -+
1751 -+/*!\fn Plugin::registerPlugin(PluginManager &K)
1752 -+ * \param K is the pointer to plugin manager
1753 -+ */
1754 -+void Plugin::registerPlugin(PluginManager &K)
1755 -+{
1756 -+ m_pfnRegisterPlugin(K, m_sPluginFileName);
1757 -+}
1758 -diff -aurN zoneminder/trunk/src/zm_plugin.h zoneminder_new/trunk/src/zm_plugin.h
1759 ---- zoneminder/trunk/src/zm_plugin.h 1970-01-01 01:00:00.000000000 +0100
1760 -+++ zoneminder_new/trunk/src/zm_plugin.h 2011-04-01 17:10:30.000000000 +0200
1761 -@@ -0,0 +1,78 @@
1762 -+#ifndef ZM_PLUGIN_H
1763 -+#define ZM_PLUGIN_H
1764 -+
1765 -+
1766 -+
1767 -+#include <stdlib.h>
1768 -+#include <stdio.h>
1769 -+#include <dlfcn.h>
1770 -+
1771 -+#include <stdexcept>
1772 -+#include "zm.h"
1773 -+
1774 -+
1775 -+
1776 -+using namespace std;
1777 -+
1778 -+
1779 -+
1780 -+class PluginManager;
1781 -+
1782 -+
1783 -+
1784 -+//! Signature for the version query function
1785 -+typedef int fnGetEngineVersion();
1786 -+
1787 -+//! Signature for the plugin's registration function
1788 -+typedef void fnRegisterPlugin(PluginManager &, string);
1789 -+
1790 -+
1791 -+
1792 -+//! Representation of a plugin.
1793 -+/*! Use for loading plugin's shared library
1794 -+ * and registration of it to the PluginManager.
1795 -+ */
1796 -+class Plugin
1797 -+{
1798 -+
1799 -+public:
1800 -+
1801 -+ //! Initialize and load plugin
1802 -+ Plugin(const std::string &sFilename);
1803 -+
1804 -+ //! Copy existing plugin instance
1805 -+ Plugin(const Plugin &Other);
1806 -+
1807 -+ //! Operator =.
1808 -+ Plugin &operator =(const Plugin &Other);
1809 -+
1810 -+ //! Unload a plugin
1811 -+ ~Plugin();
1812 -+
1813 -+ //! Query the plugin for its expected engine version
1814 -+ int getEngineVersion() const { return m_pfnGetEngineVersion();}
1815 -+
1816 -+ //! Register the plugin to a PluginManager
1817 -+ void registerPlugin(PluginManager &K);
1818 -+
1819 -+private:
1820 -+
1821 -+ //! Shared file name.
1822 -+ string m_sPluginFileName;
1823 -+
1824 -+ //! DLL handle
1825 -+ void* m_hDLL;
1826 -+
1827 -+ //! Number of references to the DLL
1828 -+ size_t *m_pDLLRefCount;
1829 -+
1830 -+ //! Version query function
1831 -+ fnGetEngineVersion *m_pfnGetEngineVersion;
1832 -+
1833 -+ //! Plugin registration function
1834 -+ fnRegisterPlugin *m_pfnRegisterPlugin;
1835 -+};
1836 -+
1837 -+
1838 -+
1839 -+#endif //ZM_PLUGIN_H
1840 -diff -aurN zoneminder/trunk/src/zm_plugin_manager.cpp zoneminder_new/trunk/src/zm_plugin_manager.cpp
1841 ---- zoneminder/trunk/src/zm_plugin_manager.cpp 1970-01-01 01:00:00.000000000 +0100
1842 -+++ zoneminder_new/trunk/src/zm_plugin_manager.cpp 2011-04-01 17:10:30.000000000 +0200
1843 -@@ -0,0 +1,118 @@
1844 -+#include "zm_plugin_manager.h"
1845 -+
1846 -+
1847 -+
1848 -+/*! \fn file_select(const struct direct *entry)
1849 -+ * A functor for selection of files with specified extension.
1850 -+ * \param entry is file structure
1851 -+ * \return 1 if file match selection criteria and
1852 -+ * 0 otherwise.
1853 -+ * NOTE: file extension is specified by PluginManager::m_sPluginExt
1854 -+ * static variable.
1855 -+ */
1856 -+int file_select(const struct direct *entry)
1857 -+{
1858 -+ char *ptr;
1859 -+
1860 -+ if ((strcmp(entry->d_name, ".")== 0) || (strcmp(entry->d_name, "..") == 0))
1861 -+ return 0;
1862 -+
1863 -+ // Check for filename extensions.
1864 -+ ptr = rindex((char*)entry->d_name, '.');
1865 -+ if ((ptr != NULL) && (strcmp(ptr, (PluginManager::m_sPluginExt).c_str()) == 0))
1866 -+ return 1;
1867 -+ else
1868 -+ return 0;
1869 -+}
1870 -+
1871 -+
1872 -+
1873 -+
1874 -+/*! \fn join_paths(const string& p1, const string& p2)
1875 -+ * \param p1 is the first part of desired path
1876 -+ * \param p2 is the second part of desired path
1877 -+ * \return joined path string.
1878 -+ */
1879 -+string join_paths(const string& p1, const string& p2)
1880 -+{
1881 -+ char sep = '/';
1882 -+ string tmp = p1;
1883 -+
1884 -+#ifdef _WIN32
1885 -+ sep = '\\';
1886 -+#endif
1887 -+
1888 -+ if (p1[p1.length()] != sep)
1889 -+ { // Need to add a path separator
1890 -+ tmp += sep;
1891 -+ return(tmp + p2);
1892 -+ }
1893 -+ else
1894 -+ return(p1 + p2);
1895 -+}
1896 -+
1897 -+
1898 -+
1899 -+string PluginManager::m_sPluginExt = DEFAULT_PLUGIN_EXT;
1900 -+
1901 -+
1902 -+PluginManager::PluginManager()
1903 -+{
1904 -+}
1905 -+
1906 -+
1907 -+
1908 -+/*!\fn PluginManager::loadPlugin(const string &sFilename))
1909 -+ * \param sFilename is the name of plugin file to load
1910 -+ */
1911 -+void PluginManager::loadPlugin(const string &sFilename)
1912 -+{
1913 -+ try
1914 -+ {
1915 -+ if(m_LoadedPlugins.find(sFilename) == m_LoadedPlugins.end())
1916 -+ m_LoadedPlugins.insert(PluginMap::value_type(sFilename, Plugin(sFilename))).first->second.registerPlugin(*this);
1917 -+ }
1918 -+ catch(runtime_error &ex)
1919 -+ {
1920 -+ Info("Runtime error: %s", ex.what());
1921 -+ }
1922 -+ catch(...)
1923 -+ {
1924 -+ Info("Unknown exception. Could not load %s.", sFilename.c_str());
1925 -+ }
1926 -+}
1927 -+
1928 -+
1929 -+
1930 -+/*!\fn PluginManager::findPlugins(const string &sPath)
1931 -+ * \param sPath is the path to folder to search plugins
1932 -+ * return count of found plugins
1933 -+ */
1934 -+int PluginManager::findPlugins(const string &sPath)
1935 -+{
1936 -+
1937 -+ struct direct **files;
1938 -+
1939 -+ int count = scandir(sPath.c_str(), &files, file_select, alphasort);
1940 -+
1941 -+ for (int i = 1; i < count + 1; ++i)
1942 -+ {
1943 -+ string sFileName = files[i-1]->d_name;
1944 -+ string sFullPath = join_paths(sPath, sFileName);
1945 -+
1946 -+ Info("Loading plugin %s ... ", sFullPath.c_str());
1947 -+
1948 -+ loadPlugin(sFullPath);
1949 -+ }
1950 -+
1951 -+ return count;
1952 -+}
1953 -+
1954 -+
1955 -+/*!\fn PluginManager::configurePlugins(string sConfigFileName)
1956 -+ * \param sConfigFileName is the path to the configuration file, where parameters for all plugins are given.
1957 -+ */
1958 -+void PluginManager::configurePlugins(string sConfigFileName)
1959 -+{
1960 -+ m_ImageAnalyser.configurePlugins(sConfigFileName);
1961 -+}
1962 -diff -aurN zoneminder/trunk/src/zm_plugin_manager.h zoneminder_new/trunk/src/zm_plugin_manager.h
1963 ---- zoneminder/trunk/src/zm_plugin_manager.h 1970-01-01 01:00:00.000000000 +0100
1964 -+++ zoneminder_new/trunk/src/zm_plugin_manager.h 2011-04-01 17:10:30.000000000 +0200
1965 -@@ -0,0 +1,85 @@
1966 -+#ifndef ZM_PLUGIN_MANAGER_H
1967 -+#define ZM_PLUGIN_MANAGER_H
1968 -+
1969 -+
1970 -+
1971 -+#include <stdio.h>
1972 -+#include <stdlib.h>
1973 -+#include <string>
1974 -+#include <map>
1975 -+#include <sys/types.h>
1976 -+#include <sys/dir.h>
1977 -+#include <sys/param.h>
1978 -+#include <unistd.h>
1979 -+
1980 -+#include "zm.h"
1981 -+#include "zm_image_analyser.h"
1982 -+#include "zm_detector.h"
1983 -+#include "zm_plugin.h"
1984 -+
1985 -+
1986 -+
1987 -+using namespace std;
1988 -+
1989 -+
1990 -+#define ZM_ENGINE_VERSION 24
1991 -+#define DEFAULT_PLUGIN_EXT ".zmpl"
1992 -+
1993 -+
1994 -+
1995 -+//! Map of plugins by their associated file names.
1996 -+typedef std::map<std::string, Plugin> PluginMap;
1997 -+
1998 -+
1999 -+//! External function for sorting of files in directory.
2000 -+extern int alphasort();
2001 -+
2002 -+
2003 -+//! Function to select files with plugins by extension.
2004 -+int file_select(const struct direct *entry);
2005 -+
2006 -+
2007 -+//! Join two path strings.
2008 -+string join_paths(const string& p1, const string& p2);
2009 -+
2010 -+
2011 -+
2012 -+//! Class for managing all loaded plugins.
2013 -+class PluginManager
2014 -+{
2015 -+
2016 -+public:
2017 -+
2018 -+ //! Default constructor.
2019 -+ PluginManager();
2020 -+
2021 -+ //! Access the image analyser.
2022 -+ ImageAnalyser &getImageAnalyser() {return m_ImageAnalyser;}
2023 -+
2024 -+ //! Loads a plugin.
2025 -+ void loadPlugin(const string &sFilename);
2026 -+
2027 -+ //! Find and load all plugins from given directory, returns number of found plugins.
2028 -+ int findPlugins(const string &sPath);
2029 -+
2030 -+ //! Configure all loaded plugins using given configuration file.
2031 -+ void configurePlugins(string sConfigFileName);
2032 -+
2033 -+ //! Set plugin extension.
2034 -+ void setPluginExt(string sPluginExt) { m_sPluginExt = sPluginExt; }
2035 -+
2036 -+ //! Extension for zm plugins.
2037 -+ static string m_sPluginExt;
2038 -+
2039 -+private:
2040 -+
2041 -+ //! All plugins currently loaded.
2042 -+ PluginMap m_LoadedPlugins;
2043 -+
2044 -+ //! The image analyser.
2045 -+ ImageAnalyser m_ImageAnalyser;
2046 -+};
2047 -+
2048 -+
2049 -+
2050 -+#endif //ZM_PLUGIN_MANAGER_H
2051 -diff -aurN zoneminder/trunk/src/zm_utils.h zoneminder_new/trunk/src/zm_utils.h
2052 ---- zoneminder/trunk/src/zm_utils.h 2011-04-01 17:08:30.000000000 +0200
2053 -+++ zoneminder_new/trunk/src/zm_utils.h 2011-04-01 17:10:30.000000000 +0200
2054 -@@ -22,6 +22,7 @@
2055 -
2056 - #include <string>
2057 - #include <vector>
2058 -+#include <stdio.h>
2059 -
2060 - typedef std::vector<std::string> StringVector;
2061 -
2062 -diff -aurN zoneminder/trunk/src/zm_zone.cpp zoneminder_new/trunk/src/zm_zone.cpp
2063 ---- zoneminder/trunk/src/zm_zone.cpp 2011-04-01 17:08:30.000000000 +0200
2064 -+++ zoneminder_new/trunk/src/zm_zone.cpp 2011-04-01 17:10:30.000000000 +0200
2065 -@@ -113,6 +113,48 @@
2066 - }
2067 - }
2068 -
2069 -+//=============================================================================
2070 -+bool Zone::CheckOverloadCount()
2071 -+{
2072 -+ Info("Overloaded count: %d, Overloaded frames: %d", overload_count, overload_frames);
2073 -+ if ( overload_count )
2074 -+ {
2075 -+ Info( "In overload mode, %d frames of %d remaining", overload_count, overload_frames );
2076 -+ Debug( 4, "In overload mode, %d frames of %d remaining", overload_count, overload_frames );
2077 -+ overload_count--;
2078 -+ return( false );
2079 -+ }
2080 -+ return true;
2081 -+}
2082 -+
2083 -+void Zone::SetScore(unsigned int nScore)
2084 -+{
2085 -+ score = nScore;
2086 -+}
2087 -+
2088 -+
2089 -+void Zone::SetAlarmImage(const Image* srcImage)
2090 -+{
2091 -+ delete image;
2092 -+ image = new Image(*srcImage);
2093 -+}
2094 -+
2095 -+int Zone::GetOverloadCount()
2096 -+{
2097 -+ return overload_count;
2098 -+}
2099 -+
2100 -+void Zone::SetOverloadCount(int nOverCount)
2101 -+{
2102 -+ overload_count = nOverCount;
2103 -+}
2104 -+
2105 -+int Zone::GetOverloadFrames()
2106 -+{
2107 -+ return overload_frames;
2108 -+}
2109 -+//===========================================================================
2110 -+
2111 - bool Zone::CheckAlarms( const Image *delta_image )
2112 - {
2113 - bool alarm = false;
2114 -diff -aurN zoneminder/trunk/src/zm_zone.h zoneminder_new/trunk/src/zm_zone.h
2115 ---- zoneminder/trunk/src/zm_zone.h 2011-04-01 17:08:30.000000000 +0200
2116 -+++ zoneminder_new/trunk/src/zm_zone.h 2011-04-01 17:10:30.000000000 +0200
2117 -@@ -147,6 +147,17 @@
2118 - static bool ParsePolygonString( const char *polygon_string, Polygon &polygon );
2119 - static bool ParseZoneString( const char *zone_string, int &zone_id, int &colour, Polygon &polygon );
2120 - static int Load( Monitor *monitor, Zone **&zones );
2121 -+
2122 -+ //=================================================
2123 -+ bool CheckOverloadCount();
2124 -+ int GetOverloadCount();
2125 -+ void SetOverloadCount(int nOverCount);
2126 -+ int GetOverloadFrames();
2127 -+ void SetScore(unsigned int nScore);
2128 -+ void SetAlarmImage(const Image* srcImage);
2129 -+
2130 -+ inline const Image *getPgImage() const { return( pg_image ); }
2131 -+ inline const Range *getRanges() const { return( ranges ); }
2132 - };
2133 -
2134 - #endif // ZM_ZONE_H
2135 -diff -aurN zoneminder/trunk/web/lang/big5_big5.php zoneminder_new/trunk/web/lang/big5_big5.php
2136 ---- zoneminder/trunk/web/lang/big5_big5.php 2011-04-01 17:08:32.000000000 +0200
2137 -+++ zoneminder_new/trunk/web/lang/big5_big5.php 2011-04-01 17:10:30.000000000 +0200
2138 -@@ -260,6 +260,7 @@
2139 - 'DonateRemindNever' => 'No, I don\'t want to donate, never remind',
2140 - 'DonateRemindWeek' => 'Not yet, remind again in 1 week',
2141 - 'DonateYes' => 'Yes, I\'d like to donate now',
2142 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2143 - 'Download' => '下載',
2144 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2145 - 'Duration' => '歷時',
2146 -@@ -632,6 +633,7 @@
2147 - 'Update' => 'Update', // Added - 2009-02-08
2148 - 'UpdateAvailable' => 'An update to ZoneMinder is available.',
2149 - 'UpdateNotNecessary' => 'No update is necessary.',
2150 -+ 'UsedPlugins' => 'Used Plugins',
2151 - 'UseFilter' => 'Use Filter',
2152 - 'UseFilterExprsPost' => '&nbsp;filter&nbsp;expressions', // This is used at the end of the phrase 'use N filter expressions'
2153 - 'UseFilterExprsPre' => 'Use&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2154 -diff -aurN zoneminder/trunk/web/lang/cn_zh.php zoneminder_new/trunk/web/lang/cn_zh.php
2155 ---- zoneminder/trunk/web/lang/cn_zh.php 2011-04-01 17:08:32.000000000 +0200
2156 -+++ zoneminder_new/trunk/web/lang/cn_zh.php 2011-04-01 17:10:30.000000000 +0200
2157 -@@ -256,6 +256,7 @@
2158 - 'DonateRemindNever' => '不,我不打算捐款',
2159 - 'DonateRemindWeek' => '现在不,1星期内再次提醒我',
2160 - 'DonateYes' => '好,我现在就捐款',
2161 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2162 - 'Download' => '下载',
2163 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2164 - 'Duration' => 'Duration',
2165 -@@ -628,6 +629,7 @@
2166 - 'Update' => '更新',
2167 - 'UpdateAvailable' => '有新版本的ZoneMinder.',
2168 - 'UpdateNotNecessary' => '无须更新',
2169 -+ 'UsedPlugins' => 'Used Plugins',
2170 - 'UseFilter' => '使用筛选器',
2171 - 'UseFilterExprsPost' => '&nbsp;筛选器&nbsp;表达式', // This is used at the end of the phrase 'use N filter expressions'
2172 - 'UseFilterExprsPre' => '使用&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2173 -diff -aurN zoneminder/trunk/web/lang/cs_cz.php zoneminder_new/trunk/web/lang/cs_cz.php
2174 ---- zoneminder/trunk/web/lang/cs_cz.php 2011-04-01 17:08:32.000000000 +0200
2175 -+++ zoneminder_new/trunk/web/lang/cs_cz.php 2011-04-01 17:10:30.000000000 +0200
2176 -@@ -256,6 +256,7 @@
2177 - 'DonateRemindNever' => 'Ne, nechci podpoøit ZoneMinder, nepøipomínat',
2178 - 'DonateRemindWeek' => 'Nyní ne, pøipomenout za týden',
2179 - 'DonateYes' => 'Ano, chcit podpoøit ZoneMinder nyní',
2180 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2181 - 'Download' => 'Stáhnout',
2182 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2183 - 'Duration' => 'Prùbìh',
2184 -@@ -628,6 +629,7 @@
2185 - 'Update' => 'Update',
2186 - 'UpdateAvailable' => 'Je dostupný nový update ZoneMinder.',
2187 - 'UpdateNotNecessary' => 'Update není potøeba.',
2188 -+ 'UsedPlugins' => 'Used Plugins',
2189 - 'UseFilter' => 'Pou¾ít filtr',
2190 - 'UseFilterExprsPost' => '&nbsp;výrazù', // This is used at the end of the phrase 'use N filter expressions'
2191 - 'UseFilterExprsPre' => 'Pou¾ít&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2192 -diff -aurN zoneminder/trunk/web/lang/de_de.php zoneminder_new/trunk/web/lang/de_de.php
2193 ---- zoneminder/trunk/web/lang/de_de.php 2011-04-01 17:08:32.000000000 +0200
2194 -+++ zoneminder_new/trunk/web/lang/de_de.php 2011-04-01 17:10:30.000000000 +0200
2195 -@@ -256,6 +256,7 @@
2196 - 'DonateRemindNever' => 'Nein, ich m&ouml;chte nicht spenden, niemals erinnern.',
2197 - 'DonateRemindWeek' => 'Noch nicht, erinnere mich in einer Woche noch mal.',
2198 - 'DonateYes' => 'Ja, ich m&ouml;chte jetzt spenden.',
2199 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2200 - 'Download' => 'Download',
2201 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2202 - 'Duration' => 'Dauer',
2203 -@@ -628,6 +629,7 @@
2204 - 'Update' => 'Aktualisieren',
2205 - 'UpdateAvailable' => 'Eine Aktualisierung f&uuml;r ZoneMinder ist verf&uuml;gbar.',
2206 - 'UpdateNotNecessary' => 'Es ist keine Aktualisierung verf&uuml;gbar.',
2207 -+ 'UsedPlugins' => 'Used Plugins',
2208 - 'UseFilter' => 'Benutze Filter',
2209 - 'UseFilterExprsPost' => '&nbsp;Filter&nbsp;Ausdr&uuml;cke', // This is used at the end of the phrase 'use N filter expressions'
2210 - 'UseFilterExprsPre' => 'Benutze&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2211 -diff -aurN zoneminder/trunk/web/lang/dk_dk.php zoneminder_new/trunk/web/lang/dk_dk.php
2212 ---- zoneminder/trunk/web/lang/dk_dk.php 2011-04-01 17:08:32.000000000 +0200
2213 -+++ zoneminder_new/trunk/web/lang/dk_dk.php 2011-04-01 17:10:30.000000000 +0200
2214 -@@ -257,6 +257,7 @@
2215 - 'DonateRemindNever' => 'No, I don\'t want to donate, never remind',
2216 - 'DonateRemindWeek' => 'Not yet, remind again in 1 week',
2217 - 'DonateYes' => 'Yes, I\'d like to donate now',
2218 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2219 - 'Download' => 'Download',
2220 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2221 - 'Duration' => 'Forløb',
2222 -@@ -629,6 +630,7 @@
2223 - 'Update' => 'Update',
2224 - 'UpdateAvailable' => 'En updatering til ZoneMinder er tilstede.',
2225 - 'UpdateNotNecessary' => 'Ingen updatering er nødvendig.',
2226 -+ 'UsedPlugins' => 'Used Plugins',
2227 - 'UseFilter' => 'Brug Filter',
2228 - 'UseFilterExprsPost' => '&nbsp;filter&nbsp;expressions', // This is used at the end of the phrase 'use N filter expressions'
2229 - 'UseFilterExprsPre' => 'Brug&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2230 -diff -aurN zoneminder/trunk/web/lang/en_gb.php zoneminder_new/trunk/web/lang/en_gb.php
2231 ---- zoneminder/trunk/web/lang/en_gb.php 2011-04-01 17:08:32.000000000 +0200
2232 -+++ zoneminder_new/trunk/web/lang/en_gb.php 2011-04-01 17:10:30.000000000 +0200
2233 -@@ -257,6 +257,7 @@
2234 - 'DonateRemindNever' => 'No, I don\'t want to donate, never remind',
2235 - 'DonateRemindWeek' => 'Not yet, remind again in 1 week',
2236 - 'DonateYes' => 'Yes, I\'d like to donate now',
2237 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2238 - 'Download' => 'Download',
2239 - 'DuplicateMonitorName' => 'Duplicate Monitor Name',
2240 - 'Duration' => 'Duration',
2241 -@@ -628,6 +629,7 @@
2242 - 'UpdateAvailable' => 'An update to ZoneMinder is available.',
2243 - 'UpdateNotNecessary' => 'No update is necessary.',
2244 - 'Update' => 'Update',
2245 -+ 'UsedPlugins' => 'Used Plugins',
2246 - 'UseFilterExprsPost' => '&nbsp;filter&nbsp;expressions', // This is used at the end of the phrase 'use N filter expressions'
2247 - 'UseFilterExprsPre' => 'Use&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2248 - 'UseFilter' => 'Use Filter',
2249 -diff -aurN zoneminder/trunk/web/lang/es_ar.php zoneminder_new/trunk/web/lang/es_ar.php
2250 ---- zoneminder/trunk/web/lang/es_ar.php 2011-04-01 17:08:32.000000000 +0200
2251 -+++ zoneminder_new/trunk/web/lang/es_ar.php 2011-04-01 17:10:30.000000000 +0200
2252 -@@ -207,6 +207,7 @@
2253 - 'DonateRemindNever' => 'No, I don\'t want to donate, never remind',
2254 - 'DonateRemindWeek' => 'Not yet, remind again in 1 week',
2255 - 'DonateYes' => 'Yes, I\'d like to donate now',
2256 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2257 - 'Download' => 'Download',
2258 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2259 - 'Duration' => 'Duración',
2260 -@@ -579,6 +580,7 @@
2261 - 'Update' => 'Update',
2262 - 'UpdateAvailable' => 'Una Actualización a ZoneMinder esta disponible',
2263 - 'UpdateNotNecessary' => 'No se requiere Actualización',
2264 -+ 'UsedPlugins' => 'Used Plugins',
2265 - 'UseFilter' => 'Usar Filtro',
2266 - 'UseFilterExprsPost' => '&nbsp;filtrar&nbsp;sentencias', // This is used at the end of the phrase 'use N filter expressions'
2267 - 'UseFilterExprsPre' => 'Utilizar&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2268 -diff -aurN zoneminder/trunk/web/lang/fr_fr.php zoneminder_new/trunk/web/lang/fr_fr.php
2269 ---- zoneminder/trunk/web/lang/fr_fr.php 2011-04-01 17:08:32.000000000 +0200
2270 -+++ zoneminder_new/trunk/web/lang/fr_fr.php 2011-04-01 17:10:30.000000000 +0200
2271 -@@ -256,6 +256,7 @@
2272 - 'DonateRemindNever' => 'No, I don\'t want to donate, never remind',
2273 - 'DonateRemindWeek' => 'Not yet, remind again in 1 week',
2274 - 'DonateYes' => 'Yes, I\'d like to donate now',
2275 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2276 - 'Download' => 'Download',
2277 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2278 - 'Duration' => 'Durée',
2279 -@@ -628,6 +629,7 @@
2280 - 'Update' => 'Update',
2281 - 'UpdateAvailable' => 'Mise à jour de ZM dispo.',
2282 - 'UpdateNotNecessary' => 'Pas de mise à jour dispo.',
2283 -+ 'UsedPlugins' => 'Utiliser des Plugins',
2284 - 'UseFilter' => 'Util. Filtre',
2285 - 'UseFilterExprsPost' => '&nbsp;filter&nbsp;expressions', // This is used at the end of the phrase 'use N filter expressions'
2286 - 'UseFilterExprsPre' => 'Util.&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2287 -diff -aurN zoneminder/trunk/web/lang/he_il.php zoneminder_new/trunk/web/lang/he_il.php
2288 ---- zoneminder/trunk/web/lang/he_il.php 2011-04-01 17:08:32.000000000 +0200
2289 -+++ zoneminder_new/trunk/web/lang/he_il.php 2011-04-01 17:10:30.000000000 +0200
2290 -@@ -256,6 +256,7 @@
2291 - 'DonateRemindNever' => 'ìà, àðé ìà øåöä ìúøåí, àì úúæëø àåúé',
2292 - 'DonateRemindWeek' => 'òãééï ìà, äæëø ìé áòåã ùáåò àçã',
2293 - 'DonateYes' => 'ëï, àðé îòåðééï ìúøåí òëùéå',
2294 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2295 - 'Download' => 'äåøã',
2296 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2297 - 'Duration' => 'îùê æîï',
2298 -@@ -628,6 +629,7 @@
2299 - 'Update' => 'òãëåï',
2300 - 'UpdateAvailable' => 'òãëåï ìæåï-îéðãø àôùøé.',
2301 - 'UpdateNotNecessary' => 'òãëåï àéðå äëøçé.',
2302 -+ 'UsedPlugins' => 'Used Plugins',
2303 - 'UseFilter' => 'ùéîåù áîñðï',
2304 - 'UseFilterExprsPost' => '&nbsp;filter&nbsp;expressions', // This is used at the end of the phrase 'use N filter expressions'
2305 - 'UseFilterExprsPre' => 'ùéîåù&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2306 -diff -aurN zoneminder/trunk/web/lang/hu_hu.php zoneminder_new/trunk/web/lang/hu_hu.php
2307 ---- zoneminder/trunk/web/lang/hu_hu.php 2011-04-01 17:08:32.000000000 +0200
2308 -+++ zoneminder_new/trunk/web/lang/hu_hu.php 2011-04-01 17:10:30.000000000 +0200
2309 -@@ -265,6 +265,7 @@
2310 - 'DonateRemindNever' => 'Nem akarom támogatni, ne is emlékeztess',
2311 - 'DonateRemindWeek' => 'Nem most, figyelmeztess 1 hét múlva',
2312 - 'DonateYes' => 'Igen, most szeretném támogatni',
2313 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2314 - 'Download' => 'Letölt',
2315 - 'DuplicateMonitorName' => 'Monitor nevének duplikálása',
2316 - 'Duration' => 'Idõtartam',
2317 -@@ -637,6 +638,7 @@
2318 - 'Update' => 'Frissítés',
2319 - 'UpdateAvailable' => 'Elérhetõ ZoneMinder frissítés.',
2320 - 'UpdateNotNecessary' => 'Nem szükséges a frissítés.',
2321 -+ 'UsedPlugins' => 'Used Plugins',
2322 - 'UseFilter' => 'Szûrõt használ',
2323 - 'UseFilterExprsPost' => '&nbsp;szürõ&nbsp;kifejezés használata', // This is used at the end of the phrase 'use N filter expressions'
2324 - 'UseFilterExprsPre' => '&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2325 -diff -aurN zoneminder/trunk/web/lang/it_it.php zoneminder_new/trunk/web/lang/it_it.php
2326 ---- zoneminder/trunk/web/lang/it_it.php 2011-04-01 17:08:32.000000000 +0200
2327 -+++ zoneminder_new/trunk/web/lang/it_it.php 2011-04-01 17:10:30.000000000 +0200
2328 -@@ -261,6 +261,7 @@
2329 - 'DonateRemindNever' => 'No, io non voglio donare, non lo faro\' mai',
2330 - 'DonateRemindWeek' => 'Non ancora, ricordamelo ancora tra 1 settimana',
2331 - 'DonateYes' => 'Si,mi piacerebbe donare qualcosa ora',
2332 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2333 - 'Download' => 'Download',
2334 - 'DuplicateMonitorName' => 'Il nome del monitor e\' gia\' presente', // Added - 2009-03-31
2335 - 'Duration' => 'Durata',
2336 -@@ -633,6 +634,7 @@
2337 - 'Update' => 'Aggiorna',
2338 - 'UpdateAvailable' => 'Un aggiornamento di ZoneMinder &egrave; disponibilie.',
2339 - 'UpdateNotNecessary' => 'Nessun aggiornamento necessario.',
2340 -+ 'UsedPlugins' => 'Used Plugins',
2341 - 'UseFilter' => 'Usa Filtro',
2342 - 'UseFilterExprsPost' => '&nbsp;espressioni&nbsp;filtri', // This is used at the end of the phrase 'use N filter expressions'
2343 - 'UseFilterExprsPre' => 'Usa&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2344 -diff -aurN zoneminder/trunk/web/lang/ja_jp.php zoneminder_new/trunk/web/lang/ja_jp.php
2345 ---- zoneminder/trunk/web/lang/ja_jp.php 2011-04-01 17:08:32.000000000 +0200
2346 -+++ zoneminder_new/trunk/web/lang/ja_jp.php 2011-04-01 17:10:30.000000000 +0200
2347 -@@ -256,6 +256,7 @@
2348 - 'DonateRemindNever' => 'No, I don\'t want to donate, never remind',
2349 - 'DonateRemindWeek' => 'Not yet, remind again in 1 week',
2350 - 'DonateYes' => 'Yes, I\'d like to donate now',
2351 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2352 - 'Download' => 'Download',
2353 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2354 - 'Duration' => 'Œp‘±ŽžŠÔ',
2355 -@@ -628,6 +629,7 @@
2356 - 'Update' => 'Update',
2357 - 'UpdateAvailable' => 'ZoneMinder‚̱¯ÌßÃްĂª‚ ‚è‚Ü‚·',
2358 - 'UpdateNotNecessary' => '±¯ÌßÃްĂ̕K—v‚Í‚ ‚è‚Ü‚¹‚ñ',
2359 -+ 'UsedPlugins' => 'Used Plugins',
2360 - 'UseFilter' => '̨ÙÀ°‚ðŽg—p‚µ‚Ä‚­‚¾‚³‚¢',
2361 - 'UseFilterExprsPost' => '&nbsp;̨ÙÀ°ŒÂ”', // This is used at the end of the phrase 'use N filter expressions'
2362 - 'UseFilterExprsPre' => 'Žw’肵‚Ä‚­‚¾‚³‚¢:&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2363 -diff -aurN zoneminder/trunk/web/lang/nl_nl.php zoneminder_new/trunk/web/lang/nl_nl.php
2364 ---- zoneminder/trunk/web/lang/nl_nl.php 2011-04-01 17:08:32.000000000 +0200
2365 -+++ zoneminder_new/trunk/web/lang/nl_nl.php 2011-04-01 17:10:30.000000000 +0200
2366 -@@ -256,6 +256,7 @@
2367 - 'DonateRemindNever' => 'No, I don\'t want to donate, never remind',
2368 - 'DonateRemindWeek' => 'Not yet, remind again in 1 week',
2369 - 'DonateYes' => 'Yes, I\'d like to donate now',
2370 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2371 - 'Download' => 'Download',
2372 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2373 - 'Duration' => 'Duur',
2374 -@@ -628,6 +629,7 @@
2375 - 'Update' => 'Update',
2376 - 'UpdateAvailable' => 'een update voor ZoneMinder is beschikbaar',
2377 - 'UpdateNotNecessary' => 'geen update noodzakelijk',
2378 -+ 'UsedPlugins' => 'Used Plugins',
2379 - 'UseFilter' => 'Gebruik Filter',
2380 - 'UseFilterExprsPost' => '&nbsp;filter&nbsp;expressies', // This is used at the end of the phrase 'use N filter expressions'
2381 - 'UseFilterExprsPre' => 'Gebruik&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2382 -diff -aurN zoneminder/trunk/web/lang/pl_pl.php zoneminder_new/trunk/web/lang/pl_pl.php
2383 ---- zoneminder/trunk/web/lang/pl_pl.php 2011-04-01 17:08:32.000000000 +0200
2384 -+++ zoneminder_new/trunk/web/lang/pl_pl.php 2011-04-01 17:10:30.000000000 +0200
2385 -@@ -256,6 +256,7 @@
2386 - 'DonateRemindNever' => 'No, I don\'t want to donate, never remind',
2387 - 'DonateRemindWeek' => 'Not yet, remind again in 1 week',
2388 - 'DonateYes' => 'Yes, I\'d like to donate now',
2389 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2390 - 'Download' => 'Download',
2391 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2392 - 'Duration' => 'Czas trwania',
2393 -@@ -628,6 +629,7 @@
2394 - 'Update' => 'Update',
2395 - 'UpdateAvailable' => 'Jest dostêpne uaktualnienie ZoneMinder ',
2396 - 'UpdateNotNecessary' => 'Nie jest wymagane uaktualnienie',
2397 -+ 'UsedPlugins' => 'Used Plugins',
2398 - 'UseFilter' => 'U¿yj filtru',
2399 - 'UseFilterExprsPost' => '&nbsp;wyra¿enie&nbsp;filtru', // This is used at the end of the phrase 'use N filter expressions'
2400 - 'UseFilterExprsPre' => 'U¿yj&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2401 -diff -aurN zoneminder/trunk/web/lang/pt_br.php zoneminder_new/trunk/web/lang/pt_br.php
2402 ---- zoneminder/trunk/web/lang/pt_br.php 2011-04-01 17:08:32.000000000 +0200
2403 -+++ zoneminder_new/trunk/web/lang/pt_br.php 2011-04-01 17:10:30.000000000 +0200
2404 -@@ -196,6 +196,7 @@
2405 - 'DonateRemindNever' => 'No, I don\'t want to donate, never remind',
2406 - 'DonateRemindWeek' => 'Not yet, remind again in 1 week',
2407 - 'DonateYes' => 'Yes, I\'d like to donate now',
2408 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2409 - 'Download' => 'Download',
2410 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2411 - 'Duration' => 'Duração',
2412 -@@ -568,6 +569,7 @@
2413 - 'Update' => 'Update',
2414 - 'UpdateAvailable' => 'Um update ao zoneminder está disponível.',
2415 - 'UpdateNotNecessary' => 'Não é necessário update.',
2416 -+ 'UsedPlugins' => 'Used Plugins',
2417 - 'UseFilter' => 'Use Filtro',
2418 - 'UseFilterExprsPost' => '&nbsp;expressões&nbsp;de&nbsp;filtragem', // This is used at the end of the phrase 'use N filter expressions'
2419 - 'UseFilterExprsPre' => 'Use&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
2420 -diff -aurN zoneminder/trunk/web/lang/ro_ro.php zoneminder_new/trunk/web/lang/ro_ro.php
2421 ---- zoneminder/trunk/web/lang/ro_ro.php 2011-04-01 17:08:32.000000000 +0200
2422 -+++ zoneminder_new/trunk/web/lang/ro_ro.php 2011-04-01 17:10:30.000000000 +0200
2423 -@@ -227,6 +227,7 @@
2424 - 'DonateRemindNever' => 'No, I don\'t want to donate, never remind',
2425 - 'DonateRemindWeek' => 'Not yet, remind again in 1 week',
2426 - 'DonateYes' => 'Yes, I\'d like to donate now',
2427 -+ 'DoNativeMotionDetection'=> 'Do Native Motion Detection',
2428 - 'Download' => 'Download',
2429 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2430 - 'Duration' => 'Durata',
2431 -@@ -599,6 +600,7 @@
2432 - 'Update' => 'Update',
2433 - 'UpdateAvailable' => 'Sunt disponibile actualiz&#259;ri ZoneMinder.',
2434 - 'UpdateNotNecessary' => 'Actulizarea nu este necesar&#259;.',
2435 -+ 'UsedPlugins' => 'Used Plugins',
2436 - 'UseFilter' => 'Folose&#351;te filtru',
2437 - 'UseFilterExprsPost' => '&nbsp;expresii&nbsp;de&nbsp;filtrare ',
2438 - 'UseFilterExprsPre' => 'Folose&#351;te&nbsp;',
2439 -diff -aurN zoneminder/trunk/web/lang/ru_ru.php zoneminder_new/trunk/web/lang/ru_ru.php
2440 ---- zoneminder/trunk/web/lang/ru_ru.php 2011-04-01 17:08:32.000000000 +0200
2441 -+++ zoneminder_new/trunk/web/lang/ru_ru.php 2011-04-01 17:10:30.000000000 +0200
2442 -@@ -256,6 +256,7 @@
2443 - 'DonateRemindNever' => 'No, I don\'t want to donate, never remind',
2444 - 'DonateRemindWeek' => 'Not yet, remind again in 1 week',
2445 - 'DonateYes' => 'Yes, I\'d like to donate now',
2446 -+ 'DoNativeMotionDetection'=> '¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿ Motion Detection',
2447 - 'Download' => 'Download',
2448 - 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
2449 - 'Duration' => 'äÌÉÔÅÌØÎÏÓÔØ',
2450 -@@ -628,6 +629,7 @@
2451 - 'Update' => 'Update',
2452 - 'UpdateAvailable' => 'äÏÓÔÕÐÎÏ ÏÂÎÏ×ÌÅÎÉÅ ZoneMinder',
2453 - 'UpdateNotNecessary' => 'ïÂÎÏ×ÌÅÎÉÅ ÎÅ ÔÒÅÂÕÅÔÓÑ',
2454 -+ 'UsedPlugins' => '¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿',
2455 - 'UseFilter' => 'éÓÐÏÌØÚÏ×ÁÔØ ÆÉÌØÔÒ',
2456