diff options
31 files changed, 2494 insertions, 0 deletions
diff --git a/multimedia/Makefile b/multimedia/Makefile index b3794f024252..7e3b0466a630 100644 --- a/multimedia/Makefile +++ b/multimedia/Makefile @@ -383,5 +383,6 @@ SUBDIR += y4mscaler SUBDIR += yamdi SUBDIR += youtube-viewer + SUBDIR += zoneminder .include <bsd.port.subdir.mk> diff --git a/multimedia/zoneminder/Makefile b/multimedia/zoneminder/Makefile new file mode 100644 index 000000000000..dc5b74f58c2a --- /dev/null +++ b/multimedia/zoneminder/Makefile @@ -0,0 +1,121 @@ +# New ports collection makefile for: multimedia/zoneminder +# Date created: 2011-04-08 +# Whom: bsam, based on ports by Richard Lee and Electric Messiah +# +# $FreeBSD$ +# + +PORTNAME= zoneminder +PORTVERSION= 1.24.2 +CATEGORIES= multimedia +MASTER_SITES= http://www2.zoneminder.com/downloads/ +DISTNAME= ZoneMinder-${PORTVERSION} + +MAINTAINER= bsam@FreeBSD.org +COMMENT= Complete security camera solution, fully web based with image analysis + +LICENSE= GPLv2 + +RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Apache.pm:${PORTSDIR}/www/mod_perl \ + ${LOCALBASE}/bin/sudo:${PORTSDIR}/security/sudo +LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \ + netpbm.1:${PORTSDIR}/graphics/netpbm \ + pcre.0:${PORTSDIR}/devel/pcre \ + avutil.1:${PORTSDIR}/multimedia/ffmpeg +BUILD_DEPENDS= ${LOCALBASE}/lib/php/20090626/mysql.so:${PORTSDIR}/databases/php5-mysql \ + ${LOCALBASE}/bin/php-config:${PORTSDIR}/lang/php5-extensions \ + ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI \ + ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql${MYSQL_VER} \ + ${SITE_PERL}/PHP/Serialization.pm:${PORTSDIR}/devel/p5-PHP-Serialization \ + ${SITE_PERL}/Date/Manip.pm:${PORTSDIR}/devel/p5-Date-Manip \ + ${SITE_PERL}/LWP.pm:${PORTSDIR}/www/p5-libwww \ + ${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \ + ${SITE_PERL}/Archive/Tar.pm:${PORTSDIR}/archivers/p5-Archive-Tar \ + ${SITE_PERL}/MIME/Lite.pm:${PORTSDIR}/mail/p5-MIME-Lite \ + ${SITE_PERL}/MIME/Entity.pm:${PORTSDIR}/mail/p5-MIME-Tools \ + ${LOCALBASE}/include/linux/videodev.h:${PORTSDIR}/multimedia/v4l_compat \ + ${LOCALBASE}/include/gnutls/openssl.h:${PORTSDIR}/security/gnutls + +GNU_CONFIGURE= yes +USE_PHP= yes +USE_PERL5= yes +USE_MYSQL= yes +USE_RC_SUBR= zm + +CONFIGURE_ARGS= --with-mysql=${LOCALBASE} \ + --with-webdir=${WWWDIR}/data \ + --with-cgidir=${WWWDIR}/cgi-bin \ + --with-webgroup=${WWWGRP} \ + --with-webuser=${WWWOWN} \ + --enable-crashtrace=no \ + --with-ffmpeg=${LOCALBASE} \ + --enable-mmap=no \ + --with-extralibs=-lpthread + +CONFIGURE_ENV= ZM_DB_HOST=${DB_HOST} \ + ZM_DB_NAME=${DB_NAME} \ + ZM_DB_USER=${DB_USER} \ + ZM_DB_PASS=${DB_PASS} + +DB_HOST?= localhost +DB_NAME?= zm +DB_USER?= zmuser +DB_PASS?= zmpass + +PLIST_SUB= WWWDIR_REL=${WWWDIR_REL} + +MAN3PREFIX?= ${PREFIX}/lib/perl5/${PERL_VERSION} +MAN3= ZoneMinder::Trigger::Connection.3 \ + ZoneMinder::Control::Ncs370.3 \ + ZoneMinder::Trigger::Channel::Serial.3 \ + ZoneMinder.3 \ + ZoneMinder::Config.3 \ + ZoneMinder::Control::mjpgStreamer.3 \ + ZoneMinder::Control::PanasonicIP.3 \ + ZoneMinder::Base.3 \ + ZoneMinder::Trigger::Channel::Unix.3 \ + ZoneMinder::Control::AxisV2.3 \ + ZoneMinder::Trigger::Channel.3 \ + ZoneMinder::Memory.3 \ + ZoneMinder::Trigger::Channel::File.3 \ + ZoneMinder::Database.3 \ + ZoneMinder::Control::PelcoD.3 \ + ZoneMinder::Control::Visca.3 \ + ZoneMinder::Trigger::Channel::Inet.3 \ + ZoneMinder::Trigger::Connection::Example.3 \ + ZoneMinder::Trigger::Channel::Spawning.3 \ + ZoneMinder::Control.3 \ + ZoneMinder::General.3 \ + ZoneMinder::Trigger::Channel::Handle.3 \ + ZoneMinder::Debug.3 \ + ZoneMinder::ConfigAdmin.3 + +post-configure: + ${MV} ${WRKSRC}/zm.conf ${WRKSRC}/zm.conf.sample + +post-patch: + ${REINPLACE_CMD} -e 's,/bin:/usr/bin,/bin:/usr/bin:${LOCALBASE}/bin,g' ${WRKSRC}/scripts/*.pl.in + ${REINPLACE_CMD} -e 's,sudo,${LOCALBASE}/bin/sudo,g' ${WRKSRC}/scripts/zmpkg.pl.in + +pre-build: + ${CP} ${FILESDIR}/videodev.h ${WRKSRC}/src + ${CP} ${FILESDIR}/zm_fbsd_camera.cpp ${WRKSRC}/src + ${CP} ${FILESDIR}/zm_fbsd_camera.h ${WRKSRC}/src + +post-install: + @if [ ! -f ${PREFIX}/etc/zm.conf ]; then \ + ${CP} -p ${PREFIX}/etc/zm.conf.sample ${PREFIX}/etc/zm.conf ; \ + fi +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_MAN} ${WRKSRC}/AUTHORS ${DOCSDIR} + ${INSTALL_MAN} ${WRKSRC}/COPYING ${DOCSDIR} + ${INSTALL_MAN} ${WRKSRC}/ChangeLog ${DOCSDIR} + ${INSTALL_MAN} ${WRKSRC}/INSTALL ${DOCSDIR} + ${INSTALL_MAN} ${WRKSRC}/NEWS ${DOCSDIR} + ${INSTALL_MAN} ${WRKSRC}/README ${DOCSDIR} + ${INSTALL_MAN} ${WRKSRC}/TODO ${DOCSDIR} + ${INSTALL_MAN} ${FILESDIR}/README.FreeBSD ${DOCSDIR} +.endif + ${CAT} ${FILESDIR}/README.FreeBSD +.include <bsd.port.mk> diff --git a/multimedia/zoneminder/distinfo b/multimedia/zoneminder/distinfo new file mode 100644 index 000000000000..e1899b31200f --- /dev/null +++ b/multimedia/zoneminder/distinfo @@ -0,0 +1,5 @@ +SHA256 (ZoneMinder-1.24.2.tar.gz) = fd8475138ccee8870534f1210a3d1e3e1990e963dd73146a6d310dc71c463dca +SIZE (ZoneMinder-1.24.2.tar.gz) = 965521 +SHA256 (ZoneMinder-1.22.3.tar.gz) = 6bee02be8d5e21d3435c17def157a87727330ee6480be3a8fa5b1966cc10a6bc +SIZE (ZoneMinder-1.22.3.tar.gz) = 1258311 + diff --git a/multimedia/zoneminder/files/README.FreeBSD b/multimedia/zoneminder/files/README.FreeBSD new file mode 100644 index 000000000000..c1f9a1fb817a --- /dev/null +++ b/multimedia/zoneminder/files/README.FreeBSD @@ -0,0 +1,213 @@ +== Origin == + +This port project started its life based on quadra's original port for +version 1.19.2. Brooktree (bktr) video input support code written by +quadra is virtually unchanged in this port other than some function +argument changes to match the latest ZoneMinder version (1.22.3). +Although this code compiles, I have not tested its functionality. +Currently, I only have two Axis 206 network cameras, which work fine, +but I have not tested the set up with any other camera +configurations. + +I have tested this port on FreeBSD 5.5 (i386) as well as FreeBSD 6.2 +(i386) without any problems. + +== Preparation == + +* Download the port (zoneminder-freebsd-port-1.22.3p[version].tgz) +* Become root and 'cd' to /usr/ports/multimedia/ +* Extract the port files. You know how to do 'tar zxf' right? + +You should now have /usr/ports/multimedia/zoneminder/ + +Now, go to the directory and look at files/patch-SharedMem.pm + +What this patch does is to hard-wire native size to 4 (32-bits). +On FreeBSD, Perl is configured with -Duse64bitint by default and the +method that is used by SharedMem.pm to determine architectural bit +width incorrectly considers an i386 machine as 64-bit capable. I'm +not a perl expert -- in fact, I hate perl -- and I really have no +idea how to properly determine pointer size in Perl, so this patch +exists. Obviously, if you are running FreeBSD-AMD64 (or Alpha or +something, although I have no idea if this software would work on +that architecture), you will want to get rid of this patch file. +Just delete it _before_ you make. + +And if you're bored, feel free to go through all the patch files just +marvelling at all the trouble I had to go through ^_^; + +Now that we've gotten that little quirk out of the way, we'll move on +to Makefile. Open Makefile using your favorite text editor and modify +the following items if they're not suitable for you. + +* WWWDIR : This is where your web server will serve from. If you + already have apache installed, you should point this to the same + place where apache thinks is the web base. Default is + /usr/local/www, as can be seen in the Makefile. +* ZM_DB_HOST : This is where mysql server runs. If you're running + mysql server on a different machine, you'll want to update this + line, but I'm not sure if you can avoid installing mysql on this + machine. Disk space is cheap, so I don't think it's that big a deal + having mysql just sitting there, as long as it's not started. +* ZM_DB_NAME : This is the database name that ZoneMinder will use. + I'm pretty sure ZoneMinder won't mind sharing a base database with + other applications, but it certainly doesn't hurt to let it have its + own database space, so this defaults to "zm" +* ZM_DB_USER and ZM_DB_PASS are username and password for the + database. + +We're almost ready to "make," but first, consider the following points +and just imagine how things can break based on your situation. + +* If you do not have apache installed, this port will install version + 1.xx.xx of apache. On the other hand, if you already have apache + 2.xx.xx installed, I do not know what will happen. My guess is that + things will work just fine since php5 port will see apache2 + installation and skip apache1 installation. +* If you have mysql version other than 5.0.xx installed, this port + build will probably fail. Even if it doesn't fail, you probably do + not want multiple versions of mysql installed on your machine. You + can either edit the dependency in the Makefile to point to your + version of mysql, or get rid of the dependency statement for mysql. + Getting rid of it is not as nice, but I'm sure you're able to keep + the dependencies in mind when messing around with ports in the + future. +* If you have PHP4 installed, you should modify the dependencies in + the Makefile to point to php4-extensions instead of + php5-extensions. I know for a fact that both versions work fine + with ZoneMinder. +* I have not set up dependencies for perl modules Device::SerialPort + and X10::ActiveHome because I do not have PTZ camera and my X10 is + handled by another dedicated machine. If you want this, you'll want + to tinker with the port some more. You can also manually install + those ports (if they exist) before doing make. I imagine + ZoneMinder's configure script will pick them up. + +That's about it. Let's make! + +== Making == + +There's really nothing special about making. Just 'make' will do. +However, during the dependency builds, make sure PHP install includes +the apache module. If you already have PHP installed without apache +module, you can always tinker with the Makefile in +/usr/ports/lang/php5/ and do 'make deinstall' followed by 'make +reinstall' to reinstall the port with additional modules. + +If the build fails, take a deep breath, yell at your computer for +a moment, and try to figure out if you messed up anything while +changing the Makefile in one of the above steps. If you do not +believe you've done anything wrong and still can't figure out why +the build fails, there's always the forum.... + +If it builds fine, feel free to 'make install' + +However, do NOT 'make clean' yet! + +== Seeding the database == + +If this is the first time installing ZoneMinder, you'll need to seed +the mysql database with ZoneMinder's configuration information. To do +this, follow these steps as a root user. + +First, if this is the first time mysql was installed, you'll want to +consider where you want the database files to reside. Default is +/var/db/mysql/ but you may have set up a dedicated partition for it. +If you want to change it, just put the following line in /etc/rc.conf + +* mysql_dbdir="/somewhere/else/you/want" + +Obviously, you'll want this line in there, too: + +* mysql_enable="YES" + +Now, start the sucker up. + +shell> /usr/local/etc/rc.d/mysql-server start + +Assuming it started fine, give it a few seconds and then continue. +Note that you should be at /usr/ports/multimedia/zoneminder/ for the +following steps. + +shell> mysql -h localhost -u root -p + +This will ask for a password. Just press enter to go with an empty +password. You should now be in mysql command line interface. + +mysql> source work/ZoneMinder-1.22.3/db/zm_create.sql + +Above runs bunch of SQL commands from the file, seeding the +database. + +mysql> grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass'; flush privileges; + +Above sets up permissions. Note that if you changed database name, +user name, or password in the Makefile, you'll need to modify above +command accordingly. + +mysql> quit + +That one should be obvious to you. + +== Post-Installation Quirks == + +PHP5 installation does not necessarily set up the apache configuration +file properly. You will want to make sure that following lines are in +apache configuration file, /usr/local/etc/apache/httpd.conf + +* AddType application/x-httpd-php .php +* AddType application/x-httpd-php-source .phps + +While you're at it, you might also want to check that following line +is in the configuration file. + +* LoadModule php5_module libexec/apache/libphp5.so + +== Automatic Execution at Boot == + +Obviously, if this is to be used as a security device, you'll want it +to start automatically on a reboot. Again obviously, you need to have +both apache and mysql start up as well, unless of course, you're +running mysql on a remote machine. If you are, I'm sure you're an +expert at this stuff already. + +Add following lines into /etc/rc.conf, if not already present. Order +is not important. + +* apache_enable="YES" +* mysql_enable="YES" +* zm_enable="YES" + +Just for your information, I had to put 'sleep 10' in ZoneMinder +startup script because mysql port does not become available +immediately after mysql startup script finishes. + +== More Quirks == + +Depending on the number of cameras and their resolution settings, you +may need a lot more shared memory than provided by a default kernel. +If you've never built a custom kernel before, umm, time for you to +read the FreeBSD Handbook. It can be found at +/usr/share/doc/handbook/index.html or at http://freebsd.org/ + +For the rest of you, just add a reasonable-looking version of the +following lines into your kernel configuration file and go though the +buildkernel, installkernel process. + +* options SHMMAXPGS=65536 +* options SHMMNI=384 +* options SHMSEG=256 + +I think above gives maximum of 256MB of shared memory. SHMMNI +statement probably isn't required since ZoneMinder probably creates +one big instance per camera instead of many little instances. I'm not +sure about the last one. Whatever the case, above works for me with +two Axis 206 cameras. + +Adding the following line into /etc/sysctl.conf may speed up the +shared memory accesses, so even though it's not required, it's +probably a good idea. + +* kern.ipc.shm_use_phys=1 + +That's all folks! diff --git a/multimedia/zoneminder/files/patch-Makefile.in b/multimedia/zoneminder/files/patch-Makefile.in new file mode 100644 index 000000000000..ac6bdeb5153e --- /dev/null +++ b/multimedia/zoneminder/files/patch-Makefile.in @@ -0,0 +1,20 @@ +--- 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 + webuser = @WEB_USER@ + webgroup = @WEB_GROUP@ + sysconf_DATA = \ +- zm.conf ++ zm.conf.sample + + SUBDIRS = \ + src \ +@@ -278,7 +278,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 + cd $(top_builddir) && $(SHELL) ./config.status $@ diff --git a/multimedia/zoneminder/files/patch-configure b/multimedia/zoneminder/files/patch-configure new file mode 100644 index 000000000000..1e0b62e35af2 --- /dev/null +++ b/multimedia/zoneminder/files/patch-configure @@ -0,0 +1,92 @@ +--- 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; + + MYSQL_LIBS="-L${MYSQL_PREFIX}/${LIB_ARCH}/mysql" +-MYSQL_CFLAGS="-I${MYSQL_PREFIX}/include" ++MYSQL_CFLAGS="-I${MYSQL_PREFIX}/include/mysql" + + + +@@ -7392,7 +7392,7 @@ if test "${ac_cv_lib_mysqlclient_mysql_i + echo $ECHO_N "(cached) $ECHO_C" >&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 + 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 + #define HAVE_LIBDL 1 + _ACEOF + +- LIBS="-ldl $LIBS" ++ 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 diff --git a/multimedia/zoneminder/files/patch-db_zm_create.sql.in b/multimedia/zoneminder/files/patch-db_zm_create.sql.in new file mode 100644 index 000000000000..839547ea1363 --- /dev/null +++ b/multimedia/zoneminder/files/patch-db_zm_create.sql.in @@ -0,0 +1,166 @@ +--- 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 +@@ -41,7 +41,7 @@ CREATE TABLE `Config` ( + `Readonly` tinyint(3) unsigned NOT NULL default '0', + `Requires` text, + PRIMARY KEY (`Name`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `ControlPresets` +@@ -53,7 +53,7 @@ CREATE TABLE `ControlPresets` ( + `Preset` int(10) unsigned NOT NULL default '0', + `Label` varchar(64) NOT NULL default '', + PRIMARY KEY (`MonitorId`,`Preset`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `Controls` +@@ -161,7 +161,7 @@ CREATE TABLE `Controls` ( + `CanAutoScan` tinyint(3) unsigned NOT NULL default '0', + `NumScanPaths` tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (`Id`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `Devices` +@@ -174,7 +174,7 @@ CREATE TABLE `Devices` ( + `Type` enum('X10') NOT NULL default 'X10', + `KeyString` varchar(32) NOT NULL default '', + PRIMARY KEY (`Id`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `Events` +@@ -208,7 +208,7 @@ CREATE TABLE `Events` ( + KEY `StartTime` (`StartTime`), + KEY `Frames` (`Frames`), + KEY `Archived` (`Archived`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `Filters` +@@ -228,7 +228,7 @@ CREATE TABLE `Filters` ( + `AutoDelete` tinyint(3) unsigned NOT NULL default '0', + `Background` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`Name`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `Frames` +@@ -245,7 +245,7 @@ CREATE TABLE `Frames` ( + PRIMARY KEY (`EventId`,`FrameId`), + KEY `Type` (`Type`), + KEY `TimeStamp` (`TimeStamp`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `Groups` +@@ -257,7 +257,7 @@ CREATE TABLE `Groups` ( + `Name` varchar(64) NOT NULL default '', + `MonitorIds` tinytext NOT NULL, + PRIMARY KEY (`Id`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `MonitorPresets` +@@ -288,7 +288,7 @@ CREATE TABLE `MonitorPresets` ( + `DefaultRate` smallint(5) unsigned NOT NULL default '100', + `DefaultScale` smallint(5) unsigned NOT NULL default '100', + PRIMARY KEY (`Id`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `Monitors` +@@ -352,7 +352,7 @@ CREATE TABLE `Monitors` ( + `WebColour` varchar(32) NOT NULL default 'red', + `Sequence` smallint(5) unsigned default NULL, + PRIMARY KEY (`Id`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `States` +@@ -363,7 +363,7 @@ CREATE TABLE `States` ( + `Name` varchar(64) NOT NULL default '', + `Definition` text NOT NULL, + PRIMARY KEY (`Name`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `Stats` +@@ -390,7 +390,7 @@ CREATE TABLE `Stats` ( + KEY `EventId` (`EventId`), + KEY `MonitorId` (`MonitorId`), + KEY `ZoneId` (`ZoneId`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `TriggersX10` +@@ -403,7 +403,7 @@ CREATE TABLE `TriggersX10` ( + `AlarmInput` varchar(32) default NULL, + `AlarmOutput` varchar(32) default NULL, + PRIMARY KEY (`MonitorId`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `Users` +@@ -426,7 +426,7 @@ CREATE TABLE `Users` ( + `MonitorIds` tinytext NOT NULL, + PRIMARY KEY (`Id`), + UNIQUE KEY `UC_Username` (`Username`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `ZonePresets` +@@ -453,7 +453,7 @@ CREATE TABLE `ZonePresets` ( + `MaxBlobs` smallint(5) unsigned default NULL, + `OverloadFrames` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`Id`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + -- + -- Table structure for table `Zones` +@@ -486,7 +486,7 @@ CREATE TABLE `Zones` ( + `OverloadFrames` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`Id`), + KEY `MonitorId` (`MonitorId`) +-) ENGINE=@ZM_MYSQL_ENGINE@; ++); + + /*!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'; diff --git a/multimedia/zoneminder/files/patch-src_Makefile.am b/multimedia/zoneminder/files/patch-src_Makefile.am new file mode 100644 index 000000000000..e80405366e9c --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_Makefile.am @@ -0,0 +1,12 @@ +--- 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 @@ + 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 = + + CLEANFILES = *.rpo + diff --git a/multimedia/zoneminder/files/patch-src_Makefile.in b/multimedia/zoneminder/files/patch-src_Makefile.in new file mode 100644 index 000000000000..74fad9aadb88 --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_Makefile.in @@ -0,0 +1,10 @@ +--- 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_comms.cpp b/multimedia/zoneminder/files/patch-src_zm_comms.cpp new file mode 100644 index 000000000000..35fbd7e627da --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_comms.cpp @@ -0,0 +1,11 @@ +--- src/zm_comms.cpp.orig 2009-03-20 15:07:00.000000000 +0300 ++++ src/zm_comms.cpp 2011-04-08 17:48:07.408806977 +0400 +@@ -25,7 +25,7 @@ + #include <fcntl.h> + #include <stdarg.h> + //#include <memory.h> +-#include <alloca.h> ++#include <stdlib.h> + #include <string.h> + //#include <unistd.h> + #include <sys/ioctl.h> diff --git a/multimedia/zoneminder/files/patch-src_zm_comms.h b/multimedia/zoneminder/files/patch-src_zm_comms.h new file mode 100644 index 000000000000..12aaf767cb9c --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_comms.h @@ -0,0 +1,16 @@ +--- src/zm_comms.h.orig 2009-03-20 15:07:00.000000000 +0300 ++++ src/zm_comms.h 2011-04-08 17:48:07.410804476 +0400 +@@ -26,10 +26,11 @@ + #include <netdb.h> + #include <errno.h> + #include <sys/un.h> +- ++#include <sys/socket.h> + #include <set> + #include <vector> +- ++#include <sys/uio.h> ++#include <netinet/in.h> + class CommsException : public Exception + { + public: diff --git a/multimedia/zoneminder/files/patch-src_zm_event.cpp b/multimedia/zoneminder/files/patch-src_zm_event.cpp new file mode 100644 index 000000000000..46bdbeeddb3f --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_event.cpp @@ -0,0 +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 +@@ -27,6 +27,7 @@ + #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]; ++ static char start_time_str[32]; + + 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]; + diff --git a/multimedia/zoneminder/files/patch-src_zm_event.h b/multimedia/zoneminder/files/patch-src_zm_event.h new file mode 100644 index 000000000000..2850a706b041 --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_event.h @@ -0,0 +1,20 @@ +--- src/zm_event.h.orig 2009-03-20 15:07:00.000000000 +0300 ++++ src/zm_event.h 2011-04-08 17:48:07.357806760 +0400 +@@ -228,7 +228,7 @@ protected: + protected: + bool loadEventData( int event_id ); + bool loadInitialEventData( int init_event_id, int init_frame_id ); +- bool loadInitialEventData( int monitor_id, time_t event_time ); ++ bool loadInitialEventData( int monitor_id, long event_time ); + + void checkEventLoaded(); + void processCommand( const CmdMsg *msg ); +@@ -251,7 +251,7 @@ public: + loadInitialEventData( init_event_id, init_frame_id ); + loadMonitor( event_data->monitor_id ); + } +- void setStreamStart( int monitor_id, time_t event_time ) ++ void setStreamStart( int monitor_id, long event_time ) + { + loadInitialEventData( monitor_id, event_time ); + loadMonitor( monitor_id ); diff --git a/multimedia/zoneminder/files/patch-src_zm_ffmpeg_camera.cpp b/multimedia/zoneminder/files/patch-src_zm_ffmpeg_camera.cpp new file mode 100644 index 000000000000..dfb0711ddd53 --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_ffmpeg_camera.cpp @@ -0,0 +1,11 @@ +--- src/zm_ffmpeg_camera.cpp.orig 2009-05-25 22:04:00.000000000 +0400 ++++ src/zm_ffmpeg_camera.cpp 2011-04-08 17:48:07.366805007 +0400 +@@ -18,7 +18,7 @@ + // + + #include "zm.h" +- ++#include <errno.h> + #if HAVE_LIBAVFORMAT + + #include "zm_ffmpeg_camera.h" diff --git a/multimedia/zoneminder/files/patch-src_zm_image.cpp b/multimedia/zoneminder/files/patch-src_zm_image.cpp new file mode 100644 index 000000000000..5dca4f9f7a17 --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_image.cpp @@ -0,0 +1,20 @@ +--- 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 new file mode 100644 index 000000000000..bddb8896c15c --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_jpeg.c @@ -0,0 +1,26 @@ +--- 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 new file mode 100644 index 000000000000..52adcc049ce2 --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_jpeg.h @@ -0,0 +1,10 @@ +--- 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 new file mode 100644 index 000000000000..f9c869a65505 --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_local_camera.h @@ -0,0 +1,25 @@ +--- 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: + protected: + static int camera_count; + static int channel_count; ++ static int last_channel; ++static int m_cap_frame; ++static int m_cap_frame_active; ++static int m_sync_frame; ++static video_mbuf m_vmb; ++static video_mmap *m_vmm; ++static int m_videohandle; ++static unsigned char *m_buffer; + static int channels[VIDEO_MAX_FRAME]; + static int standards[VIDEO_MAX_FRAME]; + +@@ -109,6 +117,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 ); ++ LocalCamera( const char *p_device, int p_channel, int p_format, int p_width, int p_height, int p_palette, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ); + ~LocalCamera(); + + void Initialise(); diff --git a/multimedia/zoneminder/files/patch-src_zm_monitor.cpp b/multimedia/zoneminder/files/patch-src_zm_monitor.cpp new file mode 100644 index 000000000000..e8c75b4871b2 --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_monitor.cpp @@ -0,0 +1,10 @@ +--- 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 @@ + #include <sys/mman.h> + #include <fcntl.h> + #else // ZM_MEM_MAPPED ++#include <unistd.h> + #include <sys/ipc.h> + #include <sys/shm.h> + #endif // ZM_MEM_MAPPED diff --git a/multimedia/zoneminder/files/patch-src_zm_mpeg.cpp b/multimedia/zoneminder/files/patch-src_zm_mpeg.cpp new file mode 100644 index 000000000000..0d5910d9c9ff --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_mpeg.cpp @@ -0,0 +1,11 @@ +--- src/zm_mpeg.cpp.orig 2009-05-25 22:04:00.000000000 +0400 ++++ src/zm_mpeg.cpp 2011-04-08 17:48:07.391806718 +0400 +@@ -19,7 +19,7 @@ + + #include <stdlib.h> + #include <string.h> +- ++#include <errno.h> + #include "zm.h" + #include "zm_mpeg.h" + diff --git a/multimedia/zoneminder/files/patch-src_zm_remote_camera.h b/multimedia/zoneminder/files/patch-src_zm_remote_camera.h new file mode 100644 index 000000000000..7c0920b27713 --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_remote_camera.h @@ -0,0 +1,11 @@ +--- src/zm_remote_camera.h.orig 2009-05-28 12:47:59.000000000 +0400 ++++ src/zm_remote_camera.h 2011-04-08 17:48:07.392807144 +0400 +@@ -21,7 +21,7 @@ + #define ZM_REMOTE_CAMERA_H + + #include "zm_camera.h" +- ++#include <netinet/in.h> + #include <string> + #include <netdb.h> + diff --git a/multimedia/zoneminder/files/patch-src_zm_sdp.cpp b/multimedia/zoneminder/files/patch-src_zm_sdp.cpp new file mode 100644 index 000000000000..5f879575984f --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_sdp.cpp @@ -0,0 +1,11 @@ +--- src/zm_sdp.cpp.orig 2009-05-28 12:45:49.000000000 +0400 ++++ src/zm_sdp.cpp 2011-04-08 17:48:07.394806320 +0400 +@@ -287,7 +287,7 @@ SessionDescriptor::SessionDescriptor( co + + AVFormatContext *SessionDescriptor::generateFormatContext() const + { +- AVFormatContext *formatContext = avformat_alloc_context(); ++ AVFormatContext *formatContext = av_alloc_format_context(); + + strncpy( formatContext->filename, mUrl.c_str(), sizeof(formatContext->filename) ); + diff --git a/multimedia/zoneminder/files/patch-src_zm_signal.h b/multimedia/zoneminder/files/patch-src_zm_signal.h new file mode 100644 index 000000000000..cb1481c3f5c0 --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm_signal.h @@ -0,0 +1,16 @@ +--- src/zm_signal.h.orig 2009-03-20 15:07:00.000000000 +0300 ++++ src/zm_signal.h 2011-04-08 17:48:07.396806893 +0400 +@@ -20,8 +20,12 @@ + #ifndef ZM_SIGNAL_H + #define ZM_SIGNAL_H + +-#include <signal.h> ++ ++#ifndef ZM_NO_CRASHTRACE + #include <execinfo.h> ++#endif ++ ++#include <signal.h> + + #include "zm.h" + diff --git a/multimedia/zoneminder/files/patch-src_zmc.cpp b/multimedia/zoneminder/files/patch-src_zmc.cpp new file mode 100644 index 000000000000..8c6384bf4016 --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zmc.cpp @@ -0,0 +1,27 @@ +--- src/zmc.cpp.orig 2009-05-08 13:17:10.000000000 +0400 ++++ src/zmc.cpp 2011-04-08 17:48:07.405805978 +0400 +@@ -19,7 +19,7 @@ + + #include <getopt.h> + #include <signal.h> +-#include <values.h> ++#include <limits.h> + + #include "zm.h" + #include "zm_db.h" +@@ -27,12 +27,14 @@ + #include "zm_signal.h" + #include "zm_monitor.h" + ++#define MAXINT INT_MAX ++ + void Usage() + { + fprintf( stderr, "zmc -d <device_path> or -r <proto> -H <host> -P <port> -p <path> or -f <file_path> or -m <monitor_id>\n" ); + + fprintf( stderr, "Options:\n" ); +- fprintf( stderr, " -d, --device <device_path> : For local cameras, device to access. E.g /dev/video0 etc\n" ); ++ fprintf( stderr, " -d, --device <device_path> : For local cameras, device to access. E.g /dev/bktr0 etc\n" ); + fprintf( stderr, " -r <proto> -H <host> -P <port> -p <path> : For remote cameras\n" ); + fprintf( stderr, " -f, --file <file_path> : For local images, jpg file to access.\n" ); + fprintf( stderr, " -m, --monitor <monitor_id> : For sources associated with a single monitor\n" ); diff --git a/multimedia/zoneminder/files/patch-src_zmu.cpp b/multimedia/zoneminder/files/patch-src_zmu.cpp new file mode 100644 index 000000000000..62ba4e73ea23 --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zmu.cpp @@ -0,0 +1,20 @@ +--- src/zmu.cpp.orig 2009-05-08 13:17:10.000000000 +0400 ++++ src/zmu.cpp 2011-04-12 15:41:02.696305284 +0400 +@@ -18,7 +18,7 @@ + // + + #include <getopt.h> +- ++#include <iostream> + #include "zm.h" + #include "zm_db.h" + #include "zm_user.h" +@@ -431,7 +431,7 @@ int main( int argc, char *argv[] ) + { + char timestamp_str[64] = "None"; + if ( timestamp.tv_sec ) +- strftime( timestamp_str, sizeof(timestamp_str), "%Y-%m-%d %H:%M:%S", localtime( ×tamp.tv_sec ) ); ++ strftime( timestamp_str, sizeof(timestamp_str), "%Y-%m-%d %H:%M:%S", localtime( (time_t *) ×tamp.tv_sec ) ); + if ( image_idx == -1 ) + printf( "Time of last image capture: %s.%02ld\n", timestamp_str, timestamp.tv_usec/10000 ); + else diff --git a/multimedia/zoneminder/files/videodev.h b/multimedia/zoneminder/files/videodev.h new file mode 100644 index 000000000000..a2278b214717 --- /dev/null +++ b/multimedia/zoneminder/files/videodev.h @@ -0,0 +1,404 @@ +#ifndef __LINUX_VIDEODEV_H +#define __LINUX_VIDEODEV_H + +typedef __signed__ char __s8; +typedef unsigned char __u8; + +typedef __signed__ short __s16; +typedef unsigned short __u16; + +typedef __signed__ int __s32; +typedef unsigned int __u32; + +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) +typedef __signed__ long long __s64; +typedef unsigned long long __u64; +#endif + +//#include <linux/types.h> +//#include <linux/version.h> + +#ifdef __KERNEL__ + +#include <linux/poll.h> +#include <linux/devfs_fs_kernel.h> + +struct video_device +{ + struct module *owner; + char name[32]; + int type; + int hardware; + + int (*open)(struct video_device *, int mode); + void (*close)(struct video_device *); + long (*read)(struct video_device *, char *, unsigned long, int noblock); + /* Do we need a write method ? */ + long (*write)(struct video_device *, const char *, unsigned long, int noblock); +#if LINUX_VERSION_CODE >= 0x020100 + unsigned int (*poll)(struct video_device *, struct file *, poll_table *); +#endif + int (*ioctl)(struct video_device *, unsigned int , void *); + int (*mmap)(struct video_device *, const char *, unsigned long); + int (*initialize)(struct video_device *); + void *priv; /* Used to be 'private' but that upsets C++ */ + int busy; + int minor; + devfs_handle_t devfs_handle; +}; + +#define VIDEO_MAJOR 81 +extern int video_register_device(struct video_device *, int type, int nr); + +#define VFL_TYPE_GRABBER 0 +#define VFL_TYPE_VBI 1 +#define VFL_TYPE_RADIO 2 +#define VFL_TYPE_VTX 3 + +extern void video_unregister_device(struct video_device *); +#endif + + +#define VID_TYPE_CAPTURE 1 /* Can capture */ +#define VID_TYPE_TUNER 2 /* Can tune */ +#define VID_TYPE_TELETEXT 4 /* Does teletext */ +#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ +#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ +#define VID_TYPE_CLIPPING 32 /* Can clip */ +#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ +#define VID_TYPE_SCALES 128 /* Scalable */ +#define VID_TYPE_MONOCHROME 256 /* Monochrome only */ +#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ +#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ +#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ +#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ +#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ + +struct video_capability +{ + char name[32]; + int type; + int channels; /* Num channels */ + int audios; /* Num audio devices */ + int maxwidth; /* Supported width */ + int maxheight; /* And height */ + int minwidth; /* Supported width */ + int minheight; /* And height */ +}; + + +struct video_channel +{ + int channel; + char name[32]; + int tuners; + __u32 flags; +#define VIDEO_VC_TUNER 1 /* Channel has a tuner */ +#define VIDEO_VC_AUDIO 2 /* Channel has audio */ + __u16 type; +#define VIDEO_TYPE_TV 1 +#define VIDEO_TYPE_CAMERA 2 + __u16 norm; /* Norm set by channel */ +}; + +struct video_tuner +{ + int tuner; + char name[32]; + u_long rangelow, rangehigh; /* Tuner range */ + __u32 flags; +#define VIDEO_TUNER_PAL 1 +#define VIDEO_TUNER_NTSC 2 +#define VIDEO_TUNER_SECAM 4 +#define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */ +#define VIDEO_TUNER_NORM 16 /* Tuner can set norm */ +#define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */ +#define VIDEO_TUNER_RDS_ON 256 /* Tuner is seeing an RDS datastream */ +#define VIDEO_TUNER_MBS_ON 512 /* Tuner is seeing an MBS datastream */ + __u16 mode; /* PAL/NTSC/SECAM/OTHER */ +#define VIDEO_MODE_PAL 0 +#define VIDEO_MODE_NTSC 1 +#define VIDEO_MODE_SECAM 2 +#define VIDEO_MODE_AUTO 3 + __u16 signal; /* Signal strength 16bit scale */ +}; + +struct video_picture +{ + __u16 brightness; + __u16 hue; + __u16 colour; + __u16 contrast; + __u16 whiteness; /* Black and white only */ + __u16 depth; /* Capture depth */ + __u16 palette; /* Palette in use */ +#define VIDEO_PALETTE_GREY 1 /* Linear greyscale */ +#define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */ +#define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */ +#define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */ +#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */ +#define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */ +#define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */ +#define VIDEO_PALETTE_YUYV 8 +#define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */ +#define VIDEO_PALETTE_YUV420 10 +#define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */ +#define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */ +#define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */ +#define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */ +#define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */ +#define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */ +#define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */ +#define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */ +}; + +struct video_audio +{ + int audio; /* Audio channel */ + __u16 volume; /* If settable */ + __u16 bass, treble; + __u32 flags; +#define VIDEO_AUDIO_MUTE 1 +#define VIDEO_AUDIO_MUTABLE 2 +#define VIDEO_AUDIO_VOLUME 4 +#define VIDEO_AUDIO_BASS 8 +#define VIDEO_AUDIO_TREBLE 16 + char name[16]; +#define VIDEO_SOUND_MONO 1 +#define VIDEO_SOUND_STEREO 2 +#define VIDEO_SOUND_LANG1 4 +#define VIDEO_SOUND_LANG2 8 + __u16 mode; + __u16 balance; /* Stereo balance */ + __u16 step; /* Step actual volume uses */ +}; + +struct video_clip +{ + __s32 x,y; + __s32 width, height; + struct video_clip *next; /* For user use/driver use only */ +}; + +struct video_window +{ + __u32 x,y; /* Position of window */ + __u32 width,height; /* Its size */ + __u32 chromakey; + __u32 flags; + struct video_clip *clips; /* Set only */ + int clipcount; +#define VIDEO_WINDOW_INTERLACE 1 +#define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */ +#define VIDEO_CLIP_BITMAP -1 +/* bitmap is 1024x625, a '1' bit represents a clipped pixel */ +#define VIDEO_CLIPMAP_SIZE (128 * 625) +}; + +struct video_capture +{ + __u32 x,y; /* Offsets into image */ + __u32 width, height; /* Area to capture */ + __u16 decimation; /* Decimation divder */ + __u16 flags; /* Flags for capture */ +#define VIDEO_CAPTURE_ODD 0 /* Temporal */ +#define VIDEO_CAPTURE_EVEN 1 +}; + +struct video_buffer +{ + void *base; + int height,width; + int depth; + int bytesperline; +}; + +struct video_mmap +{ + unsigned int frame; /* Frame (0 - n) for double buffer */ + int height,width; + unsigned int format; /* should be VIDEO_PALETTE_* */ +}; + +struct video_key +{ + __u8 key[8]; + __u32 flags; +}; + + +#define VIDEO_MAX_FRAME 32 + +struct video_mbuf +{ + int size; /* Total memory to map */ + int frames; /* Frames */ + int offsets[VIDEO_MAX_FRAME]; +}; + + +#define VIDEO_NO_UNIT (-1) + + +struct video_unit +{ + int video; /* Video minor */ + int vbi; /* VBI minor */ + int radio; /* Radio minor */ + int audio; /* Audio minor */ + int teletext; /* Teletext minor */ +}; + +struct vbi_format { + __u32 sampling_rate; /* in Hz */ + __u32 samples_per_line; + __u32 sample_format; /* VIDEO_PALETTE_RAW only (1 byte) */ + __s32 start[2]; /* starting line for each frame */ + __u32 count[2]; /* count of lines for each frame */ + __u32 flags; +#define VBI_UNSYNC 1 /* can distingues between top/bottom field */ +#define VBI_INTERLACED 2 /* lines are interlaced */ +}; + +/* video_info is biased towards hardware mpeg encode/decode */ +/* but it could apply generically to any hardware compressor/decompressor */ +struct video_info +{ + __u32 frame_count; /* frames output since decode/encode began */ + __u32 h_size; /* current unscaled horizontal size */ + __u32 v_size; /* current unscaled veritcal size */ + __u32 smpte_timecode; /* current SMPTE timecode (for current GOP) */ + __u32 picture_type; /* current picture type */ + __u32 temporal_reference; /* current temporal reference */ + __u8 user_data[256]; /* user data last found in compressed stream */ + /* user_data[0] contains user data flags, user_data[1] has count */ +}; + +/* generic structure for setting playback modes */ +struct video_play_mode +{ + int mode; + int p1; + int p2; +}; + +/* for loading microcode / fpga programming */ +struct video_code +{ + char loadwhat[16]; /* name or tag of file being passed */ + int datasize; + __u8 *data; +}; + +#define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */ +#define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */ +#define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */ +#define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */ +#define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */ +#define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */ +#define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */ +#define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */ +#define VIDIOCGWIN _IOR('v',9, struct video_window) /* Get the video overlay window */ +#define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */ +#define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */ +#define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */ +#define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */ +#define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */ +#define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */ +#define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */ +#define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */ +#define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */ +#define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */ +#define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */ +#define VIDIOCGUNIT _IOR('v',21, struct video_unit) /* Get attached units */ +#define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get subcapture */ +#define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set subcapture */ +#define VIDIOCSPLAYMODE _IOW('v',24, struct video_play_mode) /* Set output video mode/feature */ +#define VIDIOCSWRITEMODE _IOW('v',25, int) /* Set write mode */ +#define VIDIOCGPLAYINFO _IOR('v',26, struct video_info) /* Get current playback info from hardware */ +#define VIDIOCSMICROCODE _IOW('v',27, struct video_code) /* Load microcode into hardware */ +#define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format) /* Get VBI information */ +#define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format) /* Set VBI information */ + + +#define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */ + +/* VIDIOCSWRITEMODE */ +#define VID_WRITE_MPEG_AUD 0 +#define VID_WRITE_MPEG_VID 1 +#define VID_WRITE_OSD 2 +#define VID_WRITE_TTX 3 +#define VID_WRITE_CC 4 +#define VID_WRITE_MJPEG 5 + +/* VIDIOCSPLAYMODE */ +#define VID_PLAY_VID_OUT_MODE 0 + /* p1: = VIDEO_MODE_PAL, VIDEO_MODE_NTSC, etc ... */ +#define VID_PLAY_GENLOCK 1 + /* p1: 0 = OFF, 1 = ON */ + /* p2: GENLOCK FINE DELAY value */ +#define VID_PLAY_NORMAL 2 +#define VID_PLAY_PAUSE 3 +#define VID_PLAY_SINGLE_FRAME 4 +#define VID_PLAY_FAST_FORWARD 5 +#define VID_PLAY_SLOW_MOTION 6 +#define VID_PLAY_IMMEDIATE_NORMAL 7 +#define VID_PLAY_SWITCH_CHANNELS 8 +#define VID_PLAY_FREEZE_FRAME 9 +#define VID_PLAY_STILL_MODE 10 +#define VID_PLAY_MASTER_MODE 11 + /* p1: see below */ +#define VID_PLAY_MASTER_NONE 1 +#define VID_PLAY_MASTER_VIDEO 2 +#define VID_PLAY_MASTER_AUDIO 3 +#define VID_PLAY_ACTIVE_SCANLINES 12 + /* p1 = first active; p2 = last active */ +#define VID_PLAY_RESET 13 +#define VID_PLAY_END_MARK 14 + + + +#define VID_HARDWARE_BT848 1 +#define VID_HARDWARE_QCAM_BW 2 +#define VID_HARDWARE_PMS 3 +#define VID_HARDWARE_QCAM_C 4 +#define VID_HARDWARE_PSEUDO 5 +#define VID_HARDWARE_SAA5249 6 +#define VID_HARDWARE_AZTECH 7 +#define VID_HARDWARE_SF16MI 8 +#define VID_HARDWARE_RTRACK 9 +#define VID_HARDWARE_ZOLTRIX 10 +#define VID_HARDWARE_SAA7146 11 +#define VID_HARDWARE_VIDEUM 12 /* Reserved for Winnov videum */ +#define VID_HARDWARE_RTRACK2 13 +#define VID_HARDWARE_PERMEDIA2 14 /* Reserved for Permedia2 */ +#define VID_HARDWARE_RIVA128 15 /* Reserved for RIVA 128 */ +#define VID_HARDWARE_PLANB 16 /* PowerMac motherboard video-in */ +#define VID_HARDWARE_BROADWAY 17 /* Broadway project */ +#define VID_HARDWARE_GEMTEK 18 +#define VID_HARDWARE_TYPHOON 19 +#define VID_HARDWARE_VINO 20 /* SGI Indy Vino */ +#define VID_HARDWARE_CADET 21 /* Cadet radio */ +#define VID_HARDWARE_TRUST 22 /* Trust FM Radio */ +#define VID_HARDWARE_TERRATEC 23 /* TerraTec ActiveRadio */ +#define VID_HARDWARE_CPIA 24 +#define VID_HARDWARE_ZR36120 25 /* Zoran ZR36120/ZR36125 */ +#define VID_HARDWARE_ZR36067 26 /* Zoran ZR36067/36060 */ +#define VID_HARDWARE_OV511 27 +#define VID_HARDWARE_ZR356700 28 /* Zoran 36700 series */ +#define VID_HARDWARE_W9966 29 +#define VID_HARDWARE_SE401 30 /* SE401 USB webcams */ +#define VID_HARDWARE_PWC 31 /* Philips webcams */ + +/* + * Initialiser list + */ + +struct video_init +{ + char *name; + int (*init)(struct video_init *); +}; + +#endif + diff --git a/multimedia/zoneminder/files/zm.in b/multimedia/zoneminder/files/zm.in new file mode 100644 index 000000000000..6f7787909ba5 --- /dev/null +++ b/multimedia/zoneminder/files/zm.in @@ -0,0 +1,39 @@ +#!/bin/sh + +# $FreeBSD$ + +# PROVIDE: zoneminder +# REQUIRE: mysql apache +# KEYWORD: shutdown + +# Add the following line to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# zm_enable (bool): Set to NO by default. +# Set it to YES to enable zoneminder. +# + +. /etc/rc.subr + +name="zm" +rcvar=${name}_enable + +command=%%PREFIX%%/bin/${name}pkg.pl +command_args="$1" +pidfile=/var/run/${name}/${name}.pid + +load_rc_config "$name" +: ${zm_enable="NO"} + +stop_cmd="zm_stop" + +load_rc_config "$name" +: ${zm_enable="NO"} + +zm_stop() { + ${command} ${command_args} +} + +sleep 10 + +run_rc_command "$1" diff --git a/multimedia/zoneminder/files/zm_fbsd_camera.cpp b/multimedia/zoneminder/files/zm_fbsd_camera.cpp new file mode 100644 index 000000000000..739351fc046d --- /dev/null +++ b/multimedia/zoneminder/files/zm_fbsd_camera.cpp @@ -0,0 +1,807 @@ +// +// ZoneMinder Local Camera Class Implementation, $Date: 2004/04/19 16:02:17 $, $Revision: 1.19 $ +// Copyright (C) 2003 Philip Coombes +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// + +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> +#include <sys/shm.h> +#include <sys/mman.h> +#include <signal.h> +#include <dev/bktr/ioctl_bt848.h> +#include <dev/bktr/ioctl_meteor.h> + +#include "zm.h" +#include "zm_local_camera.h" + +int LocalCamera::camera_count = 0; +int LocalCamera::channel_count = 0; +int LocalCamera::last_channel = -1; + +int LocalCamera::m_cap_frame = 0; +int LocalCamera::m_cap_frame_active = 0; +int LocalCamera::m_sync_frame = 0; +video_mbuf LocalCamera::m_vmb; +video_mmap *LocalCamera::m_vmm; +int LocalCamera::m_videohandle; +unsigned char *LocalCamera::m_buffer=0; + +unsigned char *LocalCamera::y_table; +signed char *LocalCamera::uv_table; +short *LocalCamera::r_v_table; +short *LocalCamera::g_v_table; +short *LocalCamera::g_u_table; +short *LocalCamera::b_u_table; + +LocalCamera::LocalCamera( const char *p_device, int p_channel, int p_format, int p_width, int p_height, int p_palette, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ) : Camera( LOCAL, p_width, p_height, p_palette, p_brightness, p_contrast, p_hue, p_colour, p_capture ), channel( p_channel ), format( p_format ) +{ + strncpy( device, p_device, sizeof(device) ); + if ( !camera_count++ && capture ) + { + Initialise(); + } + if ( channel != last_channel ) + { + channel_index = 0; + channel_count++; + last_channel = channel; + } + else + { + channel_index = 1; + } +} + +LocalCamera::~LocalCamera() +{ + if ( !--camera_count && capture ) + { + Terminate(); + } +} + +void LocalCamera::Initialise() +{ + struct meteor_geomet geom; + struct bktr_capture_area cap_area; + // char *arg; + int c; + // int idev = 0; // Input port + static int bktr_dev[] = { METEOR_DEV0, METEOR_DEV1, METEOR_DEV2, METEOR_DEV3, METEOR_DEV_SVIDEO }; + struct meteor_pixfmt pf; // pixel format + int i; + + // arg = getenv ("BKTR_DEV"); + // if (arg) + // idev = atoi (arg); + // if (idev < 0 || idev > 4) + // idev = 0; + // Debug( 1, ( "using Meteor device: %d", idev )); + + if ( (m_videohandle=open(device, O_RDONLY)) < 0 ) + { + Error(( "Failed to open video device %s: %s", device, strerror(errno) )); + exit(-1); + } + + Info(("Initialize: using Meteor device: %d", channel)); + + c = bktr_dev[channel]; + + if (ioctl(m_videohandle, METEORSINPUT, &c) < 0) { + Error(( "Failed to set video input : %s", strerror(errno) )); + if ( (bool)config.Item( ZM_STRICT_VIDEO_CONFIG ) ) exit(-1); + } + + + static int meteor_formats[] = { METEOR_FMT_PAL, METEOR_FMT_NTSC, METEOR_FMT_SECAM, METEOR_FMT_AUTOMODE, METEOR_FMT_AUTOMODE,METEOR_FMT_AUTOMODE,METEOR_FMT_AUTOMODE,METEOR_FMT_AUTOMODE }; + + int VIDformat = meteor_formats[format]; + ioctl(m_videohandle, METEORSFMT, &VIDformat); + + + // Setup Pixel Format + + + for( i=0; ; i++ ) { + pf.index = i; + if( ioctl( m_videohandle, METEORGSUPPIXFMT, &pf ) < 0 ){ + if( errno == EINVAL ) + break; + Error(("Error getting pixformat %d: %s", i, strerror(errno) )); + if ( (bool)config.Item( ZM_STRICT_VIDEO_CONFIG ) ) exit(-1); + + } //if + + if( pf.type == METEOR_PIXTYPE_RGB && pf.Bpp == 3 ) { + // Found a good pixeltype -- set it up + if( ioctl( m_videohandle, METEORSACTPIXFMT, &i ) < 0 ){ + Error(("Error setting pixformat: %s", strerror( errno ))); + } + } // if + } // for + + + memset( &geom, 0, sizeof(geom) ); + memset( &m_vmb, 0, sizeof(m_vmb)); + geom.rows = height; + geom.columns = width; + geom.oformat = METEOR_GEO_RGB24; + geom.frames = 1; + m_vmb.size = width * height * 3; + m_vmb.frames = 1; + + + m_vmm = new video_mmap[m_vmb.frames]; + Debug( 1, ( "vmb.frames = %d", m_vmb.frames )); + Debug( 1, ( "vmb.size = %d", m_vmb.size )); + + for ( int i=0; i < m_vmb.frames; i++) + { + m_vmm[i].frame = i; + m_vmm[i].width = width; + m_vmm[i].height = height; + m_vmm[i].format = palette; + } + + + if ( ioctl( m_videohandle, METEORSETGEO, &geom ) < 0 ) + { + Error(( "Failed to set window attributes: %s", strerror(errno) )); + if ( (bool)config.Item( ZM_STRICT_VIDEO_CONFIG ) ) exit(-1); + } + + if ( ioctl( m_videohandle, BT848_GCAPAREA, &cap_area ) < 0 ) + { + Error(( "Failed to set window attributes: %s", strerror(errno) )); + if ( (bool)config.Item( ZM_STRICT_VIDEO_CONFIG ) ) exit(-1); + } + + Info(( "Geometry: xo: %d yo: %d xs: %d ys: %d " + , cap_area.x_offset + , cap_area.y_offset + , cap_area.x_size + , cap_area.y_size)); + + + + // Set Input Format + c = BT848_IFORM_F_AUTO; + + if (ioctl(m_videohandle, BT848SFMT, &c) < 0) { + Error(( "Failed to set window attributes: %s", strerror(errno) )); + if ( (bool)config.Item( ZM_STRICT_VIDEO_CONFIG ) ) exit(-1); + + } + + + c = METEOR_CAP_CONTINOUS; + ioctl(m_videohandle, METEORCAPTUR, &c); + + + m_buffer = (u_int8_t *) mmap((caddr_t)0, m_vmb.size, + PROT_READ, MAP_SHARED, m_videohandle, (off_t) 0); + + if ( m_buffer == MAP_FAILED ) + { + Error(( "Could not mmap video: %s", strerror(errno) )); + exit(-1); + } + Info(( "Mapping %d bytes for image", m_vmb.size)); + + + y_table = new unsigned char[256]; + for ( int i = 0; i <= 255; i++ ) + { + unsigned char c = i; + if ( c <= 16 ) + y_table[c] = 0; + else if ( c >= 235 ) + y_table[c] = 255; + else + y_table[c] = (255*(c-16))/219; + } + + uv_table = new signed char[256]; + for ( int i = 0; i <= 255; i++ ) + { + unsigned char c = i; + if ( c <= 16 ) + uv_table[c] = -127; + else if ( c >= 240 ) + uv_table[c] = 127; + else + uv_table[c] = (127*(c-128))/112; + } + + r_v_table = new short[255]; + g_v_table = new short[255]; + g_u_table = new short[255]; + b_u_table = new short[255]; + r_v_table += 128; + g_v_table += 128; + g_u_table += 128; + b_u_table += 128; + for ( int i = -127; i <= 127; i++ ) + { + signed char c = i; + r_v_table[c] = (1402*c)/1000; + g_u_table[c] = (344*c)/1000; + g_v_table[c] = (714*c)/1000; + b_u_table[c] = (1772*c)/1000; + } +} + +void LocalCamera::Terminate() +{ + munmap((char*)m_buffer, m_vmb.size); + + delete[] m_vmm; + + close(m_videohandle); +} + +bool LocalCamera::GetCurrentSettings( const char *device, char *output, bool verbose ) +{ + output[0] = 0; + if ( verbose ) + sprintf( output, output+strlen(output), "Checking Video Device: %s\n", device ); + if ( (m_videohandle=open(device, O_RDONLY)) <=0 ) + { + Error(( "Failed to open video device %s: %s", device, strerror(errno) )); + if ( verbose ) + sprintf( output+strlen(output), "Error, failed to open video device: %s\n", strerror(errno) ); + else + sprintf( output+strlen(output), "error%d\n", errno ); + return( false ); + } + + struct video_capability vid_cap; + if ( ioctl( m_videohandle, VIDIOCGCAP, &vid_cap ) < 0 ) + { + Error(( "Failed to get video capabilities: %s", strerror(errno) )); + if ( verbose ) + sprintf( output, "Error, failed to get video capabilities: %s\n", strerror(errno) ); + else + sprintf( output, "error%d\n", errno ); + return( false ); + } + if ( verbose ) + { + sprintf( output+strlen(output), "Video Capabilities\n" ); + sprintf( output+strlen(output), " Name: %s\n", vid_cap.name ); + sprintf( output+strlen(output), " Type: %d\n%s%s%s%s%s%s%s%s%s%s%s%s%s%s", vid_cap.type, + vid_cap.type&VID_TYPE_CAPTURE?" Can capture\n":"", + vid_cap.type&VID_TYPE_TUNER?" Can tune\n":"", + vid_cap.type&VID_TYPE_TELETEXT?" Does teletext\n":"", + vid_cap.type&VID_TYPE_OVERLAY?" Overlay onto frame buffer\n":"", + vid_cap.type&VID_TYPE_CHROMAKEY?" Overlay by chromakey\n":"", + vid_cap.type&VID_TYPE_CLIPPING?" Can clip\n":"", + vid_cap.type&VID_TYPE_FRAMERAM?" Uses the frame buffer memory\n":"", + vid_cap.type&VID_TYPE_SCALES?" Scalable\n":"", + vid_cap.type&VID_TYPE_MONOCHROME?" Monochrome only\n":"", + vid_cap.type&VID_TYPE_SUBCAPTURE?" Can capture subareas of the image\n":"", + vid_cap.type&VID_TYPE_MPEG_DECODER?" Can decode MPEG streams\n":"", + vid_cap.type&VID_TYPE_MPEG_ENCODER?" Can encode MPEG streams\n":"", + vid_cap.type&VID_TYPE_MJPEG_DECODER?" Can decode MJPEG streams\n":"", + vid_cap.type&VID_TYPE_MJPEG_ENCODER?" Can encode MJPEG streams\n":"" + ); + sprintf( output+strlen(output), " Video Channels: %d\n", vid_cap.channels ); + sprintf( output+strlen(output), " Audio Channels: %d\n", vid_cap.audios ); + sprintf( output+strlen(output), " Maximum Width: %d\n", vid_cap.maxwidth ); + sprintf( output+strlen(output), " Maximum Height: %d\n", vid_cap.maxheight ); + sprintf( output+strlen(output), " Minimum Width: %d\n", vid_cap.minwidth ); + sprintf( output+strlen(output), " Minimum Height: %d\n", vid_cap.minheight ); + } + else + { + sprintf( output+strlen(output), "N:%s,", vid_cap.name ); + sprintf( output+strlen(output), "T:%d,", vid_cap.type ); + sprintf( output+strlen(output), "nC:%d,", vid_cap.channels ); + sprintf( output+strlen(output), "nA:%d,", vid_cap.audios ); + sprintf( output+strlen(output), "mxW:%d,", vid_cap.maxwidth ); + sprintf( output+strlen(output), "mxH:%d,", vid_cap.maxheight ); + sprintf( output+strlen(output), "mnW:%d,", vid_cap.minwidth ); + sprintf( output+strlen(output), "mnH:%d,", vid_cap.minheight ); + } + + struct video_window vid_win; + if ( ioctl( m_videohandle, VIDIOCGWIN, &vid_win ) < 0 ) + { + Error(( "Failed to get window attributes: %s", strerror(errno) )); + if ( verbose ) + sprintf( output, "Error, failed to get window attributes: %s\n", strerror(errno) ); + else + sprintf( output, "error%d\n", errno ); + return( false ); + } + if ( verbose ) + { + sprintf( output+strlen(output), "Window Attributes\n" ); + sprintf( output+strlen(output), " X Offset: %d\n", vid_win.x ); + sprintf( output+strlen(output), " Y Offset: %d\n", vid_win.y ); + sprintf( output+strlen(output), " Width: %d\n", vid_win.width ); + sprintf( output+strlen(output), " Height: %d\n", vid_win.height ); + } + else + { + sprintf( output+strlen(output), "X:%d,", vid_win.x ); + sprintf( output+strlen(output), "Y:%d,", vid_win.y ); + sprintf( output+strlen(output), "W:%d,", vid_win.width ); + sprintf( output+strlen(output), "H:%d,", vid_win.height ); + } + + struct video_picture vid_pic; + if ( ioctl( m_videohandle, VIDIOCGPICT, &vid_pic ) < 0 ) + { + Error(( "Failed to get picture attributes: %s", strerror(errno) )); + if ( verbose ) + sprintf( output, "Error, failed to get picture attributes: %s\n", strerror(errno) ); + else + sprintf( output, "error%d\n", errno ); + return( false ); + } + if ( verbose ) + { + sprintf( output+strlen(output), "Picture Atributes\n" ); + sprintf( output+strlen(output), " Palette: %d - %s\n", vid_pic.palette, + vid_pic.palette==VIDEO_PALETTE_GREY?"Linear greyscale":( + vid_pic.palette==VIDEO_PALETTE_HI240?"High 240 cube (BT848)":( + vid_pic.palette==VIDEO_PALETTE_RGB565?"565 16 bit RGB":( + vid_pic.palette==VIDEO_PALETTE_RGB24?"24bit RGB":( + vid_pic.palette==VIDEO_PALETTE_RGB32?"32bit RGB":( + vid_pic.palette==VIDEO_PALETTE_RGB555?"555 15bit RGB":( + vid_pic.palette==VIDEO_PALETTE_YUV422?"YUV422 capture":( + vid_pic.palette==VIDEO_PALETTE_YUYV?"YUYV":( + vid_pic.palette==VIDEO_PALETTE_UYVY?"UVYV":( + vid_pic.palette==VIDEO_PALETTE_YUV420?"YUV420":( + vid_pic.palette==VIDEO_PALETTE_YUV411?"YUV411 capture":( + vid_pic.palette==VIDEO_PALETTE_RAW?"RAW capture (BT848)":( + vid_pic.palette==VIDEO_PALETTE_YUV422P?"YUV 4:2:2 Planar":( + vid_pic.palette==VIDEO_PALETTE_YUV411P?"YUV 4:1:1 Planar":( + vid_pic.palette==VIDEO_PALETTE_YUV420P?"YUV 4:2:0 Planar":( + vid_pic.palette==VIDEO_PALETTE_YUV410P?"YUV 4:1:0 Planar":"Unknown" + )))))))))))))))); + sprintf( output+strlen(output), " Colour Depth: %d\n", vid_pic.depth ); + sprintf( output+strlen(output), " Brightness: %d\n", vid_pic.brightness ); + sprintf( output+strlen(output), " Hue: %d\n", vid_pic.hue ); + sprintf( output+strlen(output), " Colour :%d\n", vid_pic.colour ); + sprintf( output+strlen(output), " Contrast: %d\n", vid_pic.contrast ); + sprintf( output+strlen(output), " Whiteness: %d\n", vid_pic.whiteness ); + } + else + { + sprintf( output+strlen(output), "P:%d,", vid_pic.palette ); + sprintf( output+strlen(output), "D:%d,", vid_pic.depth ); + sprintf( output+strlen(output), "B:%d,", vid_pic.brightness ); + sprintf( output+strlen(output), "h:%d,", vid_pic.hue ); + sprintf( output+strlen(output), "Cl:%d,", vid_pic.colour ); + sprintf( output+strlen(output), "Cn:%d,", vid_pic.contrast ); + sprintf( output+strlen(output), "w:%d,", vid_pic.whiteness ); + } + + for ( int chan = 0; chan < vid_cap.channels; chan++ ) + { + struct video_channel vid_src; + vid_src.channel = chan; + if ( ioctl( m_videohandle, VIDIOCGCHAN, &vid_src ) < 0 ) + { + Error(( "Failed to get channel %d attributes: %s", chan, strerror(errno) )); + if ( verbose ) + sprintf( output, "Error, failed to get channel %d attributes: %s\n", chan, strerror(errno) ); + else + sprintf( output, "error%d\n", errno ); + return( false ); + } + if ( verbose ) + { + sprintf( output+strlen(output), "Channel %d Attributes\n", chan ); + sprintf( output+strlen(output), " Name: %s\n", vid_src.name ); + sprintf( output+strlen(output), " Channel: %d\n", vid_src.channel ); + sprintf( output+strlen(output), " Flags: %d\n%s%s", vid_src.flags, + vid_src.flags&VIDEO_VC_TUNER?" Channel has a tuner\n":"", + vid_src.flags&VIDEO_VC_AUDIO?" Channel has audio\n":"" + ); + sprintf( output+strlen(output), " Type: %d - %s\n", vid_src.type, + vid_src.type==VIDEO_TYPE_TV?"TV":( + vid_src.type==VIDEO_TYPE_CAMERA?"Camera":"Unknown" + )); + sprintf( output+strlen(output), " Format: %d - %s\n", vid_src.norm, + vid_src.norm==VIDEO_MODE_PAL?"PAL":( + vid_src.norm==VIDEO_MODE_NTSC?"NTSC":( + vid_src.norm==VIDEO_MODE_SECAM?"SECAM":( + vid_src.norm==VIDEO_MODE_AUTO?"AUTO":"Unknown" + )))); + } + else + { + sprintf( output+strlen(output), "n%d:%s,", chan, vid_src.name ); + sprintf( output+strlen(output), "C%d:%d,", chan, vid_src.channel ); + sprintf( output+strlen(output), "Fl%d:%x,", chan, vid_src.flags ); + sprintf( output+strlen(output), "T%d:%d", chan, vid_src.type ); + sprintf( output+strlen(output), "F%d:%d%s,", chan, vid_src.norm, chan==(vid_cap.channels-1)?"":"," ); + } + } + return( true ); +} + +int LocalCamera::Brightness( int p_brightness ) +{ + unsigned char b; + if ( ioctl( m_videohandle, METEORGBRIG, &b) < 0 ) + { + Error(( "Failed to get picture attributes: %s", strerror(errno) )); + return( -1 ); + } + + if ( p_brightness >= 0 ) + { + b = (unsigned char) p_brightness; + if ( ioctl( m_videohandle, METEORSBRIG, &b) < 0 ) + { + Error(( "Failed to set picture attributes: %s", strerror(errno) )); + return( -1 ); + } + } + return( (int) b ); +} + +int LocalCamera::Hue( int p_hue ) +{ + signed char dev_hue; + if ( ioctl( m_videohandle, METEORGHUE, &dev_hue) < 0 ) + { + Error(( "Failed to get picture attributes: %s", strerror(errno) )); + return( -1 ); + } + + if ( p_hue >= 0 ) + { + dev_hue = (signed char ) p_hue; + if ( ioctl( m_videohandle, METEORSHUE, &dev_hue ) < 0 ) + { + Error(( "Failed to set picture attributes: %s", strerror(errno) )); + return( -1 ); + } + } + return( (int) dev_hue ); +} + +int LocalCamera::Colour( int p_colour ) +{ + + unsigned char vid_pic; + if ( ioctl( m_videohandle, METEORGCSAT, &vid_pic) < 0 ) + { + Error(( "Failed to get picture attributes: %s", strerror(errno) )); + return( -1 ); + } + + if ( p_colour >= 0 ) + { + vid_pic = (unsigned char) p_colour; + if ( ioctl( m_videohandle, METEORSCSAT, &vid_pic ) < 0 ) + { + Error(( "Failed to set picture attributes: %s", strerror(errno) )); + return( -1 ); + } + } + return( (int) vid_pic ); +} + +int LocalCamera::Contrast( int p_contrast ) +{ + unsigned char vid_pic; + + if ( ioctl( m_videohandle, METEORGCONT, &vid_pic) < 0 ) + { + Error(( "Failed to get picture attributes: %s", strerror(errno) )); + return( -1 ); + } + + if ( p_contrast >= 0 ) + { + vid_pic = (unsigned char) p_contrast; + if ( ioctl( m_videohandle, METEORSCONT, &vid_pic ) < 0 ) + { + Error(( "Failed to set picture attributes: %s", strerror(errno) )); + return( -1 ); + } + } + return( (int) vid_pic ); +} + +int LocalCamera::PrimeCapture() +{ + if ( channel_count == 1 && channel_index == 0 ) + { + return( PreCapture() ); + } + return( 0 ); +} + +int LocalCamera::PreCapture() +{ + + static int bktr_dev[] = { METEOR_DEV0, METEOR_DEV1, METEOR_DEV2, METEOR_DEV3, METEOR_DEV_SVIDEO }; + if ( camera_count > 1 ) + { + //Info(( "Switching" )); + struct video_channel vid_src; + + vid_src.channel = channel; + vid_src.norm = format; + vid_src.flags = 0; + vid_src.type = VIDEO_TYPE_CAMERA; + unsigned int tmpchannel= (unsigned)channel; + // Info(("CHANNEL = %d",tmpchannel)); + static int meteor_formats[] = { METEOR_FMT_PAL, METEOR_FMT_NTSC, METEOR_FMT_SECAM, METEOR_FMT_AUTOMODE, METEOR_FMT_AUTOMODE,METEOR_FMT_AUTOMODE,METEOR_FMT_AUTOMODE,METEOR_FMT_AUTOMODE }; + + int tmpc = METEOR_CAP_STOP_CONT; + ioctl(m_videohandle, METEORCAPTUR, &tmpc); + + int VIDformat=meteor_formats[format]; + ioctl(m_videohandle, METEORSFMT, &VIDformat); + + int tmpint=bktr_dev[tmpchannel]; + if (ioctl(m_videohandle, METEORSINPUT, &tmpint) < 0) { + Error(( "Funk2!! Failed to set camera source %d: %s", tmpchannel, strerror(errno) )); + return( -1 ); + } + + tmpc = METEOR_CAP_SINGLE; + ioctl(m_videohandle, METEORCAPTUR, &tmpc); + } + /* + if ( ioctl( m_videohandle, METEORCAPFRM, &m_vmm[m_cap_frame] ) < 0 ) + { + Error(( "Capture failure for frame %d: %s", m_cap_frame, strerror(errno))); + return( -1 ); + } + */ + m_cap_frame = (m_cap_frame+1)%m_vmb.frames; + + return( 0 ); +} + +int LocalCamera::PostCapture( Image &image ) +{ + + /* + if ( ioctl( m_videohandle, VIDIOCSYNC, &m_sync_frame ) ) + { + Error(( "Sync failure for frame %d: %s", m_sync_frame, strerror(errno))); + return( -1 ); + } + */ + + unsigned char *buffer = m_buffer; + m_sync_frame = (m_sync_frame+1)%m_vmb.frames; + + static unsigned char temp_buffer[ZM_MAX_IMAGE_SIZE]; + switch( palette ) + { + case VIDEO_PALETTE_YUV420P : + { + static unsigned char y_plane[ZM_MAX_IMAGE_DIM]; + static char u_plane[ZM_MAX_IMAGE_DIM]; + static char v_plane[ZM_MAX_IMAGE_DIM]; + + unsigned char *rgb_ptr = temp_buffer; + unsigned char *y_ptr = y_plane; + char *u1_ptr = u_plane; + char *u2_ptr = u_plane+width; + char *v1_ptr = v_plane; + char *v2_ptr = v_plane+width; + + int Y_size = width*height; + int C_size = Y_size>>2; // Every little bit helps... + unsigned char *Y_ptr = buffer; + unsigned char *Cb_ptr = buffer + Y_size; + unsigned char *Cr_ptr = Cb_ptr + C_size; + + int y,u,v; + for ( int i = 0; i < Y_size; i++ ) + { + *y_ptr++ = y_table[*Y_ptr++]; + } + int half_width = width>>1; // We are the king of optimisations! + for ( int i = 0, j = 0; i < C_size; i++, j++ ) + { + if ( j == half_width ) + { + j = 0; + u1_ptr += width; + u2_ptr += width; + v1_ptr += width; + v2_ptr += width; + } + u = uv_table[*Cb_ptr++]; + + *u1_ptr++ = u; + *u1_ptr++ = u; + *u2_ptr++ = u; + *u2_ptr++ = u; + + v = uv_table[*Cr_ptr++]; + + *v1_ptr++ = v; + *v1_ptr++ = v; + *v2_ptr++ = v; + *v2_ptr++ = v; + } + + y_ptr = y_plane; + u1_ptr = u_plane; + v1_ptr = v_plane; + int size = Y_size*3; + int r,g,b; + for ( int i = 0; i < size; i += 3 ) + { + y = *y_ptr++; + u = *u1_ptr++; + v = *v1_ptr++; + + r = y + r_v_table[v]; + g = y - (g_u_table[u]+g_v_table[v]); + b = y + b_u_table[u]; + + *rgb_ptr++ = r<0?0:(r>255?255:r); + *rgb_ptr++ = g<0?0:(g>255?255:g); + *rgb_ptr++ = b<0?0:(b>255?255:b); + } + buffer = temp_buffer; + break; + } + case VIDEO_PALETTE_YUV422P : + { + static unsigned char y_plane[ZM_MAX_IMAGE_DIM]; + static char u_plane[ZM_MAX_IMAGE_DIM]; + static char v_plane[ZM_MAX_IMAGE_DIM]; + + unsigned char *rgb_ptr = temp_buffer; + unsigned char *y_ptr = y_plane; + char *u1_ptr = u_plane; + char *v1_ptr = v_plane; + + int Y_size = width*height; + int C_size = Y_size>>1; // Every little bit helps... + unsigned char *Y_ptr = buffer; + unsigned char *Cb_ptr = buffer + Y_size; + unsigned char *Cr_ptr = Cb_ptr + C_size; + + int y,u,v; + for ( int i = 0; i < Y_size; i++ ) + { + *y_ptr++ = y_table[*Y_ptr++]; + } + for ( int i = 0, j = 0; i < C_size; i++, j++ ) + { + u = uv_table[*Cb_ptr++]; + + *u1_ptr++ = u; + *u1_ptr++ = u; + + v = uv_table[*Cr_ptr++]; + + *v1_ptr++ = v; + *v1_ptr++ = v; + } + + y_ptr = y_plane; + u1_ptr = u_plane; + v1_ptr = v_plane; + int size = Y_size*3; + int r,g,b; + for ( int i = 0; i < size; i += 3 ) + { + y = *y_ptr++; + u = *u1_ptr++; + v = *v1_ptr++; + + r = y + r_v_table[v]; + g = y - (g_u_table[u]+g_v_table[v]); + b = y + b_u_table[u]; + + *rgb_ptr++ = r<0?0:(r>255?255:r); + *rgb_ptr++ = g<0?0:(g>255?255:g); + *rgb_ptr++ = b<0?0:(b>255?255:b); + } + buffer = temp_buffer; + break; + } + case VIDEO_PALETTE_RGB555 : + { + int size = width*height*2; + unsigned char r,g,b; + unsigned char *s_ptr = buffer; + unsigned char *d_ptr = temp_buffer; + for ( int i = 0; i < size; i += 2 ) + { + b = ((*s_ptr)<<3)&0xf8; + g = (((*(s_ptr+1))<<6)|((*s_ptr)>>2))&0xf8; + r = ((*(s_ptr+1))<<1)&0xf8; + + *d_ptr++ = r; + *d_ptr++ = g; + *d_ptr++ = b; + s_ptr += 2; + } + buffer = temp_buffer; + break; + } + case VIDEO_PALETTE_RGB565 : + { + int size = width*height*2; + unsigned char r,g,b; + unsigned char *s_ptr = buffer; + unsigned char *d_ptr = temp_buffer; + for ( int i = 0; i < size; i += 2 ) + { + b = ((*s_ptr)<<3)&0xf8; + g = (((*(s_ptr+1))<<5)|((*s_ptr)>>3))&0xfc; + r = (*(s_ptr+1))&0xf8; + + *d_ptr++ = r; + *d_ptr++ = g; + *d_ptr++ = b; + s_ptr += 2; + } + buffer = temp_buffer; + break; + } + case VIDEO_PALETTE_RGB24 : + { + if ( (bool)config.Item( ZM_LOCAL_BGR_INVERT ) ) + { + int size = width*height*3; + unsigned char *s_ptr = buffer; + unsigned char *d_ptr = temp_buffer; + for ( int i = 0; i < size; i += 3 ) + { + *d_ptr++ = *(s_ptr+2); + *d_ptr++ = *(s_ptr+1); + *d_ptr++ = *s_ptr; + s_ptr += 3; + } + buffer = temp_buffer; + } + break; + } + case VIDEO_PALETTE_GREY : + { + //int size = width*height; + //for ( int i = 0; i < size; i++ ) + //{ + //if ( buffer[i] < 16 ) + //Info(( "Lo grey %d", buffer[i] )); + //if ( buffer[i] > 235 ) + //Info(( "Hi grey %d", buffer[i] )); + //} + } + default : // Everything else is straightforward, for now. + { + break; + } + } + + image.Assign( width, height, colours, buffer ); + + return( 0 ); +} diff --git a/multimedia/zoneminder/files/zm_fbsd_camera.h b/multimedia/zoneminder/files/zm_fbsd_camera.h new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/multimedia/zoneminder/files/zm_fbsd_camera.h diff --git a/multimedia/zoneminder/pkg-descr b/multimedia/zoneminder/pkg-descr new file mode 100644 index 000000000000..fc08a5debd9f --- /dev/null +++ b/multimedia/zoneminder/pkg-descr @@ -0,0 +1,4 @@ +Zoneminder is an all-in-one GPL'd security and surveillance camera solution. +Fully web-based system for viewing and analyzing security camera feeds. + +WWW: http://www.zoneminder.com/ diff --git a/multimedia/zoneminder/pkg-plist b/multimedia/zoneminder/pkg-plist new file mode 100644 index 000000000000..dbdcdcdb00f8 --- /dev/null +++ b/multimedia/zoneminder/pkg-plist @@ -0,0 +1,311 @@ +@comment file listing +bin/zma +bin/zmaudit.pl +bin/zmc +bin/zmcontrol.pl +bin/zmdc.pl +bin/zmf +bin/zmfilter.pl +bin/zmfix +bin/zmpkg.pl +bin/zmtrack.pl +bin/zmtrigger.pl +bin/zmu +bin/zmupdate.pl +bin/zmvideo.pl +bin/zmwatch.pl +bin/zmx10.pl +@unexec if cmp -s %D/etc/zm.conf.sample %D/etc/zm.conf; then rm -f %D/etc/zm.conf; fi +etc/zm.conf.sample +@exec if [ ! -f %D/etc/zm.conf ] ; then cp -p %D/%F %B/zm.conf; fi +lib/perl5/5.10.1/mach/perllocal.pod +%%SITE_PERL%%/ZoneMinder.pm +%%SITE_PERL%%/ZoneMinder/Base.pm +%%SITE_PERL%%/ZoneMinder/Config.pm +%%SITE_PERL%%/ZoneMinder/ConfigAdmin.pm +%%SITE_PERL%%/ZoneMinder/Control.pm +%%SITE_PERL%%/ZoneMinder/Control/AxisV2.pm +%%SITE_PERL%%/ZoneMinder/Control/Ncs370.pm +%%SITE_PERL%%/ZoneMinder/Control/PanasonicIP.pm +%%SITE_PERL%%/ZoneMinder/Control/PelcoD.pm +%%SITE_PERL%%/ZoneMinder/Control/Visca.pm +%%SITE_PERL%%/ZoneMinder/Control/mjpgStreamer.pm +%%SITE_PERL%%/ZoneMinder/Database.pm +%%SITE_PERL%%/ZoneMinder/Debug.pm +%%SITE_PERL%%/ZoneMinder/General.pm +%%SITE_PERL%%/ZoneMinder/Memory.pm +%%SITE_PERL%%/ZoneMinder/Memory/Mapped.pm +%%SITE_PERL%%/ZoneMinder/Memory/Shared.pm +%%SITE_PERL%%/ZoneMinder/Trigger/Channel.pm +%%SITE_PERL%%/ZoneMinder/Trigger/Channel/File.pm +%%SITE_PERL%%/ZoneMinder/Trigger/Channel/Handle.pm +%%SITE_PERL%%/ZoneMinder/Trigger/Channel/Inet.pm +%%SITE_PERL%%/ZoneMinder/Trigger/Channel/Serial.pm +%%SITE_PERL%%/ZoneMinder/Trigger/Channel/Spawning.pm +%%SITE_PERL%%/ZoneMinder/Trigger/Channel/Unix.pm +%%SITE_PERL%%/ZoneMinder/Trigger/Connection.pm +%%SITE_PERL%%/ZoneMinder/Trigger/Connection/Example.pm +%%SITE_PERL%%/mach/auto/ZoneMinder/.packlist +%%PORTDOCS%%%%DOCSDIR%%/AUTHORS +%%PORTDOCS%%%%DOCSDIR%%/COPYING +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%/INSTALL +%%PORTDOCS%%%%DOCSDIR%%/NEWS +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/README.FreeBSD +%%PORTDOCS%%%%DOCSDIR%%/TODO +%%WWWDIR_REL%%/cgi-bin/nph-zms +%%WWWDIR_REL%%/cgi-bin/zms +%%WWWDIR_REL%%/data/ajax/alarm.php +%%WWWDIR_REL%%/data/ajax/control.php +%%WWWDIR_REL%%/data/ajax/event.php +%%WWWDIR_REL%%/data/ajax/status.php +%%WWWDIR_REL%%/data/ajax/stream.php +%%WWWDIR_REL%%/data/ajax/zone.php +%%WWWDIR_REL%%/data/css/reset.css +%%WWWDIR_REL%%/data/graphics/favicon.ico +%%WWWDIR_REL%%/data/graphics/transparent.gif +%%WWWDIR_REL%%/data/includes/actions.php +%%WWWDIR_REL%%/data/includes/config.php +%%WWWDIR_REL%%/data/includes/database.php +%%WWWDIR_REL%%/data/includes/functions.php +%%WWWDIR_REL%%/data/includes/lang.php +%%WWWDIR_REL%%/data/index.php +%%WWWDIR_REL%%/data/js/mootools.ext.js +%%WWWDIR_REL%%/data/lang/big5_big5.php +%%WWWDIR_REL%%/data/lang/cn_zh.php +%%WWWDIR_REL%%/data/lang/cs_cz.php +%%WWWDIR_REL%%/data/lang/de_de.php +%%WWWDIR_REL%%/data/lang/dk_dk.php +%%WWWDIR_REL%%/data/lang/en_gb.php +%%WWWDIR_REL%%/data/lang/en_us.php +%%WWWDIR_REL%%/data/lang/es_ar.php +%%WWWDIR_REL%%/data/lang/fr_fr.php +%%WWWDIR_REL%%/data/lang/he_il.php +%%WWWDIR_REL%%/data/lang/hu_hu.php +%%WWWDIR_REL%%/data/lang/it_it.php +%%WWWDIR_REL%%/data/lang/ja_jp.php +%%WWWDIR_REL%%/data/lang/nl_nl.php +%%WWWDIR_REL%%/data/lang/pl_pl.php +%%WWWDIR_REL%%/data/lang/pt_br.php +%%WWWDIR_REL%%/data/lang/ro_ro.php +%%WWWDIR_REL%%/data/lang/ru_ru.php +%%WWWDIR_REL%%/data/lang/se_se.php +%%WWWDIR_REL%%/data/skins/classic/css/control.css +%%WWWDIR_REL%%/data/skins/classic/css/export.css +%%WWWDIR_REL%%/data/skins/classic/css/skin.css +%%WWWDIR_REL%%/data/skins/classic/graphics/arrow-d.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/arrow-dl.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/arrow-dr.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/arrow-l-d.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/arrow-l-u.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/arrow-l.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/arrow-r.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/arrow-u.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/arrow-ul.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/arrow-ur.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/center.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/point-g.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/point-o.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/point-r.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/seq-d.gif +%%WWWDIR_REL%%/data/skins/classic/graphics/seq-u.gif +%%WWWDIR_REL%%/data/skins/classic/includes/config.php +%%WWWDIR_REL%%/data/skins/classic/includes/control_functions.php +%%WWWDIR_REL%%/data/skins/classic/includes/export_functions.php +%%WWWDIR_REL%%/data/skins/classic/includes/functions.php +%%WWWDIR_REL%%/data/skins/classic/includes/init.php +%%WWWDIR_REL%%/data/skins/classic/includes/timeline_functions.php +%%WWWDIR_REL%%/data/skins/classic/js/skin.js +%%WWWDIR_REL%%/data/skins/classic/js/skin.js.php +%%WWWDIR_REL%%/data/skins/classic/skin.php +%%WWWDIR_REL%%/data/skins/classic/views/Makefile.am +%%WWWDIR_REL%%/data/skins/classic/views/bandwidth.php +%%WWWDIR_REL%%/data/skins/classic/views/blank.php +%%WWWDIR_REL%%/data/skins/classic/views/console.php +%%WWWDIR_REL%%/data/skins/classic/views/control.php +%%WWWDIR_REL%%/data/skins/classic/views/controlcap.php +%%WWWDIR_REL%%/data/skins/classic/views/controlcaps.php +%%WWWDIR_REL%%/data/skins/classic/views/controlpreset.php +%%WWWDIR_REL%%/data/skins/classic/views/css/console.css +%%WWWDIR_REL%%/data/skins/classic/views/css/control.css +%%WWWDIR_REL%%/data/skins/classic/views/css/controlcaps.css +%%WWWDIR_REL%%/data/skins/classic/views/css/devices.css +%%WWWDIR_REL%%/data/skins/classic/views/css/event.css +%%WWWDIR_REL%%/data/skins/classic/views/css/events.css +%%WWWDIR_REL%%/data/skins/classic/views/css/export.css +%%WWWDIR_REL%%/data/skins/classic/views/css/filter.css +%%WWWDIR_REL%%/data/skins/classic/views/css/frame.css +%%WWWDIR_REL%%/data/skins/classic/views/css/frames.css +%%WWWDIR_REL%%/data/skins/classic/views/css/groups.css +%%WWWDIR_REL%%/data/skins/classic/views/css/monitor.css +%%WWWDIR_REL%%/data/skins/classic/views/css/montage.css +%%WWWDIR_REL%%/data/skins/classic/views/css/montage_2wide.css +%%WWWDIR_REL%%/data/skins/classic/views/css/montage_3wide.css +%%WWWDIR_REL%%/data/skins/classic/views/css/montage_3wide50enlarge.css +%%WWWDIR_REL%%/data/skins/classic/views/css/montage_4wide.css +%%WWWDIR_REL%%/data/skins/classic/views/css/montage_freeform.css +%%WWWDIR_REL%%/data/skins/classic/views/css/options.css +%%WWWDIR_REL%%/data/skins/classic/views/css/stats.css +%%WWWDIR_REL%%/data/skins/classic/views/css/timeline.css +%%WWWDIR_REL%%/data/skins/classic/views/css/timeline.css.php +%%WWWDIR_REL%%/data/skins/classic/views/css/video.css +%%WWWDIR_REL%%/data/skins/classic/views/css/watch.css +%%WWWDIR_REL%%/data/skins/classic/views/css/zone.css +%%WWWDIR_REL%%/data/skins/classic/views/cycle.php +%%WWWDIR_REL%%/data/skins/classic/views/device.php +%%WWWDIR_REL%%/data/skins/classic/views/devices.php +%%WWWDIR_REL%%/data/skins/classic/views/donate.php +%%WWWDIR_REL%%/data/skins/classic/views/error.php +%%WWWDIR_REL%%/data/skins/classic/views/event.php +%%WWWDIR_REL%%/data/skins/classic/views/eventdetail.php +%%WWWDIR_REL%%/data/skins/classic/views/events.php +%%WWWDIR_REL%%/data/skins/classic/views/export.php +%%WWWDIR_REL%%/data/skins/classic/views/filter.php +%%WWWDIR_REL%%/data/skins/classic/views/filtersave.php +%%WWWDIR_REL%%/data/skins/classic/views/frame.php +%%WWWDIR_REL%%/data/skins/classic/views/frames.php +%%WWWDIR_REL%%/data/skins/classic/views/function.php +%%WWWDIR_REL%%/data/skins/classic/views/group.php +%%WWWDIR_REL%%/data/skins/classic/views/groups.php +%%WWWDIR_REL%%/data/skins/classic/views/js/Makefile.am +%%WWWDIR_REL%%/data/skins/classic/views/js/console.js +%%WWWDIR_REL%%/data/skins/classic/views/js/console.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/control.js +%%WWWDIR_REL%%/data/skins/classic/views/js/controlpreset.js +%%WWWDIR_REL%%/data/skins/classic/views/js/controlpreset.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/cycle.js +%%WWWDIR_REL%%/data/skins/classic/views/js/cycle.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/devices.js +%%WWWDIR_REL%%/data/skins/classic/views/js/donate.js +%%WWWDIR_REL%%/data/skins/classic/views/js/donate.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/event.js +%%WWWDIR_REL%%/data/skins/classic/views/js/event.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/events.js +%%WWWDIR_REL%%/data/skins/classic/views/js/events.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/export.js +%%WWWDIR_REL%%/data/skins/classic/views/js/export.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/filter.js +%%WWWDIR_REL%%/data/skins/classic/views/js/filter.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/group.js +%%WWWDIR_REL%%/data/skins/classic/views/js/groups.js +%%WWWDIR_REL%%/data/skins/classic/views/js/login.js +%%WWWDIR_REL%%/data/skins/classic/views/js/monitor.js +%%WWWDIR_REL%%/data/skins/classic/views/js/monitor.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/monitorpreset.js +%%WWWDIR_REL%%/data/skins/classic/views/js/monitorprobe.js +%%WWWDIR_REL%%/data/skins/classic/views/js/montage.js +%%WWWDIR_REL%%/data/skins/classic/views/js/montage.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/options.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/postlogin.js +%%WWWDIR_REL%%/data/skins/classic/views/js/state.js +%%WWWDIR_REL%%/data/skins/classic/views/js/state.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/timeline.js +%%WWWDIR_REL%%/data/skins/classic/views/js/timeline.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/user.js +%%WWWDIR_REL%%/data/skins/classic/views/js/version.js +%%WWWDIR_REL%%/data/skins/classic/views/js/version.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/video.js +%%WWWDIR_REL%%/data/skins/classic/views/js/video.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/watch.js +%%WWWDIR_REL%%/data/skins/classic/views/js/watch.js.php +%%WWWDIR_REL%%/data/skins/classic/views/js/zone.js +%%WWWDIR_REL%%/data/skins/classic/views/js/zone.js.php +%%WWWDIR_REL%%/data/skins/classic/views/login.php +%%WWWDIR_REL%%/data/skins/classic/views/logout.php +%%WWWDIR_REL%%/data/skins/classic/views/monitor.php +%%WWWDIR_REL%%/data/skins/classic/views/monitorpreset.php +%%WWWDIR_REL%%/data/skins/classic/views/monitorprobe.php +%%WWWDIR_REL%%/data/skins/classic/views/montage.php +%%WWWDIR_REL%%/data/skins/classic/views/none.php +%%WWWDIR_REL%%/data/skins/classic/views/optionhelp.php +%%WWWDIR_REL%%/data/skins/classic/views/options.php +%%WWWDIR_REL%%/data/skins/classic/views/postlogin.php +%%WWWDIR_REL%%/data/skins/classic/views/settings.php +%%WWWDIR_REL%%/data/skins/classic/views/state.php +%%WWWDIR_REL%%/data/skins/classic/views/stats.php +%%WWWDIR_REL%%/data/skins/classic/views/status.php +%%WWWDIR_REL%%/data/skins/classic/views/timeline.php +%%WWWDIR_REL%%/data/skins/classic/views/user.php +%%WWWDIR_REL%%/data/skins/classic/views/version.php +%%WWWDIR_REL%%/data/skins/classic/views/video.php +%%WWWDIR_REL%%/data/skins/classic/views/watch.php +%%WWWDIR_REL%%/data/skins/classic/views/zone.php +%%WWWDIR_REL%%/data/skins/classic/views/zones.php +%%WWWDIR_REL%%/data/skins/mobile/css/skin.css +%%WWWDIR_REL%%/data/skins/mobile/includes/config.php +%%WWWDIR_REL%%/data/skins/mobile/includes/functions.php +%%WWWDIR_REL%%/data/skins/mobile/includes/init.php +%%WWWDIR_REL%%/data/skins/mobile/skin.php +%%WWWDIR_REL%%/data/skins/mobile/views/console.php +%%WWWDIR_REL%%/data/skins/mobile/views/css/console.css +%%WWWDIR_REL%%/data/skins/mobile/views/devices.php +%%WWWDIR_REL%%/data/skins/mobile/views/error.php +%%WWWDIR_REL%%/data/skins/mobile/views/event.php +%%WWWDIR_REL%%/data/skins/mobile/views/eventdetails.php +%%WWWDIR_REL%%/data/skins/mobile/views/events.php +%%WWWDIR_REL%%/data/skins/mobile/views/filter.php +%%WWWDIR_REL%%/data/skins/mobile/views/frame.php +%%WWWDIR_REL%%/data/skins/mobile/views/function.php +%%WWWDIR_REL%%/data/skins/mobile/views/login.php +%%WWWDIR_REL%%/data/skins/mobile/views/montage.php +%%WWWDIR_REL%%/data/skins/mobile/views/state.php +%%WWWDIR_REL%%/data/skins/mobile/views/video.php +%%WWWDIR_REL%%/data/skins/mobile/views/watch.php +%%WWWDIR_REL%%/data/tools/mootools/mootools-1.2-more-nc.js +%%WWWDIR_REL%%/data/tools/mootools/mootools-1.2-more-yc.js +%%WWWDIR_REL%%/data/tools/mootools/mootools-1.2.1-core-nc.js +%%WWWDIR_REL%%/data/tools/mootools/mootools-1.2.1-core-yc.js +@comment non-empty directory listing in revers order +@dirrm %%WWWDIR_REL%%/data/views +@dirrm %%WWWDIR_REL%%/data/tools/mootools +@dirrm %%WWWDIR_REL%%/data/tools +@dirrm %%WWWDIR_REL%%/data/temp +@dirrm %%WWWDIR_REL%%/data/sounds +@dirrm %%WWWDIR_REL%%/data/skins/mobile/views/css +@dirrm %%WWWDIR_REL%%/data/skins/mobile/views +@dirrm %%WWWDIR_REL%%/data/skins/mobile/lang +@dirrm %%WWWDIR_REL%%/data/skins/mobile/includes +@dirrm %%WWWDIR_REL%%/data/skins/mobile/graphics +@dirrm %%WWWDIR_REL%%/data/skins/mobile/css +@dirrm %%WWWDIR_REL%%/data/skins/mobile/ajax +@dirrm %%WWWDIR_REL%%/data/skins/mobile +@dirrm %%WWWDIR_REL%%/data/skins/classic/views/js +@dirrm %%WWWDIR_REL%%/data/skins/classic/views/css +@dirrm %%WWWDIR_REL%%/data/skins/classic/views +@dirrm %%WWWDIR_REL%%/data/skins/classic/lang +@dirrm %%WWWDIR_REL%%/data/skins/classic/js +@dirrm %%WWWDIR_REL%%/data/skins/classic/includes +@dirrm %%WWWDIR_REL%%/data/skins/classic/graphics +@dirrm %%WWWDIR_REL%%/data/skins/classic/css +@dirrm %%WWWDIR_REL%%/data/skins/classic/ajax +@dirrm %%WWWDIR_REL%%/data/skins/classic +@dirrm %%WWWDIR_REL%%/data/skins +@dirrm %%WWWDIR_REL%%/data/lang +@dirrm %%WWWDIR_REL%%/data/js +@dirrm %%WWWDIR_REL%%/data/includes +@dirrm %%WWWDIR_REL%%/data/images +@dirrm %%WWWDIR_REL%%/data/graphics +@dirrm %%WWWDIR_REL%%/data/events +@dirrm %%WWWDIR_REL%%/data/css +@dirrm %%WWWDIR_REL%%/data/ajax +@dirrm %%WWWDIR_REL%%/data +@dirrm %%WWWDIR_REL%%/cgi-bin +@dirrm %%WWWDIR_REL%% +@dirrm %%PORTDOCS%%%%DOCSDIR%% +@dirrm %%SITE_PERL%%/mach/auto/ZoneMinder +@dirrmtry %%SITE_PERL%%/mach/auto +@dirrmtry %%SITE_PERL%%/mach +@dirrm %%SITE_PERL%%/ZoneMinder/Trigger/Connection +@dirrm %%SITE_PERL%%/ZoneMinder/Trigger/Channel +@dirrm %%SITE_PERL%%/ZoneMinder/Trigger +@dirrm %%SITE_PERL%%/ZoneMinder/Memory +@dirrm %%SITE_PERL%%/ZoneMinder/Control +@dirrm %%SITE_PERL%%/ZoneMinder +@dirrmtry %%SITE_PERL%% +@dirrmtry lib/perl5/site_perl +@dirrmtry lib/perl5/5.10.1/man/man3 +@dirrmtry lib/perl5/5.10.1/man +@dirrmtry lib/perl5/5.10.1/mach +@dirrmtry lib/perl5/5.10.1 +@dirrmtry lib/perl5 |