aboutsummaryrefslogtreecommitdiff
path: root/multimedia/zoneminder/files
diff options
context:
space:
mode:
authorBoris Samorodov <bsam@FreeBSD.org>2011-06-05 11:11:35 +0000
committerBoris Samorodov <bsam@FreeBSD.org>2011-06-05 11:11:35 +0000
commit3e9734184493301cd27b45a3412c1314543053eb (patch)
tree4f37e1af344f84ff4d2869cb92b909094570c990 /multimedia/zoneminder/files
parent256847a219b1e105d247b207047cc8acc57c9b41 (diff)
downloadports-3e9734184493301cd27b45a3412c1314543053eb.tar.gz
ports-3e9734184493301cd27b45a3412c1314543053eb.zip
Notes
Diffstat (limited to 'multimedia/zoneminder/files')
-rw-r--r--multimedia/zoneminder/files/patch-Makefile.in10
-rw-r--r--multimedia/zoneminder/files/patch-configure90
-rw-r--r--multimedia/zoneminder/files/patch-db_zm_create.sql.in33
-rw-r--r--multimedia/zoneminder/files/patch-src_Makefile.am10
-rw-r--r--multimedia/zoneminder/files/patch-src_Makefile.in10
-rw-r--r--multimedia/zoneminder/files/patch-src_zm_event.cpp80
-rw-r--r--multimedia/zoneminder/files/patch-src_zm_image.cpp20
-rw-r--r--multimedia/zoneminder/files/patch-src_zm_jpeg.c26
-rw-r--r--multimedia/zoneminder/files/patch-src_zm_jpeg.h10
-rw-r--r--multimedia/zoneminder/files/patch-src_zm_local_camera.h8
-rw-r--r--multimedia/zoneminder/files/patch-src_zm_monitor.cpp6
-rw-r--r--multimedia/zoneminder/files/patch-src_zm_stream.cpp11
-rw-r--r--multimedia/zoneminder/files/patch-src_zmu.cpp6
13 files changed, 99 insertions, 221 deletions
diff --git a/multimedia/zoneminder/files/patch-Makefile.in b/multimedia/zoneminder/files/patch-Makefile.in
index ac6bdeb5153e..5e925ceafc7a 100644
--- a/multimedia/zoneminder/files/patch-Makefile.in
+++ b/multimedia/zoneminder/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig 2009-06-24 14:22:38.000000000 +0400
-+++ Makefile.in 2011-04-12 15:41:02.584304485 +0400
-@@ -213,7 +213,7 @@ AUTOMAKE_OPTIONS = gnu
+--- Makefile.in.orig 2011-04-27 18:25:46.000000000 +0400
++++ Makefile.in 2011-05-05 17:28:47.671178104 +0400
+@@ -275,7 +275,7 @@ AUTOMAKE_OPTIONS = gnu
webuser = @WEB_USER@
webgroup = @WEB_GROUP@
sysconf_DATA = \
@@ -9,12 +9,12 @@
SUBDIRS = \
src \
-@@ -278,7 +278,7 @@ $(srcdir)/config.h.in: $(am__configure_
+@@ -343,7 +343,7 @@ $(srcdir)/config.h.in: $(am__configure_
distclean-hdr:
-rm -f config.h stamp-h1
-zm.conf: $(top_builddir)/config.status $(srcdir)/zm.conf.in
+zm.conf.sample: $(top_builddir)/config.status $(srcdir)/zm.conf.in
cd $(top_builddir) && $(SHELL) ./config.status $@
- scripts/ZoneMinder/lib/ZoneMinder/Base.pm: $(top_builddir)/config.status $(top_srcdir)/scripts/ZoneMinder/lib/ZoneMinder/Base.pm.in
+ zmconfgen.pl: $(top_builddir)/config.status $(srcdir)/zmconfgen.pl.in
cd $(top_builddir) && $(SHELL) ./config.status $@
diff --git a/multimedia/zoneminder/files/patch-configure b/multimedia/zoneminder/files/patch-configure
index 1e0b62e35af2..1b3ab24ebc20 100644
--- a/multimedia/zoneminder/files/patch-configure
+++ b/multimedia/zoneminder/files/patch-configure
@@ -1,7 +1,7 @@
---- configure.orig 2009-06-24 14:22:41.000000000 +0400
-+++ configure 2011-04-08 17:48:07.330803917 +0400
-@@ -1882,7 +1882,7 @@ echo "$as_me: WARNING: You can call conf
- fi;
+--- configure.orig 2011-04-27 18:25:46.000000000 +0400
++++ configure 2011-05-05 18:40:08.676173137 +0400
+@@ -2995,7 +2995,7 @@ fi
+
MYSQL_LIBS="-L${MYSQL_PREFIX}/${LIB_ARCH}/mysql"
-MYSQL_CFLAGS="-I${MYSQL_PREFIX}/include"
@@ -9,34 +9,25 @@
-@@ -7392,7 +7392,7 @@ if test "${ac_cv_lib_mysqlclient_mysql_i
- echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -6426,7 +6426,7 @@ if test "${ac_cv_lib_mysqlclient_mysql_i
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmysqlclient $LIBS"
-+LIBS="-lmysqlclient $LIBS -lz"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
-@@ -7470,7 +7470,7 @@ if test "${ac_cv_lib_jpeg_jpeg_start_com
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-ljpeg $LIBS"
-+LIBS="-ljpeg $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
-@@ -7626,7 +7626,7 @@ if test "${ac_cv_lib_dl_dlsym+set}" = se
- echo $ECHO_N "(cached) $ECHO_C" >&6
++LIBS="-lmysqlclient $LIBS -lz"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -6567,7 +6567,7 @@ if test "${ac_cv_lib_dl_dlsym+set}" = se
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-+LIBS="-lc $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
-@@ -7689,7 +7689,7 @@ if test $ac_cv_lib_dl_dlsym = yes; then
++LIBS="-lc $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -6602,7 +6602,7 @@ if test "x$ac_cv_lib_dl_dlsym" = x""yes;
#define HAVE_LIBDL 1
_ACEOF
@@ -44,49 +35,4 @@
+ LIBS="-lc $LIBS"
else
- { { echo "$as_me:$LINENO: error: zm requires libdl.a" >&5
-@@ -7705,7 +7705,7 @@ if test "${ac_cv_lib_crypto_MD5+set}" =
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lcrypto $LIBS"
-+LIBS="-lcrypto $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
-@@ -7861,7 +7861,7 @@ if test "${ac_cv_lib_pcre_pcre_compile+s
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lpcre $LIBS"
-+LIBS="-lpcre $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
-@@ -7938,7 +7938,7 @@ if test "${ac_cv_lib_avutil_av_malloc+se
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lavutil $LIBS"
-+LIBS="-lavutil $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
-@@ -8015,7 +8015,7 @@ if test "${ac_cv_lib_avcodec_avcodec_ini
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lavcodec $LIBS"
-+LIBS="-lavcodec $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
-@@ -8320,7 +8320,7 @@ if test "${ac_cv_lib_z_compress+set}" =
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lz $LIBS"
-+LIBS="-lz $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
+ as_fn_error "zm requires libdl.a" "$LINENO" 5
diff --git a/multimedia/zoneminder/files/patch-db_zm_create.sql.in b/multimedia/zoneminder/files/patch-db_zm_create.sql.in
index 839547ea1363..27a3fbbacd79 100644
--- a/multimedia/zoneminder/files/patch-db_zm_create.sql.in
+++ b/multimedia/zoneminder/files/patch-db_zm_create.sql.in
@@ -1,5 +1,5 @@
---- db/zm_create.sql.in.orig 2009-05-25 22:08:50.000000000 +0400
-+++ db/zm_create.sql.in 2011-04-08 17:48:07.352807423 +0400
+--- db/zm_create.sql.in.orig 2011-01-10 15:34:49.000000000 +0300
++++ db/zm_create.sql.in 2011-05-05 17:58:17.886348039 +0400
@@ -41,7 +41,7 @@ CREATE TABLE `Config` (
`Readonly` tinyint(3) unsigned NOT NULL default '0',
`Requires` text,
@@ -144,23 +144,12 @@
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-@@ -611,7 +611,7 @@ insert into Config set Id = 7, Name = 'Z
- insert into Config set Id = 8, Name = 'ZM_USE_DEEP_STORAGE', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Use a deep filesystem hierarchy for events', Help = 'Traditionally ZoneMinder stores all event sfor a monitor in one directory for that monitor. This is simple and efficient except when you have very large amounts of events. Some filesystems are unable to store more than 32k files in one directory and even without this limitation, large numbers of files in a directory can slow creation and deletion of files. This option allows you to select a new method of storing events by year/month/day/hour/min/second which has the effect of separating events out into more directories, resulting in less per directory, and also making it easier to manually navigate to any events that may have happened at a particular time or date. Be warned: deep storage should be considered in beta for now, if you value your data do not select it.', Category = 'paths', Readonly = '0', Requires = '';
- insert into Config set Id = 9, Name = 'ZM_DIR_IMAGES', Value = 'images', Type = 'string', DefaultValue = 'images', Hint = 'directory', Pattern = '(?-xism:^([a-zA-Z0-9-_.]+)$)', Format = ' $1 ', Prompt = 'Directory where the images that the ZoneMinder client generates are stored', Help = 'ZoneMinder generates a myriad of images, mosty of which are associated with events. For those that aren\'t this is where they go.', Category = 'paths', Readonly = '0', Requires = '';
- insert into Config set Id = 10, Name = 'ZM_DIR_SOUNDS', Value = 'sounds', Type = 'string', DefaultValue = 'sounds', Hint = 'directory', Pattern = '(?-xism:^([a-zA-Z0-9-_.]+)$)', Format = ' $1 ', Prompt = 'Directory to the sounds that the ZoneMinder client can use', Help = 'ZoneMinder can optionally play a sound file when an alarm is detected. This indicates where (relative to the web root) to look for this file.', Category = 'paths', Readonly = '0', Requires = '';
--insert into Config set Id = 11, Name = 'ZM_PATH_ZMS', Value = '/cgi-bin/nph-zms', Type = 'string', DefaultValue = '/cgi-bin/nph-zms', Hint = 'relative/path/to/somewhere', Pattern = '(?-xism:^((?:[^/].*)?)/?$)', Format = ' $1 ', Prompt = 'Web path to zms streaming server', Help = 'The ZoneMinder streaming server is required to send streamed images to your browser. It will be installed into the cgi-bin path given at configuration time. This option determines what the web path to the server is rather than the local path on your machine. Ordinarily the streaming server runs in parser-header mode however if you experience problems with streaming you can change this to non-parsed-header (nph) mode by changing \'zms\' to \'nph-zms\'.', Category = 'paths', Readonly = '0', Requires = '';
-+insert into Config set Id = 11, Name = 'ZM_PATH_ZMS', Value = '/cgi-bin/zms', Type = 'string', DefaultValue = '/cgi-bin/nph-zms', Hint = 'relative/path/to/somewhere', Pattern = '(?-xism:^((?:[^/].*)?)/?$)', Format = ' $1 ', Prompt = 'Web path to zms streaming server', Help = 'The ZoneMinder streaming server is required to send streamed images to your browser. It will be installed into the cgi-bin path given at configuration time. This option determines what the web path to the server is rather than the local path on your machine. Ordinarily the streaming server runs in parser-header mode however if you experience problems with streaming you can change this to non-parsed-header (nph) mode by changing \'zms\' to \'nph-zms\'.', Category = 'paths', Readonly = '0', Requires = '';
- insert into Config set Id = 12, Name = 'ZM_CAN_STREAM', Value = 'auto', Type = 'string', DefaultValue = 'auto', Hint = 'auto|yes|no', Pattern = '(?i-xsm:^([ayn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : ($1 =~ /^n/ ? \"no\" : \"auto\" ) ', Prompt = 'Override the automatic detection of browser streaming capability', Help = 'If you know that your browser can handle image streams of the type \'multipart/x-mixed-replace\' but ZoneMinder does not detect this correctly you can set this option to ensure that the stream is delivered with or without the use of the Cambozola plugin. Selecting \'yes\' will tell ZoneMinder that your browser can handle the streams natively, \'no\' means that it can\'t and so the plugin will be used while \'auto\' lets ZoneMinder decide.', Category = 'images', Readonly = '0', Requires = '';
- insert into Config set Id = 13, Name = 'ZM_STREAM_METHOD', Value = 'jpeg', Type = 'string', DefaultValue = 'jpeg', Hint = 'mpeg|jpeg', Pattern = '(?i-xsm:^([mj]))', Format = ' $1 =~ /^m/ ? \"mpeg\" : \"jpeg\" ', Prompt = 'Which method should be used to send video streams to your browser.', Help = 'ZoneMinder can be configured to use either mpeg encoded video or a series or still jpeg images when sending video streams. This option defines which is used. If you choose mpeg you should ensure that you have the appropriate plugins available on your browser whereas choosing jpeg will work natively on Mozilla and related browsers and with a Java applet on Internet Explorer', Category = 'images', Readonly = '0', Requires = '';
- insert into Config set Id = 14, Name = 'ZM_COLOUR_JPEG_FILES', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Colourise greyscale JPEG files', Help = 'Cameras that capture in greyscale can write their captured images to jpeg files with a corresponding greyscale colour space. This saves a small amount of disk space over colour ones. However some tools such as ffmpeg either fail to work with this colour space or have to convert it beforehand. Setting this option to yes uses up a little more space but makes creation of MPEG files much faster.', Category = 'images', Readonly = '0', Requires = '';
-@@ -621,8 +621,8 @@ insert into Config set Id = 17, Name = '
- insert into Config set Id = 18, Name = 'ZM_JPEG_IMAGE_QUALITY', Value = '70', Type = 'integer', DefaultValue = '70', Hint = 'integer', Pattern = '(?-xism:^(\d+)$)', Format = ' $1 ', Prompt = 'Set the JPEG quality setting for the streamed \'live\' images (1-100)', Help = 'When viewing a \'live\' stream for a monitor ZoneMinder will grab an image from the buffer and encode it into JPEG format before sending it. This option specifies what image quality should be used to encode these images. A higher number means better quality but less compression so will take longer to view over a slow connection. By contrast a low number means quicker to view images but at the price of lower quality images. This option does not apply when viewing events or still images as these are usually just read from disk and so will be encoded at the quality specified by the previous options.', Category = 'hidden', Readonly = '0', Requires = '';
- insert into Config set Id = 19, Name = 'ZM_JPEG_STREAM_QUALITY', Value = '70', Type = 'integer', DefaultValue = '70', Hint = 'integer', Pattern = '(?-xism:^(\d+)$)', Format = ' $1 ', Prompt = 'Set the JPEG quality setting for the streamed \'live\' images (1-100)', Help = 'When viewing a \'live\' stream for a monitor ZoneMinder will grab an image from the buffer and encode it into JPEG format before sending it. This option specifies what image quality should be used to encode these images. A higher number means better quality but less compression so will take longer to view over a slow connection. By contrast a low number means quicker to view images but at the price of lower quality images. This option does not apply when viewing events or still images as these are usually just read from disk and so will be encoded at the quality specified by the previous options.', Category = 'images', Readonly = '0', Requires = '';
- insert into Config set Id = 20, Name = 'ZM_MPEG_TIMED_FRAMES', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Tag video frames with a timestamp for more realistic streaming', Help = 'When using streamed MPEG based video, either for live monitor streams or events, ZoneMinder can send the streams in two ways. If this option is selected then the timestamp for each frame, taken from it\'s capture time, is included in the stream. This means that where the frame rate varies, for instance around an alarm, the stream will still maintain it\'s \'real\' timing. If this option is not selected then an approximate frame rate is calculated and that is used to schedule frames instead. This option should be selected unless you encounter problems with your preferred streaming method.', Category = 'images', Readonly = '0', Requires = 'ZM_STREAM_METHOD=mpeg';
--insert into Config set Id = 21, Name = 'ZM_MPEG_LIVE_FORMAT', Value = 'swf', Type = 'string', DefaultValue = 'swf', Hint = 'string', Pattern = '(?-xism:^(.+)$)', Format = ' $1 ', Prompt = 'What format \'live\' video streams are played in', Help = 'When using MPEG mode ZoneMinder can output live video. However what formats are handled by the browser varies greatly between machines. This option allows you to specify a video format using a file extension format, so you would just enter the extension of the file type you would like and the rest is determined from that. The default of \'asf\' works well under Windows with Windows Media Player but I\'m currently not sure what, if anything, works on a Linux platform. If you find out please let me know! If this option is left blank then live streams will revert to being in motion jpeg format', Category = 'images', Readonly = '0', Requires = 'ZM_STREAM_METHOD=mpeg';
--insert into Config set Id = 22, Name = 'ZM_MPEG_REPLAY_FORMAT', Value = 'swf', Type = 'string', DefaultValue = 'swf', Hint = 'string', Pattern = '(?-xism:^(.+)$)', Format = ' $1 ', Prompt = 'What format \'replay\' video streams are played in', Help = 'When using MPEG mode ZoneMinder can replay events in encoded video format. However what formats are handled by the browser varies greatly between machines. This option allows you to specify a video format using a file extension format, so you would just enter the extension of the file type you would like and the rest is determined from that. The default of \'asf\' works well under Windows with Windows Media Player and \'mpg\', or \'avi\' etc should work under Linux. If you knwo any more then please let me know! If this option is left blank then live streams will revert to being in motion jpeg format', Category = 'images', Readonly = '0', Requires = 'ZM_STREAM_METHOD=mpeg';
-+insert into Config set Id = 21, Name = 'ZM_MPEG_LIVE_FORMAT', Value = 'libx264', Type = 'string', DefaultValue = 'swf', Hint = 'string', Pattern = '(?-xism:^(.+)$)', Format = ' $1 ', Prompt = 'What format \'live\' video streams are played in', Help = 'When using MPEG mode ZoneMinder can output live video. However what formats are handled by the browser varies greatly between machines. This option allows you to specify a video format using a file extension format, so you would just enter the extension of the file type you would like and the rest is determined from that. The default of \'asf\' works well under Windows with Windows Media Player but I\'m currently not sure what, if anything, works on a Linux platform. If you find out please let me know! If this option is left blank then live streams will revert to being in motion jpeg format', Category = 'images', Readonly = '0', Requires = 'ZM_STREAM_METHOD=mpeg';
-+insert into Config set Id = 22, Name = 'ZM_MPEG_REPLAY_FORMAT', Value = 'libx264', Type = 'string', DefaultValue = 'swf', Hint = 'string', Pattern = '(?-xism:^(.+)$)', Format = ' $1 ', Prompt = 'What format \'replay\' video streams are played in', Help = 'When using MPEG mode ZoneMinder can replay events in encoded video format. However what formats are handled by the browser varies greatly between machines. This option allows you to specify a video format using a file extension format, so you would just enter the extension of the file type you would like and the rest is determined from that. The default of \'asf\' works well under Windows with Windows Media Player and \'mpg\', or \'avi\' etc should work under Linux. If you knwo any more then please let me know! If this option is left blank then live streams will revert to being in motion jpeg format', Category = 'images', Readonly = '0', Requires = 'ZM_STREAM_METHOD=mpeg';
- insert into Config set Id = 23, Name = 'ZM_RAND_STREAM', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Add a random string to prevent caching of streams', Help = 'Some browsers can cache the streams used by ZoneMinder. In order to prevent his a harmless random string can be appended to the url to make each invocation of the stream appear unique.', Category = 'images', Readonly = '0', Requires = '';
- insert into Config set Id = 24, Name = 'ZM_OPT_CAMBOZOLA', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Is the (optional) cambozola java streaming client installed', Help = 'Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don\'t natively support this format. If you use this browser it is highly recommended to install this from http://www.charliemouse.com/code/cambozola/ however if it is not installed still images at a lower refresh rate can still be viewed.', Category = 'images', Readonly = '0', Requires = '';
- insert into Config set Id = 25, Name = 'ZM_PATH_CAMBOZOLA', Value = 'cambozola.jar', Type = 'string', DefaultValue = 'cambozola.jar', Hint = 'relative/path/to/somewhere', Pattern = '(?-xism:^((?:[^/].*)?)/?$)', Format = ' $1 ', Prompt = 'Web path to (optional) cambozola java streaming client', Help = 'Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don\'t natively support this format. If you use this browser it is highly recommended to install this from http://www.charliemouse.com/code/cambozola/ however if it is not installed still images at a lower refresh rate can still be viewed. Leave this as \'cambozola.jar\' if cambozola is installed in the same directory as the ZoneMinder web client files.', Category = 'images', Readonly = '0', Requires = 'ZM_OPT_CAMBOZOLA=1';
+@@ -584,7 +584,7 @@ INSERT INTO MonitorPresets VALUES ('','B
+ INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 320x240, max 5 FPS','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,5.0,0,NULL,NULL,NULL,100,100);
+ INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 640x480','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,NULL,0,NULL,NULL,NULL,100,100);
+ INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 640x480, max 5 FPS','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,5.0,0,NULL,NULL,NULL,100,100);
+-INSERT INTO MonitorPresets VALUES ('','Remote ZoneMinder','Remote',NULL,NULL,NULL,'http','simple','<ip-address>',80,'/cgi-bin/nph-zms?mode=jpeg&monitor=<monitor-id>&scale=100&maxfps=5&buffer=0',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
++INSERT INTO MonitorPresets VALUES ('','Remote ZoneMinder','Remote',NULL,NULL,NULL,'http','simple','<ip-address>',80,'/cgi-bin/zms?mode=jpeg&monitor=<monitor-id>&scale=100&maxfps=5&buffer=0',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
+
+ --
+ -- Add some zone preset values
diff --git a/multimedia/zoneminder/files/patch-src_Makefile.am b/multimedia/zoneminder/files/patch-src_Makefile.am
index e80405366e9c..cb3c8a96ccaf 100644
--- a/multimedia/zoneminder/files/patch-src_Makefile.am
+++ b/multimedia/zoneminder/files/patch-src_Makefile.am
@@ -1,12 +1,10 @@
---- src/Makefile.am.orig 2009-05-28 12:45:50.000000000 +0400
-+++ src/Makefile.am 2011-04-08 17:48:07.308804602 +0400
-@@ -1,7 +1,7 @@
+--- src/Makefile.am.orig 2011-01-22 01:09:46.000000000 +0300
++++ src/Makefile.am 2011-05-05 18:11:47.076749885 +0400
+@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = gnu
-AM_CPPFLAGS = @MYSQL_CFLAGS@ @FFMPEG_CFLAGS@ -Wall -Wno-sign-compare -fno-inline
--AM_CXXFLAGS = -frepo
+AM_CPPFLAGS = @MYSQL_CFLAGS@ @FFMPEG_CFLAGS@
-+AM_CXXFLAGS =
+ #AM_CXXFLAGS = -frepo
CLEANFILES = *.rpo
-
diff --git a/multimedia/zoneminder/files/patch-src_Makefile.in b/multimedia/zoneminder/files/patch-src_Makefile.in
deleted file mode 100644
index 74fad9aadb88..000000000000
--- a/multimedia/zoneminder/files/patch-src_Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/Makefile.in.orig 2009-06-24 14:22:34.000000000 +0400
-+++ src/Makefile.in 2011-04-08 17:48:07.319804818 +0400
-@@ -227,7 +227,6 @@ sysconfdir = @sysconfdir@
- target_alias = @target_alias@
- AUTOMAKE_OPTIONS = gnu
- AM_CPPFLAGS = @MYSQL_CFLAGS@ @FFMPEG_CFLAGS@ -Wall -Wno-sign-compare -fno-inline
--AM_CXXFLAGS = -frepo
- CLEANFILES = *.rpo
-
- # This should be set to your CGI directory
diff --git a/multimedia/zoneminder/files/patch-src_zm_event.cpp b/multimedia/zoneminder/files/patch-src_zm_event.cpp
index 46bdbeeddb3f..6042119e94c0 100644
--- a/multimedia/zoneminder/files/patch-src_zm_event.cpp
+++ b/multimedia/zoneminder/files/patch-src_zm_event.cpp
@@ -1,44 +1,44 @@
---- src/zm_event.cpp.orig 2009-05-08 17:47:19.000000000 +0400
-+++ src/zm_event.cpp 2011-04-08 17:48:07.355808702 +0400
+--- src/zm_event.cpp.orig 2010-11-11 15:22:37.000000000 +0300
++++ src/zm_event.cpp 2011-05-05 18:24:59.141170446 +0400
@@ -27,6 +27,7 @@
- #include <getopt.h>
- #include <arpa/inet.h>
- #include <glob.h>
+ #include <getopt.h>
+ #include <arpa/inet.h>
+ #include <glob.h>
+#include <time.h>
-
- #include "zm.h"
- #include "zm_db.h"
-@@ -61,8 +62,10 @@ Event::Event( Monitor *p_monitor, struct
- createNotes( notes );
-
- static char sql[BUFSIZ];
+
+ #include "zm.h"
+ #include "zm_db.h"
+@@ -68,8 +69,10 @@ Event::Event( Monitor *p_monitor, struct
+ }
+
+ static char sql[ZM_SQL_MED_BUFSIZ];
+ static char start_time_str[32];
-
- struct tm *stime = localtime( &start_time.tv_sec );
+
+ struct tm *stime = localtime( &start_time.tv_sec );
+ strftime( start_time_str, sizeof(start_time_str), "%Y-%m-%d %H:%M:%S", localtime((time_t *) &start_time.tv_sec ) );
- snprintf( sql, sizeof(sql), "insert into Events ( MonitorId, Name, StartTime, Width, Height, Cause, Notes ) values ( %d, 'New Event', from_unixtime( %ld ), %d, %d, '%s', '%s' )", monitor->Id(), start_time.tv_sec, monitor->Width(), monitor->Height(), cause.c_str(), notes.c_str() );
- if ( mysql_query( &dbconn, sql ) )
- {
-@@ -150,11 +153,13 @@ Event::Event( Monitor *p_monitor, struct
-
- Event::~Event()
- {
-+ static char end_time_str[32];
- if ( frames > last_db_frame )
- {
- struct DeltaTimeval delta_time;
- DELTA_TIMEVAL( delta_time, end_time, start_time, DT_PREC_2 );
-
-+ strftime( end_time_str, sizeof(end_time_str), "%Y-%m-%d %H:%M:%S", localtime( (time_t *) &end_time.tv_sec ) );
- Debug( 1, "Adding closing frame %d to DB", frames );
- static char sql[BUFSIZ];
- snprintf( sql, sizeof(sql), "insert into Frames ( EventId, FrameId, TimeStamp, Delta ) values ( %d, %d, from_unixtime( %ld ), %s%ld.%02ld )", id, frames, end_time.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec );
-@@ -607,7 +612,7 @@ void Event::AddFrame( Image *image, stru
- }
- }
-
--bool EventStream::loadInitialEventData( int monitor_id, time_t event_time )
-+bool EventStream::loadInitialEventData( int monitor_id, long event_time )
- {
- static char sql[BUFSIZ];
-
+ snprintf( sql, sizeof(sql), "insert into Events ( MonitorId, Name, StartTime, Width, Height, Cause, Notes ) values ( %d, 'New Event', from_unixtime( %ld ), %d, %d, '%s', '%s' )", monitor->Id(), start_time.tv_sec, monitor->Width(), monitor->Height(), cause.c_str(), notes.c_str() );
+ if ( mysql_query( &dbconn, sql ) )
+ {
+@@ -161,10 +164,13 @@ Event::Event( Monitor *p_monitor, struct
+
+ Event::~Event()
+ {
++ static char end_time_str[32];
++
+ if ( frames > last_db_frame )
+ {
+ struct DeltaTimeval delta_time;
+ DELTA_TIMEVAL( delta_time, end_time, start_time, DT_PREC_2 );
++ strftime( end_time_str, sizeof(end_time_str), "%Y-%m-%d %H:%M:%S", localtime( (time_t *) &end_time.tv_sec ) );
+
+ Debug( 1, "Adding closing frame %d to DB", frames );
+ static char sql[ZM_SQL_SML_BUFSIZ];
+@@ -639,7 +645,7 @@ void Event::AddFrame( Image *image, stru
+ }
+ }
+
+-bool EventStream::loadInitialEventData( int monitor_id, time_t event_time )
++bool EventStream::loadInitialEventData( int monitor_id, long event_time )
+ {
+ static char sql[ZM_SQL_SML_BUFSIZ];
+
diff --git a/multimedia/zoneminder/files/patch-src_zm_image.cpp b/multimedia/zoneminder/files/patch-src_zm_image.cpp
deleted file mode 100644
index 5dca4f9f7a17..000000000000
--- a/multimedia/zoneminder/files/patch-src_zm_image.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/zm_image.cpp.orig 2009-05-25 22:04:00.000000000 +0400
-+++ src/zm_image.cpp 2011-04-08 17:48:07.338804532 +0400
-@@ -461,7 +461,7 @@ bool Image::DecodeJpeg( const JOCTET *in
- return( false );
- }
-
-- jpeg_mem_src( cinfo, inbuffer, inbuffer_size );
-+ zm_jpeg_mem_src( cinfo, inbuffer, inbuffer_size );
-
- jpeg_read_header( cinfo, TRUE );
-
-@@ -523,7 +523,7 @@ bool Image::EncodeJpeg( JOCTET *outbuffe
- jpeg_create_compress( cinfo );
- }
-
-- jpeg_mem_dest( cinfo, outbuffer, outbuffer_size );
-+ zm_jpeg_mem_dest( cinfo, outbuffer, outbuffer_size );
-
- cinfo->image_width = width; /* image width and height, in pixels */
- cinfo->image_height = height;
diff --git a/multimedia/zoneminder/files/patch-src_zm_jpeg.c b/multimedia/zoneminder/files/patch-src_zm_jpeg.c
deleted file mode 100644
index bddb8896c15c..000000000000
--- a/multimedia/zoneminder/files/patch-src_zm_jpeg.c
+++ /dev/null
@@ -1,26 +0,0 @@
---- src/zm_jpeg.c.orig 2009-03-20 15:07:00.000000000 +0300
-+++ src/zm_jpeg.c 2011-04-08 17:48:07.338804532 +0400
-@@ -173,7 +173,7 @@ static void term_destination (j_compress
- * for closing it after finishing compression.
- */
-
--void jpeg_mem_dest (j_compress_ptr cinfo, JOCTET *outbuffer, int *outbuffer_size )
-+void zm_jpeg_mem_dest (j_compress_ptr cinfo, JOCTET *outbuffer, int *outbuffer_size )
- {
- mem_dest_ptr dest;
-
-@@ -350,12 +350,12 @@ static void term_source (j_decompress_pt
- * for closing it after finishing decompression.
- */
-
--void jpeg_mem_src( j_decompress_ptr cinfo, const JOCTET *inbuffer, int inbuffer_size )
-+void zm_jpeg_mem_src( j_decompress_ptr cinfo, const JOCTET *inbuffer, int inbuffer_size )
- {
- mem_src_ptr src;
-
- /* The source object and input buffer are made permanent so that a series
-- * of JPEG images can be read from the same file by calling jpeg_mem_src
-+ * of JPEG images can be read from the same file by calling zm_jpeg_mem_src
- * only before the first one. (If we discarded the buffer at the end of
- * one image, we'd likely lose the start of the next one.)
- * This makes it unsafe to use this manager and a different source
diff --git a/multimedia/zoneminder/files/patch-src_zm_jpeg.h b/multimedia/zoneminder/files/patch-src_zm_jpeg.h
deleted file mode 100644
index 52adcc049ce2..000000000000
--- a/multimedia/zoneminder/files/patch-src_zm_jpeg.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/zm_jpeg.h.orig 2009-03-20 15:07:00.000000000 +0300
-+++ src/zm_jpeg.h 2011-04-08 17:48:07.339806355 +0400
-@@ -36,5 +36,5 @@ void zm_jpeg_error_exit( j_common_ptr ci
- void zm_jpeg_emit_message( j_common_ptr cinfo, int msg_level );
-
- // Prototypes for memory compress/decompression object */
--void jpeg_mem_src(j_decompress_ptr cinfo, const JOCTET *inbuffer, int inbuffer_size );
--void jpeg_mem_dest(j_compress_ptr cinfo, JOCTET *outbuffer, int *outbuffer_size );
-+void zm_jpeg_mem_src(j_decompress_ptr cinfo, const JOCTET *inbuffer, int inbuffer_size );
-+void zm_jpeg_mem_dest(j_compress_ptr cinfo, JOCTET *outbuffer, int *outbuffer_size );
diff --git a/multimedia/zoneminder/files/patch-src_zm_local_camera.h b/multimedia/zoneminder/files/patch-src_zm_local_camera.h
index f9c869a65505..c782f6553eb3 100644
--- a/multimedia/zoneminder/files/patch-src_zm_local_camera.h
+++ b/multimedia/zoneminder/files/patch-src_zm_local_camera.h
@@ -1,6 +1,6 @@
---- src/zm_local_camera.h.orig 2009-05-08 17:22:06.000000000 +0400
-+++ src/zm_local_camera.h 2011-04-08 17:48:07.368805859 +0400
-@@ -80,6 +80,14 @@ protected:
+--- src/zm_local_camera.h.orig 2011-02-16 00:59:06.000000000 +0300
++++ src/zm_local_camera.h 2011-05-05 18:31:35.024175230 +0400
+@@ -83,6 +83,14 @@ protected:
protected:
static int camera_count;
static int channel_count;
@@ -15,7 +15,7 @@
static int channels[VIDEO_MAX_FRAME];
static int standards[VIDEO_MAX_FRAME];
-@@ -109,6 +117,7 @@ protected:
+@@ -114,6 +122,7 @@ protected:
public:
LocalCamera( int p_id, const std::string &device, int p_channel, int p_format, const std::string &p_method, int p_width, int p_height, int p_palette, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture );
diff --git a/multimedia/zoneminder/files/patch-src_zm_monitor.cpp b/multimedia/zoneminder/files/patch-src_zm_monitor.cpp
index e8c75b4871b2..c79a4eececa4 100644
--- a/multimedia/zoneminder/files/patch-src_zm_monitor.cpp
+++ b/multimedia/zoneminder/files/patch-src_zm_monitor.cpp
@@ -1,6 +1,6 @@
---- src/zm_monitor.cpp.orig 2009-06-24 14:22:23.000000000 +0400
-+++ src/zm_monitor.cpp 2011-04-08 17:48:07.389805307 +0400
-@@ -43,6 +43,7 @@
+--- src/zm_monitor.cpp.orig 2011-03-02 15:23:10.000000000 +0300
++++ src/zm_monitor.cpp 2011-05-05 18:31:35.028176099 +0400
+@@ -45,6 +45,7 @@
#include <sys/mman.h>
#include <fcntl.h>
#else // ZM_MEM_MAPPED
diff --git a/multimedia/zoneminder/files/patch-src_zm_stream.cpp b/multimedia/zoneminder/files/patch-src_zm_stream.cpp
new file mode 100644
index 000000000000..2299f079c095
--- /dev/null
+++ b/multimedia/zoneminder/files/patch-src_zm_stream.cpp
@@ -0,0 +1,11 @@
+--- src/zm_stream.cpp.orig 2009-05-08 16:47:27.000000000 +0300
++++ src/zm_stream.cpp 2011-05-31 12:53:35.182245374 +0300
+@@ -289,7 +289,7 @@
+
+ strncpy( loc_addr.sun_path, loc_sock_path, sizeof(loc_addr.sun_path) );
+ loc_addr.sun_family = AF_UNIX;
+- if ( bind( sd, (struct sockaddr *)&loc_addr, strlen(loc_addr.sun_path)+sizeof(loc_addr.sun_family)) < 0 )
++ if ( bind( sd, (struct sockaddr *)&loc_addr, strlen(loc_addr.sun_path) + 1 +sizeof(loc_addr.sun_family)) < 0 )
+ {
+ Fatal( "Can't bind: %s", strerror(errno) );
+ }
diff --git a/multimedia/zoneminder/files/patch-src_zmu.cpp b/multimedia/zoneminder/files/patch-src_zmu.cpp
index 62ba4e73ea23..9bb03d1c5568 100644
--- a/multimedia/zoneminder/files/patch-src_zmu.cpp
+++ b/multimedia/zoneminder/files/patch-src_zmu.cpp
@@ -1,5 +1,5 @@
---- src/zmu.cpp.orig 2009-05-08 13:17:10.000000000 +0400
-+++ src/zmu.cpp 2011-04-12 15:41:02.696305284 +0400
+--- src/zmu.cpp.orig 2011-02-16 00:59:06.000000000 +0300
++++ src/zmu.cpp 2011-05-05 18:31:35.038175339 +0400
@@ -18,7 +18,7 @@
//
@@ -9,7 +9,7 @@
#include "zm.h"
#include "zm_db.h"
#include "zm_user.h"
-@@ -431,7 +431,7 @@ int main( int argc, char *argv[] )
+@@ -435,7 +435,7 @@ int main( int argc, char *argv[] )
{
char timestamp_str[64] = "None";
if ( timestamp.tv_sec )