Merge ../zum into develop
Conflicts: AUTHORS configure.ac db/zm_create.sql.in scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in scripts/zmupdate.pl.in src/Makefile.am src/zm_buffer.cpp src/zm_config_defines.h src/zm_event.cpp src/zm_ffmpeg.h src/zm_ffmpeg_camera.cpp src/zm_image.cpp src/zm_jpeg.h src/zm_local_camera.cpp src/zm_logger.cpp src/zm_mem_utils.h src/zm_monitor.cpp src/zm_monitor.h src/zm_mpeg.cpp src/zm_remote_camera_http.cpp src/zm_remote_camera_rtsp.cpp src/zm_rtsp.cpp src/zm_sdp.cpp src/zm_sdp.h src/zm_stream.cpp src/zm_thread.cpp src/zm_thread.h src/zm_threaddata.cpp src/zm_user.cpp src/zm_user.h src/zm_utils.cpp src/zm_zone.cpp src/zm_zone.h web/includes/actions.php web/lang/big5_big5.php web/lang/cn_zh.php web/lang/cs_cz.php web/lang/de_de.php web/lang/dk_dk.php web/lang/en_gb.php web/lang/es_ar.php web/lang/et_ee.php web/lang/fr_fr.php web/lang/he_il.php web/lang/hu_hu.php web/lang/it_it.php web/lang/ja_jp.php web/lang/nl_nl.php web/lang/pl_pl.php web/lang/pt_br.php web/lang/ro_ro.php web/lang/ru_ru.php web/lang/se_se.php web/skins/classic/js/skin.js web/skins/classic/views/js/monitor.js.php web/skins/classic/views/monitor.php web/skins/classic/views/zone.php
This commit is contained in:
commit
cdac403fb1
4
AUTHORS
4
AUTHORS
|
@ -4,3 +4,7 @@ This project was imagined and created by Philip Coombes in
|
|||
September 2002, shortly after being burglarised of his power tools.
|
||||
|
||||
mailto:philip.coombes@zoneminder.com
|
||||
|
||||
Plugin architecture and sample plugin modified for this version of ZoneMinder
|
||||
with support of Stagecoach Wireless (mailto:beat.naef@stagecoach-wireless.com)
|
||||
and the contributions of the CVisionLab team <info@cvisionlab.com>
|
||||
|
|
|
@ -285,8 +285,10 @@ AC_CHECK_LIB(x264,x264_predict_16x16_init)
|
|||
AC_CHECK_LIB(avutil,av_malloc,,AC_MSG_WARN(libavutil.a may be required for MPEG streaming))
|
||||
# Don't bother to warn about this one
|
||||
AC_CHECK_LIB(avcore,av_image_copy,,)
|
||||
AC_CHECK_LIB(avcodec,avcodec_open,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
|
||||
AC_CHECK_LIB(avformat,av_new_stream,,AC_MSG_WARN(libavformat.a is required for MPEG streaming))
|
||||
AC_CHECK_LIB(avcodec,avcodec_version,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
|
||||
AC_CHECK_LIB(avformat,avformat_version,,AC_MSG_WARN(libavformat.a is required for MPEG streaming))
|
||||
#AC_CHECK_LIB(avcodec,avcodec_open,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
|
||||
#AC_CHECK_LIB(avformat,av_new_stream,,AC_MSG_WARN(libavformat.a is required for MPEG streaming))
|
||||
AC_CHECK_LIB(avdevice,avdevice_register_all,,AC_MSG_WARN(libavdevice.a may be required for MPEG streaming))
|
||||
AC_CHECK_LIB(swscale,sws_scale,,,-lswscale)
|
||||
AC_CHECK_LIB(bz2,BZ2_bzCompress,,AC_MSG_WARN(zm requires libbz2.a for recent versions of ffmpeg))
|
||||
|
|
|
@ -0,0 +1,934 @@
|
|||
-- MySQL dump 10.9
|
||||
--
|
||||
-- Host: localhost Database: zm
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 4.1.16-log
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Current Database: `zm`
|
||||
--
|
||||
|
||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `zm`;
|
||||
|
||||
USE `zm`;
|
||||
|
||||
--
|
||||
-- Table structure for table `Config`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Config`;
|
||||
CREATE TABLE `Config` (
|
||||
`Id` smallint(5) unsigned NOT NULL default '0',
|
||||
`Name` varchar(32) NOT NULL default '',
|
||||
`Value` text NOT NULL,
|
||||
`Type` tinytext NOT NULL,
|
||||
`DefaultValue` tinytext,
|
||||
`Hint` tinytext,
|
||||
`Pattern` tinytext,
|
||||
`Format` tinytext,
|
||||
`Prompt` tinytext,
|
||||
`Help` text,
|
||||
`Category` varchar(32) NOT NULL default '',
|
||||
`Readonly` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Requires` text,
|
||||
PRIMARY KEY (`Name`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `ControlPresets`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `ControlPresets`;
|
||||
CREATE TABLE `ControlPresets` (
|
||||
`MonitorId` int(10) unsigned NOT NULL default '0',
|
||||
`Preset` int(10) unsigned NOT NULL default '0',
|
||||
`Label` varchar(64) NOT NULL default '',
|
||||
PRIMARY KEY (`MonitorId`,`Preset`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `Controls`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Controls`;
|
||||
CREATE TABLE `Controls` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Type` enum('Local','Remote') NOT NULL default 'Local',
|
||||
`Protocol` varchar(64) default NULL,
|
||||
`CanWake` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanSleep` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanReset` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanZoom` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanAutoZoom` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanZoomAbs` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanZoomRel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanZoomCon` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinZoomRange` int(10) unsigned default NULL,
|
||||
`MaxZoomRange` int(10) unsigned default NULL,
|
||||
`MinZoomStep` int(10) unsigned default NULL,
|
||||
`MaxZoomStep` int(10) unsigned default NULL,
|
||||
`HasZoomSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinZoomSpeed` int(10) unsigned default NULL,
|
||||
`MaxZoomSpeed` int(10) unsigned default NULL,
|
||||
`CanFocus` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanAutoFocus` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanFocusAbs` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanFocusRel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanFocusCon` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinFocusRange` int(10) unsigned default NULL,
|
||||
`MaxFocusRange` int(10) unsigned default NULL,
|
||||
`MinFocusStep` int(10) unsigned default NULL,
|
||||
`MaxFocusStep` int(10) unsigned default NULL,
|
||||
`HasFocusSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinFocusSpeed` int(10) unsigned default NULL,
|
||||
`MaxFocusSpeed` int(10) unsigned default NULL,
|
||||
`CanIris` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanAutoIris` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanIrisAbs` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanIrisRel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanIrisCon` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinIrisRange` int(10) unsigned default NULL,
|
||||
`MaxIrisRange` int(10) unsigned default NULL,
|
||||
`MinIrisStep` int(10) unsigned default NULL,
|
||||
`MaxIrisStep` int(10) unsigned default NULL,
|
||||
`HasIrisSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinIrisSpeed` int(10) unsigned default NULL,
|
||||
`MaxIrisSpeed` int(10) unsigned default NULL,
|
||||
`CanGain` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanAutoGain` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanGainAbs` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanGainRel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanGainCon` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinGainRange` int(10) unsigned default NULL,
|
||||
`MaxGainRange` int(10) unsigned default NULL,
|
||||
`MinGainStep` int(10) unsigned default NULL,
|
||||
`MaxGainStep` int(10) unsigned default NULL,
|
||||
`HasGainSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinGainSpeed` int(10) unsigned default NULL,
|
||||
`MaxGainSpeed` int(10) unsigned default NULL,
|
||||
`CanWhite` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanAutoWhite` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanWhiteAbs` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanWhiteRel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanWhiteCon` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinWhiteRange` int(10) unsigned default NULL,
|
||||
`MaxWhiteRange` int(10) unsigned default NULL,
|
||||
`MinWhiteStep` int(10) unsigned default NULL,
|
||||
`MaxWhiteStep` int(10) unsigned default NULL,
|
||||
`HasWhiteSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinWhiteSpeed` int(10) unsigned default NULL,
|
||||
`MaxWhiteSpeed` int(10) unsigned default NULL,
|
||||
`HasPresets` tinyint(3) unsigned NOT NULL default '0',
|
||||
`NumPresets` tinyint(3) unsigned NOT NULL default '0',
|
||||
`HasHomePreset` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanSetPresets` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanMove` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanMoveDiag` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanMoveMap` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanMoveAbs` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanMoveRel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanMoveCon` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanPan` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinPanRange` int(10) default NULL,
|
||||
`MaxPanRange` int(10) default NULL,
|
||||
`MinPanStep` int(10) default NULL,
|
||||
`MaxPanStep` int(10) default NULL,
|
||||
`HasPanSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinPanSpeed` int(10) default NULL,
|
||||
`MaxPanSpeed` int(10) default NULL,
|
||||
`HasTurboPan` tinyint(3) unsigned NOT NULL default '0',
|
||||
`TurboPanSpeed` int(10) default NULL,
|
||||
`CanTilt` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinTiltRange` int(10) default NULL,
|
||||
`MaxTiltRange` int(10) default NULL,
|
||||
`MinTiltStep` int(10) default NULL,
|
||||
`MaxTiltStep` int(10) default NULL,
|
||||
`HasTiltSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinTiltSpeed` int(10) default NULL,
|
||||
`MaxTiltSpeed` int(10) default NULL,
|
||||
`HasTurboTilt` tinyint(3) unsigned NOT NULL default '0',
|
||||
`TurboTiltSpeed` int(10) default NULL,
|
||||
`CanAutoScan` tinyint(3) unsigned NOT NULL default '0',
|
||||
`NumScanPaths` tinyint(3) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `Devices`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Devices`;
|
||||
CREATE TABLE `Devices` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` tinytext NOT NULL,
|
||||
`Type` enum('X10') NOT NULL default 'X10',
|
||||
`KeyString` varchar(32) NOT NULL default '',
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `Events`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Events`;
|
||||
CREATE TABLE `Events` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`MonitorId` int(10) unsigned NOT NULL default '0',
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Cause` varchar(32) NOT NULL default '',
|
||||
`StartTime` datetime default NULL,
|
||||
`EndTime` datetime default NULL,
|
||||
`Width` smallint(5) unsigned NOT NULL default '0',
|
||||
`Height` smallint(5) unsigned NOT NULL default '0',
|
||||
`Length` decimal(10,2) NOT NULL default '0.00',
|
||||
`Frames` int(10) unsigned default NULL,
|
||||
`AlarmFrames` int(10) unsigned default NULL,
|
||||
`TotScore` int(10) unsigned NOT NULL default '0',
|
||||
`AvgScore` smallint(5) unsigned default '0',
|
||||
`MaxScore` smallint(5) unsigned default '0',
|
||||
`Archived` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Videoed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Uploaded` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Emailed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Messaged` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Executed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Notes` text,
|
||||
PRIMARY KEY (`Id`,`MonitorId`),
|
||||
KEY `MonitorId` (`MonitorId`),
|
||||
KEY `StartTime` (`StartTime`),
|
||||
KEY `Frames` (`Frames`),
|
||||
KEY `Archived` (`Archived`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `Filters`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Filters`;
|
||||
CREATE TABLE `Filters` (
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Query` text NOT NULL,
|
||||
`AutoArchive` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AutoVideo` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AutoUpload` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AutoEmail` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AutoMessage` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AutoExecute` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AutoExecuteCmd` tinytext,
|
||||
`AutoDelete` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Background` tinyint(1) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`Name`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `Frames`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Frames`;
|
||||
CREATE TABLE `Frames` (
|
||||
`EventId` int(10) unsigned NOT NULL default '0',
|
||||
`FrameId` int(10) unsigned NOT NULL default '0',
|
||||
`Type` enum('Normal','Bulk','Alarm') NOT NULL default 'Normal',
|
||||
`TimeStamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
`Delta` decimal(8,2) NOT NULL default '0.00',
|
||||
`Score` smallint(5) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`EventId`,`FrameId`),
|
||||
KEY `Type` (`Type`),
|
||||
KEY `TimeStamp` (`TimeStamp`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `Groups`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Groups`;
|
||||
CREATE TABLE `Groups` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`MonitorIds` tinytext NOT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `Logs`
|
||||
--
|
||||
CREATE TABLE `Logs` (
|
||||
`TimeKey` decimal(16,6) NOT NULL,
|
||||
`Component` varchar(32) NOT NULL,
|
||||
`Pid` smallint(6) DEFAULT NULL,
|
||||
`Level` tinyint(3) NOT NULL,
|
||||
`Code` char(3) NOT NULL,
|
||||
`Message` varchar(255) NOT NULL,
|
||||
`File` varchar(255) DEFAULT NULL,
|
||||
`Line` smallint(5) unsigned DEFAULT NULL,
|
||||
KEY `TimeKey` (`TimeKey`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `MonitorPresets`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `MonitorPresets`;
|
||||
CREATE TABLE `MonitorPresets` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Type` enum('Local','Remote','File','Ffmpeg') NOT NULL default 'Local',
|
||||
`Device` tinytext,
|
||||
`Channel` tinyint(3) unsigned default NULL,
|
||||
`Format` int(10) unsigned default NULL,
|
||||
`Protocol` varchar(16) default NULL,
|
||||
`Method` varchar(16) default NULL,
|
||||
`Host` varchar(64) default NULL,
|
||||
`Port` varchar(8) default NULL,
|
||||
`Path` varchar(255) default NULL,
|
||||
`SubPath` varchar(64) default NULL,
|
||||
`Width` smallint(5) unsigned default NULL,
|
||||
`Height` smallint(5) unsigned default NULL,
|
||||
`Palette` int(10) unsigned default NULL,
|
||||
`MaxFPS` decimal(5,2) default NULL,
|
||||
`Controllable` tinyint(3) unsigned NOT NULL default '0',
|
||||
`ControlId` varchar(16) default NULL,
|
||||
`ControlDevice` varchar(255) default NULL,
|
||||
`ControlAddress` varchar(255) default NULL,
|
||||
`DefaultRate` smallint(5) unsigned NOT NULL default '100',
|
||||
`DefaultScale` smallint(5) unsigned NOT NULL default '100',
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `Monitors`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Monitors`;
|
||||
CREATE TABLE `Monitors` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Type` enum('Local','Remote','File','Ffmpeg') NOT NULL default 'Local',
|
||||
`Function` enum('None','Monitor','Modect','Record','Mocord','Nodect') NOT NULL default 'Monitor',
|
||||
`Enabled` tinyint(3) unsigned NOT NULL default '1',
|
||||
`LinkedMonitors` varchar(255) NOT NULL default '',
|
||||
`Triggers` set('X10') NOT NULL default '',
|
||||
`Device` varchar(64) NOT NULL default '',
|
||||
`Channel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Format` int(10) unsigned NOT NULL default '0',
|
||||
`Protocol` varchar(16) NOT NULL default '',
|
||||
`Method` varchar(16) NOT NULL default '',
|
||||
`Host` varchar(64) NOT NULL default '',
|
||||
`Port` varchar(8) NOT NULL default '',
|
||||
`SubPath` varchar(64) NOT NULL default '',
|
||||
`Path` varchar(255) NOT NULL default '',
|
||||
`Width` smallint(5) unsigned NOT NULL default '0',
|
||||
`Height` smallint(5) unsigned NOT NULL default '0',
|
||||
`Colours` tinyint(3) unsigned NOT NULL default '1',
|
||||
`Palette` int(10) unsigned NOT NULL default '0',
|
||||
`Orientation` enum('0','90','180','270','hori','vert') NOT NULL default '0',
|
||||
`Deinterlacing` int(10) unsigned NOT NULL default '0',
|
||||
`Brightness` mediumint(7) NOT NULL default '-1',
|
||||
`Contrast` mediumint(7) NOT NULL default '-1',
|
||||
`Hue` mediumint(7) NOT NULL default '-1',
|
||||
`Colour` mediumint(7) NOT NULL default '-1',
|
||||
`EventPrefix` varchar(32) NOT NULL default 'Event-',
|
||||
`LabelFormat` varchar(64) NOT NULL default '%N - %y/%m/%d %H:%M:%S',
|
||||
`LabelX` smallint(5) unsigned NOT NULL default '0',
|
||||
`LabelY` smallint(5) unsigned NOT NULL default '0',
|
||||
`ImageBufferCount` smallint(5) unsigned NOT NULL default '100',
|
||||
`WarmupCount` smallint(5) unsigned NOT NULL default '25',
|
||||
`PreEventCount` smallint(5) unsigned NOT NULL default '10',
|
||||
`PostEventCount` smallint(5) unsigned NOT NULL default '10',
|
||||
`StreamReplayBuffer` int(10) unsigned NOT NULL default '1000',
|
||||
`AlarmFrameCount` smallint(5) unsigned NOT NULL default '1',
|
||||
`SectionLength` int(10) unsigned NOT NULL default '600',
|
||||
`FrameSkip` smallint(5) unsigned NOT NULL default '0',
|
||||
`MaxFPS` decimal(5,2) default NULL,
|
||||
`AlarmMaxFPS` decimal(5,2) default NULL,
|
||||
`FPSReportInterval` smallint(5) unsigned NOT NULL default '250',
|
||||
`RefBlendPerc` tinyint(3) unsigned NOT NULL default '10',
|
||||
`Controllable` tinyint(3) unsigned NOT NULL default '0',
|
||||
`ControlId` int(10) unsigned NOT NULL default '0',
|
||||
`ControlDevice` varchar(255) default NULL,
|
||||
`ControlAddress` varchar(255) default NULL,
|
||||
`AutoStopTimeout` decimal(5,2) default NULL,
|
||||
`TrackMotion` tinyint(3) unsigned NOT NULL default '0',
|
||||
`TrackDelay` smallint(5) unsigned NOT NULL default '0',
|
||||
`ReturnLocation` tinyint(3) NOT NULL default '-1',
|
||||
`ReturnDelay` smallint(5) unsigned NOT NULL default '0',
|
||||
`DefaultView` enum('Events','Control') NOT NULL default 'Events',
|
||||
`DefaultRate` smallint(5) unsigned NOT NULL default '100',
|
||||
`DefaultScale` smallint(5) unsigned NOT NULL default '100',
|
||||
`SignalCheckColour` varchar(32) NOT NULL default '#0000BE',
|
||||
`WebColour` varchar(32) NOT NULL default 'red',
|
||||
`Sequence` smallint(5) unsigned default NULL,
|
||||
`UsedPl` varchar(88) NOT NULL default '',
|
||||
`DoNativeMotDet` tinyint(3) unsigned NOT NULL default '1',
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `PluginsConfig`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `PluginsConfig`;
|
||||
CREATE TABLE `PluginsConfig` (
|
||||
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`Name` varchar(32) NOT NULL DEFAULT '',
|
||||
`Value` text NOT NULL,
|
||||
`Type` tinytext NOT NULL,
|
||||
`Choices` text NOT NULL,
|
||||
`MonitorId` int(10) unsigned NOT NULL,
|
||||
`ZoneId` int(10) unsigned NOT NULL,
|
||||
`pluginName` tinytext NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
KEY `ZoneId` (`ZoneId`),
|
||||
KEY `MonitorId` (`MonitorId`),
|
||||
KEY `Name` (`Name`),
|
||||
FULLTEXT KEY `pluginName` (`pluginName`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
|
||||
|
||||
|
||||
--
|
||||
-- Table structure for table `States`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `States`;
|
||||
CREATE TABLE `States` (
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Definition` text NOT NULL,
|
||||
PRIMARY KEY (`Name`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `Stats`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Stats`;
|
||||
CREATE TABLE `Stats` (
|
||||
`MonitorId` int(10) unsigned NOT NULL default '0',
|
||||
`ZoneId` int(10) unsigned NOT NULL default '0',
|
||||
`EventId` int(10) unsigned NOT NULL default '0',
|
||||
`FrameId` int(10) unsigned NOT NULL default '0',
|
||||
`PixelDiff` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AlarmPixels` int(10) unsigned NOT NULL default '0',
|
||||
`FilterPixels` int(10) unsigned NOT NULL default '0',
|
||||
`BlobPixels` int(10) unsigned NOT NULL default '0',
|
||||
`Blobs` smallint(5) unsigned NOT NULL default '0',
|
||||
`MinBlobSize` int(10) unsigned NOT NULL default '0',
|
||||
`MaxBlobSize` int(10) unsigned NOT NULL default '0',
|
||||
`MinX` smallint(5) unsigned NOT NULL default '0',
|
||||
`MaxX` smallint(5) unsigned NOT NULL default '0',
|
||||
`MinY` smallint(5) unsigned NOT NULL default '0',
|
||||
`MaxY` smallint(5) unsigned NOT NULL default '0',
|
||||
`Score` smallint(5) unsigned NOT NULL default '0',
|
||||
KEY `EventId` (`EventId`),
|
||||
KEY `MonitorId` (`MonitorId`),
|
||||
KEY `ZoneId` (`ZoneId`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `TriggersX10`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `TriggersX10`;
|
||||
CREATE TABLE `TriggersX10` (
|
||||
`MonitorId` int(10) unsigned NOT NULL default '0',
|
||||
`Activation` varchar(32) default NULL,
|
||||
`AlarmInput` varchar(32) default NULL,
|
||||
`AlarmOutput` varchar(32) default NULL,
|
||||
PRIMARY KEY (`MonitorId`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `Users`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Users`;
|
||||
CREATE TABLE `Users` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Username` varchar(32) character set latin1 collate latin1_bin NOT NULL default '',
|
||||
`Password` varchar(64) NOT NULL default '',
|
||||
`Language` varchar(8) NOT NULL default '',
|
||||
`Enabled` tinyint(3) unsigned NOT NULL default '1',
|
||||
`Stream` enum('None','View') NOT NULL default 'None',
|
||||
`Events` enum('None','View','Edit') NOT NULL default 'None',
|
||||
`Control` enum('None','View','Edit') NOT NULL default 'None',
|
||||
`Monitors` enum('None','View','Edit') NOT NULL default 'None',
|
||||
`Devices` enum('None','View','Edit') NOT NULL default 'None',
|
||||
`System` enum('None','View','Edit') NOT NULL default 'None',
|
||||
`MaxBandwidth` varchar(16) NOT NULL default '',
|
||||
`MonitorIds` tinytext NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
UNIQUE KEY `UC_Username` (`Username`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `ZonePresets`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `ZonePresets`;
|
||||
CREATE TABLE `ZonePresets` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Type` enum('Active','Inclusive','Exclusive','Preclusive','Inactive') NOT NULL default 'Active',
|
||||
`Units` enum('Pixels','Percent') NOT NULL default 'Pixels',
|
||||
`CheckMethod` enum('AlarmedPixels','FilteredPixels','Blobs') NOT NULL default 'Blobs',
|
||||
`MinPixelThreshold` smallint(5) unsigned default NULL,
|
||||
`MaxPixelThreshold` smallint(5) unsigned default NULL,
|
||||
`MinAlarmPixels` int(10) unsigned default NULL,
|
||||
`MaxAlarmPixels` int(10) unsigned default NULL,
|
||||
`FilterX` tinyint(3) unsigned default NULL,
|
||||
`FilterY` tinyint(3) unsigned default NULL,
|
||||
`MinFilterPixels` int(10) unsigned default NULL,
|
||||
`MaxFilterPixels` int(10) unsigned default NULL,
|
||||
`MinBlobPixels` int(10) unsigned default NULL,
|
||||
`MaxBlobPixels` int(10) unsigned default NULL,
|
||||
`MinBlobs` smallint(5) unsigned default NULL,
|
||||
`MaxBlobs` smallint(5) unsigned default NULL,
|
||||
`OverloadFrames` smallint(5) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
-- Table structure for table `Zones`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Zones`;
|
||||
CREATE TABLE `Zones` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`MonitorId` int(10) unsigned NOT NULL default '0',
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Type` enum('Active','Inclusive','Exclusive','Preclusive','Inactive') NOT NULL default 'Active',
|
||||
`Units` enum('Pixels','Percent') NOT NULL default 'Pixels',
|
||||
`NumCoords` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Coords` tinytext NOT NULL,
|
||||
`Area` int(10) unsigned NOT NULL default '0',
|
||||
`AlarmRGB` int(10) unsigned default '0',
|
||||
`CheckMethod` enum('AlarmedPixels','FilteredPixels','Blobs') NOT NULL default 'Blobs',
|
||||
`MinPixelThreshold` smallint(5) unsigned default NULL,
|
||||
`MaxPixelThreshold` smallint(5) unsigned default NULL,
|
||||
`MinAlarmPixels` int(10) unsigned default NULL,
|
||||
`MaxAlarmPixels` int(10) unsigned default NULL,
|
||||
`FilterX` tinyint(3) unsigned default NULL,
|
||||
`FilterY` tinyint(3) unsigned default NULL,
|
||||
`MinFilterPixels` int(10) unsigned default NULL,
|
||||
`MaxFilterPixels` int(10) unsigned default NULL,
|
||||
`MinBlobPixels` int(10) unsigned default NULL,
|
||||
`MaxBlobPixels` int(10) unsigned default NULL,
|
||||
`MinBlobs` smallint(5) unsigned default NULL,
|
||||
`MaxBlobs` smallint(5) unsigned default NULL,
|
||||
`OverloadFrames` smallint(5) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`Id`),
|
||||
KEY `MonitorId` (`MonitorId`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
--
|
||||
-- Initial data to be loaded into ZoneMinder database
|
||||
--
|
||||
|
||||
--
|
||||
-- Create a default admin user.
|
||||
--
|
||||
insert into Users values ('','admin',password('admin'),'',1,'View','Edit','Edit','Edit','Edit','Edit','','');
|
||||
|
||||
--
|
||||
-- Add a sample filter to purge the oldest 5 events when the disk is 95% full, delete is disabled though
|
||||
--
|
||||
insert into Filters values ('PurgeWhenFull','{"sort_field":"Id","terms":[{"val":0,"attr":"Archived","op":"="},{"cnj":"and","val":95,"attr":"DiskPercent","op":">="}],"limit":5,"sort_asc":1}',0,0,0,0,0,0,'',1,0);
|
||||
|
||||
--
|
||||
-- Add in some sample control protocol definitions
|
||||
--
|
||||
insert into Controls values (1,'Pelco-D','Local','PelcoD',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
|
||||
insert into Controls values (2,'Pelco-P','Local','PelcoP',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
|
||||
insert into Controls values (3,'Sony VISCA','Local','Visca',1,1,0,1,0,0,0,1,0,16384,10,4000,1,1,6,1,1,1,0,1,0,1536,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,3,1,1,1,1,0,1,1,0,1,-15578,15578,100,10000,1,1,50,1,254,1,-7789,7789,100,5000,1,1,50,1,254,0,0);
|
||||
INSERT INTO Controls VALUES (4,'Axis API v2','Remote','AxisV2',0,0,0,1,0,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,12,1,1,1,1,1,0,1,0,1,-360,360,1,90,0,NULL,NULL,0,NULL,1,-360,360,1,90,0,NULL,NULL,0,NULL,0,0);
|
||||
insert into Controls values (5,'Panasonic IP','Remote','PanasonicIP',0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,8,1,1,1,0,1,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0);
|
||||
insert into Controls values (6,'Neu-Fusion NCS370','Remote','Ncs370',0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,24,1,0,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0);
|
||||
|
||||
--
|
||||
-- Add some monitor preset values
|
||||
--
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, mpjpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&req_fps=5',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, mpjpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=5',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, mpjpeg, B&W','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&color=0',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, mpjpeg, B&W','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&color=0',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 320x240, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240',NULL,320,240,3,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 320x240, mpjpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&req_fps=5',NULL,320,240,3,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 320x240, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 320x240, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,5.0,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 640x480, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480',NULL,640,480,3,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 640x480, mpjpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=5',NULL,640,480,3,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 640x480, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 640x480, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,5.0,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT into MonitorPresets VALUES ('','Axis IP, mpeg4, unicast','Remote',NULL,NULL,NULL,'rtsp','rtpUni','<ip-address>',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT into MonitorPresets VALUES ('','Axis IP, mpeg4, multicast','Remote',NULL,NULL,NULL,'rtsp','rtpMulti','<ip-address>',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT into MonitorPresets VALUES ('','Axis IP, mpeg4, RTP/RTSP','Remote',NULL,NULL,NULL,'rtsp','rtpRtsp','<ip-address>',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT into MonitorPresets VALUES ('','Axis IP, mpeg4, RTP/RTSP/HTTP','Remote',NULL,NULL,NULL,'rtsp','rtpRtspHttp','<ip-address>',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 320x240, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/nphMotionJpeg?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 320x240, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 320x240, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 640x480, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/nphMotionJpeg?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 640x480, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 640x480, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 320x240, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/nphMotionJpeg?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,1,5,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 320x240, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,1,5,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 320x240, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,5.0,1,5,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 640x480, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/nphMotionJpeg?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,1,5,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 640x480, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,1,5,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 640x480, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,5.0,1,5,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Gadspot IP, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Gadspot IP, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Gadspot IP, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/GetData.cgi',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Gadspot IP, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','VEO Observer, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Blue Net Video Server, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/cgi-bin/image.cgi?control=0&id=admin&passwd=admin',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT into MonitorPresets VALUES ('','ACTi IP, mpeg4, unicast','Remote',NULL,NULL,NULL,'rtsp','rtpUni','<ip-address>',7070,'','/track',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis FFMPEG H.264','Ffmpeg',NULL,NULL,NULL,NULL,NULL,'rtsp://<host/address>/axis-media/media.amp?videocodec=h264',NULL,NULL,NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Vivotek FFMPEG','Ffmpeg',NULL,NULL,NULL,NULL,NULL,'rtsp://<host/address>:554/live.sdp',NULL,NULL,NULL,352,240,NULL,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis FFMPEG','Ffmpeg',NULL,NULL,NULL,NULL,NULL,'rtsp://<host/address>/axis-media/media.amp',NULL,NULL,NULL,640,480,NULL,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','ACTi TCM FFMPEG','Ffmpeg',NULL,NULL,NULL,NULL,NULL,'rtsp://admin:123456@<host/address>:7070',NULL,NULL,NULL,320,240,NULL,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), PAL, 320x240','Local','/dev/video<?>','<?>',255,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), PAL, 320x240, max 5 FPS','Local','/dev/video<?>','<?>',255,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), PAL, 640x480','Local','/dev/video<?>','<?>',255,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), PAL, 640x480, max 5 FPS','Local','/dev/video<?>','<?>',255,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), NTSC, 320x240','Local','/dev/video<?>','<?>',45056,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), NTSC, 320x240, max 5 FPS','Local','/dev/video<?>','<?>',45056,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), NTSC, 640x480','Local','/dev/video<?>','<?>',45056,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), NTSC, 640x480, max 5 FPS','Local','/dev/video<?>','<?>',45056,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), PAL, 320x240','Local','/dev/video<?>','<?>',0,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), PAL, 320x240, max 5 FPS','Local','/dev/video<?>','<?>',0,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), PAL, 640x480','Local','/dev/video<?>','<?>',0,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), PAL, 640x480, max 5 FPS','Local','/dev/video<?>','<?>',0,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 320x240','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 320x240, max 5 FPS','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 640x480','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 640x480, max 5 FPS','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Remote ZoneMinder','Remote',NULL,NULL,NULL,'http','simple','<ip-address>',80,'/cgi-bin/nph-zms?mode=jpeg&monitor=<monitor-id>&scale=100&maxfps=5&buffer=0',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
|
||||
--
|
||||
-- Add some zone preset values
|
||||
--
|
||||
INSERT INTO ZonePresets VALUES (1,'Fast, low sensitivity','Active','Percent','AlarmedPixels',60,NULL,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (2,'Fast, medium sensitivity','Active','Percent','AlarmedPixels',40,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (3,'Fast, high sensitivity','Active','Percent','AlarmedPixels',20,NULL,5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (4,'Best, low sensitivity','Active','Percent','Blobs',60,NULL,36,NULL,7,7,24,NULL,20,NULL,1,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (5,'Best, medium sensitivity','Active','Percent','Blobs',40,NULL,16,NULL,5,5,12,NULL,10,NULL,1,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (6,'Best, high sensitivity','Active','Percent','Blobs',20,NULL,8,NULL,3,3,6,NULL,5,NULL,1,NULL,0);
|
||||
|
||||
--
|
||||
-- Apply the initial configuration
|
||||
--
|
||||
-- This section is autogenerated by zmconfgen.pl
|
||||
-- Do not edit this file as any changes will be overwritten
|
||||
--
|
||||
|
||||
delete from Config;
|
||||
|
||||
insert into Config set Id = 0, Name = 'ZM_LANG_DEFAULT', Value = 'en_gb', Type = 'string', DefaultValue = 'en_gb', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Default language used by web interface', Help = 'ZoneMinder allows the web interface to use languages other than English if the appropriate language file has been created and is present. This option allows you to change the default language that is used from the shipped language, British English, to another language', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 1, Name = 'ZM_OPT_USE_AUTH', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Authenticate user logins to ZoneMinder', Help = 'ZoneMinder can run in two modes. The simplest is an entirely unauthenticated mode where anyone can access ZoneMinder and perform all tasks. This is most suitable for installations where the web server access is limited in other ways. The other mode enables user accounts with varying sets of permissions. Users must login or authenticate to access ZoneMinder and are limited by their defined permissions.', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 2, Name = 'ZM_AUTH_TYPE', Value = 'builtin', Type = 'string', DefaultValue = 'builtin', Hint = 'builtin|remote', Pattern = '(?^i:^([br]))', Format = ' $1 =~ /^b/ ? \"builtin\" : \"remote\" ', Prompt = 'What is used to authenticate ZoneMinder users', Help = 'ZoneMinder can use two methods to authenticate users when running in authenticated mode. The first is a builtin method where ZoneMinder provides facilities for users to log in and maintains track of their identity. The second method allows interworking with other methods such as http basic authentication which passes an independently authentication \'remote\' user via http. In this case ZoneMinder would use the supplied user without additional authentication provided such a user is configured ion ZoneMinder.', Category = 'system', Readonly = '0', Requires = 'ZM_OPT_USE_AUTH=1';
|
||||
insert into Config set Id = 3, Name = 'ZM_AUTH_RELAY', Value = 'hashed', Type = 'string', DefaultValue = 'hashed', Hint = 'hashed|plain|none', Pattern = '(?^i:^([hpn]))', Format = ' ($1 =~ /^h/) ? \"hashed\" : ($1 =~ /^p/ ? \"plain\" : \"none\" ) ', Prompt = 'Method used to relay authentication information', Help = 'When ZoneMinder is running in authenticated mode it can pass user details between the web pages and the back end processes. There are two methods for doing this. This first is to use a time limited hashed string which contains no direct username or password details, the second method is to pass the username and passwords around in plaintext. This method is not recommend except where you do not have the md5 libraries available on your system or you have a completely isolated system with no external access. You can also switch off authentication relaying if your system is isolated in other ways.', Category = 'system', Readonly = '0', Requires = 'ZM_OPT_USE_AUTH=1';
|
||||
insert into Config set Id = 4, Name = 'ZM_AUTH_HASH_SECRET', Value = '...Change me to something unique...', Type = 'string', DefaultValue = '...Change me to something unique...', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Secret for encoding hashed authentication information', Help = 'When ZoneMinder is running in hashed authenticated mode it is necessary to generate hashed strings containing encrypted sensitive information such as usernames and password. Although these string are reasonably secure the addition of a random secret increases security substantially.', Category = 'system', Readonly = '0', Requires = 'ZM_OPT_USE_AUTH=1;ZM_AUTH_RELAY=hashed';
|
||||
insert into Config set Id = 5, Name = 'ZM_AUTH_HASH_IPS', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Include IP addresses in the authentication hash', Help = 'When ZoneMinder is running in hashed authenticated mode it can optionally include the requesting IP address in the resultant hash. This adds an extra level of security as only requests from that address may use that authentication key. However in some circumstances, such as access over mobile networks, the requesting address can change for each request which will cause most requests to fail. This option allows you to control whether IP addresses are included in the authentication hash on your system. If you experience intermitent problems with authentication, switching this option off may help.', Category = 'system', Readonly = '0', Requires = 'ZM_OPT_USE_AUTH=1;ZM_AUTH_RELAY=hashed';
|
||||
insert into Config set Id = 6, Name = 'ZM_AUTH_HASH_LOGINS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Allow login by authentication hash', Help = 'The normal process for logging into ZoneMinder is via the login screen with username and password. In some circumstances it may be desirable to allow access directly to one or more pages, for instance from a third party application. If this option is enabled then adding an \'auth\' parameter to any request will include a shortcut login bypassing the login screen, if not already logged in. As authentication hashes are time and, optionally, IP limited this can allow short-term access to ZoneMinder screens from other web pages etc. In order to use this the calling application will hae to generate the authentication hash itself and ensure it is valid. If you use this option you should ensure that you have modified the ZM_AUTH_HASH_SECRET to somethign unique to your system.', Category = 'system', Readonly = '0', Requires = 'ZM_OPT_USE_AUTH=1;ZM_AUTH_RELAY=hashed';
|
||||
insert into Config set Id = 7, Name = 'ZM_DIR_EVENTS', Value = 'events', Type = 'string', DefaultValue = 'events', Hint = 'directory', Pattern = '(?^:^([a-zA-Z0-9-_.]+)$)', Format = ' $1 ', Prompt = 'Directory where events are stored', Help = 'This is the path to the events directory where all the event images and other miscellaneous files are stored. It is normally given as a subdirectory of the web directory you have specified earlier however if disk space is tight it can reside on another partition in which case you should create a link from that area to the path you give here.', Category = 'paths', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 8, Name = 'ZM_USE_DEEP_STORAGE', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Use a deep filesystem hierarchy for events', Help = 'Traditionally ZoneMinder stores all events for 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 an alternate 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.', Category = 'paths', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 9, Name = 'ZM_DIR_IMAGES', Value = 'images', Type = 'string', DefaultValue = 'images', Hint = 'directory', Pattern = '(?^:^([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 = '(?^:^([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 = '(?^:^((?:[^/].*)?)/?$)', 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_COLOUR_JPEG_FILES', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([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 = '';
|
||||
insert into Config set Id = 13, Name = 'ZM_ADD_JPEG_COMMENTS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Add jpeg timestamp annotations as file header comments', Help = 'JPEG files may have a number of extra fields added to the file header. The comment field may have any kind of text added. This options allows you to have the same text that is used to annotate the image additionally included as a file header comment. If you archive event images to other locations this may help you locate images for particular events or times if you use software that can read comment headers.', Category = 'images', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 14, Name = 'ZM_JPEG_FILE_QUALITY', Value = '70', Type = 'integer', DefaultValue = '70', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Set the JPEG quality setting for the saved event files (1-100)', Help = 'When ZoneMinder detects an event it will save the images associated with that event to files. These files are in the JPEG format and can be viewed or streamed later. This option specifies what image quality should be used to save these files. A higher number means better quality but less compression so will take up more disk space and take longer to view over a slow connection. By contrast a low number means smaller, quicker to view, files but at the price of lower quality images. This setting applies to all images written except if the capture image has caused an alarm and the alarm file quality option is set at a higher value when that is used instead.', Category = 'images', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 15, Name = 'ZM_JPEG_ALARM_FILE_QUALITY', Value = '0', Type = 'integer', DefaultValue = '0', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Set the JPEG quality setting for the saved event files during an alarm (1-100)', Help = 'This value is equivalent to the regular jpeg file quality setting above except that it only applies to images saved while in an alarm state and then only if this value is set to a higher quality setting than the ordinary file setting. If set to a lower value then it is ignored. Thus leaving it at the default of 0 effectively means to use the regular file quality setting for all saved images. This is to prevent acccidentally saving important images at a worse quality setting.', Category = 'images', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 16, Name = 'ZM_JPEG_IMAGE_QUALITY', Value = '70', Type = 'integer', DefaultValue = '70', Hint = 'integer', Pattern = '(?^:^(\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 = 17, Name = 'ZM_JPEG_STREAM_QUALITY', Value = '70', Type = 'integer', DefaultValue = '70', Hint = 'integer', Pattern = '(?^:^(\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 = 18, Name = 'ZM_MPEG_TIMED_FRAMES', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([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 = '';
|
||||
insert into Config set Id = 19, Name = 'ZM_MPEG_LIVE_FORMAT', Value = 'swf', Type = 'string', DefaultValue = 'swf', Hint = 'string', Pattern = '(?^:^(.+)$)', 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 = '';
|
||||
insert into Config set Id = 20, Name = 'ZM_MPEG_REPLAY_FORMAT', Value = 'swf', Type = 'string', DefaultValue = 'swf', Hint = 'string', Pattern = '(?^:^(.+)$)', 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 know 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 = '';
|
||||
insert into Config set Id = 21, Name = 'ZM_RAND_STREAM', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([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 = 22, Name = 'ZM_OPT_CAMBOZOLA', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([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 = 23, Name = 'ZM_PATH_CAMBOZOLA', Value = 'cambozola.jar', Type = 'string', DefaultValue = 'cambozola.jar', Hint = 'relative/path/to/somewhere', Pattern = '(?^:^((?:[^/].*)?)/?$)', 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';
|
||||
insert into Config set Id = 24, Name = 'ZM_RELOAD_CAMBOZOLA', Value = '0', Type = 'integer', DefaultValue = '0', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'After how many seconds should Cambozola be reloaded in live view', Help = 'Cambozola allows for the viewing of streaming MJPEG however it caches the entire stream into cache space on the computer, setting this to a number > 0 will cause it to automatically reload after that many seconds to avoid filling up a hard drive.', Category = 'images', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 25, Name = 'ZM_TIMESTAMP_ON_CAPTURE', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Timestamp images as soon as they are captured', Help = 'ZoneMinder can add a timestamp to images in two ways. The default method, when this option is set, is that each image is timestamped immediately when captured and so the image held in memory is marked right away. The second method does not timestamp the images until they are either saved as part of an event or accessed over the web. The timestamp used in both methods will contain the same time as this is preserved along with the image. The first method ensures that an image is timestamped regardless of any other circumstances but will result in all images being timestamped even those never saved or viewed. The second method necessitates that saved images are copied before being saved otherwise two timestamps perhaps at different scales may be applied. This has the (perhaps) desirable side effect that the timestamp is always applied at the same resolution so an image that has scaling applied will still have a legible and correctly scaled timestamp.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 26, Name = 'ZM_CPU_EXTENSIONS', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Use advanced CPU extensions to increase performance', Help = 'When advanced processor extensions such as SSE2 or SSSE3 are available, ZoneMinder can use them, which should increase performance and reduce system load. Enabling this option on processors that do not support the advanced processors extensions used by ZoneMinder is harmless and will have no effect.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 27, Name = 'ZM_FAST_IMAGE_BLENDS', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Use a fast algorithm to blend the reference image', Help = 'To detect alarms ZoneMinder needs to blend the captured image with the stored reference image to update it for comparison with the next image. The reference blend percentage specified for the monitor controls how much the new image affects the reference image. There are two methods that are available for this. If this option is set then fast calculation which does not use any multiplication or division is used. This calculation is extremely fast, however it limits the possible blend percentages to 50%, 25%, 12.5%, 6.25%, 3.25% and 1.5%. Any other blend percentage will be rounded to the nearest possible one. The alternative is to switch this option off and use standard blending instead, which is slower.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 28, Name = 'ZM_OPT_ADAPTIVE_SKIP', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Should frame analysis try and be efficient in skipping frames', Help = 'In previous versions of ZoneMinder the analysis daemon would attempt to keep up with the capture daemon by processing the last captured frame on each pass. This would sometimes have the undesirable side-effect of missing a chunk of the initial activity that caused the alarm because the pre-alarm frames would all have to be written to disk and the database before processing the next frame, leading to some delay between the first and second event frames. Setting this option enables a newer adaptive algorithm where the analysis daemon attempts to process as many captured frames as possible, only skipping frames when in danger of the capture daemon overwriting yet to be processed frames. This skip is variable depending on the size of the ring buffer and the amount of space left in it. Enabling this option will give you much better coverage of the beginning of alarms whilst biasing out any skipped frames towards the middle or end of the event. However you should be aware that this will have the effect of making the analysis daemon run somewhat behind the capture daemon during events and for particularly fast rates of capture it is possible for the adaptive algorithm to be overwhelmed and not have time to react to a rapid build up of pending frames and thus for a buffer overrun condition to occur.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 29, Name = 'ZM_BLEND_ALARMED_IMAGES', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Blend alarmed images to update the reference image', Help = 'To detect alarms ZoneMinder compares an image with a reference image which is formed from a composite of the previous images. This option determines whether images that cause events are included in this process. Doing so may increase the precision of the alarmed region but can cause problems if wholescale lighting changes cause alarms as this would not get fed back into the image and an alarm may persist indefinately. A better way to achive the same effect in most cases is to lower substantially the reference blend percentage in specific monitors.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 30, Name = 'ZM_MAX_SUSPEND_TIME', Value = '30', Type = 'integer', DefaultValue = '30', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Maximum time that a monitor may have motion detection suspended', Help = 'ZoneMinder allows monitors to have motion detection to be suspended, for instance while panning a camera. Ordinarily this relies on the operator resuming motion detection afterwards as failure to do so can leave a monitor in a permanently suspended state. This setting allows you to set a maximum time which a camera may be suspended for before it automatically resumes motion detection. This time can be extended by subsequent suspend indications after the first so continuous camera movement will also occur while the monitor is suspended.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 31, Name = 'ZM_OPT_REMOTE_CAMERAS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Are you going to use remote/networked cameras', Help = 'ZoneMinder can work with both local cameras, ie. those attached physically to your computer and remote or network cameras. If you will be using networked cameras select this option.', Category = 'hidden', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 32, Name = 'ZM_NETCAM_REGEXPS', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Use regular expression matching with network cameras', Help = 'Traditionally ZoneMinder has used complex regular regular expressions to handle the multitude of formats that network cameras produce. In versions from 1.21.1 the default is to use a simpler and faster built in pattern matching methodology. This works well with most networks cameras but if you have problems you can try the older, but more flexible, regular expression based method by selecting this option. Note, to use this method you must have libpcre installed on your system.', Category = 'hidden', Readonly = '0', Requires = 'ZM_OPT_REMOTE_CAMERAS=1';
|
||||
insert into Config set Id = 33, Name = 'ZM_HTTP_VERSION', Value = '1.1', Type = 'string', DefaultValue = '1.1', Hint = '1.1|1.0', Pattern = '(?^:^(1\.[01])$)', Format = ' $1?$1:\"\" ', Prompt = 'The version of HTTP that ZoneMinder will use to connect', Help = 'ZoneMinder can communicate with network cameras using either of the HTTP/1.1 or HTTP/1.0 standard. A server will normally fall back to the version it supports iwht no problem so this should usually by left at the default. However it can be changed to HTTP/1.0 if necessary to resolve particular issues.', Category = 'network', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 34, Name = 'ZM_HTTP_UA', Value = 'ZoneMinder', Type = 'string', DefaultValue = 'ZoneMinder', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'The user agent that ZoneMinder uses to identify itself', Help = 'When ZoneMinder communicates with remote cameras it will identify itself using this string and it\'s version number. This is normally sufficient, however if a particular cameras expects only to communicate with certain browsers then this can be changed to a different string identifying ZoneMinder as Internet Explorer or Netscape etc.', Category = 'network', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 35, Name = 'ZM_HTTP_TIMEOUT', Value = '2500', Type = 'integer', DefaultValue = '2500', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How long ZoneMinder waits before giving up on images (milliseconds)', Help = 'When retrieving remote images ZoneMinder will wait for this length of time before deciding that an image is not going to arrive and taking steps to retry. This timeout is in milliseconds (1000 per second) and will apply to each part of an image if it is not sent in one whole chunk.', Category = 'network', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 36, Name = 'ZM_MIN_RTP_PORT', Value = '40200', Type = 'integer', DefaultValue = '40200', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Minimum port that ZoneMinder will listen for RTP traffic on', Help = 'When ZoneMinder communicates with MPEG4 capable cameras using RTP with the unicast method it must open ports for the camera to connect back to for control and streaming purposes. This setting specifies the minimum port number that ZoneMinder will use. Ordinarily two adjacent ports are used for each camera, one for control packets and one for data packets. This port should be set to an even number, you may also need to open up a hole in your firewall to allow cameras to connect back if you wish to use unicasting.', Category = 'network', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 37, Name = 'ZM_MAX_RTP_PORT', Value = '40499', Type = 'integer', DefaultValue = '40499', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Maximum port that ZoneMinder will listen for RTP traffic on', Help = 'When ZoneMinder communicates with MPEG4 capable cameras using RTP with the unicast method it must open ports for the camera to connect back to for control and streaming purposes. This setting specifies the maximum port number that ZoneMinder will use. Ordinarily two adjacent ports are used for each camera, one for control packets and one for data packets. This port should be set to an even number, you may also need to open up a hole in your firewall to allow cameras to connect back if you wish to use unicasting. You should also ensure that you have opened up at least two ports for each monitor that will be connecting to unicasting network cameras.', Category = 'network', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 38, Name = 'ZM_OPT_FFMPEG', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Is the ffmpeg video encoder/decoder installed', Help = 'ZoneMinder can optionally encode a series of video images into an MPEG encoded movie file for viewing, downloading or storage. This option allows you to specify whether you have the ffmpeg tools installed. Note that creating MPEG files can be fairly CPU and disk intensive and is not a required option as events can still be reviewed as video streams without it.', Category = 'images', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 39, Name = 'ZM_PATH_FFMPEG', Value = '/usr/bin/ffmpeg', Type = 'string', DefaultValue = '/usr/bin/ffmpeg', Hint = '/absolute/path/to/somewhere', Pattern = '(?^:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'Path to (optional) ffmpeg mpeg encoder', Help = 'This path should point to where ffmpeg has been installed.', Category = 'images', Readonly = '0', Requires = 'ZM_OPT_FFMPEG=1';
|
||||
insert into Config set Id = 40, Name = 'ZM_FFMPEG_INPUT_OPTIONS', Value = '', Type = 'string', DefaultValue = '', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Additional input options to ffmpeg', Help = 'Ffmpeg can take many options on the command line to control the quality of video produced. This option allows you to specify your own set that apply to the input to ffmpeg (options that are given before the -i option). Check the ffmpeg documentation for a full list of options which may be used here.', Category = 'images', Readonly = '0', Requires = 'ZM_OPT_FFMPEG=1';
|
||||
insert into Config set Id = 41, Name = 'ZM_FFMPEG_OUTPUT_OPTIONS', Value = '-r 25', Type = 'string', DefaultValue = '-r 25', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Additional output options to ffmpeg', Help = 'Ffmpeg can take many options on the command line to control the quality of video produced. This option allows you to specify your own set that apply to the output from ffmpeg (options that are given after the -i option). Check the ffmpeg documentation for a full list of options which may be used here. The most common one will often be to force an output frame rate supported by the video encoder.', Category = 'images', Readonly = '0', Requires = 'ZM_OPT_FFMPEG=1';
|
||||
insert into Config set Id = 42, Name = 'ZM_FFMPEG_FORMATS', Value = 'mpg mpeg wmv asf avi* mov swf 3gp**', Type = 'string', DefaultValue = 'mpg mpeg wmv asf avi* mov swf 3gp**', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Formats to allow for ffmpeg video generation', Help = 'Ffmpeg can generate video in many different formats. This option allows you to list the ones you want to be able to select. As new formats are supported by ffmpeg you can add them here and be able to use them immediately. Adding a \'*\' after a format indicates that this will be the default format used for web video, adding \'**\' defines the default format for phone video.', Category = 'images', Readonly = '0', Requires = 'ZM_OPT_FFMPEG=1';
|
||||
insert into Config set Id = 43, Name = 'ZM_LOG_LEVEL_SYSLOG', Value = '0', Type = 'integer', DefaultValue = '0', Hint = 'None=-5|Panic=-4|Fatal=-3|Error=-2|Warning=-1|Info=0|Debug=1', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Save logging output to the system log', Help = 'ZoneMinder logging is now more more integrated between components and allows you to specify the destination for logging output and the individual levels for each. This option lets you control the level of logging output that goes to the system log. ZoneMinder binaries have always logged to the system log but now scripts and web logging is also included. To preserve the previous behaviour you should ensure this value is set to Info or Warning. This option controls the maximum level of logging that will be written, so Info includes Warnings and Errors etc. To disable entirely, set this option to None. You should use caution when setting this option to Debug as it can affect severely affect system performance. If you want debug you will also need to set a level and component below', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 44, Name = 'ZM_LOG_LEVEL_FILE', Value = '-5', Type = 'integer', DefaultValue = '-5', Hint = 'None=-5|Panic=-4|Fatal=-3|Error=-2|Warning=-1|Info=0|Debug=1', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Save logging output to component files', Help = 'ZoneMinder logging is now more more integrated between components and allows you to specify the destination for logging output and the individual levels for each. This option lets you control the level of logging output that goes to individual log files written by specific components. This is how logging worked previously and although useful for tracking down issues in specific components it also resulted in many disparate log files. To preserve this behaviour you should ensure this value is set to Info or Warning. This option controls the maximum level of logging that will be written, so Info includes Warnings and Errors etc. To disable entirely, set this option to None. You should use caution when setting this option to Debug as it can affect severely affect system performance though file output has less impact than the other options. If you want debug you will also need to set a level and component below', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 45, Name = 'ZM_LOG_LEVEL_WEBLOG', Value = '-5', Type = 'integer', DefaultValue = '-5', Hint = 'None=-5|Panic=-4|Fatal=-3|Error=-2|Warning=-1|Info=0|Debug=1', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Save logging output to the weblog', Help = 'ZoneMinder logging is now more more integrated between components and allows you to specify the destination for logging output and the individual levels for each. This option lets you control the level of logging output from the web interface that goes to the httpd error log. Note that only web logging from PHP and JavaScript files is included and so this option is really only useful for investigating specific issues with those components. This option controls the maximum level of logging that will be written, so Info includes Warnings and Errors etc. To disable entirely, set this option to None. You should use caution when setting this option to Debug as it can affect severely affect system performance. If you want debug you will also need to set a level and component below', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 46, Name = 'ZM_LOG_LEVEL_DATABASE', Value = '0', Type = 'integer', DefaultValue = '0', Hint = 'None=-5|Panic=-4|Fatal=-3|Error=-2|Warning=-1|Info=0|Debug=1', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Save logging output to the database', Help = 'ZoneMinder logging is now more more integrated between components and allows you to specify the destination for logging output and the individual levels for each. This option lets you control the level of logging output that is written to the database. This is a new option which can make viewing logging output easier and more intuitive and also makes it easier to get an overall impression of how the system is performing. If you have a large or very busy system then it is possible that use of this option may slow your system down if the table becomes very large. Ensure you use the LOG_DATABASE_LIMIT option to keep the table to a manageable size. This option controls the maximum level of logging that will be written, so Info includes Warnings and Errors etc. To disable entirely, set this option to None. You should use caution when setting this option to Debug as it can affect severely affect system performance. If you want debug you will also need to set a level and component below', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 47, Name = 'ZM_LOG_DATABASE_LIMIT', Value = '7 day', Type = 'string', DefaultValue = '7 day', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Maximum number of log entries to retain', Help = 'If you are using database logging then it is possible to quickly build up a large number of entries in the Logs table. This option allows you to specify how many of these entries are kept. If you set this option to a number greater than zero then that number is used to determine the maximum number of rows, less than or equal to zero indicates no limit and is not recommended. You can also set this value to time values such as \'<n> day\' which will limit the log entries to those newer than that time. You can specify \'hour\', \'day\', \'week\', \'month\' and \'year\', note that the values should be singular (no \'s\' at the end). The Logs table is pruned periodically so it is possible for more than the expected number of rows to be present briefly in the meantime.', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 48, Name = 'ZM_LOG_DEBUG', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Switch debugging on', Help = 'ZoneMinder components usually support debug logging available to help with diagnosing problems. Binary components have several levels of debug whereas more other components have only one. Normally this is disabled to minimise performance penalties and avoid filling logs too quickly. This option lets you switch on other options that allow you to configure additional debug information to be output. Components will pick up this instruction when they are restarted.', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 49, Name = 'ZM_LOG_DEBUG_TARGET', Value = '', Type = 'string', DefaultValue = '', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'What components should have extra debug enabled', Help = 'There are three scopes of debug available. Leaving this option blank means that all components will use extra debug (not recommended). Setting this option to \'_<component>\', e.g. _zmc, will limit extra debug to that component only. Setting this option to \'_<component>_<identity>\', e.g. \'_zmc_m1\' will limit extra debug to that instance of the component only. This is ordinarily what you probably want to do. To debug scripts use their names without the .pl extension, e.g. \'_zmvideo\' and to debug issues with the web interface use \'_web\'. You can specify multiple targets by separating them with \'|\' characters.', Category = 'logging', Readonly = '0', Requires = 'ZM_LOG_DEBUG=1';
|
||||
insert into Config set Id = 50, Name = 'ZM_LOG_DEBUG_LEVEL', Value = '1', Type = 'integer', DefaultValue = '1', Hint = '1|2|3|4|5|6|7|8|9', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What level of extra debug should be enabled', Help = 'There are 9 levels of debug available, with higher numbers being more debug and level 0 being no debug. However not all levels are used by all components. Also if there is debug at a high level it is usually likely to be output at such a volume that it may obstruct normal operation. For this reason you should set the level carefully and cautiously until the degree of debug you wish to see is present. Scripts and the web interface only have one level so this is an on/off type option for them.', Category = 'logging', Readonly = '0', Requires = 'ZM_LOG_DEBUG=1';
|
||||
insert into Config set Id = 51, Name = 'ZM_LOG_DEBUG_FILE', Value = '/tmp/zm/zm_debug.log+', Type = 'string', DefaultValue = '/tmp/zm/zm_debug.log+', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Where extra debug is output to', Help = 'This option allows you to specify a different target for debug output. All components have a default log file which will norally be in /tmp or /var/log and this is where debug will be written to if this value is empty. Adding a path here will temporarily redirect debug, and other logging output, to this file. This option is a simple filename and you are debugging several components then they will all try and write to the same file with undesirable consequences. Appending a \'+\' to the filename will cause the file to be created with a \'.<pid>\' suffix containing your process id. In this way debug from each run of a component is kept separate. This is the recommended setting as it will also prevent subsequent runs from overwriting the same log. You should ensure that permissions are set up to allow writing to the file and directory specified here.', Category = 'logging', Readonly = '0', Requires = 'ZM_LOG_DEBUG=1';
|
||||
insert into Config set Id = 52, Name = 'ZM_LOG_CHECK_PERIOD', Value = '900', Type = 'integer', DefaultValue = '900', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Time period used when calculating overall system health', Help = 'When ZoneMinder is logging events to the database it can retrospectively examine the number of warnings and errors that have occurred to calculate an overall state of system health. This option allows you to indicate what period of historical events are used in this calculation. This value is expressed in seconds and is ignored if LOG_LEVEL_DATABASE is set to None.', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 53, Name = 'ZM_LOG_ALERT_WAR_COUNT', Value = '1', Type = 'integer', DefaultValue = '1', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Number of warnings indicating system alert state', Help = 'When ZoneMinder is logging events to the database it can retrospectively examine the number of warnings and errors that have occurred to calculate an overall state of system health. This option allows you to specify how many warnings must have occurred within the defined time period to generate an overall system alert state. A value of zero means warnings are not considered. This value is ignored if LOG_LEVEL_DATABASE is set to None.', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 54, Name = 'ZM_LOG_ALERT_ERR_COUNT', Value = '1', Type = 'integer', DefaultValue = '1', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Number of errors indicating system alert state', Help = 'When ZoneMinder is logging events to the database it can retrospectively examine the number of warnings and errors that have occurred to calculate an overall state of system health. This option allows you to specify how many errors must have occurred within the defined time period to generate an overall system alert state. A value of zero means errors are not considered. This value is ignored if LOG_LEVEL_DATABASE is set to None.', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 55, Name = 'ZM_LOG_ALERT_FAT_COUNT', Value = '0', Type = 'integer', DefaultValue = '0', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Number of fatal error indicating system alert state', Help = 'When ZoneMinder is logging events to the database it can retrospectively examine the number of warnings and errors that have occurred to calculate an overall state of system health. This option allows you to specify how many fatal errors (including panics) must have occurred within the defined time period to generate an overall system alert state. A value of zero means fatal errors are not considered. This value is ignored if LOG_LEVEL_DATABASE is set to None.', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 56, Name = 'ZM_LOG_ALARM_WAR_COUNT', Value = '100', Type = 'integer', DefaultValue = '100', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Number of warnings indicating system alarm state', Help = 'When ZoneMinder is logging events to the database it can retrospectively examine the number of warnings and errors that have occurred to calculate an overall state of system health. This option allows you to specify how many warnings must have occurred within the defined time period to generate an overall system alarm state. A value of zero means warnings are not considered. This value is ignored if LOG_LEVEL_DATABASE is set to None.', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 57, Name = 'ZM_LOG_ALARM_ERR_COUNT', Value = '10', Type = 'integer', DefaultValue = '10', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Number of errors indicating system alarm state', Help = 'When ZoneMinder is logging events to the database it can retrospectively examine the number of warnings and errors that have occurred to calculate an overall state of system health. This option allows you to specify how many errors must have occurred within the defined time period to generate an overall system alarm state. A value of zero means errors are not considered. This value is ignored if LOG_LEVEL_DATABASE is set to None.', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 58, Name = 'ZM_LOG_ALARM_FAT_COUNT', Value = '1', Type = 'integer', DefaultValue = '1', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Number of fatal error indicating system alarm state', Help = 'When ZoneMinder is logging events to the database it can retrospectively examine the number of warnings and errors that have occurred to calculate an overall state of system health. This option allows you to specify how many fatal errors (including panics) must have occurred within the defined time period to generate an overall system alarm state. A value of zero means fatal errors are not considered. This value is ignored if LOG_LEVEL_DATABASE is set to None.', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 59, Name = 'ZM_RECORD_EVENT_STATS', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Record event statistical information, switch off if too slow', Help = 'This version of ZoneMinder records detailed information about events in the Stats table. This can help in profiling what the optimum settings are for Zones though this is tricky at present. However in future releases this will be done more easily and intuitively, especially with a large sample of events. The default option of \'yes\' allows this information to be collected now in readiness for this but if you are concerned about performance you can switch this off in which case no Stats information will be saved.', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 60, Name = 'ZM_RECORD_DIAG_IMAGES', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Record intermediate alarm diagnostic images, can be very slow', Help = 'In addition to recording event statistics you can also record the intermediate diagnostic images that display the results of the various checks and processing that occur when trying to determine if an alarm event has taken place. There are several of these images generated for each frame and zone for each alarm or alert frame so this can have a massive impact on performance. Only switch this setting on for debug or analysis purposes and remember to switch it off again once no longer required.', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 61, Name = 'ZM_DUMP_CORES', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Create core files on unexpected process failure.', Help = 'When an unrecoverable error occurs in a ZoneMinder binary process is has traditionally been trapped and the details written to logs to aid in remote analysis. However in some cases it is easier to diagnose the error if a core file, which is a memory dump of the process at the time of the error, is created. This can be interactively analysed in the debugger and may reveal more or better information than that available from the logs. This option is recommended for advanced users only otherwise leave at the default. Note using this option to trigger core files will mean that there will be no indication in the binary logs that a process has died, they will just stop, however the zmdc log will still contain an entry. Also note that you may have to explicitly enable core file creation on your system via the \'ulimit -c\' command or other means otherwise no file will be created regardless of the value of this option.', Category = 'logging', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 62, Name = 'ZM_PATH_MAP', Value = '/dev/shm', Type = 'string', DefaultValue = '/dev/shm', Hint = '/absolute/path/to/somewhere', Pattern = '(?^:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'Path to the mapped memory files that that ZoneMinder can use', Help = 'ZoneMinder has historically used IPC shared memory for shared data between processes. This has it\'s advantages and limitations. This version of ZoneMinder can use an alternate method, mapped memory, instead with can be enabled with the --enable--mmap directive to configure. This requires less system configuration and is generally more flexible. However it requires each shared data segment to map onto a filesystem file. This option indicates where those mapped files go. You should ensure that this location has sufficient space for these files and for the best performance it should be a tmpfs file system or ramdisk otherwise disk access may render this method slower than the regular shared memory one.', Category = 'paths', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 63, Name = 'ZM_PATH_SOCKS', Value = '/tmp/zm', Type = 'string', DefaultValue = '/tmp/zm', Hint = '/absolute/path/to/somewhere', Pattern = '(?^:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'Path to the various Unix domain socket files that ZoneMinder uses', Help = 'ZoneMinder generally uses Unix domain sockets where possible. This reduces the need for port assignments and prevents external applications from possibly compromising the daemons. However each Unix socket requires a .sock file to be created. This option indicates where those socket files go.', Category = 'paths', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 64, Name = 'ZM_PATH_LOGS', Value = '/var/log/zm', Type = 'string', DefaultValue = '/var/log/zm', Hint = '/absolute/path/to/somewhere', Pattern = '(?^:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'Path to the various logs that the ZoneMinder daemons generate', Help = 'There are various daemons that are used by ZoneMinder to perform various tasks. Most generate helpful log files and this is where they go. They can be deleted if not required for debugging.', Category = 'paths', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 65, Name = 'ZM_PATH_SWAP', Value = '/tmp/zm', Type = 'string', DefaultValue = '/tmp/zm', Hint = '/absolute/path/to/somewhere', Pattern = '(?^:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'Path to location for temporary swap images used in streaming', Help = 'Buffered playback requires temporary swap images to be stored for each instance of the streaming daemons. This option determines where these images will be stored. The images will actually be stored in sub directories beneath this location and will be automatically cleaned up after a period of time.', Category = 'paths', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 66, Name = 'ZM_WEB_TITLE_PREFIX', Value = 'ZM', Type = 'string', DefaultValue = 'ZM', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'The title prefix displayed on each window', Help = 'If you have more than one installation of ZoneMinder it can be helpful to display different titles for each one. Changing this option allows you to customise the window titles to include further information to aid identification.', Category = 'web', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 67, Name = 'ZM_WEB_RESIZE_CONSOLE', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Should the console window resize itself to fit', Help = 'Traditionally the main ZoneMinder web console window has resized itself to shrink to a size small enough to list only the monitors that are actually present. This is intended to make the window more unobtrusize but may not be to everyones tastes, especially if opened in a tab in browsers which support this kind if layout. Switch this option off to have the console window size left to the users preference', Category = 'web', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 68, Name = 'ZM_WEB_POPUP_ON_ALARM', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Should the monitor window jump to the top if an alarm occurs', Help = 'When viewing a live monitor stream you can specify whether you want the window to pop to the front if an alarm occurs when the window is minimised or behind another window. This is most useful if your monitors are over doors for example when they can pop up if someone comes to the doorway.', Category = 'web', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 69, Name = 'ZM_OPT_X10', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Support interfacing with X10 devices', Help = 'If you have an X10 Home Automation setup in your home you can use ZoneMinder to initiate or react to X10 signals if your computer has the appropriate interface controller. This option indicates whether X10 options will be available in the browser client.', Category = 'x10', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 70, Name = 'ZM_X10_DEVICE', Value = '/dev/ttyS0', Type = 'string', DefaultValue = '/dev/ttyS0', Hint = '/absolute/path/to/somewhere', Pattern = '(?^:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'What device is your X10 controller connected on', Help = 'If you have an X10 controller device (e.g. XM10U) connected to your computer this option details which port it is conected on, the default of /dev/ttyS0 maps to serial or com port 1.', Category = 'x10', Readonly = '0', Requires = 'ZM_OPT_X10=1';
|
||||
insert into Config set Id = 71, Name = 'ZM_X10_HOUSE_CODE', Value = 'A', Type = 'string', DefaultValue = 'A', Hint = 'A-P', Pattern = '(?^i:^([A-P]))', Format = ' uc($1) ', Prompt = 'What X10 house code should be used', Help = 'X10 devices are grouped together by identifying them as all belonging to one House Code. This option details what that is. It should be a single letter between A and P.', Category = 'x10', Readonly = '0', Requires = 'ZM_OPT_X10=1';
|
||||
insert into Config set Id = 72, Name = 'ZM_X10_DB_RELOAD_INTERVAL', Value = '60', Type = 'integer', DefaultValue = '60', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the X10 daemon reloads the monitors from the database', Help = 'The zmx10 daemon periodically checks the database to find out what X10 events trigger, or result from, alarms. This option determines how frequently this check occurs, unless you change this area frequently this can be a fairly large value.', Category = 'x10', Readonly = '0', Requires = 'ZM_OPT_X10=1';
|
||||
insert into Config set Id = 73, Name = 'ZM_WEB_SOUND_ON_ALARM', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Should the monitor window play a sound if an alarm occurs', Help = 'When viewing a live monitor stream you can specify whether you want the window to play a sound to alert you if an alarm occurs.', Category = 'web', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 74, Name = 'ZM_WEB_ALARM_SOUND', Value = '', Type = 'string', DefaultValue = '', Hint = 'filename', Pattern = '(?^:^([a-zA-Z0-9-_.]+)$)', Format = ' $1 ', Prompt = 'The sound to play on alarm, put this in the sounds directory', Help = 'You can specify a sound file to play if an alarm occurs whilst you are watching a live monitor stream. So long as your browser understands the format it does not need to be any particular type. This file should be placed in the sounds directory defined earlier.', Category = 'web', Readonly = '0', Requires = 'ZM_WEB_SOUND_ON_ALARM=1';
|
||||
insert into Config set Id = 75, Name = 'ZM_WEB_COMPACT_MONTAGE', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Compact the montage view by removing extra detail', Help = 'The montage view shows the output of all of your active monitors in one window. This include a small menu and status information for each one. This can increase the web traffic and make the window larger than may be desired. Setting this option on removes all this extraneous information and just displays the images.', Category = 'web', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 76, Name = 'ZM_OPT_FAST_DELETE', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Delete only event database records for speed', Help = 'Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later.', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 77, Name = 'ZM_STRICT_VIDEO_CONFIG', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Allow errors in setting video config to be fatal', Help = 'With some video devices errors can be reported in setting the various video attributes when in fact the operation was successful. Switching this option off will still allow these errors to be reported but will not cause them to kill the video capture daemon. Note however that doing this will cause all errors to be ignored including those which are genuine and which may cause the video capture to not function correctly. Use this option with caution.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 78, Name = 'ZM_SIGNAL_CHECK_POINTS', Value = '10', Type = 'integer', DefaultValue = '10', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How many points in a captured image to check for signal loss', Help = 'For locally attached video cameras ZoneMinder can check for signal loss by looking at a number of random points on each captured image. If all of these points are set to the same fixed colour then the camera is assumed to have lost signal. When this happens any open events are closed and a short one frame signal loss event is generated, as is another when the signal returns. This option defines how many points on each image to check. Note that this is a maximum, any points found to not have the check colour will abort any further checks so in most cases on a couple of points will actually be checked. Network and file based cameras are never checked.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 79, Name = 'ZM_V4L_MULTI_BUFFER', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Use more than one buffer for Video 4 Linux devices', Help = 'Performance when using Video 4 Linux devices is usually best if multiple buffers are used allowing the next image to be captured while the previous one is being processed. If you have multiple devices on a card sharing one input that requires switching then this approach can sometimes cause frames from one source to be mixed up with frames from another. Switching this option off prevents multi buffering resulting in slower but more stable image capture. This option is ignored for non-local cameras or if only one input is present on a capture chip. This option addresses a similar problem to the ZM_CAPTURES_PER_FRAME option and you should normally change the value of only one of the options at a time.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 80, Name = 'ZM_CAPTURES_PER_FRAME', Value = '1', Type = 'integer', DefaultValue = '1', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How many images are captured per returned frame, for shared local cameras', Help = 'If you are using cameras attached to a video capture card which forces multiple inputs to share one capture chip, it can sometimes produce images with interlaced frames reversed resulting in poor image quality and a distinctive comb edge appearance. Increasing this setting allows you to force additional image captures before one is selected as the captured frame. This allows the capture hardware to \'settle down\' and produce better quality images at the price of lesser capture rates. This option has no effect on (a) network cameras, or (b) where multiple inputs do not share a capture chip. This option addresses a similar problem to the ZM_V4L_MULTI_BUFFER option and you should normally change the value of only one of the options at a time.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 81, Name = 'ZM_FILTER_RELOAD_DELAY', Value = '300', Type = 'integer', DefaultValue = '300', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) filters are reloaded in zmfilter', Help = 'ZoneMinder allows you to save filters to the database which allow events that match certain criteria to be emailed, deleted or uploaded to a remote machine etc. The zmfilter daemon loads these and does the actual operation. This option determines how often the filters are reloaded from the database to get the latest versions or new filters. If you don\'t change filters very often this value can be set to a large value.', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 82, Name = 'ZM_FILTER_EXECUTE_INTERVAL', Value = '60', Type = 'integer', DefaultValue = '60', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) to run automatic saved filters', Help = 'ZoneMinder allows you to save filters to the database which allow events that match certain criteria to be emailed, deleted or uploaded to a remote machine etc. The zmfilter daemon loads these and does the actual operation. This option determines how often the filters are executed on the saved event in the database. If you want a rapid response to new events this should be a smaller value, however this may increase the overall load on the system and affect performance of other elements.', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 83, Name = 'ZM_OPT_UPLOAD', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Should ZoneMinder support uploading events from filters', Help = 'In ZoneMinder you can create event filters that specify whether events that match certain criteria should be uploaded to a remote server for archiving. This option specifies whether this functionality should be available', Category = 'upload', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 84, Name = 'ZM_UPLOAD_ARCH_FORMAT', Value = 'tar', Type = 'string', DefaultValue = 'tar', Hint = 'tar|zip', Pattern = '(?^i:^([tz]))', Format = ' $1 =~ /^t/ ? \"tar\" : \"zip\" ', Prompt = 'What format the uploaded events should be created in.', Help = 'Uploaded events may be stored in either .tar or .zip format, this option specifies which. Note that to use this you will need to have the Archive::Tar and/or Archive::Zip perl modules installed.', Category = 'upload', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 85, Name = 'ZM_UPLOAD_ARCH_COMPRESS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Should archive files be compressed', Help = 'When the archive files are created they can be compressed. However in general since the images are compressed already this saves only a minimal amount of space versus utilising more CPU in their creation. Only enable if you have CPU to waste and are limited in disk space on your remote server or bandwidth.', Category = 'upload', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 86, Name = 'ZM_UPLOAD_ARCH_ANALYSE', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Include the analysis files in the archive', Help = 'When the archive files are created they can contain either just the captured frames or both the captured frames and, for frames that caused an alarm, the analysed image with the changed area highlighted. This option controls files are included. Only include analysed frames if you have a high bandwidth connection to the remote server or if you need help in figuring out what caused an alarm in the first place as archives with these files in can be considerably larger.', Category = 'upload', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 87, Name = 'ZM_UPLOAD_PROTOCOL', Value = 'ftp', Type = 'string', DefaultValue = 'ftp', Hint = 'ftp|sftp', Pattern = '(?^i:^([tz]))', Format = ' $1 =~ /^f/ ? \"ftp\" : \"sftp\" ', Prompt = 'What protocol to use to upload events', Help = 'ZoneMinder can upload events to a remote server using either FTP or SFTP. Regular FTP is widely supported but not necessarily very secure whereas SFTP (Secure FTP) runs over an ssh connection and so is encrypted and uses regular ssh ports. Note that to use this you will need to have the appropriate perl module, either Net::FTP or Net::SFTP installed depending on your choice.', Category = 'upload', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 88, Name = 'ZM_UPLOAD_FTP_HOST', Value = '', Type = 'string', DefaultValue = '', Hint = 'host.your.domain', Pattern = '(?^:^([a-zA-Z0-9_.-]+)$)', Format = ' $1 ', Prompt = 'The remote server to upload to', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates the name, or ip address, of the server to use.', Category = 'hidden', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 89, Name = 'ZM_UPLOAD_HOST', Value = '', Type = 'string', DefaultValue = '', Hint = 'host.your.domain', Pattern = '(?^:^([a-zA-Z0-9_.-]+)$)', Format = ' $1 ', Prompt = 'The remote server to upload events to', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote server. This option indicates the name, or ip address, of the server to use.', Category = 'upload', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 90, Name = 'ZM_UPLOAD_PORT', Value = '', Type = 'integer', DefaultValue = '', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'The port on the remote upload server, if not the default (SFTP only)', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote server. If you are using the SFTP protocol then this option allows you to specify a particular port to use for connection. If this option is left blank then the default, port 22, is used. This option is ignored for FTP uploads.', Category = 'upload', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 91, Name = 'ZM_UPLOAD_FTP_USER', Value = '', Type = 'string', DefaultValue = '', Hint = 'alphanumeric', Pattern = '(?^:^([a-zA-Z0-9-_]+)$)', Format = ' $1 ', Prompt = 'Your ftp username', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates the username that ZoneMinder should use to log in for ftp transfer.', Category = 'hidden', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 92, Name = 'ZM_UPLOAD_USER', Value = '', Type = 'string', DefaultValue = '', Hint = 'alphanumeric', Pattern = '(?^:^([a-zA-Z0-9-_]+)$)', Format = ' $1 ', Prompt = 'Remote server username', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote server. This option indicates the username that ZoneMinder should use to log in for transfer.', Category = 'upload', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 93, Name = 'ZM_UPLOAD_FTP_PASS', Value = '', Type = 'string', DefaultValue = '', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Your ftp password', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates the password that ZoneMinder should use to log in for ftp transfer.', Category = 'hidden', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 94, Name = 'ZM_UPLOAD_PASS', Value = '', Type = 'string', DefaultValue = '', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Remote server password', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote server. This option indicates the password that ZoneMinder should use to log in for transfer. If you are using certicate based logins for SFTP servers you can leave this option blank.', Category = 'upload', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 95, Name = 'ZM_UPLOAD_FTP_LOC_DIR', Value = '/tmp/zm', Type = 'string', DefaultValue = '/tmp/zm', Hint = '/absolute/path/to/somewhere', Pattern = '(?^:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'The local directory in which to create upload files', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates the local directory that ZoneMinder should use for temporary upload files. These are files that are created from events, uploaded and then deleted.', Category = 'hidden', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 96, Name = 'ZM_UPLOAD_LOC_DIR', Value = '/tmp/zm', Type = 'string', DefaultValue = '/tmp/zm', Hint = '/absolute/path/to/somewhere', Pattern = '(?^:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'The local directory in which to create upload files', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote server. This option indicates the local directory that ZoneMinder should use for temporary upload files. These are files that are created from events, uploaded and then deleted.', Category = 'upload', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 97, Name = 'ZM_UPLOAD_FTP_REM_DIR', Value = '', Type = 'string', DefaultValue = '', Hint = 'relative/path/to/somewhere', Pattern = '(?^:^((?:[^/].*)?)/?$)', Format = ' $1 ', Prompt = 'The remote directory to upload to', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates the remote directory that ZoneMinder should use to upload event files to.', Category = 'hidden', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 98, Name = 'ZM_UPLOAD_REM_DIR', Value = '', Type = 'string', DefaultValue = '', Hint = 'relative/path/to/somewhere', Pattern = '(?^:^((?:[^/].*)?)/?$)', Format = ' $1 ', Prompt = 'The remote directory to upload to', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote server. This option indicates the remote directory that ZoneMinder should use to upload event files to.', Category = 'upload', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 99, Name = 'ZM_UPLOAD_FTP_TIMEOUT', Value = '120', Type = 'integer', DefaultValue = '120', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How long to allow the transfer to take for each file', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates the maximum ftp inactivity timeout (in seconds) that should be tolerated before ZoneMinder determines that the transfer has failed and closes down the connection.', Category = 'hidden', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 100, Name = 'ZM_UPLOAD_TIMEOUT', Value = '120', Type = 'integer', DefaultValue = '120', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How long to allow the transfer to take for each file', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote server. This option indicates the maximum inactivity timeout (in seconds) that should be tolerated before ZoneMinder determines that the transfer has failed and closes down the connection.', Category = 'upload', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 101, Name = 'ZM_UPLOAD_FTP_PASSIVE', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Use passive ftp when uploading', Help = 'If your computer is behind a firewall or proxy you may need to set FTP to passive mode. In fact for simple transfers it makes little sense to do otherwise anyway but you can set this to \'No\' if you wish.', Category = 'upload', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 102, Name = 'ZM_UPLOAD_FTP_DEBUG', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Switch ftp debugging on', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote ftp server. If you are having (or expecting) troubles with uploading events then setting this to \'yes\' permits additional information to be included in the zmfilter log file.', Category = 'hidden', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 103, Name = 'ZM_UPLOAD_DEBUG', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Switch upload debugging on', Help = 'You can use filters to instruct ZoneMinder to upload events to a remote server. If you are having (or expecting) troubles with uploading events then setting this to \'yes\' permits additional information to be generated by the underlying transfer modules and included in the logs.', Category = 'upload', Readonly = '0', Requires = 'ZM_OPT_UPLOAD=1';
|
||||
insert into Config set Id = 104, Name = 'ZM_OPT_EMAIL', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Should ZoneMinder email you details of events that match corresponding filters', Help = 'In ZoneMinder you can create event filters that specify whether events that match certain criteria should have their details emailed to you at a designated email address. This will allow you to be notified of events as soon as they occur and also to quickly view the events directly. This option specifies whether this functionality should be available. The email created with this option can be any size and is intended to be sent to a regular email reader rather than a mobile device.', Category = 'mail', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 105, Name = 'ZM_EMAIL_ADDRESS', Value = '', Type = 'string', DefaultValue = '', Hint = 'your.name@your.domain', Pattern = '(?^:^([a-zA-Z0-9_.-]+)\@([a-zA-Z0-9_.-]+)$)', Format = ' $1\@$2 ', Prompt = 'The email address to send matching event details to', Help = 'This option is used to define the email address that any events that match the appropriate filters will be sent to.', Category = 'mail', Readonly = '0', Requires = 'ZM_OPT_EMAIL=1';
|
||||
insert into Config set Id = 106, Name = 'ZM_EMAIL_TEXT', Value = 'subject = \"ZoneMinder: Alarm - %MN%-%EI% (%ESM% - %ESA% %EFA%)\"
|
||||
body = \"
|
||||
Hello,
|
||||
|
||||
An alarm has been detected on your installation of the ZoneMinder.
|
||||
|
||||
The details are as follows :-
|
||||
|
||||
Monitor : %MN%
|
||||
Event Id : %EI%
|
||||
Length : %EL%
|
||||
Frames : %EF% (%EFA%)
|
||||
Scores : t%EST% m%ESM% a%ESA%
|
||||
|
||||
This alarm was matched by the %FN% filter and can be viewed at %EPS%
|
||||
|
||||
ZoneMinder\"', Type = 'text', DefaultValue = 'subject = \"ZoneMinder: Alarm - %MN%-%EI% (%ESM% - %ESA% %EFA%)\"
|
||||
body = \"
|
||||
Hello,
|
||||
|
||||
An alarm has been detected on your installation of the ZoneMinder.
|
||||
|
||||
The details are as follows :-
|
||||
|
||||
Monitor : %MN%
|
||||
Event Id : %EI%
|
||||
Length : %EL%
|
||||
Frames : %EF% (%EFA%)
|
||||
Scores : t%EST% m%ESM% a%ESA%
|
||||
|
||||
This alarm was matched by the %FN% filter and can be viewed at %EPS%
|
||||
|
||||
ZoneMinder\"', Hint = 'free text', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'The text of the email used to send matching event details', Help = 'This option is used to define the content of the email that is sent for any events that match the appropriate filters.', Category = 'hidden', Readonly = '0', Requires = 'ZM_OPT_EMAIL=1';
|
||||
insert into Config set Id = 107, Name = 'ZM_EMAIL_SUBJECT', Value = 'ZoneMinder: Alarm - %MN%-%EI% (%ESM% - %ESA% %EFA%)', Type = 'string', DefaultValue = 'ZoneMinder: Alarm - %MN%-%EI% (%ESM% - %ESA% %EFA%)', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'The subject of the email used to send matching event details', Help = 'This option is used to define the subject of the email that is sent for any events that match the appropriate filters.', Category = 'mail', Readonly = '0', Requires = 'ZM_OPT_EMAIL=1';
|
||||
insert into Config set Id = 108, Name = 'ZM_EMAIL_BODY', Value = '
|
||||
Hello,
|
||||
|
||||
An alarm has been detected on your installation of the ZoneMinder.
|
||||
|
||||
The details are as follows :-
|
||||
|
||||
Monitor : %MN%
|
||||
Event Id : %EI%
|
||||
Length : %EL%
|
||||
Frames : %EF% (%EFA%)
|
||||
Scores : t%EST% m%ESM% a%ESA%
|
||||
|
||||
This alarm was matched by the %FN% filter and can be viewed at %EPS%
|
||||
|
||||
ZoneMinder', Type = 'text', DefaultValue = '
|
||||
Hello,
|
||||
|
||||
An alarm has been detected on your installation of the ZoneMinder.
|
||||
|
||||
The details are as follows :-
|
||||
|
||||
Monitor : %MN%
|
||||
Event Id : %EI%
|
||||
Length : %EL%
|
||||
Frames : %EF% (%EFA%)
|
||||
Scores : t%EST% m%ESM% a%ESA%
|
||||
|
||||
This alarm was matched by the %FN% filter and can be viewed at %EPS%
|
||||
|
||||
ZoneMinder', Hint = 'free text', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'The body of the email used to send matching event details', Help = 'This option is used to define the content of the email that is sent for any events that match the appropriate filters.', Category = 'mail', Readonly = '0', Requires = 'ZM_OPT_EMAIL=1';
|
||||
insert into Config set Id = 109, Name = 'ZM_OPT_MESSAGE', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Should ZoneMinder message you with details of events that match corresponding filters', Help = 'In ZoneMinder you can create event filters that specify whether events that match certain criteria should have their details sent to you at a designated short message email address. This will allow you to be notified of events as soon as they occur. This option specifies whether this functionality should be available. The email created by this option will be brief and is intended to be sent to an SMS gateway or a minimal mail reader such as a mobile device or phone rather than a regular email reader.', Category = 'mail', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 110, Name = 'ZM_MESSAGE_ADDRESS', Value = '', Type = 'string', DefaultValue = '', Hint = 'your.name@your.domain', Pattern = '(?^:^([a-zA-Z0-9_.-]+)\@([a-zA-Z0-9_.-]+)$)', Format = ' $1\@$2 ', Prompt = 'The email address to send matching event details to', Help = 'This option is used to define the short message email address that any events that match the appropriate filters will be sent to.', Category = 'mail', Readonly = '0', Requires = 'ZM_OPT_MESSAGE=1';
|
||||
insert into Config set Id = 111, Name = 'ZM_MESSAGE_TEXT', Value = 'subject = \"ZoneMinder: Alarm - %MN%-%EI%\"
|
||||
body = \"ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% score.\"', Type = 'text', DefaultValue = 'subject = \"ZoneMinder: Alarm - %MN%-%EI%\"
|
||||
body = \"ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% score.\"', Hint = 'free text', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'The text of the message used to send matching event details', Help = 'This option is used to define the content of the message that is sent for any events that match the appropriate filters.', Category = 'hidden', Readonly = '0', Requires = 'ZM_OPT_MESSAGE=1';
|
||||
insert into Config set Id = 112, Name = 'ZM_MESSAGE_SUBJECT', Value = 'ZoneMinder: Alarm - %MN%-%EI%', Type = 'string', DefaultValue = 'ZoneMinder: Alarm - %MN%-%EI%', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'The subject of the message used to send matching event details', Help = 'This option is used to define the subject of the message that is sent for any events that match the appropriate filters.', Category = 'mail', Readonly = '0', Requires = 'ZM_OPT_MESSAGE=1';
|
||||
insert into Config set Id = 113, Name = 'ZM_MESSAGE_BODY', Value = 'ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% score.', Type = 'text', DefaultValue = 'ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% score.', Hint = 'free text', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'The body of the message used to send matching event details', Help = 'This option is used to define the content of the message that is sent for any events that match the appropriate filters.', Category = 'mail', Readonly = '0', Requires = 'ZM_OPT_MESSAGE=1';
|
||||
insert into Config set Id = 114, Name = 'ZM_NEW_MAIL_MODULES', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Use a newer perl method to send emails', Help = 'Traditionally ZoneMinder has used the MIME::Entity perl module to construct and send notification emails and messages. Some people have reported problems with this module not being present at all or flexible enough for their needs. If you are one of those people this option allows you to select a new mailing method using MIME::Lite and Net::SMTP instead. This method was contributed by Ross Melin and should work for everyone but has not been extensively tested so currently is not selected by default.', Category = 'mail', Readonly = '0', Requires = 'ZM_OPT_EMAIL=1;ZM_OPT_MESSAGE=1';
|
||||
insert into Config set Id = 115, Name = 'ZM_EMAIL_HOST', Value = 'localhost', Type = 'string', DefaultValue = 'localhost', Hint = 'host.your.domain', Pattern = '(?^:^([a-zA-Z0-9_.-]+)$)', Format = ' $1 ', Prompt = 'The host address of your SMTP mail server', Help = 'If you have chosen SMTP as the method by which to send notification emails or messages then this option allows you to choose which SMTP server to use to send them. The default of localhost may work if you have the sendmail, exim or a similar daemon running however you may wish to enter your ISP\'s SMTP mail server here.', Category = 'mail', Readonly = '0', Requires = 'ZM_OPT_EMAIL=1;ZM_OPT_MESSAGE=1';
|
||||
insert into Config set Id = 116, Name = 'ZM_FROM_EMAIL', Value = '', Type = 'string', DefaultValue = '', Hint = 'your.name@your.domain', Pattern = '(?^:^([a-zA-Z0-9_.-]+)\@([a-zA-Z0-9_.-]+)$)', Format = ' $1\@$2 ', Prompt = 'The email address you wish your event notifications to originate from', Help = 'The emails or messages that will be sent to you informing you of events can appear to come from a designated email address to help you with mail filtering etc. An address of something like ZoneMinder@your.domain is recommended.', Category = 'mail', Readonly = '0', Requires = 'ZM_OPT_EMAIL=1;ZM_OPT_MESSAGE=1';
|
||||
insert into Config set Id = 117, Name = 'ZM_URL', Value = '', Type = 'string', DefaultValue = '', Hint = 'http://host.your.domain/', Pattern = '(?^:^(?:http://)?(.+)$)', Format = ' \"http://\".$1 ', Prompt = 'The URL of your ZoneMinder installation', Help = 'The emails or messages that will be sent to you informing you of events can include a link to the events themselves for easy viewing. If you intend to use this feature then set this option to the url of your installation as it would appear from where you read your email, e.g. http://host.your.domain/zm.php.', Category = 'mail', Readonly = '0', Requires = 'ZM_OPT_EMAIL=1;ZM_OPT_MESSAGE=1';
|
||||
insert into Config set Id = 118, Name = 'ZM_MAX_RESTART_DELAY', Value = '600', Type = 'integer', DefaultValue = '600', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Maximum delay (in seconds) for daemon restart attempts.', Help = 'The zmdc (zm daemon control) process controls when processeses are started or stopped and will attempt to restart any that fail. If a daemon fails frequently then a delay is introduced between each restart attempt. If the daemon stills fails then this delay is increased to prevent extra load being placed on the system by continual restarts. This option controls what this maximum delay is.', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 119, Name = 'ZM_WATCH_CHECK_INTERVAL', Value = '10', Type = 'integer', DefaultValue = '10', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often to check the capture daemons have not locked up', Help = 'The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinately). This option determines how often the daemons are checked.', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 120, Name = 'ZM_WATCH_MAX_DELAY', Value = '5', Type = 'decimal', DefaultValue = '5', Hint = 'decimal', Pattern = '(?^:^(\d+(?:\.\d+)?)$)', Format = ' $1 ', Prompt = 'The maximum delay allowed since the last captured image', Help = 'The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinately). This option determines the maximum delay to allow since the last captured frame. The daemon will be restarted if it has not captured any images after this period though the actual restart may take slightly longer in conjunction with the check interval value above.', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 121, Name = 'ZM_RUN_AUDIT', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Run zmaudit to check data consistency', Help = 'The zmaudit daemon exists to check that the saved information in the database and on the filesystem match and are consistent with each other. If an error occurs or if you are using \'fast deletes\' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronise the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and filesystem may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times.', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 122, Name = 'ZM_AUDIT_CHECK_INTERVAL', Value = '900', Type = 'integer', DefaultValue = '900', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often to check database and filesystem consistency', Help = 'The zmaudit daemon exists to check that the saved information in the database and on the filesystem match and are consistent with each other. If an error occurs or if you are using \'fast deletes\' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronise the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and filesystem may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 123, Name = 'ZM_FORCED_ALARM_SCORE', Value = '255', Type = 'integer', DefaultValue = '255', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Score to give forced alarms', Help = 'The \'zmu\' utility can be used to force an alarm on a monitor rather than rely on the motion detection algorithms. This option determines what score to give these alarms to distinguish them from regular ones. It must be 255 or less.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 124, Name = 'ZM_BULK_FRAME_INTERVAL', Value = '100', Type = 'integer', DefaultValue = '100', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often a bulk frame should be written to the database', Help = 'Traditionally ZoneMinder writes an entry into the Frames database table for each frame that is captured and saved. This works well in motion detection scenarios but when in a DVR situation (\'Record\' or \'Mocord\' mode) this results in a huge number of frame writes and a lot of database and disk bandwidth for very little additional information. Setting this to a non-zero value will enabled ZoneMinder to group these non-alarm frames into one \'bulk\' frame entry which saves a lot of bandwidth and space. The only disadvantage of this is that timing information for individual frames is lost but in constant frame rate situations this is usually not significant. This setting is ignored in Modect mode and individual frames are still written if an alarm occurs in Mocord mode also.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 125, Name = 'ZM_EVENT_CLOSE_MODE', Value = 'idle', Type = 'string', DefaultValue = 'idle', Hint = 'time|idle|alarm', Pattern = '(?^i:^([tia]))', Format = ' ($1 =~ /^t/) ? \"time\" : ($1 =~ /^i/ ? \"idle\" : \"time\" ) ', Prompt = 'When continuous events are closed.', Help = 'When a monitor is running in a continuous recording mode (Record or Mocord) events are usually closed after a fixed period of time (the section length). However in Mocord mode it is possible that motion detection may occur near the end of a section. This option controls what happens when an alarm occurs in Mocord mode. The \'time\' setting means that the event will be closed at the end of the section regardless of alarm activity. The \'idle\' setting means that the event will be closed at the end of the section if there is no alarm activity occuring at the time otherwise it will be closed once the alarm is over meaning the event may end up being longer than the normal section length. The \'alarm\' setting means that if an alarm occurs during the event, the event will be closed once the alarm is over regardless of when this occurs. This has the effect of limiting the number of alarms to one per event and the events will be shorter than the section length if an alarm has occurred.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 126, Name = 'ZM_FORCE_CLOSE_EVENTS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Close events at section ends.', Help = 'When a monitor is running in a continuous recording mode (Record or Mocord) events are usually closed after a fixed period of time (the section length). However in Mocord mode it is possible that motion detection may occur near the end of a section and ordinarily this will prevent the event being closed until the motion has ceased. Switching this option on will force the event closed at the specified time regardless of any motion activity.', Category = 'hidden', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 127, Name = 'ZM_CREATE_ANALYSIS_IMAGES', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Create analysed alarm images with motion outlined', Help = 'By default during an alarm ZoneMinder records both the raw captured image and one that has been analysed and had areas where motion was detected outlined. This can be very useful during zone configuration or in analysing why events occured. However it also incurs some overhead and in a stable system may no longer be necessary. This parameter allows you to switch the generation of these images off.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 128, Name = 'ZM_WEIGHTED_ALARM_CENTRES', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Use a weighted algorithm to calculate the centre of an alarm', Help = 'ZoneMinder will always calculate the centre point of an alarm in a zone to give some indication of where on the screen it is. This can be used by the experimental motion tracking feature or your own custom extensions. In the alarmed or filtered pixels mode this is a simple midpoint between the extents of the detected pxiesl. However in the blob method this can instead be calculated using weighted pixel locations to give more accurate positioning for irregularly shaped blobs. This method, while more precise is also slower and so is turned off by default.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 129, Name = 'ZM_EVENT_IMAGE_DIGITS', Value = '3', Type = 'integer', DefaultValue = '3', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How many significant digits are used in event image numbering', Help = 'As event images are captured they are stored to the filesystem with a numerical index. By default this index has three digits so the numbers start 001, 002 etc. This works works for most scenarios as events with more than 999 frames are rarely captured. However if you have extremely long events and use external applications then you may wish to increase this to ensure correct sorting of images in listings etc. Warning, increasing this value on a live system may render existing events unviewable as the event will have been saved with the previous scheme. Decreasing this value should have no ill effects.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 130, Name = 'ZM_DEFAULT_ASPECT_RATIO', Value = '4:3', Type = 'string', DefaultValue = '4:3', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'The default width:height aspect ratio used in monitors', Help = 'When specifying the dimensions of monitors you can click a checkbox to ensure that the width stays in the correct ratio to the height, or vice versa. This setting allows you to indicate what the ratio of these settings should be. This should be specified in the format <width value>:<height value> and the default of 4:3 normally be acceptable but 11:9 is another common setting. If the checkbox is not clicked when specifying monitor dimensions this setting has no effect.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 131, Name = 'ZM_USER_SELF_EDIT', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Allow unprivileged users to change their details', Help = 'Ordinarily only users with system edit privilege are able to change users details. Switching this option on allows ordinary users to change their passwords and their language settings', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 132, Name = 'ZM_OPT_FRAME_SERVER', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Should analysis farm out the writing of images to disk', Help = 'In some circumstances it is possible for a slow disk to take so long writing images to disk that it causes the analysis daemon to fall behind especially during high frame rate events. Setting this option to yes enables a frame server daemon (zmf) which will be sent the images from the analysis daemon and will do the actual writing of images itself freeing up the analysis daemon to get on with other things. Should this transmission fail or other permanent or transient error occur, this function will fall back to the analysis daemon.', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 133, Name = 'ZM_FRAME_SOCKET_SIZE', Value = '0', Type = 'integer', DefaultValue = '0', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Specify the frame server socket buffer size if non-standard', Help = 'For large captured images it is possible for the writes from the analysis daemon to the frame server to fail as the amount to be written exceeds the default buffer size. While the images are then written by the analysis daemon so no data is lost, it defeats the object of the frame server daemon in the first place. You can use this option to indicate that a larger buffer size should be used. Note that you may have to change the existing maximum socket buffer size on your system via sysctl (or in /proc/sys/net/core/wmem_max) to allow this new size to be set. Alternatively you can change the default buffer size on your system in the same way in which case that will be used with no change necessary in this option', Category = 'system', Readonly = '0', Requires = 'ZM_OPT_FRAME_SERVER=1';
|
||||
insert into Config set Id = 134, Name = 'ZM_OPT_CONTROL', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Support controllable (e.g. PTZ) cameras', Help = 'ZoneMinder includes limited support for controllable cameras. A number of sample protocols are included and others can easily be added. If you wish to control your cameras via ZoneMinder then select this option otherwise if you only have static cameras or use other control methods then leave this option off.', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 135, Name = 'ZM_OPT_TRIGGERS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Interface external event triggers via socket or device files', Help = 'ZoneMinder can interact with external systems which prompt or cancel alarms. This is done via the zmtrigger.pl script. This option indicates whether you want to use these external triggers. Most people will say no here.', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 136, Name = 'ZM_CHECK_FOR_UPDATES', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Check with zoneminder.com for updated versions', Help = 'From ZoneMinder version 1.17.0 onwards new versions are expected to be more frequent. To save checking manually for each new version ZoneMinder can check with the zoneminder.com website to determine the most recent release. These checks are infrequent, about once per week, and no personal or system information is transmitted other than your current version number. If you do not wish these checks to take place or your ZoneMinder system has no internet access you can switch these check off with this configuration variable', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 137, Name = 'ZM_UPDATE_CHECK_PROXY', Value = '', Type = 'string', DefaultValue = '', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Proxy url if required to access zoneminder.com', Help = 'If you use a proxy to access the internet then ZoneMinder needs to know so it can access zoneminder.com to check for updates. If you do use a proxy enter the full proxy url here in the form of http://<proxy host>:<proxy port>/', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 138, Name = 'ZM_SHM_KEY', Value = '0x7a6d0000', Type = 'hexadecimal', DefaultValue = '0x7a6d0000', Hint = 'hexadecimal', Pattern = '(?^:^(?:0x)?([0-9a-f]{1,8})$)', Format = ' \"0x\".$1 ', Prompt = 'Shared memory root key to use', Help = 'ZoneMinder uses shared memory to speed up communication between modules. To identify the right area to use shared memory keys are used. This option controls what the base key is, each monitor will have it\'s Id or\'ed with this to get the actual key used. You will not normally need to change this value unless it clashes with another instance of ZoneMinder on the same machine. Only the first four hex digits are used, the lower four will be masked out and ignored.', Category = 'system', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 139, Name = 'ZM_WEB_REFRESH_METHOD', Value = 'javascript', Type = 'string', DefaultValue = 'javascript', Hint = 'javascript|http', Pattern = '(?^i:^([jh]))', Format = ' $1 =~ /^j/ ? \"javascript\" : \"http\" ', Prompt = 'What method windows should use to refresh themselves', Help = 'Many windows in Javascript need to refresh themselves to keep their information current. This option determines what method they should use to do this. Choosing \'javascript\' means that each window will have a short JavaScript statement in with a timer to prompt the refresh. This is the most compatible method. Choosing \'http\' means the refresh instruction is put in the HTTP header. This is a cleaner method but refreshes are interrupted or cancelled when a link in the window is clicked meaning that the window will no longer refresh and this would have to be done manually.', Category = 'hidden', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 140, Name = 'ZM_WEB_EVENT_SORT_FIELD', Value = 'DateTime', Type = 'string', DefaultValue = 'DateTime', Hint = 'Id|Name|Cause|MonitorName|DateTime|Length|Frames|AlarmFrames|TotScore|AvgScore|MaxScore', Pattern = '(?^:.)', Format = ' $1 ', Prompt = 'Default field the event lists are sorted by', Help = 'Events in lists can be initially ordered in any way you want. This option controls what field is used to sort them. You can modify this ordering from filters or by clicking on headings in the lists themselves. Bear in mind however that the \'Prev\' and \'Next\' links, when scrolling through events, relate to the ordering in the lists and so not always to time based ordering.', Category = 'web', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 141, Name = 'ZM_WEB_EVENT_SORT_ORDER', Value = 'asc', Type = 'string', DefaultValue = 'asc', Hint = 'asc|desc', Pattern = '(?^i:^([ad]))', Format = ' $1 =~ /^a/i ? \"asc\" : \"desc\" ', Prompt = 'Default order the event lists are sorted by', Help = 'Events in lists can be initially ordered in any way you want. This option controls what order (ascending or descending) is used to sort them. You can modify this ordering from filters or by clicking on headings in the lists themselves. Bear in mind however that the \'Prev\' and \'Next\' links, when scrolling through events, relate to the ordering in the lists and so not always to time based ordering.', Category = 'web', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 142, Name = 'ZM_WEB_EVENTS_PER_PAGE', Value = '25', Type = 'integer', DefaultValue = '25', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How many events to list per page in paged mode', Help = 'In the event list view you can either list all events or just a page at a time. This option controls how many events are listed per page in paged mode and how often to repeat the column headers in non-paged mode.', Category = 'web', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 143, Name = 'ZM_WEB_LIST_THUMBS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Display mini-thumbnails of event images in event lists', Help = 'Ordinarily the event lists just display text details of the events to save space and time. By switching this option on you can also display small thumbnails to help you identify events of interest. The size of these thumbnails is controlled by the following two options.', Category = 'web', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 144, Name = 'ZM_WEB_LIST_THUMB_WIDTH', Value = '48', Type = 'integer', DefaultValue = '48', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'The width of the thumbnails that appear in the event lists', Help = 'This options controls the width of the thumbnail images that appear in the event lists. It should be fairly small to fit in with the rest of the table. If you prefer you can specify a height instead in the next option but you should only use one of the width or height and the other option should be set to zero. If both width and height are specified then width will be used and height ignored.', Category = 'web', Readonly = '0', Requires = 'ZM_WEB_LIST_THUMBS=1';
|
||||
insert into Config set Id = 145, Name = 'ZM_WEB_LIST_THUMB_HEIGHT', Value = '0', Type = 'integer', DefaultValue = '0', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'The height of the thumbnails that appear in the event lists', Help = 'This options controls the height of the thumbnail images that appear in the event lists. It should be fairly small to fit in with the rest of the table. If you prefer you can specify a width instead in the previous option but you should only use one of the width or height and the other option should be set to zero. If both width and height are specified then width will be used and height ignored.', Category = 'web', Readonly = '0', Requires = 'ZM_WEB_LIST_THUMBS=1';
|
||||
insert into Config set Id = 146, Name = 'ZM_WEB_USE_OBJECT_TAGS', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Wrap embed in object tags for media content', Help = 'There are two methods of including media content in web pages. The most common way is use the EMBED tag which is able to give some indication of the type of content. However this is not a standard part of HTML. The official method is to use OBJECT tags which are able to give more information allowing the correct media viewers etc to be loaded. However these are less widely supported and content may be specifically tailored to a particular platform or player. This option controls whether media content is enclosed in EMBED tags only or whether, where appropriate, it is additionally wrapped in OBJECT tags. Currently OBJECT tags are only used in a limited number of circumstances but they may become more widespread in the future. It is suggested that you leave this option on unless you encounter problems playing some content.', Category = 'web', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 147, Name = 'ZM_WEB_H_REFRESH_MAIN', Value = '300', Type = 'integer', DefaultValue = '300', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the main console window should refresh itself', Help = 'The main console window lists a general status and the event totals for all monitors. This is not a trivial task and should not be repeated too frequently or it may affect the performance of the rest of the system.', Category = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 148, Name = 'ZM_WEB_H_REFRESH_CYCLE', Value = '10', Type = 'integer', DefaultValue = '10', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the cycle watch window swaps to the next monitor', Help = 'The cycle watch window is a method of continuously cycling between images from all of your monitors. This option determines how often to refresh with a new image.', Category = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 149, Name = 'ZM_WEB_H_REFRESH_IMAGE', Value = '5', Type = 'integer', DefaultValue = '5', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the watched image is refreshed (if not streaming)', Help = 'The live images from a monitor can be viewed in either streamed or stills mode. This option determines how often a stills image is refreshed, it has no effect if streaming is selected.', Category = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 150, Name = 'ZM_WEB_H_REFRESH_STATUS', Value = '3', Type = 'integer', DefaultValue = '3', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the status refreshes itself in the watch window', Help = 'The monitor window is actually made from several frames. The one in the middle merely contains a monitor status which needs to refresh fairly frequently to give a true indication. This option determines that frequency.', Category = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 151, Name = 'ZM_WEB_H_REFRESH_EVENTS', Value = '30', Type = 'integer', DefaultValue = '30', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the event listing is refreshed in the watch window', Help = 'The monitor window is actually made from several frames. The lower framme contains a listing of the last few events for easy access. This option determines how often this is refreshed.', Category = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 152, Name = 'ZM_WEB_H_CAN_STREAM', Value = 'auto', Type = 'string', DefaultValue = 'auto', Hint = 'auto|yes|no', Pattern = '(?^i:^([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 = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 153, Name = 'ZM_WEB_H_STREAM_METHOD', Value = 'jpeg', Type = 'string', DefaultValue = 'jpeg', Hint = 'mpeg|jpeg', Pattern = '(?^i:^([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 = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 154, Name = 'ZM_WEB_H_DEFAULT_SCALE', Value = '100', Type = 'integer', DefaultValue = '100', Hint = '25|33|50|75|100|150|200|300|400', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the default scaling factor applied to \'live\' or \'event\' views is (%)', Help = 'Normally ZoneMinder will display \'live\' or \'event\' streams in their native size. However if you have monitors with large dimensions or a slow link you may prefer to reduce this size, alternatively for small monitors you can enlarge it. This options lets you specify what the default scaling factor will be. It is expressed as a percentage so 100 is normal size, 200 is double size etc.', Category = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 155, Name = 'ZM_WEB_H_DEFAULT_RATE', Value = '100', Type = 'integer', DefaultValue = '100', Hint = '25|50|100|150|200|400|1000|2500|5000|10000', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the default replay rate factor applied to \'event\' views is (%)', Help = 'Normally ZoneMinder will display \'event\' streams at their native rate, i.e. as close to real-time as possible. However if you have long events it is often convenient to replay them at a faster rate for review. This option lets you specify what the default replay rate will be. It is expressed as a percentage so 100 is normal rate, 200 is double speed etc.', Category = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 156, Name = 'ZM_WEB_H_VIDEO_BITRATE', Value = '150000', Type = 'integer', DefaultValue = '150000', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the bitrate of the video encoded stream should be set to', Help = 'When encoding real video via the ffmpeg library a bit rate can be specified which roughly corresponds to the available bandwidth used for the stream. This setting effectively corresponds to a \'quality\' setting for the video. A low value will result in a blocky image whereas a high value will produce a clearer view. Note that this setting does not control the frame rate of the video however the quality of the video produced is affected both by this setting and the frame rate that the video is produced at. A higher frame rate at a particular bit rate result in individual frames being at a lower quality.', Category = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 157, Name = 'ZM_WEB_H_VIDEO_MAXFPS', Value = '15', Type = 'integer', DefaultValue = '15', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the maximum frame rate for streamed video should be', Help = 'When using streamed video the main control is the bitrate which determines how much data can be transmitted. However a lower bitrate at high frame rates results in a lower quality image. This option allows you to limit the maximum frame rate to ensure that video quality is maintained. An additional advantage is that encoding video at high frame rates is a processor intensive task when for the most part a very high frame rate offers little perceptible improvement over one that has a more manageable resource requirement. Note, this option is implemented as a cap beyond which binary reduction takes place. So if you have a device capturing at 15fps and set this option to 10fps then the video is not produced at 10fps, but rather at 7.5fps (15 divided by 2) as the final frame rate must be the original divided by a power of 2.', Category = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 158, Name = 'ZM_WEB_H_SCALE_THUMBS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Scale thumbnails in events, bandwidth versus cpu in rescaling', Help = 'If unset, this option sends the whole image to the browser which resizes it in the window. If set the image is scaled down on the server before sending a reduced size image to the browser to conserve bandwidth at the cost of cpu on the server. Note that ZM can only perform the resizing if the appropriate PHP graphics functionality is installed. This is usually available in the php-gd package.', Category = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 159, Name = 'ZM_WEB_H_EVENTS_VIEW', Value = 'events', Type = 'string', DefaultValue = 'events', Hint = 'events|timeline', Pattern = '(?^i:^([lt]))', Format = ' $1 =~ /^e/ ? \"events\" : \"timeline\" ', Prompt = 'What the default view of multiple events should be.', Help = 'Stored events can be viewed in either an events list format or in a timeline based one. This option sets the default view that will be used. Choosing one view here does not prevent the other view being used as it will always be selectable from whichever view is currently being used.', Category = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 160, Name = 'ZM_WEB_H_SHOW_PROGRESS', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Show the progress of replay in event view.', Help = 'When viewing events an event navigation panel and progress bar is shown below the event itself. This allows you to jump to specific points in the event, but can can also dynamically update to display the current progress of the event replay itself. This progress is calculated from the actual event duration and is not directly linked to the replay itself, so on limited bandwidth connections may be out of step with the replay. This option allows you to turn off the progress display, whilst still keeping the navigation aspect, where bandwidth prevents it functioning effectively.', Category = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 161, Name = 'ZM_WEB_H_AJAX_TIMEOUT', Value = '3000', Type = 'integer', DefaultValue = '3000', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How long to wait for Ajax request responses (ms)', Help = 'The newer versions of the live feed and event views use Ajax to request information from the server and populate the views dynamically. This option allows you to specify a timeout if required after which requests are abandoned. A timeout may be necessary if requests would overwise hang such as on a slow connection. This would tend to consume a lot of browser memory and make the interface unresponsive. Ordinarily no requests should timeout so this setting should be set to a value greater than the slowest expected response. This value is in milliseconds but if set to zero then no timeout will be used.', Category = 'highband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 162, Name = 'ZM_WEB_M_REFRESH_MAIN', Value = '300', Type = 'integer', DefaultValue = '300', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the main console window should refresh itself', Help = 'The main console window lists a general status and the event totals for all monitors. This is not a trivial task and should not be repeated too frequently or it may affect the performance of the rest of the system.', Category = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 163, Name = 'ZM_WEB_M_REFRESH_CYCLE', Value = '20', Type = 'integer', DefaultValue = '20', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the cycle watch window swaps to the next monitor', Help = 'The cycle watch window is a method of continuously cycling between images from all of your monitors. This option determines how often to refresh with a new image.', Category = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 164, Name = 'ZM_WEB_M_REFRESH_IMAGE', Value = '10', Type = 'integer', DefaultValue = '10', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the watched image is refreshed (if not streaming)', Help = 'The live images from a monitor can be viewed in either streamed or stills mode. This option determines how often a stills image is refreshed, it has no effect if streaming is selected.', Category = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 165, Name = 'ZM_WEB_M_REFRESH_STATUS', Value = '5', Type = 'integer', DefaultValue = '5', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the status refreshes itself in the watch window', Help = 'The monitor window is actually made from several frames. The one in the middle merely contains a monitor status which needs to refresh fairly frequently to give a true indication. This option determines that frequency.', Category = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 166, Name = 'ZM_WEB_M_REFRESH_EVENTS', Value = '60', Type = 'integer', DefaultValue = '60', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the event listing is refreshed in the watch window', Help = 'The monitor window is actually made from several frames. The lower framme contains a listing of the last few events for easy access. This option determines how often this is refreshed.', Category = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 167, Name = 'ZM_WEB_M_CAN_STREAM', Value = 'auto', Type = 'string', DefaultValue = 'auto', Hint = 'auto|yes|no', Pattern = '(?^i:^([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 = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 168, Name = 'ZM_WEB_M_STREAM_METHOD', Value = 'jpeg', Type = 'string', DefaultValue = 'jpeg', Hint = 'mpeg|jpeg', Pattern = '(?^i:^([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 = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 169, Name = 'ZM_WEB_M_DEFAULT_SCALE', Value = '100', Type = 'integer', DefaultValue = '100', Hint = '25|33|50|75|100|150|200|300|400', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the default scaling factor applied to \'live\' or \'event\' views is (%)', Help = 'Normally ZoneMinder will display \'live\' or \'event\' streams in their native size. However if you have monitors with large dimensions or a slow link you may prefer to reduce this size, alternatively for small monitors you can enlarge it. This options lets you specify what the default scaling factor will be. It is expressed as a percentage so 100 is normal size, 200 is double size etc.', Category = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 170, Name = 'ZM_WEB_M_DEFAULT_RATE', Value = '100', Type = 'integer', DefaultValue = '100', Hint = '25|50|100|150|200|400|1000|2500|5000|10000', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the default replay rate factor applied to \'event\' views is (%)', Help = 'Normally ZoneMinder will display \'event\' streams at their native rate, i.e. as close to real-time as possible. However if you have long events it is often convenient to replay them at a faster rate for review. This option lets you specify what the default replay rate will be. It is expressed as a percentage so 100 is normal rate, 200 is double speed etc.', Category = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 171, Name = 'ZM_WEB_M_VIDEO_BITRATE', Value = '75000', Type = 'integer', DefaultValue = '75000', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the bitrate of the video encoded stream should be set to', Help = 'When encoding real video via the ffmpeg library a bit rate can be specified which roughly corresponds to the available bandwidth used for the stream. This setting effectively corresponds to a \'quality\' setting for the video. A low value will result in a blocky image whereas a high value will produce a clearer view. Note that this setting does not control the frame rate of the video however the quality of the video produced is affected both by this setting and the frame rate that the video is produced at. A higher frame rate at a particular bit rate result in individual frames being at a lower quality.', Category = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 172, Name = 'ZM_WEB_M_VIDEO_MAXFPS', Value = '10', Type = 'integer', DefaultValue = '10', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the maximum frame rate for streamed video should be', Help = 'When using streamed video the main control is the bitrate which determines how much data can be transmitted. However a lower bitrate at high frame rates results in a lower quality image. This option allows you to limit the maximum frame rate to ensure that video quality is maintained. An additional advantage is that encoding video at high frame rates is a processor intensive task when for the most part a very high frame rate offers little perceptible improvement over one that has a more manageable resource requirement. Note, this option is implemented as a cap beyond which binary reduction takes place. So if you have a device capturing at 15fps and set this option to 10fps then the video is not produced at 10fps, but rather at 7.5fps (15 divided by 2) as the final frame rate must be the original divided by a power of 2.', Category = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 173, Name = 'ZM_WEB_M_SCALE_THUMBS', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Scale thumbnails in events, bandwidth versus cpu in rescaling', Help = 'If unset, this option sends the whole image to the browser which resizes it in the window. If set the image is scaled down on the server before sending a reduced size image to the browser to conserve bandwidth at the cost of cpu on the server. Note that ZM can only perform the resizing if the appropriate PHP graphics functionality is installed. This is usually available in the php-gd package.', Category = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 174, Name = 'ZM_WEB_M_EVENTS_VIEW', Value = 'events', Type = 'string', DefaultValue = 'events', Hint = 'events|timeline', Pattern = '(?^i:^([lt]))', Format = ' $1 =~ /^e/ ? \"events\" : \"timeline\" ', Prompt = 'What the default view of multiple events should be.', Help = 'Stored events can be viewed in either an events list format or in a timeline based one. This option sets the default view that will be used. Choosing one view here does not prevent the other view being used as it will always be selectable from whichever view is currently being used.', Category = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 175, Name = 'ZM_WEB_M_SHOW_PROGRESS', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Show the progress of replay in event view.', Help = 'When viewing events an event navigation panel and progress bar is shown below the event itself. This allows you to jump to specific points in the event, but can can also dynamically update to display the current progress of the event replay itself. This progress is calculated from the actual event duration and is not directly linked to the replay itself, so on limited bandwidth connections may be out of step with the replay. This option allows you to turn off the progress display, whilst still keeping the navigation aspect, where bandwidth prevents it functioning effectively.', Category = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 176, Name = 'ZM_WEB_M_AJAX_TIMEOUT', Value = '5000', Type = 'integer', DefaultValue = '5000', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How long to wait for Ajax request responses (ms)', Help = 'The newer versions of the live feed and event views use Ajax to request information from the server and populate the views dynamically. This option allows you to specify a timeout if required after which requests are abandoned. A timeout may be necessary if requests would overwise hang such as on a slow connection. This would tend to consume a lot of browser memory and make the interface unresponsive. Ordinarily no requests should timeout so this setting should be set to a value greater than the slowest expected response. This value is in milliseconds but if set to zero then no timeout will be used.', Category = 'medband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 177, Name = 'ZM_WEB_L_REFRESH_MAIN', Value = '300', Type = 'integer', DefaultValue = '300', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the main console window should refresh itself', Help = 'The main console window lists a general status and the event totals for all monitors. This is not a trivial task and should not be repeated too frequently or it may affect the performance of the rest of the system.', Category = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 178, Name = 'ZM_WEB_L_REFRESH_CYCLE', Value = '30', Type = 'integer', DefaultValue = '30', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the cycle watch window swaps to the next monitor', Help = 'The cycle watch window is a method of continuously cycling between images from all of your monitors. This option determines how often to refresh with a new image.', Category = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 179, Name = 'ZM_WEB_L_REFRESH_IMAGE', Value = '15', Type = 'integer', DefaultValue = '15', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the watched image is refreshed (if not streaming)', Help = 'The live images from a monitor can be viewed in either streamed or stills mode. This option determines how often a stills image is refreshed, it has no effect if streaming is selected.', Category = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 180, Name = 'ZM_WEB_L_REFRESH_STATUS', Value = '10', Type = 'integer', DefaultValue = '10', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the status refreshes itself in the watch window', Help = 'The monitor window is actually made from several frames. The one in the middle merely contains a monitor status which needs to refresh fairly frequently to give a true indication. This option determines that frequency.', Category = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 181, Name = 'ZM_WEB_L_REFRESH_EVENTS', Value = '180', Type = 'integer', DefaultValue = '180', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How often (in seconds) the event listing is refreshed in the watch window', Help = 'The monitor window is actually made from several frames. The lower framme contains a listing of the last few events for easy access. This option determines how often this is refreshed.', Category = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 182, Name = 'ZM_WEB_L_CAN_STREAM', Value = 'auto', Type = 'string', DefaultValue = 'auto', Hint = 'auto|yes|no', Pattern = '(?^i:^([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 = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 183, Name = 'ZM_WEB_L_STREAM_METHOD', Value = 'jpeg', Type = 'string', DefaultValue = 'jpeg', Hint = 'mpeg|jpeg', Pattern = '(?^i:^([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 = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 184, Name = 'ZM_WEB_L_DEFAULT_SCALE', Value = '100', Type = 'integer', DefaultValue = '100', Hint = '25|33|50|75|100|150|200|300|400', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the default scaling factor applied to \'live\' or \'event\' views is (%)', Help = 'Normally ZoneMinder will display \'live\' or \'event\' streams in their native size. However if you have monitors with large dimensions or a slow link you may prefer to reduce this size, alternatively for small monitors you can enlarge it. This options lets you specify what the default scaling factor will be. It is expressed as a percentage so 100 is normal size, 200 is double size etc.', Category = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 185, Name = 'ZM_WEB_L_DEFAULT_RATE', Value = '100', Type = 'integer', DefaultValue = '100', Hint = '25|50|100|150|200|400|1000|2500|5000|10000', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the default replay rate factor applied to \'event\' views is (%)', Help = 'Normally ZoneMinder will display \'event\' streams at their native rate, i.e. as close to real-time as possible. However if you have long events it is often convenient to replay them at a faster rate for review. This option lets you specify what the default replay rate will be. It is expressed as a percentage so 100 is normal rate, 200 is double speed etc.', Category = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 186, Name = 'ZM_WEB_L_VIDEO_BITRATE', Value = '25000', Type = 'integer', DefaultValue = '25000', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the bitrate of the video encoded stream should be set to', Help = 'When encoding real video via the ffmpeg library a bit rate can be specified which roughly corresponds to the available bandwidth used for the stream. This setting effectively corresponds to a \'quality\' setting for the video. A low value will result in a blocky image whereas a high value will produce a clearer view. Note that this setting does not control the frame rate of the video however the quality of the video produced is affected both by this setting and the frame rate that the video is produced at. A higher frame rate at a particular bit rate result in individual frames being at a lower quality.', Category = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 187, Name = 'ZM_WEB_L_VIDEO_MAXFPS', Value = '5', Type = 'integer', DefaultValue = '5', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the maximum frame rate for streamed video should be', Help = 'When using streamed video the main control is the bitrate which determines how much data can be transmitted. However a lower bitrate at high frame rates results in a lower quality image. This option allows you to limit the maximum frame rate to ensure that video quality is maintained. An additional advantage is that encoding video at high frame rates is a processor intensive task when for the most part a very high frame rate offers little perceptible improvement over one that has a more manageable resource requirement. Note, this option is implemented as a cap beyond which binary reduction takes place. So if you have a device capturing at 15fps and set this option to 10fps then the video is not produced at 10fps, but rather at 7.5fps (15 divided by 2) as the final frame rate must be the original divided by a power of 2.', Category = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 188, Name = 'ZM_WEB_L_SCALE_THUMBS', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Scale thumbnails in events, bandwidth versus cpu in rescaling', Help = 'If unset, this option sends the whole image to the browser which resizes it in the window. If set the image is scaled down on the server before sending a reduced size image to the browser to conserve bandwidth at the cost of cpu on the server. Note that ZM can only perform the resizing if the appropriate PHP graphics functionality is installed. This is usually available in the php-gd package.', Category = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 189, Name = 'ZM_WEB_L_EVENTS_VIEW', Value = 'events', Type = 'string', DefaultValue = 'events', Hint = 'events|timeline', Pattern = '(?^i:^([lt]))', Format = ' $1 =~ /^e/ ? \"events\" : \"timeline\" ', Prompt = 'What the default view of multiple events should be.', Help = 'Stored events can be viewed in either an events list format or in a timeline based one. This option sets the default view that will be used. Choosing one view here does not prevent the other view being used as it will always be selectable from whichever view is currently being used.', Category = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 190, Name = 'ZM_WEB_L_SHOW_PROGRESS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Show the progress of replay in event view.', Help = 'When viewing events an event navigation panel and progress bar is shown below the event itself. This allows you to jump to specific points in the event, but can can also dynamically update to display the current progress of the event replay itself. This progress is calculated from the actual event duration and is not directly linked to the replay itself, so on limited bandwidth connections may be out of step with the replay. This option allows you to turn off the progress display, whilst still keeping the navigation aspect, where bandwidth prevents it functioning effectively.', Category = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 191, Name = 'ZM_WEB_L_AJAX_TIMEOUT', Value = '10000', Type = 'integer', DefaultValue = '10000', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How long to wait for Ajax request responses (ms)', Help = 'The newer versions of the live feed and event views use Ajax to request information from the server and populate the views dynamically. This option allows you to specify a timeout if required after which requests are abandoned. A timeout may be necessary if requests would overwise hang such as on a slow connection. This would tend to consume a lot of browser memory and make the interface unresponsive. Ordinarily no requests should timeout so this setting should be set to a value greater than the slowest expected response. This value is in milliseconds but if set to zero then no timeout will be used.', Category = 'lowband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 192, Name = 'ZM_WEB_P_CAN_STREAM', Value = 'auto', Type = 'string', DefaultValue = 'auto', Hint = 'auto|yes|no', Pattern = '(?^i:^([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 = 'phoneband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 193, Name = 'ZM_WEB_P_STREAM_METHOD', Value = 'jpeg', Type = 'string', DefaultValue = 'jpeg', Hint = 'mpeg|jpeg', Pattern = '(?^i:^([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 = 'phoneband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 194, Name = 'ZM_WEB_P_DEFAULT_SCALE', Value = '100', Type = 'integer', DefaultValue = '100', Hint = '25|33|50|75|100|150|200|300|400', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the default scaling factor applied to \'live\' or \'event\' views is (%)', Help = 'Normally ZoneMinder will display \'live\' or \'event\' streams in their native size. However if you have monitors with large dimensions or a slow link you may prefer to reduce this size, alternatively for small monitors you can enlarge it. This options lets you specify what the default scaling factor will be. It is expressed as a percentage so 100 is normal size, 200 is double size etc.', Category = 'phoneband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 195, Name = 'ZM_WEB_P_DEFAULT_RATE', Value = '100', Type = 'integer', DefaultValue = '100', Hint = '25|50|100|150|200|400|1000|2500|5000|10000', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the default replay rate factor applied to \'event\' views is (%)', Help = 'Normally ZoneMinder will display \'event\' streams at their native rate, i.e. as close to real-time as possible. However if you have long events it is often convenient to replay them at a faster rate for review. This option lets you specify what the default replay rate will be. It is expressed as a percentage so 100 is normal rate, 200 is double speed etc.', Category = 'phoneband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 196, Name = 'ZM_WEB_P_VIDEO_BITRATE', Value = '8000', Type = 'integer', DefaultValue = '8000', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the bitrate of the video encoded stream should be set to', Help = 'When encoding real video via the ffmpeg library a bit rate can be specified which roughly corresponds to the available bandwidth used for the stream. This setting effectively corresponds to a \'quality\' setting for the video. A low value will result in a blocky image whereas a high value will produce a clearer view. Note that this setting does not control the frame rate of the video however the quality of the video produced is affected both by this setting and the frame rate that the video is produced at. A higher frame rate at a particular bit rate result in individual frames being at a lower quality.', Category = 'phoneband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 197, Name = 'ZM_WEB_P_VIDEO_MAXFPS', Value = '5', Type = 'integer', DefaultValue = '5', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'What the maximum frame rate for streamed video should be', Help = 'When using streamed video the main control is the bitrate which determines how much data can be transmitted. However a lower bitrate at high frame rates results in a lower quality image. This option allows you to limit the maximum frame rate to ensure that video quality is maintained. An additional advantage is that encoding video at high frame rates is a processor intensive task when for the most part a very high frame rate offers little perceptible improvement over one that has a more manageable resource requirement. Note, this option is implemented as a cap beyond which binary reduction takes place. So if you have a device capturing at 15fps and set this option to 10fps then the video is not produced at 10fps, but rather at 7.5fps (15 divided by 2) as the final frame rate must be the original divided by a power of 2.', Category = 'phoneband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 198, Name = 'ZM_WEB_P_SCALE_THUMBS', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Scale thumbnails in events, bandwidth versus cpu in rescaling', Help = 'If unset, this option sends the whole image to the browser which resizes it in the window. If set the image is scaled down on the server before sending a reduced size image to the browser to conserve bandwidth at the cost of cpu on the server. Note that ZM can only perform the resizing if the appropriate PHP graphics functionality is installed. This is usually available in the php-gd package.', Category = 'phoneband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 199, Name = 'ZM_WEB_P_AJAX_TIMEOUT', Value = '10000', Type = 'integer', DefaultValue = '10000', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'How long to wait for Ajax request responses (ms)', Help = 'The newer versions of the live feed and event views use Ajax to request information from the server and populate the views dynamically. This option allows you to specify a timeout if required after which requests are abandoned. A timeout may be necessary if requests would overwise hang such as on a slow connection. This would tend to consume a lot of browser memory and make the interface unresponsive. Ordinarily no requests should timeout so this setting should be set to a value greater than the slowest expected response. This value is in milliseconds but if set to zero then no timeout will be used.', Category = 'phoneband', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 200, Name = 'ZM_DYN_LAST_VERSION', Value = '', Type = 'string', DefaultValue = '', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'What the last version of ZoneMinder recorded from zoneminder.com is', Help = '', Category = 'dynamic', Readonly = '1', Requires = '';
|
||||
insert into Config set Id = 201, Name = 'ZM_DYN_CURR_VERSION', Value = '1.25.0', Type = 'string', DefaultValue = '1.25.0', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'What the effective current version of ZoneMinder is, might be different from actual if versions ignored', Help = '', Category = 'dynamic', Readonly = '1', Requires = '';
|
||||
insert into Config set Id = 202, Name = 'ZM_DYN_DB_VERSION', Value = '1.25.0', Type = 'string', DefaultValue = '1.25.0', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'What the version of the database is, from zmupdate', Help = '', Category = 'dynamic', Readonly = '1', Requires = '';
|
||||
insert into Config set Id = 203, Name = 'ZM_DYN_LAST_CHECK', Value = '', Type = 'integer', DefaultValue = '', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'When the last check for version from zoneminder.com was', Help = '', Category = 'dynamic', Readonly = '1', Requires = '';
|
||||
insert into Config set Id = 204, Name = 'ZM_DYN_NEXT_REMINDER', Value = '', Type = 'string', DefaultValue = '', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'When the earliest time to remind about versions will be', Help = '', Category = 'dynamic', Readonly = '1', Requires = '';
|
||||
insert into Config set Id = 205, Name = 'ZM_DYN_DONATE_REMINDER_TIME', Value = '0', Type = 'integer', DefaultValue = '0', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'When the earliest time to remind about donations will be', Help = '', Category = 'dynamic', Readonly = '1', Requires = '';
|
||||
insert into Config set Id = 206, Name = 'ZM_DYN_SHOW_DONATE_REMINDER', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Remind about donations or not', Help = '', Category = 'dynamic', Readonly = '1', Requires = '';
|
||||
insert into Config set Id = 207, Name = 'ZM_EYEZM_DEBUG', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Switch additional debugging on for eyeZm Plugin', Help = 'Enable or Disable extra debugging from the eyeZm Plugin. Extra debugging information will be displayed in it\'s own file (EYEZM_LOG_TO_FILE is set), or your Apache error log', Category = 'eyeZm', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 208, Name = 'ZM_EYEZM_LOG_TO_FILE', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'When eyeZm Debugging is enabled, enabling this logs output to it\'s own file', Help = 'When EYEZM_DEBUG is on and EYEZM_LOG_TO_FILE is on, output generated from the eyeZm Plugin will go to it\'s own file. Otherwise it will go to the apache error log.', Category = 'eyeZm', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 209, Name = 'ZM_EYEZM_LOG_FILE', Value = '/var/log/zm/zm_xml.log', Type = 'string', DefaultValue = '/var/log/zm/zm_xml.log', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Default filename to use when logging eyeZm Output and EYEZM_LOG_TO_FILE is enabled', Help = 'This file will contain it\'s own output from the eyeZm Plugin when EYEZM_LOG_TO_FILE and EYEZM_DEBUG are both enabled', Category = 'eyeZm', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 210, Name = 'ZM_EYEZM_EVENT_VCODEC', Value = 'mpeg4', Type = 'string', DefaultValue = 'mpeg4', Hint = 'mpeg4|h264', Pattern = '(?^i:^([mh]))', Format = ' $1 =~ /^m/ ? \"mpeg4\" : \"h264\" ', Prompt = 'Default video-codec to use for encoding events', Help = 'The eyeZm Plugin calls FFMPEG externally to encode the captured images. If your FFMPEG is not built with support for H264, change this to MPEG-4. If using H264, please check http://www.eyezm.com for H264 requirements and that your eyeZm version supports H264 (v1.2+).', Category = 'eyeZm', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 211, Name = 'ZM_EYEZM_FEED_VCODEC', Value = 'mjpeg', Type = 'string', DefaultValue = 'mjpeg', Hint = 'mjpeg|h264', Pattern = '(?^i:^([mh]))', Format = ' $1 =~ /^m/ ? \"mjpeg\" : \"h264\" ', Prompt = 'Default video-codec to use for streaming the live feed', Help = 'Determines whether the live stream is generated using native MJPEG streaming with ZoneMinder, or H264 using FFMPEG and HTML-5 streaming. If using H264, please check http://www.eyezm.com for H264 requirements and that your eyeZm version supports H264 (v1.2+). This is just a default parameter, and can be overridden with eyeZm.', Category = 'eyeZm', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 212, Name = 'ZM_EYEZM_H264_DEFAULT_BR', Value = '96k', Type = 'string', DefaultValue = '96k', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Default bit-rate to use with FFMPEG for H264 streaming', Help = 'When using the eyeZm Plugin to stream H264 data, FFMPEG requires a bitrate to control the quality and bandwidth of the video. This should be specified in a format acceptable to FFMPEG. The default value is sufficient for most installations. This is just a default parameter, and can be overridden with eyeZm.', Category = 'eyeZm', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 213, Name = 'ZM_EYEZM_H264_DEFAULT_EVBR', Value = '128k', Type = 'string', DefaultValue = '128k', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Default bit-rate to use with FFMPEG for H264 event viewing', Help = 'When using the eyeZm Plugin to view events in H264, FFMPEG requires a bitrate to control the quality and bandwidth of the video. This should be specified in a format acceptable to FFMPEG. The default value is sufficient for most installations. This is just a default parameter, and can be overridden with eyeZm.', Category = 'eyeZm', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 214, Name = 'ZM_EYEZM_H264_TIMEOUT', Value = '20', Type = 'string', DefaultValue = '20', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Timeout (sec) to wait for H264 stream to start before terminating', Help = 'The eyeZm Plugin will attempt to spawn an H264 stream when requested, and require that it complete within the timeout specified. If you have a slow system or find through the logs that the H264 stream is not starting because the timeout is expiring, even though FFMPEG is running, try increasing this value. If you have a fast system, decreasing this value can improve the responsiveness when there are issues starting H264 streams', Category = 'eyeZm', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 215, Name = 'ZM_EYEZM_SEG_DURATION', Value = '3', Type = 'string', DefaultValue = '3', Hint = 'string', Pattern = '(?^:^(.+)$)', Format = ' $1 ', Prompt = 'Segment duration used for streaming using HTTP-5 Streaming protocol', Help = 'The HTTP-5 Live Streaming Protocol segments the input video stream into small chunks of a duration specified by this parameter. Increasing the segment duration will help with choppy connections on the other end, but will increase the latency in starting a stream.', Category = 'eyeZm', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 216, Name = 'ZM_PATH_PLUGINS', Value = '/usr/share/zm', Type = 'string', DefaultValue = '/usr/share/zm', Hint = '/absolute/path/to/somewhere', Pattern = '(?^:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'Path to the plugin folder', Help = '3d-party plugins have to be placed here.', Category = 'paths', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 217, Name = 'ZM_PLUGIN_EXTENSION', Value = '.zmpl', Type = 'string', DefaultValue = '.zmpl', Hint = 'relative/path/to/somewhere', Pattern = '(?^:^((?:[^/].*)?)/?$)', Format = ' $1 ', Prompt = 'Default extension of plugins to found.', Help = 'Default extension of plugins to found.', Category = 'paths', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 218, Name = 'ZM_PLUGINS_CONFIG_PATH', Value = '/usr/share/zm/plugins.conf', Type = 'string', DefaultValue = '/usr/share/zm/plugins.conf', Hint = '/absolute/path/to/somewhere', Pattern = '(?^:^((?:/[^/]*)+?)/?$)', Format = ' $1 ', Prompt = 'Path to the config file for plugins.', Help = 'Path to the config file for plugins.', Category = 'paths', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 219, Name = 'ZM_LOAD_PLUGINS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Load and use 3d-party plugins', Help = '3d-party plugins will be loaded and used for analysing.', Category = 'config', Readonly = '0', Requires = '';
|
||||
insert into Config set Id = 220, Name = 'ZM_TURNOFF_NATIVE_ANALYSIS', Value = '0', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?^i:^([yn]))', Format = ' ($1 =~ /^y/) ? \"yes\" : \"no\" ', Prompt = 'Turn native ZM\'s image analysis possibility off', Help = 'Image analysis with ZM\'s motion detected function will be turned off. Only detection functions from loaded plugins will be used. Note, that if no plugins have be loaded, no detection will be done.', Category = 'config', Readonly = '0', Requires = '';
|
||||
|
|
@ -368,6 +368,8 @@ CREATE TABLE `Monitors` (
|
|||
`SignalCheckColour` varchar(32) NOT NULL default '#0000BE',
|
||||
`WebColour` varchar(32) NOT NULL default 'red',
|
||||
`Sequence` smallint(5) unsigned default NULL,
|
||||
`UsedPl` varchar(88) NOT NULL default '',
|
||||
`DoNativeMotDet` tinyint(3) unsigned NOT NULL default '1',
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
|
|
|
@ -0,0 +1,621 @@
|
|||
-- MySQL dump 10.9
|
||||
--
|
||||
-- Host: localhost Database: @ZM_DB_NAME@
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 4.1.16-log
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Current Database: `@ZM_DB_NAME@`
|
||||
--
|
||||
|
||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `@ZM_DB_NAME@`;
|
||||
|
||||
USE `@ZM_DB_NAME@`;
|
||||
|
||||
--
|
||||
-- Table structure for table `Config`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Config`;
|
||||
CREATE TABLE `Config` (
|
||||
`Id` smallint(5) unsigned NOT NULL default '0',
|
||||
`Name` varchar(32) NOT NULL default '',
|
||||
`Value` text NOT NULL,
|
||||
`Type` tinytext NOT NULL,
|
||||
`DefaultValue` tinytext,
|
||||
`Hint` tinytext,
|
||||
`Pattern` tinytext,
|
||||
`Format` tinytext,
|
||||
`Prompt` tinytext,
|
||||
`Help` text,
|
||||
`Category` varchar(32) NOT NULL default '',
|
||||
`Readonly` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Requires` text,
|
||||
PRIMARY KEY (`Name`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
-- Table structure for table `ControlPresets`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `ControlPresets`;
|
||||
CREATE TABLE `ControlPresets` (
|
||||
`MonitorId` int(10) unsigned NOT NULL default '0',
|
||||
`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`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Controls`;
|
||||
CREATE TABLE `Controls` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Type` enum('Local','Remote') NOT NULL default 'Local',
|
||||
`Protocol` varchar(64) default NULL,
|
||||
`CanWake` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanSleep` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanReset` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanZoom` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanAutoZoom` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanZoomAbs` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanZoomRel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanZoomCon` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinZoomRange` int(10) unsigned default NULL,
|
||||
`MaxZoomRange` int(10) unsigned default NULL,
|
||||
`MinZoomStep` int(10) unsigned default NULL,
|
||||
`MaxZoomStep` int(10) unsigned default NULL,
|
||||
`HasZoomSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinZoomSpeed` int(10) unsigned default NULL,
|
||||
`MaxZoomSpeed` int(10) unsigned default NULL,
|
||||
`CanFocus` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanAutoFocus` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanFocusAbs` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanFocusRel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanFocusCon` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinFocusRange` int(10) unsigned default NULL,
|
||||
`MaxFocusRange` int(10) unsigned default NULL,
|
||||
`MinFocusStep` int(10) unsigned default NULL,
|
||||
`MaxFocusStep` int(10) unsigned default NULL,
|
||||
`HasFocusSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinFocusSpeed` int(10) unsigned default NULL,
|
||||
`MaxFocusSpeed` int(10) unsigned default NULL,
|
||||
`CanIris` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanAutoIris` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanIrisAbs` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanIrisRel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanIrisCon` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinIrisRange` int(10) unsigned default NULL,
|
||||
`MaxIrisRange` int(10) unsigned default NULL,
|
||||
`MinIrisStep` int(10) unsigned default NULL,
|
||||
`MaxIrisStep` int(10) unsigned default NULL,
|
||||
`HasIrisSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinIrisSpeed` int(10) unsigned default NULL,
|
||||
`MaxIrisSpeed` int(10) unsigned default NULL,
|
||||
`CanGain` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanAutoGain` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanGainAbs` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanGainRel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanGainCon` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinGainRange` int(10) unsigned default NULL,
|
||||
`MaxGainRange` int(10) unsigned default NULL,
|
||||
`MinGainStep` int(10) unsigned default NULL,
|
||||
`MaxGainStep` int(10) unsigned default NULL,
|
||||
`HasGainSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinGainSpeed` int(10) unsigned default NULL,
|
||||
`MaxGainSpeed` int(10) unsigned default NULL,
|
||||
`CanWhite` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanAutoWhite` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanWhiteAbs` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanWhiteRel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanWhiteCon` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinWhiteRange` int(10) unsigned default NULL,
|
||||
`MaxWhiteRange` int(10) unsigned default NULL,
|
||||
`MinWhiteStep` int(10) unsigned default NULL,
|
||||
`MaxWhiteStep` int(10) unsigned default NULL,
|
||||
`HasWhiteSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinWhiteSpeed` int(10) unsigned default NULL,
|
||||
`MaxWhiteSpeed` int(10) unsigned default NULL,
|
||||
`HasPresets` tinyint(3) unsigned NOT NULL default '0',
|
||||
`NumPresets` tinyint(3) unsigned NOT NULL default '0',
|
||||
`HasHomePreset` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanSetPresets` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanMove` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanMoveDiag` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanMoveMap` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanMoveAbs` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanMoveRel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanMoveCon` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanPan` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinPanRange` int(10) default NULL,
|
||||
`MaxPanRange` int(10) default NULL,
|
||||
`MinPanStep` int(10) default NULL,
|
||||
`MaxPanStep` int(10) default NULL,
|
||||
`HasPanSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinPanSpeed` int(10) default NULL,
|
||||
`MaxPanSpeed` int(10) default NULL,
|
||||
`HasTurboPan` tinyint(3) unsigned NOT NULL default '0',
|
||||
`TurboPanSpeed` int(10) default NULL,
|
||||
`CanTilt` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinTiltRange` int(10) default NULL,
|
||||
`MaxTiltRange` int(10) default NULL,
|
||||
`MinTiltStep` int(10) default NULL,
|
||||
`MaxTiltStep` int(10) default NULL,
|
||||
`HasTiltSpeed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`MinTiltSpeed` int(10) default NULL,
|
||||
`MaxTiltSpeed` int(10) default NULL,
|
||||
`HasTurboTilt` tinyint(3) unsigned NOT NULL default '0',
|
||||
`TurboTiltSpeed` int(10) default NULL,
|
||||
`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`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Devices`;
|
||||
CREATE TABLE `Devices` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` tinytext NOT NULL,
|
||||
`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`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Events`;
|
||||
CREATE TABLE `Events` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`MonitorId` int(10) unsigned NOT NULL default '0',
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Cause` varchar(32) NOT NULL default '',
|
||||
`StartTime` datetime default NULL,
|
||||
`EndTime` datetime default NULL,
|
||||
`Width` smallint(5) unsigned NOT NULL default '0',
|
||||
`Height` smallint(5) unsigned NOT NULL default '0',
|
||||
`Length` decimal(10,2) NOT NULL default '0.00',
|
||||
`Frames` int(10) unsigned default NULL,
|
||||
`AlarmFrames` int(10) unsigned default NULL,
|
||||
`TotScore` int(10) unsigned NOT NULL default '0',
|
||||
`AvgScore` smallint(5) unsigned default '0',
|
||||
`MaxScore` smallint(5) unsigned default '0',
|
||||
`Archived` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Videoed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Uploaded` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Emailed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Messaged` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Executed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Notes` text,
|
||||
PRIMARY KEY (`Id`,`MonitorId`),
|
||||
KEY `MonitorId` (`MonitorId`),
|
||||
KEY `StartTime` (`StartTime`),
|
||||
KEY `Frames` (`Frames`),
|
||||
KEY `Archived` (`Archived`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
-- Table structure for table `Filters`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Filters`;
|
||||
CREATE TABLE `Filters` (
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Query` text NOT NULL,
|
||||
`AutoArchive` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AutoVideo` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AutoUpload` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AutoEmail` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AutoMessage` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AutoExecute` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AutoExecuteCmd` tinytext,
|
||||
`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`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Frames`;
|
||||
CREATE TABLE `Frames` (
|
||||
`EventId` int(10) unsigned NOT NULL default '0',
|
||||
`FrameId` int(10) unsigned NOT NULL default '0',
|
||||
`Type` enum('Normal','Bulk','Alarm') NOT NULL default 'Normal',
|
||||
`TimeStamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
`Delta` decimal(8,2) NOT NULL default '0.00',
|
||||
`Score` smallint(5) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`EventId`,`FrameId`),
|
||||
KEY `Type` (`Type`),
|
||||
KEY `TimeStamp` (`TimeStamp`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
-- Table structure for table `Groups`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Groups`;
|
||||
CREATE TABLE `Groups` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`MonitorIds` tinytext NOT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
-- Table structure for table `Logs`
|
||||
--
|
||||
CREATE TABLE `Logs` (
|
||||
`TimeKey` decimal(16,6) NOT NULL,
|
||||
`Component` varchar(32) NOT NULL,
|
||||
`Pid` smallint(6) DEFAULT NULL,
|
||||
`Level` tinyint(3) NOT NULL,
|
||||
`Code` char(3) NOT NULL,
|
||||
`Message` varchar(255) NOT NULL,
|
||||
`File` varchar(255) DEFAULT NULL,
|
||||
`Line` smallint(5) unsigned DEFAULT NULL,
|
||||
KEY `TimeKey` (`TimeKey`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
-- Table structure for table `MonitorPresets`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `MonitorPresets`;
|
||||
CREATE TABLE `MonitorPresets` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Type` enum('Local','Remote','File','Ffmpeg') NOT NULL default 'Local',
|
||||
`Device` tinytext,
|
||||
`Channel` tinyint(3) unsigned default NULL,
|
||||
`Format` int(10) unsigned default NULL,
|
||||
`Protocol` varchar(16) default NULL,
|
||||
`Method` varchar(16) default NULL,
|
||||
`Host` varchar(64) default NULL,
|
||||
`Port` varchar(8) default NULL,
|
||||
`Path` varchar(255) default NULL,
|
||||
`SubPath` varchar(64) default NULL,
|
||||
`Width` smallint(5) unsigned default NULL,
|
||||
`Height` smallint(5) unsigned default NULL,
|
||||
`Palette` int(10) unsigned default NULL,
|
||||
`MaxFPS` decimal(5,2) default NULL,
|
||||
`Controllable` tinyint(3) unsigned NOT NULL default '0',
|
||||
`ControlId` varchar(16) default NULL,
|
||||
`ControlDevice` varchar(255) default NULL,
|
||||
`ControlAddress` varchar(255) default NULL,
|
||||
`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`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Monitors`;
|
||||
CREATE TABLE `Monitors` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Type` enum('Local','Remote','File','Ffmpeg') NOT NULL default 'Local',
|
||||
`Function` enum('None','Monitor','Modect','Record','Mocord','Nodect') NOT NULL default 'Monitor',
|
||||
`Enabled` tinyint(3) unsigned NOT NULL default '1',
|
||||
`LinkedMonitors` varchar(255) NOT NULL default '',
|
||||
`Triggers` set('X10') NOT NULL default '',
|
||||
`Device` varchar(64) NOT NULL default '',
|
||||
`Channel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Format` int(10) unsigned NOT NULL default '0',
|
||||
`Protocol` varchar(16) NOT NULL default '',
|
||||
`Method` varchar(16) NOT NULL default '',
|
||||
`Host` varchar(64) NOT NULL default '',
|
||||
`Port` varchar(8) NOT NULL default '',
|
||||
`SubPath` varchar(64) NOT NULL default '',
|
||||
`Path` varchar(255) NOT NULL default '',
|
||||
`Width` smallint(5) unsigned NOT NULL default '0',
|
||||
`Height` smallint(5) unsigned NOT NULL default '0',
|
||||
`Colours` tinyint(3) unsigned NOT NULL default '1',
|
||||
`Palette` int(10) unsigned NOT NULL default '0',
|
||||
`Orientation` enum('0','90','180','270','hori','vert') NOT NULL default '0',
|
||||
`Deinterlacing` int(10) unsigned NOT NULL default '0',
|
||||
`Brightness` mediumint(7) NOT NULL default '-1',
|
||||
`Contrast` mediumint(7) NOT NULL default '-1',
|
||||
`Hue` mediumint(7) NOT NULL default '-1',
|
||||
`Colour` mediumint(7) NOT NULL default '-1',
|
||||
`EventPrefix` varchar(32) NOT NULL default 'Event-',
|
||||
`LabelFormat` varchar(64) NOT NULL default '%N - %y/%m/%d %H:%M:%S',
|
||||
`LabelX` smallint(5) unsigned NOT NULL default '0',
|
||||
`LabelY` smallint(5) unsigned NOT NULL default '0',
|
||||
`ImageBufferCount` smallint(5) unsigned NOT NULL default '100',
|
||||
`WarmupCount` smallint(5) unsigned NOT NULL default '25',
|
||||
`PreEventCount` smallint(5) unsigned NOT NULL default '10',
|
||||
`PostEventCount` smallint(5) unsigned NOT NULL default '10',
|
||||
`StreamReplayBuffer` int(10) unsigned NOT NULL default '1000',
|
||||
`AlarmFrameCount` smallint(5) unsigned NOT NULL default '1',
|
||||
`SectionLength` int(10) unsigned NOT NULL default '600',
|
||||
`FrameSkip` smallint(5) unsigned NOT NULL default '0',
|
||||
`MaxFPS` decimal(5,2) default NULL,
|
||||
`AlarmMaxFPS` decimal(5,2) default NULL,
|
||||
`FPSReportInterval` smallint(5) unsigned NOT NULL default '250',
|
||||
`RefBlendPerc` tinyint(3) unsigned NOT NULL default '10',
|
||||
`Controllable` tinyint(3) unsigned NOT NULL default '0',
|
||||
`ControlId` int(10) unsigned NOT NULL default '0',
|
||||
`ControlDevice` varchar(255) default NULL,
|
||||
`ControlAddress` varchar(255) default NULL,
|
||||
`AutoStopTimeout` decimal(5,2) default NULL,
|
||||
`TrackMotion` tinyint(3) unsigned NOT NULL default '0',
|
||||
`TrackDelay` smallint(5) unsigned NOT NULL default '0',
|
||||
`ReturnLocation` tinyint(3) NOT NULL default '-1',
|
||||
`ReturnDelay` smallint(5) unsigned NOT NULL default '0',
|
||||
`DefaultView` enum('Events','Control') NOT NULL default 'Events',
|
||||
`DefaultRate` smallint(5) unsigned NOT NULL default '100',
|
||||
`DefaultScale` smallint(5) unsigned NOT NULL default '100',
|
||||
`SignalCheckColour` varchar(32) NOT NULL default '#0000BE',
|
||||
`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`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `States`;
|
||||
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`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Stats`;
|
||||
CREATE TABLE `Stats` (
|
||||
`MonitorId` int(10) unsigned NOT NULL default '0',
|
||||
`ZoneId` int(10) unsigned NOT NULL default '0',
|
||||
`EventId` int(10) unsigned NOT NULL default '0',
|
||||
`FrameId` int(10) unsigned NOT NULL default '0',
|
||||
`PixelDiff` tinyint(3) unsigned NOT NULL default '0',
|
||||
`AlarmPixels` int(10) unsigned NOT NULL default '0',
|
||||
`FilterPixels` int(10) unsigned NOT NULL default '0',
|
||||
`BlobPixels` int(10) unsigned NOT NULL default '0',
|
||||
`Blobs` smallint(5) unsigned NOT NULL default '0',
|
||||
`MinBlobSize` int(10) unsigned NOT NULL default '0',
|
||||
`MaxBlobSize` int(10) unsigned NOT NULL default '0',
|
||||
`MinX` smallint(5) unsigned NOT NULL default '0',
|
||||
`MaxX` smallint(5) unsigned NOT NULL default '0',
|
||||
`MinY` smallint(5) unsigned NOT NULL default '0',
|
||||
`MaxY` smallint(5) unsigned NOT NULL default '0',
|
||||
`Score` smallint(5) unsigned NOT NULL default '0',
|
||||
KEY `EventId` (`EventId`),
|
||||
KEY `MonitorId` (`MonitorId`),
|
||||
KEY `ZoneId` (`ZoneId`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
-- Table structure for table `TriggersX10`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `TriggersX10`;
|
||||
CREATE TABLE `TriggersX10` (
|
||||
`MonitorId` int(10) unsigned NOT NULL default '0',
|
||||
`Activation` varchar(32) default NULL,
|
||||
`AlarmInput` varchar(32) default NULL,
|
||||
`AlarmOutput` varchar(32) default NULL,
|
||||
PRIMARY KEY (`MonitorId`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
-- Table structure for table `Users`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Users`;
|
||||
CREATE TABLE `Users` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Username` varchar(32) character set latin1 collate latin1_bin NOT NULL default '',
|
||||
`Password` varchar(64) NOT NULL default '',
|
||||
`Language` varchar(8) NOT NULL default '',
|
||||
`Enabled` tinyint(3) unsigned NOT NULL default '1',
|
||||
`Stream` enum('None','View') NOT NULL default 'None',
|
||||
`Events` enum('None','View','Edit') NOT NULL default 'None',
|
||||
`Control` enum('None','View','Edit') NOT NULL default 'None',
|
||||
`Monitors` enum('None','View','Edit') NOT NULL default 'None',
|
||||
`Devices` enum('None','View','Edit') NOT NULL default 'None',
|
||||
`System` enum('None','View','Edit') NOT NULL default 'None',
|
||||
`MaxBandwidth` varchar(16) NOT NULL default '',
|
||||
`MonitorIds` tinytext NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
UNIQUE KEY `UC_Username` (`Username`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
-- Table structure for table `ZonePresets`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `ZonePresets`;
|
||||
CREATE TABLE `ZonePresets` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Type` enum('Active','Inclusive','Exclusive','Preclusive','Inactive') NOT NULL default 'Active',
|
||||
`Units` enum('Pixels','Percent') NOT NULL default 'Pixels',
|
||||
`CheckMethod` enum('AlarmedPixels','FilteredPixels','Blobs') NOT NULL default 'Blobs',
|
||||
`MinPixelThreshold` smallint(5) unsigned default NULL,
|
||||
`MaxPixelThreshold` smallint(5) unsigned default NULL,
|
||||
`MinAlarmPixels` int(10) unsigned default NULL,
|
||||
`MaxAlarmPixels` int(10) unsigned default NULL,
|
||||
`FilterX` tinyint(3) unsigned default NULL,
|
||||
`FilterY` tinyint(3) unsigned default NULL,
|
||||
`MinFilterPixels` int(10) unsigned default NULL,
|
||||
`MaxFilterPixels` int(10) unsigned default NULL,
|
||||
`MinBlobPixels` int(10) unsigned default NULL,
|
||||
`MaxBlobPixels` int(10) unsigned default NULL,
|
||||
`MinBlobs` smallint(5) unsigned default NULL,
|
||||
`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`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Zones`;
|
||||
CREATE TABLE `Zones` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`MonitorId` int(10) unsigned NOT NULL default '0',
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Type` enum('Active','Inclusive','Exclusive','Preclusive','Inactive') NOT NULL default 'Active',
|
||||
`Units` enum('Pixels','Percent') NOT NULL default 'Pixels',
|
||||
`NumCoords` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Coords` tinytext NOT NULL,
|
||||
`Area` int(10) unsigned NOT NULL default '0',
|
||||
`AlarmRGB` int(10) unsigned default '0',
|
||||
`CheckMethod` enum('AlarmedPixels','FilteredPixels','Blobs') NOT NULL default 'Blobs',
|
||||
`MinPixelThreshold` smallint(5) unsigned default NULL,
|
||||
`MaxPixelThreshold` smallint(5) unsigned default NULL,
|
||||
`MinAlarmPixels` int(10) unsigned default NULL,
|
||||
`MaxAlarmPixels` int(10) unsigned default NULL,
|
||||
`FilterX` tinyint(3) unsigned default NULL,
|
||||
`FilterY` tinyint(3) unsigned default NULL,
|
||||
`MinFilterPixels` int(10) unsigned default NULL,
|
||||
`MaxFilterPixels` int(10) unsigned default NULL,
|
||||
`MinBlobPixels` int(10) unsigned default NULL,
|
||||
`MaxBlobPixels` int(10) unsigned default NULL,
|
||||
`MinBlobs` smallint(5) unsigned default NULL,
|
||||
`MaxBlobs` smallint(5) unsigned default NULL,
|
||||
`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 */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
--
|
||||
-- Initial data to be loaded into ZoneMinder database
|
||||
--
|
||||
|
||||
--
|
||||
-- Create a default admin user.
|
||||
--
|
||||
insert into Users values ('','admin',password('admin'),'',1,'View','Edit','Edit','Edit','Edit','Edit','','');
|
||||
|
||||
--
|
||||
-- Add a sample filter to purge the oldest 5 events when the disk is 95% full, delete is disabled though
|
||||
--
|
||||
insert into Filters values ('PurgeWhenFull','{"sort_field":"Id","terms":[{"val":0,"attr":"Archived","op":"="},{"cnj":"and","val":95,"attr":"DiskPercent","op":">="}],"limit":5,"sort_asc":1}',0,0,0,0,0,0,'',1,0);
|
||||
|
||||
--
|
||||
-- Add in some sample control protocol definitions
|
||||
--
|
||||
insert into Controls values (1,'Pelco-D','Local','PelcoD',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
|
||||
insert into Controls values (2,'Pelco-P','Local','PelcoP',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
|
||||
insert into Controls values (3,'Sony VISCA','Local','Visca',1,1,0,1,0,0,0,1,0,16384,10,4000,1,1,6,1,1,1,0,1,0,1536,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,3,1,1,1,1,0,1,1,0,1,-15578,15578,100,10000,1,1,50,1,254,1,-7789,7789,100,5000,1,1,50,1,254,0,0);
|
||||
INSERT INTO Controls VALUES (4,'Axis API v2','Remote','AxisV2',0,0,0,1,0,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,12,1,1,1,1,1,0,1,0,1,-360,360,1,90,0,NULL,NULL,0,NULL,1,-360,360,1,90,0,NULL,NULL,0,NULL,0,0);
|
||||
insert into Controls values (5,'Panasonic IP','Remote','PanasonicIP',0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,8,1,1,1,0,1,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0);
|
||||
insert into Controls values (6,'Neu-Fusion NCS370','Remote','Ncs370',0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,24,1,0,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0);
|
||||
|
||||
--
|
||||
-- Add some monitor preset values
|
||||
--
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, mpjpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&req_fps=5',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, mpjpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=5',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, mpjpeg, B&W','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&color=0',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, mpjpeg, B&W','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&color=0',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 320x240, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240',NULL,320,240,3,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 320x240, mpjpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&req_fps=5',NULL,320,240,3,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 320x240, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 320x240, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,5.0,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 640x480, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480',NULL,640,480,3,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 640x480, mpjpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=5',NULL,640,480,3,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 640x480, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 640x480, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,5.0,1,4,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT into MonitorPresets VALUES ('','Axis IP, mpeg4, unicast','Remote',NULL,NULL,NULL,'rtsp','rtpUni','<ip-address>',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT into MonitorPresets VALUES ('','Axis IP, mpeg4, multicast','Remote',NULL,NULL,NULL,'rtsp','rtpMulti','<ip-address>',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT into MonitorPresets VALUES ('','Axis IP, mpeg4, RTP/RTSP','Remote',NULL,NULL,NULL,'rtsp','rtpRtsp','<ip-address>',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT into MonitorPresets VALUES ('','Axis IP, mpeg4, RTP/RTSP/HTTP','Remote',NULL,NULL,NULL,'rtsp','rtpRtspHttp','<ip-address>',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 320x240, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/nphMotionJpeg?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 320x240, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 320x240, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 640x480, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/nphMotionJpeg?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 640x480, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 640x480, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 320x240, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/nphMotionJpeg?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,1,5,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 320x240, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,1,5,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 320x240, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,5.0,1,5,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 640x480, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/nphMotionJpeg?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,1,5,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 640x480, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,1,5,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 640x480, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,5.0,1,5,NULL,'<ip-address>:<port>',100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Gadspot IP, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Gadspot IP, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Gadspot IP, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/GetData.cgi',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Gadspot IP, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','VEO Observer, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Blue Net Video Server, jpeg','Remote','http','simple',NULL,NULL,NULL,'<ip-address>',80,'/cgi-bin/image.cgi?control=0&id=admin&passwd=admin',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT into MonitorPresets VALUES ('','ACTi IP, mpeg4, unicast','Remote',NULL,NULL,NULL,'rtsp','rtpUni','<ip-address>',7070,'','/track',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis FFMPEG H.264','Ffmpeg',NULL,NULL,NULL,NULL,NULL,'rtsp://<host/address>/axis-media/media.amp?videocodec=h264',NULL,NULL,NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Vivotek FFMPEG','Ffmpeg',NULL,NULL,NULL,NULL,NULL,'rtsp://<host/address>:554/live.sdp',NULL,NULL,NULL,352,240,NULL,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Axis FFMPEG','Ffmpeg',NULL,NULL,NULL,NULL,NULL,'rtsp://<host/address>/axis-media/media.amp',NULL,NULL,NULL,640,480,NULL,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','ACTi TCM FFMPEG','Ffmpeg',NULL,NULL,NULL,NULL,NULL,'rtsp://admin:123456@<host/address>:7070',NULL,NULL,NULL,320,240,NULL,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), PAL, 320x240','Local','/dev/video<?>','<?>',255,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), PAL, 320x240, max 5 FPS','Local','/dev/video<?>','<?>',255,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), PAL, 640x480','Local','/dev/video<?>','<?>',255,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), PAL, 640x480, max 5 FPS','Local','/dev/video<?>','<?>',255,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), NTSC, 320x240','Local','/dev/video<?>','<?>',45056,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), NTSC, 320x240, max 5 FPS','Local','/dev/video<?>','<?>',45056,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), NTSC, 640x480','Local','/dev/video<?>','<?>',45056,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L2), NTSC, 640x480, max 5 FPS','Local','/dev/video<?>','<?>',45056,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), PAL, 320x240','Local','/dev/video<?>','<?>',0,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), PAL, 320x240, max 5 FPS','Local','/dev/video<?>','<?>',0,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), PAL, 640x480','Local','/dev/video<?>','<?>',0,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), PAL, 640x480, max 5 FPS','Local','/dev/video<?>','<?>',0,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 320x240','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 320x240, max 5 FPS','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 640x480','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,NULL,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 640x480, max 5 FPS','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,5.0,0,NULL,NULL,NULL,100,100);
|
||||
INSERT INTO MonitorPresets VALUES ('','Remote ZoneMinder','Remote',NULL,NULL,NULL,'http','simple','<ip-address>',80,'/cgi-bin/nph-zms?mode=jpeg&monitor=<monitor-id>&scale=100&maxfps=5&buffer=0',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
|
||||
|
||||
--
|
||||
-- Add some zone preset values
|
||||
--
|
||||
INSERT INTO ZonePresets VALUES (1,'Fast, low sensitivity','Active','Percent','AlarmedPixels',60,NULL,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (2,'Fast, medium sensitivity','Active','Percent','AlarmedPixels',40,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (3,'Fast, high sensitivity','Active','Percent','AlarmedPixels',20,NULL,5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (4,'Best, low sensitivity','Active','Percent','Blobs',60,NULL,36,NULL,7,7,24,NULL,20,NULL,1,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (5,'Best, medium sensitivity','Active','Percent','Blobs',40,NULL,16,NULL,5,5,12,NULL,10,NULL,1,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (6,'Best, high sensitivity','Active','Percent','Blobs',20,NULL,8,NULL,3,3,6,NULL,5,NULL,1,NULL,0);
|
||||
|
||||
--
|
||||
-- Apply the initial configuration
|
||||
--
|
||||
-- This section is autogenerated by zmconfgen.pl
|
||||
-- Do not edit this file as any changes will be overwritten
|
||||
--
|
|
@ -0,0 +1,24 @@
|
|||
--
|
||||
-- Table structure for table `PluginsConfig`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `PluginsConfig` (
|
||||
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`Name` varchar(32) NOT NULL DEFAULT '',
|
||||
`Value` text NOT NULL,
|
||||
`Type` tinytext NOT NULL,
|
||||
`Choices` text NOT NULL,
|
||||
`MonitorId` int(10) unsigned NOT NULL,
|
||||
`ZoneId` int(10) unsigned NOT NULL,
|
||||
`pluginName` tinytext NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
KEY `ZoneId` (`ZoneId`),
|
||||
KEY `MonitorId` (`MonitorId`),
|
||||
KEY `Name` (`Name`),
|
||||
FULLTEXT KEY `pluginName` (`pluginName`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
|
||||
|
||||
|
||||
ALTER TABLE `Monitors` ADD `UsedPl` varchar(88) NOT NULL default '' AFTER `Sequence`;
|
||||
ALTER TABLE `Monitors` ADD `DoNativeMotDet` varchar(5) NOT NULL default 'yes' AFTER `UsedPl`;
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
--
|
||||
-- Table structure for table `PluginsConfig`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `PluginsConfig` (
|
||||
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`Name` varchar(32) NOT NULL DEFAULT '',
|
||||
`Value` text NOT NULL,
|
||||
`Type` tinytext NOT NULL,
|
||||
`Choices` text NOT NULL,
|
||||
`MonitorId` int(10) unsigned NOT NULL,
|
||||
`ZoneId` int(10) unsigned NOT NULL,
|
||||
`pluginName` tinytext NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
KEY `ZoneId` (`ZoneId`),
|
||||
KEY `MonitorId` (`MonitorId`),
|
||||
KEY `Name` (`Name`),
|
||||
FULLTEXT KEY `pluginName` (`pluginName`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
|
||||
|
||||
|
||||
ALTER TABLE `Monitors` ADD `UsedPl` varchar(88) NOT NULL default '' AFTER `Sequence`;
|
||||
ALTER TABLE `Monitors` ADD `DoNativeMotDet` varchar(5) NOT NULL default 'yes' AFTER `UsedPl`;
|
||||
ALTER TABLE `Monitors` ADD `Colours` TINYINT UNSIGNED NOT NULL DEFAULT '1' AFTER `Height`;
|
||||
ALTER TABLE `Monitors` ADD `Deinterlacing` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `Orientation`;
|
||||
|
|
@ -0,0 +1 @@
|
|||
Zoneminder with kfir performances patches and plugin patches from UnixMedia
|
|
@ -0,0 +1,6 @@
|
|||
ZoneMinder - A Linux based camera monitoring and analysis tool.
|
||||
|
||||
This project was imagined and created by Philip Coombes in
|
||||
September 2002, shortly after being burglarised of his power tools.
|
||||
|
||||
mailto:philip.coombes@zoneminder.com
|
|
@ -0,0 +1 @@
|
|||
Please see README file.
|
|
@ -0,0 +1,340 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
|
@ -0,0 +1 @@
|
|||
Please see README file.
|
|
@ -0,0 +1,185 @@
|
|||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
Please see http://www.zoneminder.com/wiki/index.php/Documentation
|
||||
for full details.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
|
@ -0,0 +1 @@
|
|||
Please see README file.
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
All documentation for ZoneMinder is now online at
|
||||
|
||||
http://www.zoneminder.com/wiki/index.php/Documentation
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
Please see README file.
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# PLEASE NOTE THAT THIS FILE IS INTENDED FOR GUIDANCE ONLY AND MAY NOT BE APPROPRIATE FOR YOUR DISTRIBUTION
|
||||
#
|
||||
# Sample configuration file for running ZoneMinder as name based virtual host
|
||||
# Some values may need to manually adjusted to suit your setup
|
||||
#
|
||||
<VirtualHost *:80>
|
||||
ServerName zm.local
|
||||
ServerAdmin webmaster@localhost
|
||||
|
||||
DocumentRoot "/usr/share/zoneminder"
|
||||
<Directory "/usr/share/zoneminder">
|
||||
Options FollowSymLinks
|
||||
AllowOverride All
|
||||
</Directory>
|
||||
|
||||
ScriptAlias /cgi-bin/ "/usr/lib/cgi-bin"
|
||||
<Directory "/usr/lib/cgi-bin">
|
||||
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
||||
AllowOverride All
|
||||
</Directory>
|
||||
|
||||
# Use the first option to have Apache logs written to the general log
|
||||
# directory, or the second to have them written to the regular Apache
|
||||
# directory (you may have to change the path to that used on your system)
|
||||
ErrorLog /var/log/zm/apache-error.log
|
||||
ErrorLog /var/log/httpd/zm-error.log
|
||||
|
||||
# Possible values include: debug, info, notice, warn, error, crit,
|
||||
# alert, emerg.
|
||||
LogLevel warn
|
||||
|
||||
# Use the first option to have Apache logs written to the general log
|
||||
# directory, or the second to have them written to the regular Apache
|
||||
# directory (you may have to change the path to that used on your system)
|
||||
CustomLog /var/log/zm/apache-access.log combined
|
||||
CustomLog /var/log/httpd/zm-access.log combined
|
||||
|
||||
</VirtualHost>
|
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# PLEASE NOTE THAT THIS FILE IS INTENDED FOR GUIDANCE ONLY AND MAY NOT BE APPROPRIATE FOR YOUR DISTRIBUTION
|
||||
#
|
||||
# Sample logrotate file for ZoneMinder. Copy this to /etc/logrotate.d/zm or similar
|
||||
# if you wish your system to prevent your log files from growing too large.
|
||||
# You can remove the 'kill' of syslogd if you have another logrotate file that does
|
||||
# this but in that case you will want this file run first, so it will need to be
|
||||
# named something lexically ahead of the other logrotate file, for example 0zm to
|
||||
# ensure it is executed first.
|
||||
#
|
||||
/var/log/zm/*.log {
|
||||
missingok
|
||||
notifempty
|
||||
sharedscripts
|
||||
postrotate
|
||||
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
|
||||
/usr/bin/zmpkg.pl logrot 2> /dev/null > /dev/null || true
|
||||
endscript
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# PLEASE NOTE THAT THIS FILE IS INTENDED FOR GUIDANCE ONLY AND MAY NOT BE APPROPRIATE FOR YOUR DISTRIBUTION
|
||||
#
|
||||
# Sample instruction to put in /etc/syslog.conf (or rsyslog.conf) to redirect
|
||||
# ZoneMinder syslog message to a separate file, apart from warnings and errors.
|
||||
# This is done by assigning ZoneMinder messages to one of the user logging facilities
|
||||
# which are local0-7. In this example local1 is used but if this is used by other
|
||||
# packages then this can be changed to another which is unused (e.g. local3).
|
||||
#
|
||||
|
||||
# Save ZoneMinder messages to zm.log, this uses the local1 facility,
|
||||
local1.* /var/log/zm/zm.log
|
||||
|
||||
# You will need to edit the existing config line that directs to /var/log/messages
|
||||
# or /var/log/syslog and insert the 'local1.!*;local1.warning' directives. This
|
||||
# first excludes all local1 messages, and then re-enables local1 messages of warning
|
||||
# level or above. Remove the second part if you want no ZoneMinder messages to go
|
||||
# to your system logs at all.
|
||||
*.info;local1.!*;local1.warning;mail.none;news.none;authpriv.none;cron.none /var/log/messages
|
|
@ -0,0 +1,40 @@
|
|||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id$
|
||||
|
||||
errstatus=0
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# mkinstalldirs ends here
|
Binary file not shown.
|
@ -0,0 +1,60 @@
|
|||
#/***********************************************************************
|
||||
# This file is part of libzm_anpr_plugin, License Plate REcognition.
|
||||
#
|
||||
# Copyright (C) 2012 Franco (nextime) Lanza <nextime@nexlab.it>
|
||||
#
|
||||
# LiPRec is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LiPRec 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 Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with LiPRec. If not, see <http://www.gnu.org/licenses/>.
|
||||
#************************************************************************/
|
||||
|
||||
|
||||
OBJECTS = anpr_plugin.o
|
||||
SOBJ=anpr_plugin.so
|
||||
|
||||
ZMSRC = zm_detector.cpp zm_config.cpp zm_poly.cpp zm_zone.cpp zm_image.cpp zm_db.cpp
|
||||
ZMSRC+= zm_logger.cpp zm_utils.cpp zm_thread.cpp zm_jpeg.cpp
|
||||
ZMOBJ = $(ZMSRC:.cpp=.o)
|
||||
|
||||
#CPPFLAGS= -fpermissive -O3 -march=native -Wall -lliprec -msse2
|
||||
CPPFLAGS= -fpermissive -O3 -Wall -lliprec -msse2
|
||||
CPPFLAGS+=-D__STDC_CONSTANT_MACROS -DZM_FFMPEG_CVS -DHAVE_LIBCRYPTO
|
||||
CPPFLAGS+=-DJPEG_INCLUDE_DIR=../../../../../libjpeg-turbo-1.2.1/.libs/
|
||||
LDFLAGS=-L. -L../../../../../libjpeg-turbo-1.2.1/.libs/
|
||||
LDFLAGS+=-I../../src/ -I../../ -I./
|
||||
LDFLAGS+=-L/usr/lib -I/usr/include -I../../../../../libjpeg-turbo-1.2.1/
|
||||
LDFLAGS+=$(shell pkg-config --cflags opencv)
|
||||
|
||||
LINKFLAGS=$(shell pkg-config --libs opencv)
|
||||
LINKFLAGS+= -lliprec -lboost_program_options -lmysqlclient -lpthread -ljpeg -lz
|
||||
|
||||
|
||||
all: anpr_plugin.o $(SOBJ)
|
||||
|
||||
|
||||
$(ZMOBJ): %.o : ../../src/%.cpp
|
||||
$(CXX) $^ -fPIC -c -o $@ ${LDFLAGS} $(CPPFLAGS)
|
||||
|
||||
anpr_plugin.o: anpr_plugin.cpp
|
||||
$(CXX) anpr_plugin.cpp -fPIC -c -o anpr_plugin.o ${LDFLAGS} $(CPPFLAGS)
|
||||
|
||||
anpr_plugin.so: $(ZMOBJ) anpr_plugin.o
|
||||
$(CXX) -o anpr_plugin.so -Wall anpr_plugin.o -shared $(ZMOBJ) $(LINKFLAGS)
|
||||
cp anpr_plugin.so libzm_plugin_anpr.zmpl
|
||||
|
||||
install: anpr_plugin.o $(SOBJ)
|
||||
install -m 0644 libzm_plugin_anpr.zmpl /usr/share/zm/libzm_plugin_anpr.zmpl
|
||||
$(shell cat plugin.conf >> /usr/share/zm/plugin.conf)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(ZMOBJ) $(SOBJ) libzm_plugin_anpr.zmpl
|
||||
|
|
@ -0,0 +1,250 @@
|
|||
/***********************************************************************
|
||||
This file is part of libzm_anpr_plugin, License Plate REcognition.
|
||||
|
||||
Copyright (C) 2012 Franco (nextime) Lanza <nextime@nexlab.it>
|
||||
|
||||
LiPRec is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
LiPRec 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with LiPRec. If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
|
||||
#define LIST LIPREC_LIST // This is a workaround to avoid the conflict
|
||||
#include <liprec.h> // of typedef LIST in both mysql and tesseract headers...
|
||||
//#include "opencv2/highgui/highgui.hpp"
|
||||
#undef LIST
|
||||
#include "anpr_plugin.h"
|
||||
|
||||
//! Retrieve the engine version we're going to expect
|
||||
extern "C" int getEngineVersion()
|
||||
{
|
||||
return ZM_ENGINE_VERSION;
|
||||
}
|
||||
|
||||
//! Tells us to register our functionality to an engine kernel
|
||||
extern "C" void registerPlugin(PluginManager &PlM, string sPluginName)
|
||||
{
|
||||
PlM.getImageAnalyser().addDetector(
|
||||
auto_ptr<Detector>(new ANPRPlugin(sPluginName))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
using namespace cv;
|
||||
//using namespace liprec;
|
||||
|
||||
ANPRPlugin::ANPRPlugin()
|
||||
: Detector(),
|
||||
m_nMinObjSize(DEFAULT_DETECTOR_MIN_OBJECT_SIZE),
|
||||
m_nMaxObjSize(DEFAULT_DETECTOR_MAX_OBJECT_SIZE)
|
||||
{
|
||||
m_sDetectionCause = DETECTED_CAUSE;
|
||||
m_sLogPrefix = LOG_PREFIX;
|
||||
|
||||
|
||||
log(LOG_NOTICE, "License Plate Recognition Plugin\'s Object has been created.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ANPRPlugin::ANPRPlugin(string sPluginName)
|
||||
: Detector(sPluginName),
|
||||
m_nMinObjSize(DEFAULT_DETECTOR_MIN_OBJECT_SIZE),
|
||||
m_nMaxObjSize(DEFAULT_DETECTOR_MAX_OBJECT_SIZE)
|
||||
{
|
||||
m_sDetectionCause = DETECTED_CAUSE;
|
||||
m_sLogPrefix = LOG_PREFIX;
|
||||
|
||||
log(LOG_NOTICE, "License Plate Recognition Plugin\'s Object has been created.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*! \fn ANPRPlugin::loadConfig(string sConfigFileName)
|
||||
* \param sConfigFileName is path to configuration to load parameters from
|
||||
*/
|
||||
void ANPRPlugin::loadConfig(string sConfigFileName)
|
||||
{
|
||||
options_description config_file("Configuration file options.");
|
||||
variables_map vm;
|
||||
config_file.add_options()
|
||||
((m_sConfigSectionName + string(".min-obj-size")).c_str(),
|
||||
value<int>()->default_value(DEFAULT_DETECTOR_MIN_OBJECT_SIZE))
|
||||
((m_sConfigSectionName + string(".max-obj-size")).c_str(),
|
||||
value<int>()->default_value(DEFAULT_DETECTOR_MAX_OBJECT_SIZE))
|
||||
((m_sConfigSectionName + string(".alarm-score")).c_str(),
|
||||
value<int>()->default_value(DEFAULT_ALARM_SCORE))
|
||||
((m_sConfigSectionName + string(".det-cause")).c_str(),
|
||||
value<string>()->default_value(DETECTED_CAUSE))
|
||||
((m_sConfigSectionName + string(".log-prefix")).c_str(),
|
||||
value<string>()->default_value(LOG_PREFIX))
|
||||
;
|
||||
ifstream ifs(sConfigFileName.c_str());
|
||||
store(parse_config_file(ifs, config_file, true), vm);
|
||||
notify(vm);
|
||||
|
||||
m_nMinObjSize = vm[(m_sConfigSectionName + string(".min-obj-size")).c_str()].as<int>();
|
||||
m_nMaxObjSize = vm[(m_sConfigSectionName + string(".max-obj-size")).c_str()].as<int>();
|
||||
m_nAlarmScore = vm[(m_sConfigSectionName + string(".alarm-score")).c_str()].as<int>();
|
||||
|
||||
m_sDetectionCause = vm[(m_sConfigSectionName + string(".det-cause")).c_str()].as<string>();
|
||||
m_sLogPrefix = vm[(m_sConfigSectionName + string(".log-prefix")).c_str()].as<string>();
|
||||
zmLoadConfig();
|
||||
log(LOG_NOTICE, "License Plate Recognition Plugin\'s Object is configured.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
ANPRPlugin::~ANPRPlugin()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/*! \fn ANPRPlugin::ANPRPlugin(const ANPRPlugin& source)
|
||||
* \param source is the object for copying
|
||||
*/
|
||||
ANPRPlugin::ANPRPlugin(const ANPRPlugin& source)
|
||||
: Detector(source),
|
||||
m_nMinObjSize(source.m_nMinObjSize),
|
||||
m_nMaxObjSize(source.m_nMaxObjSize)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*! \fn ANPRPlugin:: operator=(const ANPRPlugin& source)
|
||||
* \param source is the object for copying
|
||||
*/
|
||||
ANPRPlugin & ANPRPlugin:: operator=(const ANPRPlugin& source)
|
||||
{
|
||||
Detector::operator=(source);
|
||||
m_nMinObjSize = source.m_nMinObjSize;
|
||||
m_nMaxObjSize = source.m_nMaxObjSize;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*! \fn ANPRPlugin::checkZone(Zone *zone, const Image *zmImage)
|
||||
* \param zone is a zone where faces will be detected
|
||||
* \param zmImage is an image to perform face detection (in the form of ZM' Image)
|
||||
* \return true if there were objects detected in given image and
|
||||
* false otherwise
|
||||
*/
|
||||
bool ANPRPlugin::checkZone(Zone *zone, const Image *zmImage)
|
||||
{
|
||||
|
||||
double score;
|
||||
Polygon zone_polygon = Polygon(zone->GetPolygon()); // Polygon of interest of the processed zone.
|
||||
|
||||
Image *pMaskImage = new Image(zmImage->Width(), zmImage->Height(), ZM_COLOUR_GRAY8, ZM_SUBPIX_ORDER_NONE );
|
||||
pMaskImage->Fill(BLACK);
|
||||
// An temporary image in the form of ZM for making from it CvMat.
|
||||
// If don't use temp image, after rgb->bgr it will change.
|
||||
Image *tempZmImage = new Image(*zmImage);
|
||||
int imgtype=CV_8UC1;
|
||||
if (tempZmImage->Colours() == ZM_COLOUR_RGB24)
|
||||
imgtype=CV_8UC3;
|
||||
Mat cvInputImage = Mat(
|
||||
tempZmImage->Height(),
|
||||
tempZmImage->Width(),
|
||||
imgtype, (unsigned char*)tempZmImage->Buffer()).clone();
|
||||
//Mat cvInputImage = cvtmpInputImage.reshape(0, tempZmImage->Colours());
|
||||
//Mat cvInputImage = cvtmpInputImage.reshape(0, tempZmImage->Height());
|
||||
if (tempZmImage->Colours() == ZM_COLOUR_RGB24)
|
||||
{
|
||||
cvtColor(cvInputImage, cvInputImage, CV_RGB2BGR);
|
||||
}
|
||||
//imwrite("/tmp/sarca.jpg", cvInputImage);
|
||||
//Process image
|
||||
liprec::LiPRec plateDetector;
|
||||
liprec::PlatesImage plates;
|
||||
plateDetector.detectPlates(cvInputImage, &plates);
|
||||
score = 0;
|
||||
if(plates.plates.size() > 0) {
|
||||
log(LOG_INFO, "PLATES WERE DETECTED");
|
||||
for(unsigned int i=0;i<plates.plates.size();i++) {
|
||||
|
||||
// Check if object's rectangle is inside zone's polygon of interest.
|
||||
int x1 = plates.plates[i].rect.x, x2 = int(plates.plates[i].rect.x+plates.plates[i].rect.width);
|
||||
int y1 = plates.plates[i].rect.y, y2 = int(plates.plates[i].rect.y+plates.plates[i].rect.height);
|
||||
Coord rectVertCoords[4] = {Coord(x1, y1), Coord(x1, y2), Coord(x2, y1), Coord(x2, y2)};
|
||||
int nNumVertInside = 0;
|
||||
for (int p = 0; p < 4; p++)
|
||||
{
|
||||
nNumVertInside += zone_polygon.isInside(rectVertCoords[p]);
|
||||
}
|
||||
if (nNumVertInside < 3)
|
||||
// if at least three rectangle coordinates are inside polygon,
|
||||
// consider rectangle as belonging to the zone
|
||||
// otherwise process next object
|
||||
continue;
|
||||
log(LOG_INFO, plates.plates[i].platetxt);
|
||||
// Fill a box with object in the mask
|
||||
Box *plateBox = new Box(x1, y1, x2, y2);
|
||||
pMaskImage->Fill(WHITE, plateBox);
|
||||
score=m_nAlarmScore;
|
||||
delete plateBox;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (score == 0)
|
||||
{
|
||||
//log(LOG_DEBUG, "No objects found. Exit.");
|
||||
delete pMaskImage;
|
||||
delete tempZmImage;
|
||||
|
||||
// XXX We need to delete Mats?
|
||||
|
||||
return( false );
|
||||
}
|
||||
/*
|
||||
else
|
||||
{
|
||||
zone->SetOverloadCount(zone->GetOverloadFrames());
|
||||
delete pMaskImage;
|
||||
delete tempZmImage;
|
||||
|
||||
return( false );
|
||||
}*/
|
||||
|
||||
|
||||
zone->SetScore((int)score);
|
||||
|
||||
//Get mask by highlighting contours of objects and overlaying them with previous contours.
|
||||
Rgb alarm_colour = RGB_GREEN;
|
||||
Image *hlZmImage = pMaskImage->HighlightEdges(alarm_colour, ZM_COLOUR_RGB24,
|
||||
ZM_SUBPIX_ORDER_RGB, &zone_polygon.Extent());
|
||||
|
||||
if (zone->Alarmed())
|
||||
{
|
||||
// if there were previous detection and they have already set up alarm image
|
||||
// then overlay it with current mask
|
||||
Image* pPrevZoneMask = new Image(*(zone->AlarmImage()));
|
||||
pPrevZoneMask->Overlay(*hlZmImage);
|
||||
zone->SetAlarmImage(pPrevZoneMask);
|
||||
delete pPrevZoneMask;
|
||||
}
|
||||
else
|
||||
zone->SetAlarmImage(hlZmImage);
|
||||
|
||||
delete pMaskImage;
|
||||
delete hlZmImage;
|
||||
delete tempZmImage;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
/***********************************************************************
|
||||
This file is part of libzm_anpr_plugin, License Plate REcognition.
|
||||
|
||||
Copyright (C) 2012 Franco (nextime) Lanza <nextime@nexlab.it>
|
||||
|
||||
LiPRec is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
LiPRec 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with LiPRec. If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
#ifndef ANPR_PLUGIN_H
|
||||
#define ANPR_PLUGIN_H
|
||||
|
||||
#include <cv.h>
|
||||
//#include <liprec.h>
|
||||
#include <stdexcept>
|
||||
#include <fstream>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
#include <boost/program_options.hpp>
|
||||
#include <boost/program_options/option.hpp>
|
||||
#include <boost/program_options/options_description.hpp>
|
||||
#include <boost/program_options/errors.hpp>
|
||||
|
||||
#include "zm_plugin_manager.h"
|
||||
#include "zm_detector.h"
|
||||
#include "zm_rgb.h"
|
||||
|
||||
#define DETECTED_CAUSE "Plate Detected"
|
||||
#define LOG_PREFIX "ZM PLATEDEC PLUGIN"
|
||||
|
||||
|
||||
#define DEFAULT_DETECTOR_MIN_OBJECT_SIZE 600
|
||||
#define DEFAULT_DETECTOR_MAX_OBJECT_SIZE 6000
|
||||
#define DEFAULT_ALARM_SCORE 99
|
||||
|
||||
using namespace std;
|
||||
using namespace boost::program_options;
|
||||
|
||||
|
||||
//! Face detector plugin class.
|
||||
/*! The class derived from Detector.
|
||||
* This class provides face detection based on OpenCV's implementation of Haar cascade classifier detector.
|
||||
*/
|
||||
class ANPRPlugin : public Detector {
|
||||
public:
|
||||
|
||||
//! Default Constructor.
|
||||
ANPRPlugin();
|
||||
|
||||
//! Constructor.
|
||||
ANPRPlugin(string sConfigSectionName);
|
||||
|
||||
//! Destructor.
|
||||
virtual ~ANPRPlugin();
|
||||
|
||||
//! Copy constructor.
|
||||
ANPRPlugin(const ANPRPlugin& source);
|
||||
|
||||
//! Overloaded operator=.
|
||||
ANPRPlugin& operator=(const ANPRPlugin& source);
|
||||
|
||||
void loadConfig(string sConfigFileName);
|
||||
|
||||
protected:
|
||||
|
||||
bool checkZone(Zone *zone, const Image *zmImage);
|
||||
|
||||
int m_nMinObjSize;
|
||||
int m_nMaxObjSize;
|
||||
|
||||
int m_nAlarmScore;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // ANPR_PLUGIN_H
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
[libzm_plugin_anpr]
|
||||
|
||||
min-obj-size = 600
|
||||
max-obj-size = 6000
|
||||
alarm-score = 99
|
||||
det-cause = Plate Detected
|
||||
log-prefix = PLATEDET PLUGIN
|
||||
|
Binary file not shown.
|
@ -0,0 +1,78 @@
|
|||
import os, glob, sys
|
||||
env = Environment()
|
||||
|
||||
# Short messages while compiling and linking.
|
||||
if ARGUMENTS.get('VERBOSE') != "1":
|
||||
env.Append(CXXCOMSTR = "Compiling static object $TARGET")
|
||||
env.Append(LINKCOMSTR = "Linking $TARGET")
|
||||
env.Append(SHCXXCOMSTR = "Compiling shared object $TARGET")
|
||||
env.Append(SHLINKCOMSTR = "Linking shared $TARGET" )
|
||||
|
||||
|
||||
# CXXFLAGS
|
||||
if ARGUMENTS.get('debug', 0):
|
||||
env.Append(CXXFLAGS = ['-g'])
|
||||
build_dir = 'debug/'
|
||||
else:
|
||||
build_dir = 'release/'
|
||||
|
||||
env.BuildDir(build_dir, 'src/', duplicate=0)
|
||||
|
||||
|
||||
|
||||
env.Append(CXXFLAGS=['-msse2', '-march=native','-Wno-write-strings','-D__STDC_CONSTANT_MACROS'])
|
||||
env.Append(CXXFLAGS=['-DZM_FFMPEG_CVS','-DHAVE_LIBCRYPTO','-DJPEG_INCLUDE_DIR=../../../../../libjpeg-turbo-1.2.1/'])
|
||||
env.Append(LINKFLAGS = ['-Wl,--no-undefined'])
|
||||
env.Append(LDFLAGS = [" -L../../../../../libjpeg-turbo-1.2.1/.libs "])
|
||||
|
||||
|
||||
# Headers and libs
|
||||
env['CPPPATH'] = [ build_dir,
|
||||
'src',
|
||||
'../../src',
|
||||
'../../',
|
||||
'../../../../../libjpeg-turbo-1.2.1/',
|
||||
'/usr/include/opencv', '/usr/local/include/opencv',
|
||||
'/usr/local/include/boost',
|
||||
'.'
|
||||
]
|
||||
|
||||
env['LIBPATH'] = [
|
||||
'../../../../../libjpeg-turbo-1.2.1/.libs/',
|
||||
'/usr/local/lib',
|
||||
'/usr/lib',
|
||||
'./']
|
||||
|
||||
env['LIBS'] = [
|
||||
'opencv_core',
|
||||
'opencv_highgui',
|
||||
'opencv_objdetect',
|
||||
'opencv_imgproc',
|
||||
'boost_program_options',
|
||||
'mysqlclient',
|
||||
'pthread',
|
||||
'jpeg',
|
||||
'z'
|
||||
]
|
||||
|
||||
# Common sources.
|
||||
# common_src = env.Glob( build_dir + '*.cpp')
|
||||
|
||||
zoneminder_src = env.Glob('../../src/' + 'zm_detector.cpp')
|
||||
zoneminder_src += env.Glob('../../src/' + 'zm_config.cpp')
|
||||
zoneminder_src += env.Glob('../../src/' + 'zm_poly.cpp')
|
||||
zoneminder_src += env.Glob('../../src/' + 'zm_zone.cpp')
|
||||
zoneminder_src += env.Glob('../../src/' + 'zm_image.cpp')
|
||||
zoneminder_src += env.Glob('../../src/' + 'zm_db.cpp')
|
||||
zoneminder_src += env.Glob('../../src/' + 'zm_jpeg.cpp')
|
||||
zoneminder_src += env.Glob('../../src/' + 'zm_logger.cpp')
|
||||
zoneminder_src += env.Glob('../../src/' + 'zm_utils.cpp')
|
||||
zoneminder_src += env.Glob('../../src/' + 'zm_thread.cpp')
|
||||
|
||||
|
||||
# Face detector sources.
|
||||
face_haar_src = env.Glob( build_dir + 'face_detector_plugin.cpp')
|
||||
|
||||
# Shared lib
|
||||
env.SharedLibrary(target = 'zm_plugin_face_haar', source = [face_haar_src, zoneminder_src])
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,14 @@
|
|||
[libzm_plugin_face_haar]
|
||||
|
||||
cascade = /usr/share/zm/haarcascades/haarcascade_frontalface_alt2.xml
|
||||
scale = 1.15
|
||||
flag = 1
|
||||
min-nbrs = 5
|
||||
min-obj-width = 4.5
|
||||
min-obj-height = 5.5
|
||||
min-alarm-score = 0.4
|
||||
max-alarm-score = 99
|
||||
image-scale-factor = 0.5
|
||||
det-cause = Face Detected
|
||||
log-prefix = FACEDET PLUGIN
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,400 @@
|
|||
#include "face_detector_plugin.h"
|
||||
|
||||
|
||||
|
||||
//! Retrieve the engine version we're going to expect
|
||||
extern "C" int getEngineVersion()
|
||||
{
|
||||
return ZM_ENGINE_VERSION;
|
||||
}
|
||||
|
||||
//! Tells us to register our functionality to an engine kernel
|
||||
extern "C" void registerPlugin(PluginManager &PlM, string sPluginName)
|
||||
{
|
||||
PlM.getImageAnalyser().addDetector(
|
||||
auto_ptr<Detector>(new FaceDetectorPlugin(sPluginName))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
FaceDetectorPlugin::FaceDetectorPlugin()
|
||||
: Detector(),
|
||||
m_fScaleFactor(DEFAULT_HAAR_SCALE_FACTOR),
|
||||
m_nMinNeighbors(DEFAULT_HAAR_MIN_NEIGHBORS),
|
||||
m_nFlag(DEFAULT_HAAR_FLAG),
|
||||
m_fMinObjWidth(DEFAULT_DETECTOR_MIN_OBJECT_SIZE_WIDTH),
|
||||
m_fMinObjHeight(DEFAULT_DETECTOR_MIN_OBJECT_SIZE_HEIGHT),
|
||||
m_cascade(NULL),
|
||||
m_sHaarCascadePath(DEFAULT_HAAR_FACE_CASCADE_PATH)
|
||||
{
|
||||
m_sDetectionCause = DETECTED_CAUSE;
|
||||
m_sLogPrefix = LOG_PREFIX;
|
||||
|
||||
//openlog(m_sLogPrefix.c_str(), LOG_PID|LOG_CONS, LOG_USER);
|
||||
m_pStorage = cvCreateMemStorage(0);
|
||||
//_loadHaarCascade(m_sHaarCascadePath);
|
||||
log(LOG_NOTICE, "Face Detector Plugin\'s Object has been created.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
FaceDetectorPlugin::FaceDetectorPlugin(string sPluginName)
|
||||
: Detector(sPluginName),
|
||||
m_fScaleFactor(DEFAULT_HAAR_SCALE_FACTOR),
|
||||
m_nMinNeighbors(DEFAULT_HAAR_MIN_NEIGHBORS),
|
||||
m_nFlag(DEFAULT_HAAR_FLAG),
|
||||
m_fMinObjWidth(DEFAULT_DETECTOR_MIN_OBJECT_SIZE_WIDTH),
|
||||
m_fMinObjHeight(DEFAULT_DETECTOR_MIN_OBJECT_SIZE_HEIGHT),
|
||||
m_cascade(NULL),
|
||||
m_sHaarCascadePath(DEFAULT_HAAR_FACE_CASCADE_PATH)
|
||||
{
|
||||
m_sDetectionCause = DETECTED_CAUSE;
|
||||
m_sLogPrefix = LOG_PREFIX;
|
||||
|
||||
//openlog(m_sLogPrefix.c_str(), LOG_PID|LOG_CONS, LOG_USER);
|
||||
m_pStorage = cvCreateMemStorage(0);
|
||||
//_loadHaarCascade(m_sHaarCascadePath);
|
||||
log(LOG_NOTICE, "Face Detector Plugin\'s Object has been created.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*! \fn FaceDetectorPlugin::loadConfig(string sConfigFileName)
|
||||
* \param sConfigFileName is path to configuration to load parameters from
|
||||
*/
|
||||
void FaceDetectorPlugin::loadConfig(string sConfigFileName)
|
||||
{
|
||||
options_description config_file("Configuration file options.");
|
||||
variables_map vm;
|
||||
config_file.add_options()
|
||||
// Haar face detector options
|
||||
((m_sConfigSectionName + string(".cascade")).c_str(),
|
||||
value<string>()->default_value(DEFAULT_HAAR_FACE_CASCADE_PATH))
|
||||
((m_sConfigSectionName + string(".scale")).c_str(),
|
||||
value<double>()->default_value(DEFAULT_HAAR_SCALE_FACTOR))
|
||||
((m_sConfigSectionName + string(".flag")).c_str(),
|
||||
value<int>()->default_value(DEFAULT_HAAR_FLAG))
|
||||
((m_sConfigSectionName + string(".min-nbrs")).c_str(),
|
||||
value<int>()->default_value(DEFAULT_HAAR_MIN_NEIGHBORS))
|
||||
((m_sConfigSectionName + string(".min-obj-width")).c_str(),
|
||||
value<double>()->default_value(DEFAULT_DETECTOR_MIN_OBJECT_SIZE_WIDTH))
|
||||
((m_sConfigSectionName + string(".min-obj-height")).c_str(),
|
||||
value<double>()->default_value(DEFAULT_DETECTOR_MIN_OBJECT_SIZE_HEIGHT))
|
||||
((m_sConfigSectionName + string(".min-alarm-score")).c_str(),
|
||||
value<double>()->default_value(DEFAULT_MIN_ALARM_SCORE))
|
||||
((m_sConfigSectionName + string(".max-alarm-score")).c_str(),
|
||||
value<double>()->default_value(DEFAULT_MAX_ALARM_SCORE))
|
||||
((m_sConfigSectionName + string(".image-scale-factor")).c_str(),
|
||||
value<double>()->default_value(DEFAULT_IMAGE_SCALE_FACTOR))
|
||||
((m_sConfigSectionName + string(".det-cause")).c_str(),
|
||||
value<string>()->default_value(DETECTED_CAUSE))
|
||||
((m_sConfigSectionName + string(".log-prefix")).c_str(),
|
||||
value<string>()->default_value(LOG_PREFIX))
|
||||
;
|
||||
ifstream ifs(sConfigFileName.c_str());
|
||||
store(parse_config_file(ifs, config_file, true), vm);
|
||||
notify(vm);
|
||||
|
||||
m_fScaleFactor = vm[(m_sConfigSectionName + string(".scale")).c_str()].as<double>();
|
||||
m_nMinNeighbors = vm[(m_sConfigSectionName + string(".min-nbrs")).c_str()].as<int>();
|
||||
m_nFlag = vm[(m_sConfigSectionName + string(".flag")).c_str()].as<int>();
|
||||
m_fMinObjWidth = vm[(m_sConfigSectionName + string(".min-obj-width")).c_str()].as<double>();
|
||||
m_fMinObjHeight = vm[(m_sConfigSectionName + string(".min-obj-height")).c_str()].as<double>();
|
||||
m_fMinAlarmScore = vm[(m_sConfigSectionName + string(".min-alarm-score")).c_str()].as<double>();
|
||||
m_fMaxAlarmScore = vm[(m_sConfigSectionName + string(".max-alarm-score")).c_str()].as<double>();
|
||||
m_fImageScaleFactor = vm[(m_sConfigSectionName + string(".image-scale-factor")).c_str()].as<double>();
|
||||
|
||||
m_sDetectionCause = vm[(m_sConfigSectionName + string(".det-cause")).c_str()].as<string>();
|
||||
m_sLogPrefix = vm[(m_sConfigSectionName + string(".log-prefix")).c_str()].as<string>();
|
||||
|
||||
// if (m_sHaarCascadePath != vm[(m_sConfigSectionName + string(".cascade")).c_str()].as<string>())
|
||||
// {
|
||||
m_sHaarCascadePath = vm[(m_sConfigSectionName + string(".cascade")).c_str()].as<string>();
|
||||
_loadHaarCascade(m_sHaarCascadePath);
|
||||
// }
|
||||
zmLoadConfig();
|
||||
log(LOG_NOTICE, "Face Detector Plugin\'s Object is configured.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
FaceDetectorPlugin::~FaceDetectorPlugin()
|
||||
{
|
||||
cvReleaseMemStorage(&m_pStorage);
|
||||
cvReleaseHaarClassifierCascade(&m_cascade);
|
||||
}
|
||||
|
||||
|
||||
/*! \fn FaceDetectorPlugin::FaceDetectorPlugin(const FaceDetectorPlugin& source)
|
||||
* \param source is the object for copying
|
||||
*/
|
||||
FaceDetectorPlugin::FaceDetectorPlugin(const FaceDetectorPlugin& source)
|
||||
: Detector(source),
|
||||
m_fScaleFactor(source.m_fScaleFactor),
|
||||
m_nMinNeighbors(source.m_nMinNeighbors),
|
||||
m_nFlag(source.m_nFlag),
|
||||
m_fMinObjWidth(source.m_fMinObjWidth),
|
||||
m_fMinObjHeight(source.m_fMinObjHeight),
|
||||
m_cascade(NULL),
|
||||
m_sHaarCascadePath(source.m_sHaarCascadePath)
|
||||
{
|
||||
m_pStorage = cvCreateMemStorage(0);
|
||||
if (m_sHaarCascadePath != string())
|
||||
_loadHaarCascade(m_sHaarCascadePath);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*! \fn FaceDetectorPlugin:: operator=(const FaceDetectorPlugin& source)
|
||||
* \param source is the object for copying
|
||||
*/
|
||||
FaceDetectorPlugin & FaceDetectorPlugin:: operator=(const FaceDetectorPlugin& source)
|
||||
{
|
||||
Detector::operator=(source);
|
||||
m_fScaleFactor = source.m_fScaleFactor;
|
||||
m_nMinNeighbors = source.m_nMinNeighbors;
|
||||
m_nFlag = source.m_nFlag;
|
||||
m_fMinObjWidth = source.m_fMinObjWidth;
|
||||
m_fMinObjHeight = source.m_fMinObjHeight;
|
||||
m_cascade = NULL;
|
||||
m_sHaarCascadePath = source.m_sHaarCascadePath;
|
||||
|
||||
m_pStorage = cvCreateMemStorage(0);
|
||||
|
||||
if (m_sHaarCascadePath != string())
|
||||
_loadHaarCascade(m_sHaarCascadePath);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*! \fn FaceDetectorPlugin::_loadHaarCascade(string sConfigPath)
|
||||
* \param sConfigPath is path to xml Haar classifier cascade.
|
||||
*/
|
||||
void FaceDetectorPlugin::_loadHaarCascade(string sConfigPath)
|
||||
{
|
||||
m_sHaarCascadePath = sConfigPath;
|
||||
if (m_cascade != NULL)
|
||||
cvReleaseHaarClassifierCascade(&m_cascade);
|
||||
|
||||
m_cascade = (CvHaarClassifierCascade*)cvLoad(sConfigPath.c_str());
|
||||
if (m_cascade == NULL)
|
||||
throw invalid_argument((string("Couldn't load xml data: ") + sConfigPath + ".").c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*! \fn FaceDetectorPlugin::_opencvHaarDetect(const CvMat* pMatImage)
|
||||
* \param pMatImage is an image to perform face detection (in the form of OpenCv' CvMat)
|
||||
*/
|
||||
vector<CvRect> FaceDetectorPlugin::_opencvHaarDetect(const CvMat* pMatImage)
|
||||
{
|
||||
CvSize minObjSize = cvSize((int) pMatImage->width * m_fMinObjWidth / 100.0, (int) pMatImage->height * m_fMinObjHeight / 100.0);
|
||||
//char szMessage[50];
|
||||
//sprintf(szMessage, "IMAGE SIZE IS %d x %d \nMIN OBJ SIZE IS %d x %d", pMatImage->width, pMatImage->height, minObjSize.width, minObjSize.height);
|
||||
//log(LOG_WARNING, szMessage);
|
||||
|
||||
CvSeq* haarObjects = cvHaarDetectObjects(pMatImage,
|
||||
m_cascade,
|
||||
m_pStorage,
|
||||
m_fScaleFactor,
|
||||
m_nMinNeighbors,
|
||||
m_nFlag,
|
||||
minObjSize);
|
||||
vector<CvRect> objects;
|
||||
for (int i = 0; i < haarObjects->total; i++)
|
||||
{
|
||||
CvRect* pHaarRect = (CvRect*)cvGetSeqElem(haarObjects, i);
|
||||
objects.push_back(*pHaarRect);
|
||||
}
|
||||
return objects;
|
||||
}
|
||||
|
||||
|
||||
/*! \fn FaceDetectorPlugin::checkZone(Zone *zone, const Image *zmImage)
|
||||
* \param zone is a zone where faces will be detected
|
||||
* \param zmImage is an image to perform face detection (in the form of ZM' Image)
|
||||
* \return true if there were objects detected in given image and
|
||||
* false otherwise
|
||||
*/
|
||||
bool FaceDetectorPlugin::checkZone(Zone *zone, const Image *zmImage)
|
||||
{
|
||||
//log(LOG_DEBUG, "Entering checkZone.");
|
||||
double score;
|
||||
Polygon zone_polygon = Polygon(zone->GetPolygon()); // Polygon of interest of the processed zone.
|
||||
//char szMessage[50];
|
||||
//sprintf(szMessage, "Polygon of the zone has %d vertices.", zone_polygon.getNumCoords());
|
||||
//log(LOG_WARNING, szMessage);
|
||||
|
||||
//zone->ResetStats();
|
||||
|
||||
/*
|
||||
log(LOG_WARNING, "precheck");
|
||||
if ( !zone->CheckOverloadCount() )
|
||||
{
|
||||
log(LOG_WARNING, "CheckOverloadCount() return false, we'll return false.");
|
||||
return(false);
|
||||
}
|
||||
*/
|
||||
//zmLoadConfig();
|
||||
// An image for highlighting detected objects.
|
||||
Image *pMaskImage = new Image(zmImage->Width(), zmImage->Height(), ZM_COLOUR_GRAY8, ZM_SUBPIX_ORDER_NONE );
|
||||
pMaskImage->Fill(BLACK);
|
||||
|
||||
//log(LOG_WARNING, "FILLBLACK.");
|
||||
// An temporary image in the form of ZM for making from it CvMat.
|
||||
// If don't use temp image, after rgb->bgr it will change.
|
||||
Image *tempZmImage = new Image(*zmImage);
|
||||
CvMat* cvInputImage = NULL;
|
||||
CvMat* pScaledImage = NULL;
|
||||
|
||||
bool bDoResizing = (m_fImageScaleFactor != 1.0); // resize image or not
|
||||
|
||||
if (tempZmImage->Colours() == ZM_COLOUR_GRAY8)
|
||||
{
|
||||
// if image is not colored, create an one-channel CvMat.
|
||||
cvInputImage = cvCreateMat(tempZmImage->Height(), tempZmImage->Width(), CV_8UC1);
|
||||
unsigned char *buffer = (unsigned char*)tempZmImage->Buffer();
|
||||
cvSetData(cvInputImage, buffer, tempZmImage->Width());
|
||||
}
|
||||
// NEXTIME XXX TODO: manage also 32 bit images!
|
||||
else
|
||||
{
|
||||
// otherwise create a three-channel CvMat and then convert colors from RGB to BGR.
|
||||
cvInputImage = cvCreateMat(tempZmImage->Height(), tempZmImage->Width(), CV_8UC3);
|
||||
unsigned char *buffer = (unsigned char*)tempZmImage->Buffer();
|
||||
cvSetData(cvInputImage, buffer, tempZmImage->Width() * 3);
|
||||
cvCvtColor(cvInputImage, cvInputImage, CV_RGB2BGR);
|
||||
}
|
||||
|
||||
if (bDoResizing)
|
||||
{
|
||||
int nNewWidth = int (m_fImageScaleFactor * zmImage->Width());
|
||||
int nNewHeight = int (m_fImageScaleFactor * tempZmImage->Height());
|
||||
int nImageElemType = cvGetElemType(cvInputImage);
|
||||
pScaledImage = cvCreateMat(nNewHeight, nNewWidth, nImageElemType);
|
||||
cvResize(cvInputImage, pScaledImage, CV_INTER_LINEAR);
|
||||
}
|
||||
|
||||
|
||||
//Process image
|
||||
|
||||
vector<CvRect> foundObjects;
|
||||
if (bDoResizing)
|
||||
foundObjects = _opencvHaarDetect(pScaledImage);
|
||||
else
|
||||
foundObjects = _opencvHaarDetect(cvInputImage);
|
||||
|
||||
if (foundObjects.size() > 0)
|
||||
log(LOG_INFO, "OBJECTS WERE DETECTED");
|
||||
|
||||
score = 0;
|
||||
for (vector<CvRect>::iterator it = foundObjects.begin(); it < foundObjects.end(); it++)
|
||||
{
|
||||
// Process found objects.
|
||||
|
||||
// Scale object's coordinates back if image has been scaled.
|
||||
int x1 = int(it->x/m_fImageScaleFactor), x2 = int((it->x + it->width)/m_fImageScaleFactor), y1 = int(it->y/m_fImageScaleFactor), y2 = int((it->y + it->height)/m_fImageScaleFactor);
|
||||
|
||||
// Check if object's rectangle is inside zone's polygon of interest.
|
||||
Coord rectVertCoords[4] = {Coord(x1, y1), Coord(x1, y2), Coord(x2, y1), Coord(x2, y2)};
|
||||
int nNumVertInside = 0;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
nNumVertInside += zone_polygon.isInside(rectVertCoords[i]);
|
||||
}
|
||||
if (nNumVertInside < 3)
|
||||
// if at least three rectangle coordinates are inside polygon, consider rectangle as belonging to the zone
|
||||
// otherwise process next object
|
||||
continue;
|
||||
|
||||
// Fill a box with object in the mask
|
||||
Box *faceBox = new Box(x1, y1, x2, y2);
|
||||
pMaskImage->Fill(WHITE, faceBox);
|
||||
// Calculate score as portion of object area in the image
|
||||
score += (100.0*(it->width)*(it->height)/m_fImageScaleFactor/m_fImageScaleFactor)/zone_polygon.Area();
|
||||
delete faceBox;
|
||||
}
|
||||
|
||||
|
||||
if (score == 0)
|
||||
{
|
||||
//log(LOG_DEBUG, "No objects found. Exit.");
|
||||
delete pMaskImage;
|
||||
delete tempZmImage;
|
||||
|
||||
if (cvInputImage)
|
||||
cvReleaseMat(&cvInputImage);
|
||||
if (pScaledImage)
|
||||
cvReleaseMat(&pScaledImage);
|
||||
|
||||
return( false );
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( m_fMinAlarmScore && ( score < m_fMinAlarmScore) )
|
||||
{
|
||||
delete pMaskImage;
|
||||
delete tempZmImage;
|
||||
|
||||
if (cvInputImage)
|
||||
cvReleaseMat(&cvInputImage);
|
||||
if (pScaledImage)
|
||||
cvReleaseMat(&pScaledImage);
|
||||
|
||||
return( false );
|
||||
}
|
||||
if ( m_fMaxAlarmScore && (score > m_fMaxAlarmScore) )
|
||||
{
|
||||
zone->SetOverloadCount(zone->GetOverloadFrames());
|
||||
delete pMaskImage;
|
||||
delete tempZmImage;
|
||||
|
||||
if (cvInputImage)
|
||||
cvReleaseMat(&cvInputImage);
|
||||
if (pScaledImage)
|
||||
cvReleaseMat(&pScaledImage);
|
||||
|
||||
return( false );
|
||||
}
|
||||
|
||||
|
||||
zone->SetScore(max(1, (int)score));
|
||||
|
||||
//Get mask by highlighting contours of objects and overlaying them with previous contours.
|
||||
Rgb alarm_colour = RGB_GREEN;
|
||||
Image *hlZmImage = pMaskImage->HighlightEdges(alarm_colour, ZM_COLOUR_RGB24,
|
||||
ZM_SUBPIX_ORDER_RGB, &zone_polygon.Extent());
|
||||
|
||||
if (zone->Alarmed())
|
||||
{
|
||||
// if there were previous detection and they have already set up alarm image
|
||||
// then overlay it with current mask
|
||||
Image* pPrevZoneMask = new Image(*(zone->AlarmImage()));
|
||||
pPrevZoneMask->Overlay(*hlZmImage);
|
||||
zone->SetAlarmImage(pPrevZoneMask);
|
||||
delete pPrevZoneMask;
|
||||
}
|
||||
else
|
||||
zone->SetAlarmImage(hlZmImage);
|
||||
|
||||
delete pMaskImage;
|
||||
delete hlZmImage;
|
||||
delete tempZmImage;
|
||||
|
||||
if (cvInputImage)
|
||||
cvReleaseMat(&cvInputImage);
|
||||
if (pScaledImage)
|
||||
cvReleaseMat(&pScaledImage);
|
||||
|
||||
//log(LOG_DEBUG, "Leaving checkZone.");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
#ifndef HAAR_DETECTOR_PLUGIN_H
|
||||
#define HAAR_DETECTOR_PLUGIN_H
|
||||
|
||||
|
||||
#include <cv.h>
|
||||
#include <stdexcept>
|
||||
#include <fstream>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
#include <boost/program_options.hpp>
|
||||
#include <boost/program_options/option.hpp>
|
||||
#include <boost/program_options/options_description.hpp>
|
||||
#include <boost/program_options/errors.hpp>
|
||||
|
||||
#include "zm_plugin_manager.h"
|
||||
#include "zm_detector.h"
|
||||
#include "zm_rgb.h"
|
||||
|
||||
|
||||
|
||||
#define DETECTED_CAUSE "Face Detected"
|
||||
#define LOG_PREFIX "ZM FACEDET PLUGIN"
|
||||
|
||||
|
||||
#define DEFAULT_HAAR_SCALE_FACTOR 1.1
|
||||
#define DEFAULT_HAAR_MIN_NEIGHBORS 3
|
||||
#define DEFAULT_HAAR_FLAG CV_HAAR_DO_CANNY_PRUNING
|
||||
#define DEFAULT_DETECTOR_MIN_OBJECT_SIZE_WIDTH 5.0
|
||||
#define DEFAULT_DETECTOR_MIN_OBJECT_SIZE_HEIGHT 6.0
|
||||
#define DEFAULT_HAAR_FACE_CASCADE_PATH "/usr/local/share/opencv/haarcascades/haarcascade_frontalface_alt2.xml"
|
||||
|
||||
|
||||
|
||||
|
||||
using namespace std;
|
||||
using namespace boost::program_options;
|
||||
|
||||
|
||||
//! Face detector plugin class.
|
||||
/*! The class derived from Detector.
|
||||
* This class provides face detection based on OpenCV's implementation of Haar cascade classifier detector.
|
||||
*/
|
||||
class FaceDetectorPlugin : public Detector {
|
||||
public:
|
||||
|
||||
//! Default Constructor.
|
||||
FaceDetectorPlugin();
|
||||
|
||||
//! Constructor.
|
||||
FaceDetectorPlugin(string sConfigSectionName);
|
||||
|
||||
//! Destructor.
|
||||
virtual ~FaceDetectorPlugin();
|
||||
|
||||
//! Copy constructor.
|
||||
FaceDetectorPlugin(const FaceDetectorPlugin& source);
|
||||
|
||||
//! Overloaded operator=.
|
||||
FaceDetectorPlugin& operator=(const FaceDetectorPlugin& source);
|
||||
|
||||
void loadConfig(string sConfigFileName);
|
||||
|
||||
protected:
|
||||
|
||||
bool checkZone(Zone *zone, const Image *zmImage);
|
||||
|
||||
//! Path to the xml file with cascade.
|
||||
string m_sHaarCascadePath;
|
||||
|
||||
//! Cascade of classifiers.
|
||||
CvHaarClassifierCascade* m_cascade;
|
||||
|
||||
//! Scale factor.
|
||||
double m_fScaleFactor;
|
||||
|
||||
//! Minimum number (minus 1) of neighbors rectangles that makes up an object.
|
||||
size_t m_nMinNeighbors;
|
||||
|
||||
//! Mode of operation.
|
||||
int m_nFlag;
|
||||
|
||||
//! Minimal object's sizes.
|
||||
double m_fMinObjWidth;
|
||||
double m_fMinObjHeight;
|
||||
|
||||
//! Pointer to storage for calculations.
|
||||
CvMemStorage* m_pStorage;
|
||||
|
||||
private:
|
||||
|
||||
//! Load xml Haar cascade file.
|
||||
void _loadHaarCascade(string sConfigPath);
|
||||
|
||||
//! Detect faces on OpenCV' CvMat image.
|
||||
vector<CvRect> _opencvHaarDetect(const CvMat* pMatImage);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif //HAAR_DETECTOR_PLUGIN_H
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
abstract: 'Container module for common ZoneMinder modules'
|
||||
author:
|
||||
- 'Philip Coombes <philip.coombes@zoneminder.com>'
|
||||
build_requires:
|
||||
ExtUtils::MakeMaker: 0
|
||||
configure_requires:
|
||||
ExtUtils::MakeMaker: 0
|
||||
distribution_type: module
|
||||
dynamic_config: 0
|
||||
generated_by: 'ExtUtils::MakeMaker version 6.57_05'
|
||||
license: unknown
|
||||
meta-spec:
|
||||
url: http://module-build.sourceforge.net/META-spec-v1.4.html
|
||||
version: 1.4
|
||||
name: ZoneMinder
|
||||
no_index:
|
||||
directory:
|
||||
- t
|
||||
- inc
|
||||
requires: {}
|
||||
version: 1.25.0
|
|
@ -0,0 +1,965 @@
|
|||
# This Makefile is for the ZoneMinder extension to perl.
|
||||
#
|
||||
# It was generated automatically by MakeMaker version
|
||||
# 6.57_05 (Revision: 65705) from the contents of
|
||||
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
|
||||
#
|
||||
# ANY CHANGES MADE HERE WILL BE LOST!
|
||||
#
|
||||
# MakeMaker ARGV: ()
|
||||
#
|
||||
|
||||
# MakeMaker Parameters:
|
||||
|
||||
# ABSTRACT_FROM => q[lib/ZoneMinder.pm]
|
||||
# AUTHOR => [q[Philip Coombes <philip.coombes@zoneminder.com>]]
|
||||
# BUILD_REQUIRES => { }
|
||||
# NAME => q[ZoneMinder]
|
||||
# PM => { lib/ZoneMinder/Trigger/Connection.pm=>q[$(INST_LIBDIR)/ZoneMinder/Trigger/Connection.pm], lib/ZoneMinder/Control/Ncs370.pm=>q[$(INST_LIBDIR)/ZoneMinder/Control/Ncs370.pm], lib/ZoneMinder/Trigger/Channel/Serial.pm=>q[$(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Serial.pm], lib/ZoneMinder/Memory/Shared.pm=>q[$(INST_LIBDIR)/ZoneMinder/Memory/Shared.pm], lib/ZoneMinder.pm=>q[$(INST_LIBDIR)/ZoneMinder.pm], lib/ZoneMinder/Config.pm=>q[$(INST_LIBDIR)/ZoneMinder/Config.pm], lib/ZoneMinder/Control/mjpgStreamer.pm=>q[$(INST_LIBDIR)/ZoneMinder/Control/mjpgStreamer.pm], lib/ZoneMinder/Trigger/Channel/Unix.pm=>q[$(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Unix.pm], lib/ZoneMinder/Control/PanasonicIP.pm=>q[$(INST_LIBDIR)/ZoneMinder/Control/PanasonicIP.pm], lib/ZoneMinder/Base.pm=>q[$(INST_LIBDIR)/ZoneMinder/Base.pm], lib/ZoneMinder/Control/AxisV2.pm=>q[$(INST_LIBDIR)/ZoneMinder/Control/AxisV2.pm], lib/ZoneMinder/Memory/Mapped.pm=>q[$(INST_LIBDIR)/ZoneMinder/Memory/Mapped.pm], lib/ZoneMinder/Trigger/Channel.pm=>q[$(INST_LIBDIR)/ZoneMinder/Trigger/Channel.pm], lib/ZoneMinder/Memory.pm=>q[$(INST_LIBDIR)/ZoneMinder/Memory.pm], lib/ZoneMinder/Trigger/Channel/File.pm=>q[$(INST_LIBDIR)/ZoneMinder/Trigger/Channel/File.pm], lib/ZoneMinder/Database.pm=>q[$(INST_LIBDIR)/ZoneMinder/Database.pm], lib/ZoneMinder/ConfigData.pm=>q[$(INST_LIBDIR)/ZoneMinder/ConfigData.pm], lib/ZoneMinder/Control/PelcoD.pm=>q[$(INST_LIBDIR)/ZoneMinder/Control/PelcoD.pm], lib/ZoneMinder/Control/Visca.pm=>q[$(INST_LIBDIR)/ZoneMinder/Control/Visca.pm], lib/ZoneMinder/Trigger/Channel/Inet.pm=>q[$(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Inet.pm], lib/ZoneMinder/Logger.pm=>q[$(INST_LIBDIR)/ZoneMinder/Logger.pm], lib/ZoneMinder/Trigger/Connection/Example.pm=>q[$(INST_LIBDIR)/ZoneMinder/Trigger/Connection/Example.pm], lib/ZoneMinder/Trigger/Channel/Spawning.pm=>q[$(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Spawning.pm], lib/ZoneMinder/Control.pm=>q[$(INST_LIBDIR)/ZoneMinder/Control.pm], lib/ZoneMinder/General.pm=>q[$(INST_LIBDIR)/ZoneMinder/General.pm], lib/ZoneMinder/Trigger/Channel/Handle.pm=>q[$(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Handle.pm], lib/ZoneMinder/ConfigAdmin.pm=>q[$(INST_LIBDIR)/ZoneMinder/ConfigAdmin.pm] }
|
||||
# PREREQ_PM => { }
|
||||
# VERSION_FROM => q[lib/ZoneMinder/Base.pm]
|
||||
|
||||
# --- MakeMaker post_initialize section:
|
||||
|
||||
|
||||
# --- MakeMaker const_config section:
|
||||
|
||||
# These definitions are from config.sh (via /usr/lib/perl/5.14/Config.pm).
|
||||
# They may have been overridden via Makefile.PL or on the command line.
|
||||
AR = ar
|
||||
CC = cc
|
||||
CCCDLFLAGS = -fPIC
|
||||
CCDLFLAGS = -Wl,-E
|
||||
DLEXT = so
|
||||
DLSRC = dl_dlopen.xs
|
||||
EXE_EXT =
|
||||
FULL_AR = /usr/bin/ar
|
||||
LD = cc
|
||||
LDDLFLAGS = -shared -L/usr/local/lib -fstack-protector
|
||||
LDFLAGS = -fstack-protector -L/usr/local/lib
|
||||
LIBC =
|
||||
LIB_EXT = .a
|
||||
OBJ_EXT = .o
|
||||
OSNAME = linux
|
||||
OSVERS = 2.6.32-5-amd64
|
||||
RANLIB = :
|
||||
SITELIBEXP = /usr/local/share/perl/5.14.2
|
||||
SITEARCHEXP = /usr/local/lib/perl/5.14.2
|
||||
SO = so
|
||||
VENDORARCHEXP = /usr/lib/perl5
|
||||
VENDORLIBEXP = /usr/share/perl5
|
||||
|
||||
|
||||
# --- MakeMaker constants section:
|
||||
AR_STATIC_ARGS = cr
|
||||
DIRFILESEP = /
|
||||
DFSEP = $(DIRFILESEP)
|
||||
NAME = ZoneMinder
|
||||
NAME_SYM = ZoneMinder
|
||||
VERSION = 1.25.0
|
||||
VERSION_MACRO = VERSION
|
||||
VERSION_SYM = 1_25_0
|
||||
DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
|
||||
XS_VERSION = 1.25.0
|
||||
XS_VERSION_MACRO = XS_VERSION
|
||||
XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
|
||||
INST_ARCHLIB = blib/arch
|
||||
INST_SCRIPT = blib/script
|
||||
INST_BIN = blib/bin
|
||||
INST_LIB = blib/lib
|
||||
INST_MAN1DIR = blib/man1
|
||||
INST_MAN3DIR = blib/man3
|
||||
MAN1EXT = 1p
|
||||
MAN3EXT = 3pm
|
||||
INSTALLDIRS = site
|
||||
DESTDIR =
|
||||
PREFIX = /usr
|
||||
PERLPREFIX = $(PREFIX)
|
||||
SITEPREFIX = $(PREFIX)/local
|
||||
VENDORPREFIX = $(PREFIX)
|
||||
INSTALLPRIVLIB = $(PERLPREFIX)/share/perl/5.14
|
||||
DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
|
||||
INSTALLSITELIB = $(SITEPREFIX)/share/perl/5.14.2
|
||||
DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
|
||||
INSTALLVENDORLIB = $(VENDORPREFIX)/share/perl5
|
||||
DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
|
||||
INSTALLARCHLIB = $(PERLPREFIX)/lib/perl/5.14
|
||||
DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
|
||||
INSTALLSITEARCH = $(SITEPREFIX)/lib/perl/5.14.2
|
||||
DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
|
||||
INSTALLVENDORARCH = $(VENDORPREFIX)/lib/perl5
|
||||
DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
|
||||
INSTALLBIN = $(PERLPREFIX)/bin
|
||||
DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
|
||||
INSTALLSITEBIN = $(SITEPREFIX)/bin
|
||||
DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
|
||||
INSTALLVENDORBIN = $(VENDORPREFIX)/bin
|
||||
DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
|
||||
INSTALLSCRIPT = $(PERLPREFIX)/bin
|
||||
DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
|
||||
INSTALLSITESCRIPT = $(SITEPREFIX)/bin
|
||||
DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT)
|
||||
INSTALLVENDORSCRIPT = $(VENDORPREFIX)/bin
|
||||
DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT)
|
||||
INSTALLMAN1DIR = $(PERLPREFIX)/share/man/man1
|
||||
DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
|
||||
INSTALLSITEMAN1DIR = $(SITEPREFIX)/man/man1
|
||||
DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
|
||||
INSTALLVENDORMAN1DIR = $(VENDORPREFIX)/share/man/man1
|
||||
DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
|
||||
INSTALLMAN3DIR = $(PERLPREFIX)/share/man/man3
|
||||
DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
|
||||
INSTALLSITEMAN3DIR = $(SITEPREFIX)/man/man3
|
||||
DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
|
||||
INSTALLVENDORMAN3DIR = $(VENDORPREFIX)/share/man/man3
|
||||
DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
|
||||
PERL_LIB = /usr/share/perl/5.14
|
||||
PERL_ARCHLIB = /usr/lib/perl/5.14
|
||||
LIBPERL_A = libperl.a
|
||||
FIRST_MAKEFILE = Makefile
|
||||
MAKEFILE_OLD = Makefile.old
|
||||
MAKE_APERL_FILE = Makefile.aperl
|
||||
PERLMAINCC = $(CC)
|
||||
PERL_INC = /usr/lib/perl/5.14/CORE
|
||||
PERL = /usr/bin/perl
|
||||
FULLPERL = /usr/bin/perl
|
||||
ABSPERL = $(PERL)
|
||||
PERLRUN = $(PERL)
|
||||
FULLPERLRUN = $(FULLPERL)
|
||||
ABSPERLRUN = $(ABSPERL)
|
||||
PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
|
||||
FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
|
||||
ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
|
||||
PERL_CORE = 0
|
||||
PERM_DIR = 755
|
||||
PERM_RW = 644
|
||||
PERM_RWX = 755
|
||||
|
||||
MAKEMAKER = /usr/share/perl/5.14/ExtUtils/MakeMaker.pm
|
||||
MM_VERSION = 6.57_05
|
||||
MM_REVISION = 65705
|
||||
|
||||
# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
|
||||
# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
|
||||
# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
|
||||
# DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
|
||||
MAKE = make
|
||||
FULLEXT = ZoneMinder
|
||||
BASEEXT = ZoneMinder
|
||||
PARENT_NAME =
|
||||
DLBASE = $(BASEEXT)
|
||||
VERSION_FROM = lib/ZoneMinder/Base.pm
|
||||
OBJECT =
|
||||
LDFROM = $(OBJECT)
|
||||
LINKTYPE = dynamic
|
||||
BOOTDEP =
|
||||
|
||||
# Handy lists of source code files:
|
||||
XS_FILES =
|
||||
C_FILES =
|
||||
O_FILES =
|
||||
H_FILES =
|
||||
MAN1PODS =
|
||||
MAN3PODS = lib/ZoneMinder.pm \
|
||||
lib/ZoneMinder/Base.pm \
|
||||
lib/ZoneMinder/Config.pm \
|
||||
lib/ZoneMinder/ConfigAdmin.pm \
|
||||
lib/ZoneMinder/ConfigData.pm \
|
||||
lib/ZoneMinder/Control.pm \
|
||||
lib/ZoneMinder/Control/AxisV2.pm \
|
||||
lib/ZoneMinder/Control/Ncs370.pm \
|
||||
lib/ZoneMinder/Control/PanasonicIP.pm \
|
||||
lib/ZoneMinder/Control/PelcoD.pm \
|
||||
lib/ZoneMinder/Control/Visca.pm \
|
||||
lib/ZoneMinder/Control/mjpgStreamer.pm \
|
||||
lib/ZoneMinder/Database.pm \
|
||||
lib/ZoneMinder/General.pm \
|
||||
lib/ZoneMinder/Logger.pm \
|
||||
lib/ZoneMinder/Memory.pm \
|
||||
lib/ZoneMinder/Trigger/Channel.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/File.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Handle.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Inet.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Serial.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Spawning.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Unix.pm \
|
||||
lib/ZoneMinder/Trigger/Connection.pm \
|
||||
lib/ZoneMinder/Trigger/Connection/Example.pm
|
||||
|
||||
# Where is the Config information that we are using/depend on
|
||||
CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
|
||||
|
||||
# Where to build things
|
||||
INST_LIBDIR = $(INST_LIB)
|
||||
INST_ARCHLIBDIR = $(INST_ARCHLIB)
|
||||
|
||||
INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT)
|
||||
INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)
|
||||
|
||||
INST_STATIC =
|
||||
INST_DYNAMIC =
|
||||
INST_BOOT =
|
||||
|
||||
# Extra linker info
|
||||
EXPORT_LIST =
|
||||
PERL_ARCHIVE =
|
||||
PERL_ARCHIVE_AFTER =
|
||||
|
||||
|
||||
TO_INST_PM = lib/ZoneMinder.pm \
|
||||
lib/ZoneMinder/Base.pm \
|
||||
lib/ZoneMinder/Config.pm \
|
||||
lib/ZoneMinder/ConfigAdmin.pm \
|
||||
lib/ZoneMinder/ConfigData.pm \
|
||||
lib/ZoneMinder/Control.pm \
|
||||
lib/ZoneMinder/Control/AxisV2.pm \
|
||||
lib/ZoneMinder/Control/Ncs370.pm \
|
||||
lib/ZoneMinder/Control/PanasonicIP.pm \
|
||||
lib/ZoneMinder/Control/PelcoD.pm \
|
||||
lib/ZoneMinder/Control/Visca.pm \
|
||||
lib/ZoneMinder/Control/mjpgStreamer.pm \
|
||||
lib/ZoneMinder/Database.pm \
|
||||
lib/ZoneMinder/General.pm \
|
||||
lib/ZoneMinder/Logger.pm \
|
||||
lib/ZoneMinder/Memory.pm \
|
||||
lib/ZoneMinder/Memory/Mapped.pm \
|
||||
lib/ZoneMinder/Memory/Shared.pm \
|
||||
lib/ZoneMinder/Trigger/Channel.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/File.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Handle.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Inet.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Serial.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Spawning.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Unix.pm \
|
||||
lib/ZoneMinder/Trigger/Connection.pm \
|
||||
lib/ZoneMinder/Trigger/Connection/Example.pm
|
||||
|
||||
PM_TO_BLIB = lib/ZoneMinder/Trigger/Connection.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Trigger/Connection.pm \
|
||||
lib/ZoneMinder/Control/Ncs370.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Control/Ncs370.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Serial.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Serial.pm \
|
||||
lib/ZoneMinder/Memory/Shared.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Memory/Shared.pm \
|
||||
lib/ZoneMinder.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder.pm \
|
||||
lib/ZoneMinder/Config.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Config.pm \
|
||||
lib/ZoneMinder/Control/mjpgStreamer.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Control/mjpgStreamer.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Unix.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Unix.pm \
|
||||
lib/ZoneMinder/Control/PanasonicIP.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Control/PanasonicIP.pm \
|
||||
lib/ZoneMinder/Base.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Base.pm \
|
||||
lib/ZoneMinder/Control/AxisV2.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Control/AxisV2.pm \
|
||||
lib/ZoneMinder/Memory/Mapped.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Memory/Mapped.pm \
|
||||
lib/ZoneMinder/Trigger/Channel.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Trigger/Channel.pm \
|
||||
lib/ZoneMinder/Memory.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Memory.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/File.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Trigger/Channel/File.pm \
|
||||
lib/ZoneMinder/Database.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Database.pm \
|
||||
lib/ZoneMinder/ConfigData.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/ConfigData.pm \
|
||||
lib/ZoneMinder/Control/PelcoD.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Control/PelcoD.pm \
|
||||
lib/ZoneMinder/Control/Visca.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Control/Visca.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Inet.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Inet.pm \
|
||||
lib/ZoneMinder/Logger.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Logger.pm \
|
||||
lib/ZoneMinder/Trigger/Connection/Example.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Trigger/Connection/Example.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Spawning.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Spawning.pm \
|
||||
lib/ZoneMinder/Control.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Control.pm \
|
||||
lib/ZoneMinder/General.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/General.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Handle.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Handle.pm \
|
||||
lib/ZoneMinder/ConfigAdmin.pm \
|
||||
$(INST_LIBDIR)/ZoneMinder/ConfigAdmin.pm
|
||||
|
||||
|
||||
# --- MakeMaker platform_constants section:
|
||||
MM_Unix_VERSION = 6.57_05
|
||||
PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc
|
||||
|
||||
|
||||
# --- MakeMaker tool_autosplit section:
|
||||
# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
|
||||
AUTOSPLITFILE = $(ABSPERLRUN) -e 'use AutoSplit; autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)' --
|
||||
|
||||
|
||||
|
||||
# --- MakeMaker tool_xsubpp section:
|
||||
|
||||
|
||||
# --- MakeMaker tools_other section:
|
||||
SHELL = /bin/sh
|
||||
CHMOD = chmod
|
||||
CP = cp
|
||||
MV = mv
|
||||
NOOP = $(TRUE)
|
||||
NOECHO = @
|
||||
RM_F = rm -f
|
||||
RM_RF = rm -rf
|
||||
TEST_F = test -f
|
||||
TOUCH = touch
|
||||
UMASK_NULL = umask 0
|
||||
DEV_NULL = > /dev/null 2>&1
|
||||
MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' --
|
||||
EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' --
|
||||
FALSE = false
|
||||
TRUE = true
|
||||
ECHO = echo
|
||||
ECHO_N = echo -n
|
||||
UNINST = 0
|
||||
VERBINST = 0
|
||||
MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' --
|
||||
DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' --
|
||||
UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' --
|
||||
WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' --
|
||||
MACROSTART =
|
||||
MACROEND =
|
||||
USEMAKEFILE = -f
|
||||
FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' --
|
||||
|
||||
|
||||
# --- MakeMaker makemakerdflt section:
|
||||
makemakerdflt : all
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
|
||||
# --- MakeMaker dist section:
|
||||
TAR = tar
|
||||
TARFLAGS = cvf
|
||||
ZIP = zip
|
||||
ZIPFLAGS = -r
|
||||
COMPRESS = gzip --best
|
||||
SUFFIX = .gz
|
||||
SHAR = shar
|
||||
PREOP = $(NOECHO) $(NOOP)
|
||||
POSTOP = $(NOECHO) $(NOOP)
|
||||
TO_UNIX = $(NOECHO) $(NOOP)
|
||||
CI = ci -u
|
||||
RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
|
||||
DIST_CP = best
|
||||
DIST_DEFAULT = tardist
|
||||
DISTNAME = ZoneMinder
|
||||
DISTVNAME = ZoneMinder-1.25.0
|
||||
|
||||
|
||||
# --- MakeMaker macro section:
|
||||
|
||||
|
||||
# --- MakeMaker depend section:
|
||||
|
||||
|
||||
# --- MakeMaker cflags section:
|
||||
|
||||
|
||||
# --- MakeMaker const_loadlibs section:
|
||||
|
||||
|
||||
# --- MakeMaker const_cccmd section:
|
||||
|
||||
|
||||
# --- MakeMaker post_constants section:
|
||||
|
||||
|
||||
# --- MakeMaker pasthru section:
|
||||
|
||||
PASTHRU = LIBPERL_A="$(LIBPERL_A)"\
|
||||
LINKTYPE="$(LINKTYPE)"\
|
||||
LD="$(LD)"\
|
||||
PREFIX="$(PREFIX)"
|
||||
|
||||
|
||||
# --- MakeMaker special_targets section:
|
||||
.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
|
||||
|
||||
.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
|
||||
|
||||
|
||||
|
||||
# --- MakeMaker c_o section:
|
||||
|
||||
|
||||
# --- MakeMaker xs_c section:
|
||||
|
||||
|
||||
# --- MakeMaker xs_o section:
|
||||
|
||||
|
||||
# --- MakeMaker top_targets section:
|
||||
all :: pure_all manifypods
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
|
||||
pure_all :: config pm_to_blib subdirs linkext
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
subdirs :: $(MYEXTLIB)
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
config :: $(FIRST_MAKEFILE) blibdirs
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
help :
|
||||
perldoc ExtUtils::MakeMaker
|
||||
|
||||
|
||||
# --- MakeMaker blibdirs section:
|
||||
blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
# Backwards compat with 6.18 through 6.25
|
||||
blibdirs.ts : blibdirs
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL
|
||||
$(NOECHO) $(MKPATH) $(INST_LIBDIR)
|
||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR)
|
||||
$(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists
|
||||
|
||||
$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL
|
||||
$(NOECHO) $(MKPATH) $(INST_ARCHLIB)
|
||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB)
|
||||
$(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists
|
||||
|
||||
$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL
|
||||
$(NOECHO) $(MKPATH) $(INST_AUTODIR)
|
||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR)
|
||||
$(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists
|
||||
|
||||
$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL
|
||||
$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
|
||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR)
|
||||
$(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists
|
||||
|
||||
$(INST_BIN)$(DFSEP).exists :: Makefile.PL
|
||||
$(NOECHO) $(MKPATH) $(INST_BIN)
|
||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN)
|
||||
$(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists
|
||||
|
||||
$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL
|
||||
$(NOECHO) $(MKPATH) $(INST_SCRIPT)
|
||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT)
|
||||
$(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists
|
||||
|
||||
$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL
|
||||
$(NOECHO) $(MKPATH) $(INST_MAN1DIR)
|
||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR)
|
||||
$(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists
|
||||
|
||||
$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL
|
||||
$(NOECHO) $(MKPATH) $(INST_MAN3DIR)
|
||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR)
|
||||
$(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists
|
||||
|
||||
|
||||
|
||||
# --- MakeMaker linkext section:
|
||||
|
||||
linkext :: $(LINKTYPE)
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
|
||||
# --- MakeMaker dlsyms section:
|
||||
|
||||
|
||||
# --- MakeMaker dynamic section:
|
||||
|
||||
dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
|
||||
# --- MakeMaker dynamic_bs section:
|
||||
|
||||
BOOTSTRAP =
|
||||
|
||||
|
||||
# --- MakeMaker dynamic_lib section:
|
||||
|
||||
|
||||
# --- MakeMaker static section:
|
||||
|
||||
## $(INST_PM) has been moved to the all: target.
|
||||
## It remains here for awhile to allow for old usage: "make static"
|
||||
static :: $(FIRST_MAKEFILE) $(INST_STATIC)
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
|
||||
# --- MakeMaker static_lib section:
|
||||
|
||||
|
||||
# --- MakeMaker manifypods section:
|
||||
|
||||
POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
|
||||
POD2MAN = $(POD2MAN_EXE)
|
||||
|
||||
|
||||
manifypods : pure_all \
|
||||
lib/ZoneMinder/Trigger/Connection.pm \
|
||||
lib/ZoneMinder/Control/Ncs370.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Serial.pm \
|
||||
lib/ZoneMinder.pm \
|
||||
lib/ZoneMinder/Config.pm \
|
||||
lib/ZoneMinder/Control/mjpgStreamer.pm \
|
||||
lib/ZoneMinder/Control/PanasonicIP.pm \
|
||||
lib/ZoneMinder/Base.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Unix.pm \
|
||||
lib/ZoneMinder/Control/AxisV2.pm \
|
||||
lib/ZoneMinder/Trigger/Channel.pm \
|
||||
lib/ZoneMinder/Memory.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/File.pm \
|
||||
lib/ZoneMinder/Database.pm \
|
||||
lib/ZoneMinder/ConfigData.pm \
|
||||
lib/ZoneMinder/Control/PelcoD.pm \
|
||||
lib/ZoneMinder/Control/Visca.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Inet.pm \
|
||||
lib/ZoneMinder/Logger.pm \
|
||||
lib/ZoneMinder/Trigger/Connection/Example.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Spawning.pm \
|
||||
lib/ZoneMinder/Control.pm \
|
||||
lib/ZoneMinder/General.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Handle.pm \
|
||||
lib/ZoneMinder/ConfigAdmin.pm
|
||||
$(NOECHO) $(POD2MAN) --section=$(MAN3EXT) --perm_rw=$(PERM_RW) \
|
||||
lib/ZoneMinder/Trigger/Connection.pm $(INST_MAN3DIR)/ZoneMinder::Trigger::Connection.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Control/Ncs370.pm $(INST_MAN3DIR)/ZoneMinder::Control::Ncs370.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Trigger/Channel/Serial.pm $(INST_MAN3DIR)/ZoneMinder::Trigger::Channel::Serial.$(MAN3EXT) \
|
||||
lib/ZoneMinder.pm $(INST_MAN3DIR)/ZoneMinder.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Config.pm $(INST_MAN3DIR)/ZoneMinder::Config.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Control/mjpgStreamer.pm $(INST_MAN3DIR)/ZoneMinder::Control::mjpgStreamer.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Control/PanasonicIP.pm $(INST_MAN3DIR)/ZoneMinder::Control::PanasonicIP.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Base.pm $(INST_MAN3DIR)/ZoneMinder::Base.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Trigger/Channel/Unix.pm $(INST_MAN3DIR)/ZoneMinder::Trigger::Channel::Unix.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Control/AxisV2.pm $(INST_MAN3DIR)/ZoneMinder::Control::AxisV2.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Trigger/Channel.pm $(INST_MAN3DIR)/ZoneMinder::Trigger::Channel.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Memory.pm $(INST_MAN3DIR)/ZoneMinder::Memory.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Trigger/Channel/File.pm $(INST_MAN3DIR)/ZoneMinder::Trigger::Channel::File.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Database.pm $(INST_MAN3DIR)/ZoneMinder::Database.$(MAN3EXT) \
|
||||
lib/ZoneMinder/ConfigData.pm $(INST_MAN3DIR)/ZoneMinder::ConfigData.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Control/PelcoD.pm $(INST_MAN3DIR)/ZoneMinder::Control::PelcoD.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Control/Visca.pm $(INST_MAN3DIR)/ZoneMinder::Control::Visca.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Trigger/Channel/Inet.pm $(INST_MAN3DIR)/ZoneMinder::Trigger::Channel::Inet.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Logger.pm $(INST_MAN3DIR)/ZoneMinder::Logger.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Trigger/Connection/Example.pm $(INST_MAN3DIR)/ZoneMinder::Trigger::Connection::Example.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Trigger/Channel/Spawning.pm $(INST_MAN3DIR)/ZoneMinder::Trigger::Channel::Spawning.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Control.pm $(INST_MAN3DIR)/ZoneMinder::Control.$(MAN3EXT) \
|
||||
lib/ZoneMinder/General.pm $(INST_MAN3DIR)/ZoneMinder::General.$(MAN3EXT) \
|
||||
lib/ZoneMinder/Trigger/Channel/Handle.pm $(INST_MAN3DIR)/ZoneMinder::Trigger::Channel::Handle.$(MAN3EXT) \
|
||||
lib/ZoneMinder/ConfigAdmin.pm $(INST_MAN3DIR)/ZoneMinder::ConfigAdmin.$(MAN3EXT)
|
||||
|
||||
|
||||
|
||||
|
||||
# --- MakeMaker processPL section:
|
||||
|
||||
|
||||
# --- MakeMaker installbin section:
|
||||
|
||||
|
||||
# --- MakeMaker subdirs section:
|
||||
|
||||
# none
|
||||
|
||||
# --- MakeMaker clean_subdirs section:
|
||||
clean_subdirs :
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
|
||||
# --- MakeMaker clean section:
|
||||
|
||||
# Delete temporary files but do not touch installed files. We don't delete
|
||||
# the Makefile here so a later make realclean still has a makefile to use.
|
||||
|
||||
clean :: clean_subdirs
|
||||
- $(RM_F) \
|
||||
*$(LIB_EXT) core \
|
||||
core.[0-9] $(INST_ARCHAUTODIR)/extralibs.all \
|
||||
core.[0-9][0-9] $(BASEEXT).bso \
|
||||
pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \
|
||||
MYMETA.yml $(BASEEXT).x \
|
||||
$(BOOTSTRAP) perl$(EXE_EXT) \
|
||||
tmon.out *$(OBJ_EXT) \
|
||||
pm_to_blib $(INST_ARCHAUTODIR)/extralibs.ld \
|
||||
blibdirs.ts core.[0-9][0-9][0-9][0-9][0-9] \
|
||||
*perl.core core.*perl.*.? \
|
||||
$(MAKE_APERL_FILE) perl \
|
||||
$(BASEEXT).def core.[0-9][0-9][0-9] \
|
||||
mon.out lib$(BASEEXT).def \
|
||||
perlmain.c perl.exe \
|
||||
so_locations $(BASEEXT).exp
|
||||
- $(RM_RF) \
|
||||
blib
|
||||
- $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
|
||||
|
||||
|
||||
# --- MakeMaker realclean_subdirs section:
|
||||
realclean_subdirs :
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
|
||||
# --- MakeMaker realclean section:
|
||||
# Delete temporary files (via clean) and also delete dist files
|
||||
realclean purge :: clean realclean_subdirs
|
||||
- $(RM_F) \
|
||||
$(MAKEFILE_OLD) $(FIRST_MAKEFILE)
|
||||
- $(RM_RF) \
|
||||
$(DISTVNAME)
|
||||
|
||||
|
||||
# --- MakeMaker metafile section:
|
||||
metafile : create_distdir
|
||||
$(NOECHO) $(ECHO) Generating META.yml
|
||||
$(NOECHO) $(ECHO) '--- #YAML:1.0' > META_new.yml
|
||||
$(NOECHO) $(ECHO) 'name: ZoneMinder' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) 'version: 1.25.0' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) 'abstract: Container module for common ZoneMinder modules' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) 'author:' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) ' - Philip Coombes <philip.coombes@zoneminder.com>' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) 'license: unknown' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) 'distribution_type: module' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) 'configure_requires:' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) 'build_requires:' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) 'requires: {}' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) 'no_index:' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) ' directory:' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) ' - t' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) ' - inc' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) 'generated_by: ExtUtils::MakeMaker version 6.57_05' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) 'meta-spec:' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) ' url: http://module-build.sourceforge.net/META-spec-v1.4.html' >> META_new.yml
|
||||
$(NOECHO) $(ECHO) ' version: 1.4' >> META_new.yml
|
||||
-$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml
|
||||
|
||||
|
||||
# --- MakeMaker signature section:
|
||||
signature :
|
||||
cpansign -s
|
||||
|
||||
|
||||
# --- MakeMaker dist_basics section:
|
||||
distclean :: realclean distcheck
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
distcheck :
|
||||
$(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck
|
||||
|
||||
skipcheck :
|
||||
$(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck
|
||||
|
||||
manifest :
|
||||
$(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
|
||||
|
||||
veryclean : realclean
|
||||
$(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old
|
||||
|
||||
|
||||
|
||||
# --- MakeMaker dist_core section:
|
||||
|
||||
dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
|
||||
$(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \
|
||||
-e ' if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' --
|
||||
|
||||
tardist : $(DISTVNAME).tar$(SUFFIX)
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
uutardist : $(DISTVNAME).tar$(SUFFIX)
|
||||
uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
|
||||
|
||||
$(DISTVNAME).tar$(SUFFIX) : distdir
|
||||
$(PREOP)
|
||||
$(TO_UNIX)
|
||||
$(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
|
||||
$(RM_RF) $(DISTVNAME)
|
||||
$(COMPRESS) $(DISTVNAME).tar
|
||||
$(POSTOP)
|
||||
|
||||
zipdist : $(DISTVNAME).zip
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
$(DISTVNAME).zip : distdir
|
||||
$(PREOP)
|
||||
$(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
|
||||
$(RM_RF) $(DISTVNAME)
|
||||
$(POSTOP)
|
||||
|
||||
shdist : distdir
|
||||
$(PREOP)
|
||||
$(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
|
||||
$(RM_RF) $(DISTVNAME)
|
||||
$(POSTOP)
|
||||
|
||||
|
||||
# --- MakeMaker distdir section:
|
||||
create_distdir :
|
||||
$(RM_RF) $(DISTVNAME)
|
||||
$(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
|
||||
-e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
|
||||
|
||||
distdir : create_distdir distmeta
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
|
||||
|
||||
# --- MakeMaker dist_test section:
|
||||
disttest : distdir
|
||||
cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL
|
||||
cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
|
||||
cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)
|
||||
|
||||
|
||||
|
||||
# --- MakeMaker dist_ci section:
|
||||
|
||||
ci :
|
||||
$(PERLRUN) "-MExtUtils::Manifest=maniread" \
|
||||
-e "@all = keys %{ maniread() };" \
|
||||
-e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \
|
||||
-e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});"
|
||||
|
||||
|
||||
# --- MakeMaker distmeta section:
|
||||
distmeta : create_distdir metafile
|
||||
$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } ' \
|
||||
-e ' or print "Could not add META.yml to MANIFEST: $${'\''@'\''}\n"' --
|
||||
|
||||
|
||||
|
||||
# --- MakeMaker distsignature section:
|
||||
distsignature : create_distdir
|
||||
$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } ' \
|
||||
-e ' or print "Could not add SIGNATURE to MANIFEST: $${'\''@'\''}\n"' --
|
||||
$(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE
|
||||
cd $(DISTVNAME) && cpansign -s
|
||||
|
||||
|
||||
|
||||
# --- MakeMaker install section:
|
||||
|
||||
install :: pure_install doc_install
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
install_perl :: pure_perl_install doc_perl_install
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
install_site :: pure_site_install doc_site_install
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
install_vendor :: pure_vendor_install doc_vendor_install
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
pure_install :: pure_$(INSTALLDIRS)_install
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
doc_install :: doc_$(INSTALLDIRS)_install
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
pure__install : pure_site_install
|
||||
$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
|
||||
|
||||
doc__install : doc_site_install
|
||||
$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
|
||||
|
||||
pure_perl_install :: all
|
||||
$(NOECHO) umask 022; $(MOD_INSTALL) \
|
||||
$(INST_LIB) $(DESTINSTALLPRIVLIB) \
|
||||
$(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
|
||||
$(INST_BIN) $(DESTINSTALLBIN) \
|
||||
$(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
|
||||
$(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \
|
||||
$(INST_MAN3DIR) $(DESTINSTALLMAN3DIR)
|
||||
$(NOECHO) $(WARN_IF_OLD_PACKLIST) \
|
||||
$(SITEARCHEXP)/auto/$(FULLEXT)
|
||||
|
||||
|
||||
pure_site_install :: all
|
||||
$(NOECHO) umask 02; $(MOD_INSTALL) \
|
||||
read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \
|
||||
write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \
|
||||
$(INST_LIB) $(DESTINSTALLSITELIB) \
|
||||
$(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \
|
||||
$(INST_BIN) $(DESTINSTALLSITEBIN) \
|
||||
$(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \
|
||||
$(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \
|
||||
$(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR)
|
||||
$(NOECHO) $(WARN_IF_OLD_PACKLIST) \
|
||||
$(PERL_ARCHLIB)/auto/$(FULLEXT)
|
||||
|
||||
pure_vendor_install :: all
|
||||
$(NOECHO) umask 022; $(MOD_INSTALL) \
|
||||
$(INST_LIB) $(DESTINSTALLVENDORLIB) \
|
||||
$(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
|
||||
$(INST_BIN) $(DESTINSTALLVENDORBIN) \
|
||||
$(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \
|
||||
$(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \
|
||||
$(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
|
||||
|
||||
doc_perl_install :: all
|
||||
|
||||
doc_site_install :: all
|
||||
$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLSITEARCH)/perllocal.pod
|
||||
-$(NOECHO) umask 02; $(MKPATH) $(DESTINSTALLSITEARCH)
|
||||
-$(NOECHO) umask 02; $(DOC_INSTALL) \
|
||||
"Module" "$(NAME)" \
|
||||
"installed into" "$(INSTALLSITELIB)" \
|
||||
LINKTYPE "$(LINKTYPE)" \
|
||||
VERSION "$(VERSION)" \
|
||||
EXE_FILES "$(EXE_FILES)" \
|
||||
>> $(DESTINSTALLSITEARCH)/perllocal.pod
|
||||
|
||||
doc_vendor_install :: all
|
||||
|
||||
|
||||
uninstall :: uninstall_from_$(INSTALLDIRS)dirs
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
uninstall_from_perldirs ::
|
||||
|
||||
uninstall_from_sitedirs ::
|
||||
$(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist
|
||||
|
||||
uninstall_from_vendordirs ::
|
||||
|
||||
|
||||
|
||||
# --- MakeMaker force section:
|
||||
# Phony target to force checking subdirectories.
|
||||
FORCE :
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
|
||||
# --- MakeMaker perldepend section:
|
||||
|
||||
|
||||
# --- MakeMaker makefile section:
|
||||
# We take a very conservative approach here, but it's worth it.
|
||||
# We move Makefile to Makefile.old here to avoid gnu make looping.
|
||||
$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
|
||||
$(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
|
||||
$(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
|
||||
-$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
|
||||
-$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
|
||||
- $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
|
||||
$(PERLRUN) Makefile.PL
|
||||
$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
|
||||
$(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
|
||||
$(FALSE)
|
||||
|
||||
|
||||
|
||||
# --- MakeMaker staticmake section:
|
||||
|
||||
# --- MakeMaker makeaperl section ---
|
||||
MAP_TARGET = perl
|
||||
FULLPERL = /usr/bin/perl
|
||||
|
||||
$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
|
||||
$(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@
|
||||
|
||||
$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib
|
||||
$(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
|
||||
$(NOECHO) $(PERLRUNINST) \
|
||||
Makefile.PL DIR= \
|
||||
MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
|
||||
MAKEAPERL=1 NORECURS=1 CCCDLFLAGS=
|
||||
|
||||
|
||||
# --- MakeMaker test section:
|
||||
|
||||
TEST_VERBOSE=0
|
||||
TEST_TYPE=test_$(LINKTYPE)
|
||||
TEST_FILE = test.pl
|
||||
TEST_FILES = t/*.t
|
||||
TESTDB_SW = -d
|
||||
|
||||
testdb :: testdb_$(LINKTYPE)
|
||||
|
||||
test :: $(TEST_TYPE) subdirs-test
|
||||
|
||||
subdirs-test ::
|
||||
$(NOECHO) $(NOOP)
|
||||
|
||||
|
||||
test_dynamic :: pure_all
|
||||
PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
|
||||
|
||||
testdb_dynamic :: pure_all
|
||||
PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
|
||||
|
||||
test_ : test_dynamic
|
||||
|
||||
test_static :: test_dynamic
|
||||
testdb_static :: testdb_dynamic
|
||||
|
||||
|
||||
# --- MakeMaker ppd section:
|
||||
# Creates a PPD (Perl Package Description) for a binary distribution.
|
||||
ppd :
|
||||
$(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="1.25.0">' > $(DISTNAME).ppd
|
||||
$(NOECHO) $(ECHO) ' <ABSTRACT>Container module for common ZoneMinder modules</ABSTRACT>' >> $(DISTNAME).ppd
|
||||
$(NOECHO) $(ECHO) ' <AUTHOR>Philip Coombes <philip.coombes@zoneminder.com></AUTHOR>' >> $(DISTNAME).ppd
|
||||
$(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd
|
||||
$(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="x86_64-linux-gnu-thread-multi-5.14" />' >> $(DISTNAME).ppd
|
||||
$(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> $(DISTNAME).ppd
|
||||
$(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> $(DISTNAME).ppd
|
||||
$(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd
|
||||
|
||||
|
||||
# --- MakeMaker pm_to_blib section:
|
||||
|
||||
pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
|
||||
$(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \
|
||||
lib/ZoneMinder/Trigger/Connection.pm $(INST_LIBDIR)/ZoneMinder/Trigger/Connection.pm \
|
||||
lib/ZoneMinder/Control/Ncs370.pm $(INST_LIBDIR)/ZoneMinder/Control/Ncs370.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Serial.pm $(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Serial.pm \
|
||||
lib/ZoneMinder/Memory/Shared.pm $(INST_LIBDIR)/ZoneMinder/Memory/Shared.pm \
|
||||
lib/ZoneMinder.pm $(INST_LIBDIR)/ZoneMinder.pm \
|
||||
lib/ZoneMinder/Config.pm $(INST_LIBDIR)/ZoneMinder/Config.pm \
|
||||
lib/ZoneMinder/Control/mjpgStreamer.pm $(INST_LIBDIR)/ZoneMinder/Control/mjpgStreamer.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Unix.pm $(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Unix.pm \
|
||||
lib/ZoneMinder/Control/PanasonicIP.pm $(INST_LIBDIR)/ZoneMinder/Control/PanasonicIP.pm \
|
||||
lib/ZoneMinder/Base.pm $(INST_LIBDIR)/ZoneMinder/Base.pm \
|
||||
lib/ZoneMinder/Control/AxisV2.pm $(INST_LIBDIR)/ZoneMinder/Control/AxisV2.pm \
|
||||
lib/ZoneMinder/Memory/Mapped.pm $(INST_LIBDIR)/ZoneMinder/Memory/Mapped.pm \
|
||||
lib/ZoneMinder/Trigger/Channel.pm $(INST_LIBDIR)/ZoneMinder/Trigger/Channel.pm \
|
||||
lib/ZoneMinder/Memory.pm $(INST_LIBDIR)/ZoneMinder/Memory.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/File.pm $(INST_LIBDIR)/ZoneMinder/Trigger/Channel/File.pm \
|
||||
lib/ZoneMinder/Database.pm $(INST_LIBDIR)/ZoneMinder/Database.pm \
|
||||
lib/ZoneMinder/ConfigData.pm $(INST_LIBDIR)/ZoneMinder/ConfigData.pm \
|
||||
lib/ZoneMinder/Control/PelcoD.pm $(INST_LIBDIR)/ZoneMinder/Control/PelcoD.pm \
|
||||
lib/ZoneMinder/Control/Visca.pm $(INST_LIBDIR)/ZoneMinder/Control/Visca.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Inet.pm $(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Inet.pm \
|
||||
lib/ZoneMinder/Logger.pm $(INST_LIBDIR)/ZoneMinder/Logger.pm \
|
||||
lib/ZoneMinder/Trigger/Connection/Example.pm $(INST_LIBDIR)/ZoneMinder/Trigger/Connection/Example.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Spawning.pm $(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Spawning.pm \
|
||||
lib/ZoneMinder/Control.pm $(INST_LIBDIR)/ZoneMinder/Control.pm \
|
||||
lib/ZoneMinder/General.pm $(INST_LIBDIR)/ZoneMinder/General.pm \
|
||||
lib/ZoneMinder/Trigger/Channel/Handle.pm $(INST_LIBDIR)/ZoneMinder/Trigger/Channel/Handle.pm \
|
||||
lib/ZoneMinder/ConfigAdmin.pm $(INST_LIBDIR)/ZoneMinder/ConfigAdmin.pm
|
||||
$(NOECHO) $(TOUCH) pm_to_blib
|
||||
|
||||
|
||||
# --- MakeMaker selfdocument section:
|
||||
|
||||
|
||||
# --- MakeMaker postamble section:
|
||||
|
||||
|
||||
# End.
|
|
@ -0,0 +1,130 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Common Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the common definitions and functions used by the rest
|
||||
# of the ZoneMinder scripts
|
||||
#
|
||||
package ZoneMinder;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require Exporter;
|
||||
use ZoneMinder::Base qw(:all);
|
||||
use ZoneMinder::Config qw(:all);
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
use ZoneMinder::General qw(:all);
|
||||
use ZoneMinder::Database qw(:all);
|
||||
use ZoneMinder::Memory qw(:all);
|
||||
|
||||
our @ISA = qw(Exporter ZoneMinder::Base ZoneMinder::Config ZoneMinder::Logger ZoneMinder::General ZoneMinder::Database ZoneMinder::Memory);
|
||||
|
||||
# Items to export into callers namespace by default. Note: do not export
|
||||
# names by default without a very good reason. Use EXPORT_OK instead.
|
||||
# Do not simply export all your public functions/methods/constants.
|
||||
|
||||
# This allows declaration use ZoneMinder ':all';
|
||||
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
|
||||
# will save memory.
|
||||
our %EXPORT_TAGS = (
|
||||
'base' => [
|
||||
@ZoneMinder::Base::EXPORT_OK
|
||||
],
|
||||
'config' => [
|
||||
@ZoneMinder::Config::EXPORT_OK
|
||||
],
|
||||
'debug' => [
|
||||
@ZoneMinder::Logger::EXPORT_OK
|
||||
],
|
||||
'general' => [
|
||||
@ZoneMinder::General::EXPORT_OK
|
||||
],
|
||||
'database' => [
|
||||
@ZoneMinder::Database::EXPORT_OK
|
||||
],
|
||||
'memory' => [
|
||||
@ZoneMinder::Memory::EXPORT_OK
|
||||
],
|
||||
);
|
||||
push( @{$EXPORT_TAGS{all}}, @{$EXPORT_TAGS{$_}} ) foreach keys %EXPORT_TAGS;
|
||||
|
||||
our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} };
|
||||
|
||||
our @EXPORT = ( @EXPORT_OK );
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder - Container module for common ZoneMinder modules
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder;
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This module is a convenience container module that uses the
|
||||
ZoneMinder::Base, ZoneMinder::Common, ZoneMinder::Logger,
|
||||
ZoneMinder::Database and ZoneMinder::Memory modules. It also
|
||||
exports by default all symbols provided by the 'all' tag of
|
||||
each of the modules.
|
||||
|
||||
Thus 'use'ing this module is equivalent to the following
|
||||
|
||||
use ZoneMinder::Base qw(:all);
|
||||
use ZoneMinder::Config qw(:all);
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
use ZoneMinder::Database qw(:all);
|
||||
use ZoneMinder::Memory qw(:all);
|
||||
|
||||
but is somewhat easier.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
All symbols exported by the 'all' tag of each of the included
|
||||
modules.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
ZoneMinder::Base, ZoneMinder::Common, ZoneMinder::Logger,
|
||||
ZoneMinder::Database, ZoneMinder::Memory
|
||||
|
||||
http://www.zoneminder.com
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2005 by Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,86 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Base Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the common definitions and functions used by the rest
|
||||
# of the ZoneMinder scripts
|
||||
#
|
||||
package ZoneMinder::Base;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require Exporter;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
|
||||
# Items to export into callers namespace by default. Note: do not export
|
||||
# names by default without a very good reason. Use EXPORT_OK instead.
|
||||
# Do not simply export all your public functions/methods/constants.
|
||||
|
||||
# This allows declaration use ZoneMinder ':all';
|
||||
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
|
||||
# will save memory.
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
||||
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
|
||||
|
||||
our @EXPORT = qw();
|
||||
|
||||
our $VERSION = "1.25.0";
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Base - Base perl module for ZoneMinder
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Base;
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This module is the base module for the rest of the ZoneMinder modules. It is included by each of the other modules but serves no purpose other than to propagate the perl module version amongst the other modules. You will never need to use this module directly but if you write new ZoneMinder modules they should include it.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.zoneminder.com
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,145 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Config Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the common definitions and functions used by the rest
|
||||
# of the ZoneMinder scripts
|
||||
#
|
||||
package ZoneMinder::Config;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require Exporter;
|
||||
require ZoneMinder::Base;
|
||||
|
||||
our @ISA = qw(Exporter ZoneMinder::Base);
|
||||
|
||||
# Items to export into callers namespace by default. Note: do not export
|
||||
# names by default without a very good reason. Use EXPORT_OK instead.
|
||||
# Do not simply export all your public functions/methods/constants.
|
||||
|
||||
# This allows declaration use ZoneMinder ':all';
|
||||
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
|
||||
# will save memory.
|
||||
our @EXPORT_CONFIG; # Get populated by BEGIN
|
||||
|
||||
our %EXPORT_TAGS = (
|
||||
'constants' => [ qw(
|
||||
ZM_PID
|
||||
) ]
|
||||
);
|
||||
push( @{$EXPORT_TAGS{config}}, @EXPORT_CONFIG );
|
||||
push( @{$EXPORT_TAGS{all}}, @{$EXPORT_TAGS{$_}} ) foreach keys %EXPORT_TAGS;
|
||||
|
||||
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
|
||||
|
||||
our @EXPORT = qw();
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
use constant ZM_PID => "/var/run/zm/zm.pid"; # Path to the ZoneMinder run pid file
|
||||
use constant ZM_CONFIG => "/etc/zm/zm.conf"; # Path to the ZoneMinder config file
|
||||
|
||||
use Carp;
|
||||
|
||||
# Load the config from the database into the symbol table
|
||||
BEGIN
|
||||
{
|
||||
no strict 'refs';
|
||||
|
||||
my $config_file = ZM_CONFIG;
|
||||
( my $local_config_file = $config_file ) =~ s|^.*/|./|;
|
||||
if ( -s $local_config_file && -r $local_config_file )
|
||||
{
|
||||
print( STDERR "Warning, overriding installed $local_config_file file with local copy\n" );
|
||||
$config_file = $local_config_file;
|
||||
}
|
||||
open( CONFIG, "<".$config_file ) or croak( "Can't open config file '$config_file': $!" );
|
||||
foreach my $str ( <CONFIG> )
|
||||
{
|
||||
next if ( $str =~ /^\s*$/ );
|
||||
next if ( $str =~ /^\s*#/ );
|
||||
my ( $name, $value ) = $str =~ /^\s*([^=\s]+)\s*=\s*(.+?)\s*$/;
|
||||
$name =~ tr/a-z/A-Z/;
|
||||
*{$name} = sub { $value };
|
||||
push( @EXPORT_CONFIG, $name );
|
||||
}
|
||||
close( CONFIG );
|
||||
|
||||
use DBI;
|
||||
my $dbh = DBI->connect( "DBI:mysql:database=".&ZM_DB_NAME.";host=".&ZM_DB_HOST, &ZM_DB_USER, &ZM_DB_PASS );
|
||||
my $sql = "select * from Config";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or croak( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
my $res = $sth->execute() or croak( "Can't execute: ".$sth->errstr() );
|
||||
while( my $config = $sth->fetchrow_hashref() )
|
||||
{
|
||||
*{$config->{Name}} = sub { $config->{Value} };
|
||||
push( @EXPORT_CONFIG, $config->{Name} );
|
||||
}
|
||||
$sth->finish();
|
||||
$dbh->disconnect();
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Config - ZoneMinder configuration module.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Config qw(:all);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The ZoneMinder::Config module is used to import the ZoneMinder configuration from the database. It will do this at compile time in a BEGIN block and require access to the zm.conf file either in the current directory or in its defined location in order to determine database access details, configuration from this file will also be included. If the :all or :config tags are used then this configuration is exported into the namespace of the calling program or module.
|
||||
|
||||
Once the configuration has been imported then configuration variables are defined as constants and can be accessed directory by name, e.g.
|
||||
|
||||
$lang = ZM_LANG_DEFAULT;
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
The :constants tag will export the ZM_PID constant which details the location of the zm.pid file
|
||||
The :config tag will export all configuration from the database as well as any from the zm.conf file
|
||||
The :all tag will export all above symbols.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.zoneminder.com
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,213 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Config Admin Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the debug definitions and functions used by the rest
|
||||
# of the ZoneMinder scripts
|
||||
#
|
||||
package ZoneMinder::ConfigAdmin;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require Exporter;
|
||||
require ZoneMinder::Base;
|
||||
|
||||
our @ISA = qw(Exporter ZoneMinder::Base);
|
||||
|
||||
# Items to export into callers namespace by default. Note: do not export
|
||||
# names by default without a very good reason. Use EXPORT_OK instead.
|
||||
# Do not simply export all your public functions/methods/constants.
|
||||
|
||||
# This allows declaration use ZoneMinder ':all';
|
||||
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
|
||||
# will save memory.
|
||||
our %EXPORT_TAGS = (
|
||||
'functions' => [ qw(
|
||||
loadConfigFromDB
|
||||
saveConfigToDB
|
||||
) ]
|
||||
);
|
||||
push( @{$EXPORT_TAGS{all}}, @{$EXPORT_TAGS{$_}} ) foreach keys %EXPORT_TAGS;
|
||||
|
||||
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'functions'} } );
|
||||
|
||||
our @EXPORT = qw();
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Configuration Administration
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Config qw(:all);
|
||||
use ZoneMinder::ConfigData qw(:all);
|
||||
|
||||
use Carp;
|
||||
|
||||
sub loadConfigFromDB
|
||||
{
|
||||
print( "Loading config from DB\n" );
|
||||
my $dbh = DBI->connect( "DBI:mysql:database=".ZM_DB_NAME.";host=".ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );
|
||||
|
||||
if ( !$dbh )
|
||||
{
|
||||
print( "Error: unable to load options from database: $DBI::errstr\n" );
|
||||
return( 0 );
|
||||
}
|
||||
my $sql = "select * from Config";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or croak( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
my $res = $sth->execute() or croak( "Can't execute: ".$sth->errstr() );
|
||||
my $option_count = 0;
|
||||
while( my $config = $sth->fetchrow_hashref() )
|
||||
{
|
||||
my ( $name, $value ) = ( $config->{Name}, $config->{Value} );
|
||||
#print( "Name = '$name'\n" );
|
||||
my $option = $options_hash{$name};
|
||||
if ( !$option )
|
||||
{
|
||||
warn( "No option '$name' found, removing" );
|
||||
next;
|
||||
}
|
||||
#next if ( $option->{category} eq 'hidden' );
|
||||
if ( defined($value) )
|
||||
{
|
||||
if ( $option->{type} == $types{boolean} )
|
||||
{
|
||||
$option->{value} = $value?"yes":"no";
|
||||
}
|
||||
else
|
||||
{
|
||||
$option->{value} = $value;
|
||||
}
|
||||
}
|
||||
$option_count++;;
|
||||
}
|
||||
$sth->finish();
|
||||
$dbh->disconnect();
|
||||
return( $option_count );
|
||||
}
|
||||
|
||||
sub saveConfigToDB
|
||||
{
|
||||
print( "Saving config to DB\n" );
|
||||
my $dbh = DBI->connect( "DBI:mysql:database=".ZM_DB_NAME.";host=".ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );
|
||||
|
||||
if ( !$dbh )
|
||||
{
|
||||
print( "Error: unable to save options to database: $DBI::errstr\n" );
|
||||
return( 0 );
|
||||
}
|
||||
my $sql = "delete from Config";
|
||||
my $res = $dbh->do( $sql ) or croak( "Can't do '$sql': ".$dbh->errstr() );
|
||||
|
||||
$sql = "replace into Config set Id = ?, Name = ?, Value = ?, Type = ?, DefaultValue = ?, Hint = ?, Pattern = ?, Format = ?, Prompt = ?, Help = ?, Category = ?, Readonly = ?, Requires = ?";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or croak( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
foreach my $option ( @options )
|
||||
{
|
||||
#next if ( $option->{category} eq 'hidden' );
|
||||
#print( $option->{name}."\n" ) if ( !$option->{category} );
|
||||
$option->{db_type} = $option->{type}->{db_type};
|
||||
$option->{db_hint} = $option->{type}->{hint};
|
||||
$option->{db_pattern} = $option->{type}->{pattern};
|
||||
$option->{db_format} = $option->{type}->{format};
|
||||
if ( $option->{db_type} eq "boolean" )
|
||||
{
|
||||
$option->{db_value} = ($option->{value} eq "yes")?"1":"0";
|
||||
}
|
||||
else
|
||||
{
|
||||
$option->{db_value} = $option->{value};
|
||||
}
|
||||
if ( my $requires = $option->{requires} )
|
||||
{
|
||||
$option->{db_requires} = join( ";", map { my $value = $_->{value}; $value = ($value eq "yes")?1:0 if ( $options_hash{$_->{name}}->{db_type} eq "boolean" ); ( "$_->{name}=$value" ) } @$requires );
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
my $res = $sth->execute( $option->{id}, $option->{name}, $option->{db_value}, $option->{db_type}, $option->{default}, $option->{db_hint}, $option->{db_pattern}, $option->{db_format}, $option->{description}, $option->{help}, $option->{category}, $option->{readonly}?1:0, $option->{db_requires} ) or croak( "Can't execute: ".$sth->errstr() );
|
||||
}
|
||||
$sth->finish();
|
||||
$dbh->disconnect();
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::ConfigAdmin - ZoneMinder Configuration Administration module
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::ConfigAdmin;
|
||||
use ZoneMinder::ConfigAdmin qw(:all);
|
||||
|
||||
loadConfigFromDB();
|
||||
saveConfigToDB();
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The ZoneMinder:ConfigAdmin module contains the master definition of the ZoneMinder configuration options as well as helper methods. This module is intended for specialist confguration management and would not normally be used by end users.
|
||||
|
||||
The configuration held in this module, which was previously in zmconfig.pl, includes the name, default value, description, help text, type and category for each option, as well as a number of additional fields in a small number of cases.
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=over 4
|
||||
|
||||
=item loadConfigFromDB ();
|
||||
|
||||
Loads existing configuration from the database (if any) and merges it with the definitions held in this module. This results in the merging of any new configuration and the removal of any deprecated configuration while preserving the existing values of every else.
|
||||
|
||||
=item saveConfigToDB ();
|
||||
|
||||
Saves configuration held in memory to the database. The act of loading and saving configuration is a convenient way to ensure that the configuration held in the database corresponds with the most recent definitions and that all components are using the same set of configuration.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
The :data tag will export the various configuration data structures
|
||||
The :functions tag will export the helper functions.
|
||||
The :all tag will export all above symbols.
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.zoneminder.com
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,205 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Base Control Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the base class definitions for the camera control
|
||||
# protocol implementations
|
||||
#
|
||||
package ZoneMinder::Control;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Base connection class
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
use ZoneMinder::Database qw(:all);
|
||||
|
||||
our $AUTOLOAD;
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my $id = shift;
|
||||
my $self = {};
|
||||
$self->{name} = "PelcoD";
|
||||
if ( !defined($id) )
|
||||
{
|
||||
Fatal( "No monitor defined when invoking protocol ".$self->{name} );
|
||||
}
|
||||
$self->{id} = $id;
|
||||
bless( $self, $class );
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub DESTROY
|
||||
{
|
||||
}
|
||||
|
||||
sub AUTOLOAD
|
||||
{
|
||||
my $self = shift;
|
||||
my $class = ref($self) || croak( "$self not object" );
|
||||
my $name = $AUTOLOAD;
|
||||
$name =~ s/.*://;
|
||||
if ( exists($self->{$name}) )
|
||||
{
|
||||
return( $self->{$name} );
|
||||
}
|
||||
croak( "Can't access $name member of object of class $class" );
|
||||
}
|
||||
|
||||
sub getKey()
|
||||
{
|
||||
my $self = shift;
|
||||
return( $self->{id} );
|
||||
}
|
||||
|
||||
sub open
|
||||
{
|
||||
my $self = shift;
|
||||
Fatal( "No open method defined for protocol ".$self->{name} );
|
||||
}
|
||||
|
||||
sub close
|
||||
{
|
||||
my $self = shift;
|
||||
Fatal( "No close method defined for protocol ".$self->{name} );
|
||||
}
|
||||
|
||||
sub loadMonitor
|
||||
{
|
||||
my $self = shift;
|
||||
if ( !$self->{Monitor} )
|
||||
{
|
||||
if ( !($self->{Monitor} = zmDbGetMonitor( $self->{id} )) )
|
||||
{
|
||||
Fatal( "Monitor id ".$self->{id}." not found or not controllable" );
|
||||
}
|
||||
if ( defined($self->{Monitor}->{AutoStopTimeout}) )
|
||||
{
|
||||
# Convert to microseconds.
|
||||
$self->{Monitor}->{AutoStopTimeout} = int(1000000*$self->{Monitor}->{AutoStopTimeout});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub getParam
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $name = shift;
|
||||
my $default = shift;
|
||||
|
||||
if ( defined($params->{$name}) )
|
||||
{
|
||||
return( $params->{$name} );
|
||||
}
|
||||
elsif ( defined($default) )
|
||||
{
|
||||
return( $default );
|
||||
}
|
||||
Fatal( "Missing mandatory parameter '$name'" );
|
||||
}
|
||||
|
||||
sub executeCommand
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
|
||||
$self->loadMonitor();
|
||||
|
||||
my $command = $params->{command};
|
||||
delete $params->{command};
|
||||
|
||||
#if ( !defined($self->{$command}) )
|
||||
#{
|
||||
#Fatal( "Unsupported command '$command'" );
|
||||
#}
|
||||
&{$self->{$command}}( $self, $params );
|
||||
}
|
||||
|
||||
sub printMsg()
|
||||
{
|
||||
my $self = shift;
|
||||
Fatal( "No printMsg method defined for protocol ".$self->{name} );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,475 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Axis version 2 API Control Protocol Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the implementation of the Axis V2 API camera control
|
||||
# protocol
|
||||
#
|
||||
package ZoneMinder::Control::AxisV2;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
require ZoneMinder::Control;
|
||||
|
||||
our @ISA = qw(ZoneMinder::Control);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Axis V2 Control Protocol
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
use ZoneMinder::Config qw(:all);
|
||||
|
||||
use Time::HiRes qw( usleep );
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my $id = shift;
|
||||
my $self = ZoneMinder::Control->new( $id );
|
||||
bless( $self, $class );
|
||||
srand( time() );
|
||||
return $self;
|
||||
}
|
||||
|
||||
our $AUTOLOAD;
|
||||
|
||||
sub AUTOLOAD
|
||||
{
|
||||
my $self = shift;
|
||||
my $class = ref($self) || croak( "$self not object" );
|
||||
my $name = $AUTOLOAD;
|
||||
$name =~ s/.*://;
|
||||
if ( exists($self->{$name}) )
|
||||
{
|
||||
return( $self->{$name} );
|
||||
}
|
||||
Fatal( "Can't access $name member of object of class $class" );
|
||||
}
|
||||
|
||||
sub open
|
||||
{
|
||||
my $self = shift;
|
||||
|
||||
$self->loadMonitor();
|
||||
|
||||
use LWP::UserAgent;
|
||||
$self->{ua} = LWP::UserAgent->new;
|
||||
$self->{ua}->agent( "ZoneMinder Control Agent/".ZM_VERSION );
|
||||
|
||||
$self->{state} = 'open';
|
||||
}
|
||||
|
||||
sub close
|
||||
{
|
||||
my $self = shift;
|
||||
$self->{state} = 'closed';
|
||||
}
|
||||
|
||||
sub printMsg
|
||||
{
|
||||
my $self = shift;
|
||||
my $msg = shift;
|
||||
my $msg_len = length($msg);
|
||||
|
||||
Debug( $msg."[".$msg_len."]" );
|
||||
}
|
||||
|
||||
sub sendCmd
|
||||
{
|
||||
my $self = shift;
|
||||
my $cmd = shift;
|
||||
|
||||
my $result = undef;
|
||||
|
||||
printMsg( $cmd, "Tx" );
|
||||
|
||||
#print( "http://$address/$cmd\n" );
|
||||
my $req = HTTP::Request->new( GET=>"http://".$self->{Monitor}->{ControlAddress}."/$cmd" );
|
||||
my $res = $self->{ua}->request($req);
|
||||
|
||||
if ( $res->is_success )
|
||||
{
|
||||
$result = !undef;
|
||||
}
|
||||
else
|
||||
{
|
||||
Error( "Error check failed: '".$res->status_line()."'" );
|
||||
}
|
||||
|
||||
return( $result );
|
||||
}
|
||||
|
||||
sub cameraReset
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Camera Reset" );
|
||||
my $cmd = "/axis-cgi/admin/restart.cgi";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConUp
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Up" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?move=up";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConDown
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Down" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?move=down";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConLeft
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Left" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?move=left";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConRight
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Right" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?move=right";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConUpRight
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Up/Right" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?move=upright";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConUpLeft
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Up/Left" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?move=upleft";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConDownRight
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Down/Right" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?move=downright";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConDownLeft
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Down/Left" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?move=downleft";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveMap
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $xcoord = $self->getParam( $params, 'xcoord' );
|
||||
my $ycoord = $self->getParam( $params, 'ycoord' );
|
||||
Debug( "Move Map to $xcoord,$ycoord" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?center=$xcoord,$ycoord&imagewidth=".$self->{Monitor}->{Width}."&imageheight=".$self->{Monitor}->{Height};
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveRelUp
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'tiltstep' );
|
||||
Debug( "Step Up $step" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?rtilt=$step";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveRelDown
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'tiltstep' );
|
||||
Debug( "Step Down $step" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?rtilt=-$step";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveRelLeft
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'panstep' );
|
||||
Debug( "Step Left $step" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?rpan=-$step";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveRelRight
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'panstep' );
|
||||
Debug( "Step Right $step" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?rpan=$step";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveRelUpRight
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panstep = $self->getParam( $params, 'panstep' );
|
||||
my $tiltstep = $self->getParam( $params, 'tiltstep' );
|
||||
Debug( "Step Up/Right $tiltstep/$panstep" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?rpan=$panstep&rtilt=$tiltstep";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveRelUpLeft
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panstep = $self->getParam( $params, 'panstep' );
|
||||
my $tiltstep = $self->getParam( $params, 'tiltstep' );
|
||||
Debug( "Step Up/Left $tiltstep/$panstep" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?rpan=-$panstep&rtilt=$tiltstep";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveRelDownRight
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panstep = $self->getParam( $params, 'panstep' );
|
||||
my $tiltstep = $self->getParam( $params, 'tiltstep' );
|
||||
Debug( "Step Down/Right $tiltstep/$panstep" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?rpan=$panstep&rtilt=-$tiltstep";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveRelDownLeft
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panstep = $self->getParam( $params, 'panstep' );
|
||||
my $tiltstep = $self->getParam( $params, 'tiltstep' );
|
||||
Debug( "Step Down/Left $tiltstep/$panstep" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?rpan=-$panstep&rtilt=-$tiltstep";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub zoomRelTele
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'step' );
|
||||
Debug( "Zoom Tele" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?rzoom=$step";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub zoomRelWide
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'step' );
|
||||
Debug( "Zoom Wide" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?rzoom=-$step";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub focusRelNear
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'step' );
|
||||
Debug( "Focus Near" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?rfocus=-$step";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub focusRelFar
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'step' );
|
||||
Debug( "Focus Far" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?rfocus=$step";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub focusAuto
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Focus Auto" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?autofocus=on";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub focusMan
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Focus Manual" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?autofocus=off";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub irisRelOpen
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'step' );
|
||||
Debug( "Iris Open" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?riris=$step";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub irisRelClose
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'step' );
|
||||
Debug( "Iris Close" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?riris=-$step";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub irisAuto
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Iris Auto" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?autoiris=on";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub irisMan
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Iris Manual" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?autoiris=off";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub presetClear
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $preset = $self->getParam( $params, 'preset' );
|
||||
Debug( "Clear Preset $preset" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?removeserverpresetno=$preset";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub presetSet
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $preset = $self->getParam( $params, 'preset' );
|
||||
Debug( "Set Preset $preset" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?setserverpresetno=$preset";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub presetGoto
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $preset = $self->getParam( $params, 'preset' );
|
||||
Debug( "Goto Preset $preset" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?gotoserverpresetno=$preset";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub presetHome
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Home Preset" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?move=home";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,241 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Neu-Fusion Control Protocol Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the implementation of the Neu-Fusion NCS370 IP camera
|
||||
# control protocol
|
||||
#
|
||||
package ZoneMinder::Control::Ncs370;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
require ZoneMinder::Control;
|
||||
|
||||
our @ISA = qw(ZoneMinder::Control);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Ncs370 IP Control Protocol
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
use ZoneMinder::Config qw(:all);
|
||||
|
||||
use Time::HiRes qw( usleep );
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my $id = shift;
|
||||
my $self = ZoneMinder::Control->new( $id );
|
||||
bless( $self, $class );
|
||||
srand( time() );
|
||||
return $self;
|
||||
}
|
||||
|
||||
our $AUTOLOAD;
|
||||
|
||||
sub AUTOLOAD
|
||||
{
|
||||
my $self = shift;
|
||||
my $class = ref($self) || croak( "$self not object" );
|
||||
my $name = $AUTOLOAD;
|
||||
$name =~ s/.*://;
|
||||
if ( exists($self->{$name}) )
|
||||
{
|
||||
return( $self->{$name} );
|
||||
}
|
||||
Fatal( "Can't access $name member of object of class $class" );
|
||||
}
|
||||
|
||||
sub open
|
||||
{
|
||||
my $self = shift;
|
||||
|
||||
$self->loadMonitor();
|
||||
|
||||
use LWP::UserAgent;
|
||||
$self->{ua} = LWP::UserAgent->new;
|
||||
$self->{ua}->agent( "ZoneMinder Control Agent/".ZM_VERSION );
|
||||
|
||||
$self->{state} = 'open';
|
||||
}
|
||||
|
||||
sub close
|
||||
{
|
||||
my $self = shift;
|
||||
$self->{state} = 'closed';
|
||||
}
|
||||
|
||||
sub printMsg
|
||||
{
|
||||
my $self = shift;
|
||||
my $msg = shift;
|
||||
my $msg_len = length($msg);
|
||||
|
||||
Debug( $msg."[".$msg_len."]" );
|
||||
}
|
||||
|
||||
sub sendCmd
|
||||
{
|
||||
my $self = shift;
|
||||
my $cmd = shift;
|
||||
|
||||
my $result = undef;
|
||||
|
||||
printMsg( $cmd, "Tx" );
|
||||
|
||||
my $req = HTTP::Request->new( POST=>"http://".$self->{Monitor}->{ControlAddress}."/PANTILTCONTROL.CGI" );
|
||||
my $res = $self->{ua}->request($req);
|
||||
|
||||
if ( $res->is_success )
|
||||
{
|
||||
$result = !undef;
|
||||
}
|
||||
else
|
||||
{
|
||||
Error( "Error check failed: '".$res->status_line()."'" );
|
||||
}
|
||||
|
||||
return( $result );
|
||||
}
|
||||
|
||||
sub moveConUp
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Up" );
|
||||
my $cmd = "PanSingleMoveDegree=1\nTiltSingleMoveDegree=1\nPanTiltSingleMove=1";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConDown
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Down" );
|
||||
my $cmd = "PanSingleMoveDegree=1\nTiltSingleMoveDegree=1\nPanTiltSingleMove=7";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConLeft
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Left" );
|
||||
my $cmd = "PanSingleMoveDegree=1\nTiltSingleMoveDegree=1\nPanTiltSingleMove=3";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConRight
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Right" );
|
||||
my $cmd = "PanSingleMoveDegree=1\nTiltSingleMoveDegree=1\nPanTiltSingleMove=5";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConUpRight
|
||||
{
|
||||
moveConUp();
|
||||
moveConRight();
|
||||
}
|
||||
|
||||
sub moveConUpLeft
|
||||
{
|
||||
moveConUp();
|
||||
moveConLeft();
|
||||
}
|
||||
|
||||
sub moveConDownRight
|
||||
{
|
||||
moveConDown();
|
||||
moveConRight();
|
||||
}
|
||||
|
||||
sub moveConDownLeft
|
||||
{
|
||||
moveConDown();
|
||||
moveConLeft();
|
||||
}
|
||||
|
||||
sub presetHome
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Home Preset" );
|
||||
my $cmd = "PanSingleMoveDegree=1\nTiltSingleMoveDegree=1\nPanTiltSingleMove=4";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,322 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Panasonic IP Control Protocol Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the implementation of the Panasonic IP camera control
|
||||
# protocol
|
||||
#
|
||||
package ZoneMinder::Control::PanasonicIP;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
require ZoneMinder::Control;
|
||||
|
||||
our @ISA = qw(ZoneMinder::Control);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Panasonic IP Control Protocol
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
use ZoneMinder::Config qw(:all);
|
||||
|
||||
use Time::HiRes qw( usleep );
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my $id = shift;
|
||||
my $self = ZoneMinder::Control->new( $id );
|
||||
bless( $self, $class );
|
||||
srand( time() );
|
||||
return $self;
|
||||
}
|
||||
|
||||
our $AUTOLOAD;
|
||||
|
||||
sub AUTOLOAD
|
||||
{
|
||||
my $self = shift;
|
||||
my $class = ref($self) || croak( "$self not object" );
|
||||
my $name = $AUTOLOAD;
|
||||
$name =~ s/.*://;
|
||||
if ( exists($self->{$name}) )
|
||||
{
|
||||
return( $self->{$name} );
|
||||
}
|
||||
Fatal( "Can't access $name member of object of class $class" );
|
||||
}
|
||||
|
||||
sub open
|
||||
{
|
||||
my $self = shift;
|
||||
|
||||
$self->loadMonitor();
|
||||
|
||||
use LWP::UserAgent;
|
||||
$self->{ua} = LWP::UserAgent->new;
|
||||
$self->{ua}->agent( "ZoneMinder Control Agent/".ZM_VERSION );
|
||||
|
||||
$self->{state} = 'open';
|
||||
}
|
||||
|
||||
sub close
|
||||
{
|
||||
my $self = shift;
|
||||
$self->{state} = 'closed';
|
||||
}
|
||||
|
||||
sub printMsg
|
||||
{
|
||||
my $self = shift;
|
||||
my $msg = shift;
|
||||
my $msg_len = length($msg);
|
||||
|
||||
Debug( $msg."[".$msg_len."]" );
|
||||
}
|
||||
|
||||
sub sendCmd
|
||||
{
|
||||
my $self = shift;
|
||||
my $cmd = shift;
|
||||
|
||||
my $result = undef;
|
||||
|
||||
printMsg( $cmd, "Tx" );
|
||||
|
||||
my $req = HTTP::Request->new( GET=>"http://".$self->{Monitor}->{ControlAddress}."/$cmd" );
|
||||
my $res = $self->{ua}->request($req);
|
||||
|
||||
if ( $res->is_success )
|
||||
{
|
||||
$result = !undef;
|
||||
}
|
||||
else
|
||||
{
|
||||
Error( "Error check failed: '".$res->status_line()."'" );
|
||||
}
|
||||
|
||||
return( $result );
|
||||
}
|
||||
|
||||
sub cameraReset
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Camera Reset" );
|
||||
my $cmd = "nphRestart?PAGE=Restart&Restart=OK";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConUp
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Up" );
|
||||
my $cmd = "nphControlCamera?Direction=TiltUp";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConDown
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Down" );
|
||||
my $cmd = "nphControlCamera?Direction=TiltDown";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConLeft
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Left" );
|
||||
my $cmd = "nphControlCamera?Direction=PanLeft";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConRight
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Right" );
|
||||
my $cmd = "nphControlCamera?Direction=PanRight";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveMap
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $xcoord = $self->getParam( $params, 'xcoord' );
|
||||
my $ycoord = $self->getParam( $params, 'ycoord' );
|
||||
Debug( "Move Map to $xcoord,$ycoord" );
|
||||
my $cmd = "nphControlCamera?Direction=Direct&NewPosition.x=$xcoord&NewPosition.y=$ycoord&Width=".$self->{Monitor}->{Width}."&Height=".$self->{Monitor}->{Height};
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub zoomConTele
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'step' );
|
||||
Debug( "Zoom Tele" );
|
||||
my $cmd = "nphControlCamera?Direction=ZoomTele";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub zoomConWide
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'step' );
|
||||
Debug( "Zoom Wide" );
|
||||
my $cmd = "nphControlCamera?Direction=ZoomWide";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub focusConNear
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'step' );
|
||||
Debug( "Focus Near" );
|
||||
my $cmd = "nphControlCamera?Direction=FocusNear";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub focusConFar
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'step' );
|
||||
Debug( "Focus Far" );
|
||||
my $cmd = "nphControlCamera?Direction=FocusFar";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub focusAuto
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Focus Auto" );
|
||||
my $cmd = "nphControlCamera?Direction=FocusAuto";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub focusMan
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Focus Manual" );
|
||||
my $cmd = "/axis-cgi/com/ptz.cgi?autofocus=off";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub presetClear
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $preset = $self->getParam( $params, 'preset' );
|
||||
Debug( "Clear Preset $preset" );
|
||||
my $cmd = "nphPresetNameCheck?Data=$preset";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub presetSet
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $preset = $self->getParam( $params, 'preset' );
|
||||
Debug( "Set Preset $preset" );
|
||||
my $cmd = "nphPresetNameCheck?PresetName=$preset&Data=$preset";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub presetGoto
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $preset = $self->getParam( $params, 'preset' );
|
||||
Debug( "Goto Preset $preset" );
|
||||
my $cmd = "nphControlCamera?Direction=Preset&PresetOperation=Move&Data=$preset";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub presetHome
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Home Preset" );
|
||||
my $cmd = "nphControlCamera?Direction=HomePosition";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,735 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Pelco-D Control Protocol Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the implementation of the Pelco-D camera control
|
||||
# protocol
|
||||
#
|
||||
package ZoneMinder::Control::PelcoD;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
require ZoneMinder::Control;
|
||||
|
||||
our @ISA = qw(ZoneMinder::Control);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Pelco-D Control Protocol
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
use Time::HiRes qw( usleep );
|
||||
|
||||
use constant SYNC => 0xff;
|
||||
use constant COMMAND_GAP => 100000; # In ms
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my $id = shift;
|
||||
my $self = ZoneMinder::Control->new( $id );
|
||||
bless( $self, $class );
|
||||
srand( time() );
|
||||
return $self;
|
||||
}
|
||||
|
||||
our $AUTOLOAD;
|
||||
|
||||
sub AUTOLOAD
|
||||
{
|
||||
my $self = shift;
|
||||
my $class = ref($self) || croak( "$self not object" );
|
||||
my $name = $AUTOLOAD;
|
||||
$name =~ s/.*://;
|
||||
if ( exists($self->{$name}) )
|
||||
{
|
||||
return( $self->{$name} );
|
||||
}
|
||||
Fatal( "Can't access $name member of object of class $class" );
|
||||
}
|
||||
|
||||
sub open
|
||||
{
|
||||
my $self = shift;
|
||||
|
||||
$self->loadMonitor();
|
||||
|
||||
use Device::SerialPort;
|
||||
$self->{port} = new Device::SerialPort( $self->{Monitor}->{ControlDevice} );
|
||||
$self->{port}->baudrate(2400);
|
||||
$self->{port}->databits(8);
|
||||
$self->{port}->parity('none');
|
||||
$self->{port}->stopbits(1);
|
||||
$self->{port}->handshake('none');
|
||||
|
||||
$self->{port}->read_const_time(50);
|
||||
$self->{port}->read_char_time(10);
|
||||
|
||||
$self->{state} = 'open';
|
||||
}
|
||||
|
||||
sub close
|
||||
{
|
||||
my $self = shift;
|
||||
$self->{state} = 'closed';
|
||||
$self->{port}->close();
|
||||
}
|
||||
|
||||
sub printMsg
|
||||
{
|
||||
if ( logDebugging() )
|
||||
{
|
||||
my $self = shift;
|
||||
my $msg = shift;
|
||||
my $prefix = shift || "";
|
||||
$prefix = $prefix.": " if ( $prefix );
|
||||
|
||||
my $line_length = 16;
|
||||
my $msg_len = int(@$msg);
|
||||
|
||||
my $msg_str = $prefix;
|
||||
for ( my $i = 0; $i < $msg_len; $i++ )
|
||||
{
|
||||
if ( ($i > 0) && ($i%$line_length == 0) && ($i != ($msg_len-1)) )
|
||||
{
|
||||
$msg_str .= sprintf( "\n%*s", length($prefix), "" );
|
||||
}
|
||||
$msg_str .= sprintf( "%02x ", $msg->[$i] );
|
||||
}
|
||||
$msg_str .= "[".$msg_len."]";
|
||||
Debug( $msg_str );
|
||||
}
|
||||
}
|
||||
|
||||
sub sendCmd
|
||||
{
|
||||
my $self = shift;
|
||||
my $cmd = shift;
|
||||
my $ack = shift || 0;
|
||||
|
||||
my $result = undef;
|
||||
|
||||
my $checksum = 0x00;
|
||||
for ( my $i = 1; $i < int(@$cmd); $i++ )
|
||||
{
|
||||
$checksum += $cmd->[$i];
|
||||
$checksum &= 0xff;
|
||||
}
|
||||
push( @$cmd, $checksum );
|
||||
|
||||
$self->printMsg( $cmd, "Tx" );
|
||||
my $id = $cmd->[0] & 0xf;
|
||||
|
||||
my $tx_msg = pack( "C*", @$cmd );
|
||||
|
||||
#print( "Tx: ".length( $tx_msg )." bytes\n" );
|
||||
my $n_bytes = $self->{port}->write( $tx_msg );
|
||||
if ( !$n_bytes )
|
||||
{
|
||||
Error( "Write failed: $!" );
|
||||
}
|
||||
if ( $n_bytes != length($tx_msg) )
|
||||
{
|
||||
Error( "Incomplete write, only ".$n_bytes." of ".length($tx_msg)." written: $!" );
|
||||
}
|
||||
|
||||
if ( $ack )
|
||||
{
|
||||
Debug( "Waiting for ack" );
|
||||
my $max_wait = 3;
|
||||
my $now = time();
|
||||
while( 1 )
|
||||
{
|
||||
my ( $count, $rx_msg ) = $self->{port}->read(4);
|
||||
|
||||
if ( $count )
|
||||
{
|
||||
#print( "Rx1: ".$count." bytes\n" );
|
||||
my @resp = unpack( "C*", $rx_msg );
|
||||
printMsg( \@resp, "Rx" );
|
||||
|
||||
if ( $resp[0] = 0x80 + ($id<<4) )
|
||||
{
|
||||
if ( ($resp[1] & 0xf0) == 0x40 )
|
||||
{
|
||||
my $socket = $resp[1] & 0x0f;
|
||||
Debug( "Got ack for socket $socket" );
|
||||
$result = !undef;
|
||||
}
|
||||
else
|
||||
{
|
||||
Error( "Got bogus response" );
|
||||
}
|
||||
last;
|
||||
}
|
||||
else
|
||||
{
|
||||
Error( "Got message for camera ".(($resp[0]-0x80)>>4) );
|
||||
}
|
||||
}
|
||||
if ( (time() - $now) > $max_wait )
|
||||
{
|
||||
Warning( "Response timeout" );
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub remoteReset
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Remote Reset" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x0f, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub resetDefaults
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Reset Defaults" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x29, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub cameraOff
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Camera Off" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x08, 0x00, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub cameraOn
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Camera On" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x88, 0x00, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub autoScan
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Auto Scan" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x90, 0x00, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub manScan
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Manual Scan" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x10, 0x00, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub stop
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Stop" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x00, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub moveConUp
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'tiltspeed' );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Up" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x08, 0x00, $speed );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop( $params );
|
||||
}
|
||||
}
|
||||
|
||||
sub moveConDown
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'tiltspeed' );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Down" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x10, 0x00, $speed );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop();
|
||||
}
|
||||
}
|
||||
|
||||
sub moveConLeft
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'panspeed' );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Left" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x04, $speed, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop();
|
||||
}
|
||||
}
|
||||
|
||||
sub moveConRight
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'panspeed' );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Right" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x02, $speed, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop();
|
||||
}
|
||||
}
|
||||
|
||||
sub moveConUpLeft
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panspeed = $self->getParam( $params, 'panspeed', 0x3f );
|
||||
my $tiltspeed = $self->getParam( $params, 'tiltspeed', 0x3f );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Up/Left" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x0c, $panspeed, $tiltspeed );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop();
|
||||
}
|
||||
}
|
||||
|
||||
sub moveConUpRight
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panspeed = $self->getParam( $params, 'panspeed', 0x3f );
|
||||
my $tiltspeed = $self->getParam( $params, 'tiltspeed', 0x3f );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Up/Right" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x0a, $panspeed, $tiltspeed );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop();
|
||||
}
|
||||
}
|
||||
|
||||
sub moveConDownLeft
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panspeed = $self->getParam( $params, 'panspeed', 0x3f );
|
||||
my $tiltspeed = $self->getParam( $params, 'tiltspeed', 0x3f );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Down/Left" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x14, $panspeed, $tiltspeed );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop();
|
||||
}
|
||||
}
|
||||
|
||||
sub moveConDownRight
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panspeed = $self->getParam( $params, 'panspeed', 0x3f );
|
||||
my $tiltspeed = $self->getParam( $params, 'tiltspeed', 0x3f );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Down/Right" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x12, $panspeed, $tiltspeed );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop();
|
||||
}
|
||||
}
|
||||
|
||||
sub moveStop
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Stop" );
|
||||
$self->stop();
|
||||
}
|
||||
|
||||
sub flip180
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Flip 180" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x07, 0x00, 0x21 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub zeroPan
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Zero Pan" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x07, 0x00, 0x22 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub _setZoomSpeed
|
||||
{
|
||||
my $self = shift;
|
||||
my $speed = shift;
|
||||
Debug( "Set Zoom Speed $speed" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x25, 0x00, $speed );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub zoomStop
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Zoom Stop" );
|
||||
$self->stop();
|
||||
$self->_setZoomSpeed( 0 );
|
||||
}
|
||||
|
||||
sub zoomConTele
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'speed', 0x01 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Zoom Tele" );
|
||||
$self->_setZoomSpeed( $speed );
|
||||
usleep( COMMAND_GAP );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x20, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->zoomStop();
|
||||
}
|
||||
}
|
||||
|
||||
sub zoomConWide
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'speed', 0x01 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Zoom Wide" );
|
||||
$self->_setZoomSpeed( $speed );
|
||||
usleep( COMMAND_GAP );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x40, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->zoomStop();
|
||||
}
|
||||
}
|
||||
|
||||
sub _setFocusSpeed
|
||||
{
|
||||
my $self = shift;
|
||||
my $speed = shift;
|
||||
Debug( "Set Focus Speed $speed" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x27, 0x00, $speed );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub focusConNear
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'speed', 0x03 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Focus Near" );
|
||||
$self->_setFocusSpeed( $speed );
|
||||
usleep( COMMAND_GAP );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x01, 0x00, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->_setFocusSpeed( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
sub focusConFar
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'speed', 0x03 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Focus Far" );
|
||||
$self->_setFocusSpeed( $speed );
|
||||
usleep( COMMAND_GAP );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x80, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->_setFocusSpeed( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
sub focusStop
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Focus Stop" );
|
||||
$self->stop();
|
||||
$self->_setFocusSpeed( 0 );
|
||||
}
|
||||
|
||||
sub focusAuto
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Focus Auto" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x2b, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub focusMan
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Focus Man" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x2b, 0x00, 0x02 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub _setIrisSpeed
|
||||
{
|
||||
my $self = shift;
|
||||
my $speed = shift;
|
||||
Debug( "Set Iris Speed $speed" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x27, 0x00, $speed );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub irisConClose
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Iris Close" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x04, 0x00, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->_setIrisSpeed( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
sub irisConOpen
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Iris Open" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x02, 0x80, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->_setIrisSpeed( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
sub irisStop
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Iris Stop" );
|
||||
$self->stop();
|
||||
$self->_setIrisSpeed( 0 );
|
||||
}
|
||||
|
||||
sub irisAuto
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Iris Auto" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x2d, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub irisMan
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Iris Man" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x2d, 0x00, 0x02 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub writeScreen
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $string = $self->getParam( $params, 'string' );
|
||||
Debug( "Writing '$string' to screen" );
|
||||
|
||||
my @chars = unpack( "C*", $string );
|
||||
for ( my $i = 0; $i < length($string); $i++ )
|
||||
{
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x15, $i, $chars[$i] );
|
||||
$self->sendCmd( \@msg );
|
||||
usleep( COMMAND_GAP );
|
||||
}
|
||||
}
|
||||
|
||||
sub clearScreen
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Clear Screen" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x17, 0x00, 0x00 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub clearPreset
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $preset = $self->getParam( $params, 'preset', 1 );
|
||||
Debug( "Clear Preset $preset" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x05, 0x00, $preset );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub presetSet
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $preset = $self->getParam( $params, 'preset', 1 );
|
||||
Debug( "Set Preset $preset" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x03, 0x00, $preset );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub presetGoto
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $preset = $self->getParam( $params, 'preset', 1 );
|
||||
Debug( "Goto Preset $preset" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x07, 0x00, $preset );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub presetHome
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Home Preset" );
|
||||
my @msg = ( SYNC, $self->{Monitor}->{ControlAddress}, 0x00, 0x07, 0x00, 0x22 );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub reset
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Reset" );
|
||||
$self->remoteReset();
|
||||
$self->resetDefaults();
|
||||
}
|
||||
|
||||
sub wake
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Wake" );
|
||||
$self->cameraOn();
|
||||
}
|
||||
|
||||
sub sleep
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Sleep" );
|
||||
$self->cameraOff();
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,668 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Visca Control Protocol Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the implementation of the Visca camera control
|
||||
# protocol
|
||||
#
|
||||
package ZoneMinder::Control::Visca;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
require ZoneMinder::Control;
|
||||
|
||||
our @ISA = qw(ZoneMinder::Control);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Visca Control Protocol
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
use Time::HiRes qw( usleep );
|
||||
|
||||
use constant SYNC => 0xff;
|
||||
use constant COMMAND_GAP => 100000; # In ms
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my $id = shift;
|
||||
my $self = ZoneMinder::Control->new( $id );
|
||||
bless( $self, $class );
|
||||
srand( time() );
|
||||
return $self;
|
||||
}
|
||||
|
||||
our $AUTOLOAD;
|
||||
|
||||
sub AUTOLOAD
|
||||
{
|
||||
my $self = shift;
|
||||
my $class = ref($self) || croak( "$self not object" );
|
||||
my $name = $AUTOLOAD;
|
||||
$name =~ s/.*://;
|
||||
if ( exists($self->{$name}) )
|
||||
{
|
||||
return( $self->{$name} );
|
||||
}
|
||||
Fatal( "Can't access $name member of object of class $class" );
|
||||
}
|
||||
|
||||
sub open
|
||||
{
|
||||
my $self = shift;
|
||||
|
||||
$self->loadMonitor();
|
||||
|
||||
use Device::SerialPort;
|
||||
$self->{port} = new Device::SerialPort( $self->{Monitor}->{ControlDevice} );
|
||||
$self->{port}->baudrate(9600);
|
||||
$self->{port}->databits(8);
|
||||
$self->{port}->parity('none');
|
||||
$self->{port}->stopbits(1);
|
||||
$self->{port}->handshake('rts');
|
||||
$self->{port}->stty_echo(0);
|
||||
|
||||
#$self->{port}->read_const_time(250);
|
||||
$self->{port}->read_char_time(2);
|
||||
|
||||
$self->{state} = 'open';
|
||||
}
|
||||
|
||||
sub close
|
||||
{
|
||||
my $self = shift;
|
||||
$self->{state} = 'closed';
|
||||
$self->{port}->close();
|
||||
}
|
||||
|
||||
sub printMsg
|
||||
{
|
||||
if ( logDebugging() )
|
||||
{
|
||||
my $self = shift;
|
||||
my $msg = shift;
|
||||
my $prefix = shift || "";
|
||||
$prefix = $prefix.": " if ( $prefix );
|
||||
|
||||
my $line_length = 16;
|
||||
my $msg_len = int(@$msg);
|
||||
|
||||
my $msg_str = $prefix;
|
||||
for ( my $i = 0; $i < $msg_len; $i++ )
|
||||
{
|
||||
if ( ($i > 0) && ($i%$line_length == 0) && ($i != ($msg_len-1)) )
|
||||
{
|
||||
$msg_str .= sprintf( "\n%*s", length($prefix), "" );
|
||||
}
|
||||
$msg_str .= sprintf( "%02x ", $msg->[$i] );
|
||||
}
|
||||
$msg_str .= "[".$msg_len."]";
|
||||
Debug( $msg_str );
|
||||
}
|
||||
}
|
||||
|
||||
sub sendCmd
|
||||
{
|
||||
my $self = shift;
|
||||
my $cmd = shift;
|
||||
my $ack = shift || 0;
|
||||
my $cmp = shift || 0;
|
||||
|
||||
my $result = undef;
|
||||
|
||||
$self->printMsg( $cmd, "Tx" );
|
||||
my $id = $cmd->[0] & 0xf;
|
||||
|
||||
my $tx_msg = pack( "C*", @$cmd );
|
||||
|
||||
#print( "Tx: ".length( $tx_msg )." bytes\n" );
|
||||
my $n_bytes = $self->{port}->write( $tx_msg );
|
||||
if ( !$n_bytes )
|
||||
{
|
||||
Error( "Write failed: $!" );
|
||||
}
|
||||
if ( $n_bytes != length($tx_msg) )
|
||||
{
|
||||
Error( "Incomplete write, only ".$n_bytes." of ".length($tx_msg)." written: $!" );
|
||||
}
|
||||
|
||||
if ( $ack )
|
||||
{
|
||||
Debug( "Waiting for ack" );
|
||||
my $max_wait = 3;
|
||||
my $now = time();
|
||||
while( 1 )
|
||||
{
|
||||
my ( $count, $rx_msg ) = $self->{port}->read(4);
|
||||
|
||||
if ( $count )
|
||||
{
|
||||
#print( "Rx1: ".$count." bytes\n" );
|
||||
my @resp = unpack( "C*", $rx_msg );
|
||||
$self->printMsg( \@resp, "Rx" );
|
||||
|
||||
if ( $resp[0] = 0x80 + ($id<<4) )
|
||||
{
|
||||
if ( ($resp[1] & 0xf0) == 0x40 )
|
||||
{
|
||||
my $socket = $resp[1] & 0x0f;
|
||||
Debug( "Got ack for socket $socket" );
|
||||
$result = !undef;
|
||||
}
|
||||
else
|
||||
{
|
||||
Error( "Got bogus response" );
|
||||
}
|
||||
last;
|
||||
}
|
||||
else
|
||||
{
|
||||
Error( "Got message for camera ".(($resp[0]-0x80)>>4) );
|
||||
}
|
||||
}
|
||||
if ( (time() - $now) > $max_wait )
|
||||
{
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $cmp )
|
||||
{
|
||||
Debug( "Waiting for command complete" );
|
||||
my $max_wait = 10;
|
||||
my $now = time();
|
||||
while( 1 )
|
||||
{
|
||||
#print( "Waiting\n" );
|
||||
my ( $count, $rx_msg ) = $self->{port}->read(16);
|
||||
|
||||
if ( $count )
|
||||
{
|
||||
#print( "Rx1: ".$count." bytes\n" );
|
||||
my @resp = unpack( "C*", $rx_msg );
|
||||
$self->printMsg( \@resp, "Rx" );
|
||||
|
||||
if ( $resp[0] = 0x80 + ($id<<4) )
|
||||
{
|
||||
if ( ($resp[1] & 0xf0) == 0x50 )
|
||||
{
|
||||
Debug( "Got command complete" );
|
||||
$result = !undef;
|
||||
}
|
||||
else
|
||||
{
|
||||
Error( "Got bogus response" );
|
||||
}
|
||||
last;
|
||||
}
|
||||
else
|
||||
{
|
||||
Error( "Got message for camera ".(($resp[0]-0x80)>>4) );
|
||||
}
|
||||
}
|
||||
if ( (time() - $now) > $max_wait )
|
||||
{
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
return( $result );
|
||||
}
|
||||
|
||||
sub cameraOff
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Camera Off\n" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x04, 0x00, 0x0, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub cameraOn
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Camera On\n" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x04, 0x00, 0x2, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub stop
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Stop\n" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x01, 0x00, 0x00, 0x03, 0x03, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub moveConUp
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'tiltspeed', 0x40 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Up" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x01, 0x00, $speed, 0x03, 0x01, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop( $params );
|
||||
}
|
||||
}
|
||||
|
||||
sub moveConDown
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'tiltspeed', 0x40 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Down" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x01, 0x00, $speed, 0x03, 0x02, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop( $params );
|
||||
}
|
||||
}
|
||||
|
||||
sub movConLeft
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'panspeed', 0x40 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Left" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x01, $speed, 0x00, 0x01, 0x03, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop( $params );
|
||||
}
|
||||
}
|
||||
|
||||
sub moveConRight
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'panspeed', 0x40 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Right" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x01, $speed, 0x00, 0x02, 0x03, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop( $params );
|
||||
}
|
||||
}
|
||||
|
||||
sub moveUpLeft
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panspeed = $self->getParam( $params, 'panspeed', 0x40 );
|
||||
my $tiltspeed = $self->getParam( $params, 'tiltspeed', 0x40 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Up/Left" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x01, $panspeed, $tiltspeed, 0x01, 0x01, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop( $params );
|
||||
}
|
||||
}
|
||||
|
||||
sub moveUpRight
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panspeed = $self->getParam( $params, 'panspeed', 0x40 );
|
||||
my $tiltspeed = $self->getParam( $params, 'tiltspeed', 0x40 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Up/Right" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x01, $panspeed, $tiltspeed, 0x02, 0x01, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop( $params );
|
||||
}
|
||||
}
|
||||
|
||||
sub moveDownLeft
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panspeed = $self->getParam( $params, 'panspeed', 0x40 );
|
||||
my $tiltspeed = $self->getParam( $params, 'tiltspeed', 0x40 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Down/Left" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x01, $panspeed, $tiltspeed, 0x01, 0x02, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop( $params );
|
||||
}
|
||||
}
|
||||
|
||||
sub moveDownRight
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panspeed = $self->getParam( $params, 'panspeed', 0x40 );
|
||||
my $tiltspeed = $self->getParam( $params, 'tiltspeed', 0x40 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Move Down/Right" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x01, $panspeed, $tiltspeed, 0x02, 0x02, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->stop( $params );
|
||||
}
|
||||
}
|
||||
|
||||
sub moveRelUp
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'tiltstep' );
|
||||
my $speed = $self->getParam( $params, 'tiltspeed', 0x40 );
|
||||
Debug( "Step Up" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x03, 0x00, $speed, 0x00, 0x00, 0x00, 0x00, ($step&0xf000)>>12, ($step&0x0f00)>>8, ($step&0x00f0)>>4, ($step&0x000f)>>0, SYNC );
|
||||
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub moveRelDown
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = -$self->getParam( $params, 'tiltstep' );
|
||||
my $speed = $self->getParam( $params, 'tiltspeed', 0x40 );
|
||||
Debug( "Step Down" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x03, 0x00, $speed, 0x00, 0x00, 0x00, 0x00, ($step&0xf000)>>12, ($step&0x0f00)>>8, ($step&0x00f0)>>4, ($step&0x000f)>>0, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub moveRelLeft
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = -$self->getParam( $params, 'panstep' );
|
||||
my $speed = $self->getParam( $params, 'panspeed', 0x40 );
|
||||
Debug( "Step Left" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x03, $speed, 0x00, ($step&0xf000)>>12, ($step&0x0f00)>>8, ($step&0x00f0)>>4, ($step&0x000f)>>0, 0x00, 0x00, 0x00, 0x00, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub moveRelRight
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $step = $self->getParam( $params, 'panstep' );
|
||||
my $speed = $self->getParam( $params, 'panspeed', 0x40 );
|
||||
Debug( "Step Right" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x03, $speed, 0x00, ($step&0xf000)>>12, ($step&0x0f00)>>8, ($step&0x00f0)>>4, ($step&0x000f)>>0, 0x00, 0x00, 0x00, 0x00, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub moveRelUpLeft
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panstep = -$self->getParam( $params, 'panstep' );
|
||||
my $tiltstep = $self->getParam( $params, 'tiltstep' );
|
||||
my $panspeed = $self->getParam( $params, 'panspeed', 0x40 );
|
||||
my $tiltspeed = $self->getParam( $params, 'tiltspeed', 0x40 );
|
||||
Debug( "Step Up/Left" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x03, $panspeed, $tiltspeed, ($panstep&0xf000)>>12, ($panstep&0x0f00)>>8, ($panstep&0x00f0)>>4, ($panstep&0x000f)>>0, ($tiltstep&0xf000)>>12, ($tiltstep&0x0f00)>>8, ($tiltstep&0x00f0)>>4, ($tiltstep&0x000f)>>0, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub moveRelUpRight
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panstep = $self->getParam( $params, 'panstep' );
|
||||
my $tiltstep = $self->getParam( $params, 'tiltstep' );
|
||||
my $panspeed = $self->getParam( $params, 'panspeed', 0x40 );
|
||||
my $tiltspeed = $self->getParam( $params, 'tiltspeed', 0x40 );
|
||||
Debug( "Step Up/Right" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x03, $panspeed, $tiltspeed, ($panstep&0xf000)>>12, ($panstep&0x0f00)>>8, ($panstep&0x00f0)>>4, ($panstep&0x000f)>>0, ($tiltstep&0xf000)>>12, ($tiltstep&0x0f00)>>8, ($tiltstep&0x00f0)>>4, ($tiltstep&0x000f)>>0, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub moveRelDownLeft
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panstep = -$self->getParam( $params, 'panstep' );
|
||||
my $tiltstep = -$self->getParam( $params, 'tiltstep' );
|
||||
my $panspeed = $self->getParam( $params, 'panspeed', 0x40 );
|
||||
my $tiltspeed = $self->getParam( $params, 'tiltspeed', 0x40 );
|
||||
Debug( "Step Down/Left" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x03, $panspeed, $tiltspeed, ($panstep&0xf000)>>12, ($panstep&0x0f00)>>8, ($panstep&0x00f0)>>4, ($panstep&0x000f)>>0, ($tiltstep&0xf000)>>12, ($tiltstep&0x0f00)>>8, ($tiltstep&0x00f0)>>4, ($tiltstep&0x000f)>>0, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub moveRelDownRight
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $panstep = $self->getParam( $params, 'panstep' );
|
||||
my $tiltstep = -$self->getParam( $params, 'tiltstep' );
|
||||
my $panspeed = $self->getParam( $params, 'panspeed', 0x40 );
|
||||
my $tiltspeed = $self->getParam( $params, 'tiltspeed', 0x40 );
|
||||
Debug( "Step Down/Right" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x03, $panspeed, $tiltspeed, ($panstep&0xf000)>>12, ($panstep&0x0f00)>>8, ($panstep&0x00f0)>>4, ($panstep&0x000f)>>0, ($tiltstep&0xf000)>>12, ($tiltstep&0x0f00)>>8, ($tiltstep&0x00f0)>>4, ($tiltstep&0x000f)>>0, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub zoomConTele
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'speed', 0x06 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Zoom Tele" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x04, 0x07, 0x20|$speed, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->zoomStop();
|
||||
}
|
||||
}
|
||||
|
||||
sub zoomWide
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $speed = $self->getParam( $params, 'speed', 0x06 );
|
||||
my $autostop = $self->getParam( $params, 'autostop', 0 );
|
||||
Debug( "Zoom Wide" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x04, 0x07, 0x30|$speed, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
if( $autostop && $self->{Monitor}->{AutoStopTimeout} )
|
||||
{
|
||||
usleep( $self->{Monitor}->{AutoStopTimeout} );
|
||||
$self->zoomStop();
|
||||
}
|
||||
}
|
||||
|
||||
sub zoomStop
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
Debug( "Zoom Stop" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x04, 0x07, 0x00, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub focusConNear
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
Debug( "Focus Near" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x04, 0x08, 0x03, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub focusConFar
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
Debug( "Focus Far" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x04, 0x08, 0x02, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub focusStop
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
Debug( "Focus Stop" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x04, 0x08, 0x00, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub focusAuto
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
Debug( "Focus Auto" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x04, 0x38, 0x02, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub focusMan
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
Debug( "Focus Man" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x04, 0x38, 0x03, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub presetClear
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $preset = $self->getParam( $params, 'preset', 1 );
|
||||
Debug( "Clear Preset $preset" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x04, 0x3f, 0x00, $preset, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub presetSet
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $preset = $self->getParam( $params, 'preset', 1 );
|
||||
Debug( "Set Preset $preset" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x04, 0x3f, 0x01, $preset, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub presetGoto
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
my $preset = $self->getParam( $params, 'preset', 1 );
|
||||
Debug( "Goto Preset $preset" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x04, 0x3f, 0x02, $preset, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
sub presetHome
|
||||
{
|
||||
my $self = shift;
|
||||
my $params = shift;
|
||||
Debug( "Home Preset" );
|
||||
my @msg = ( 0x80|$self->{Monitor}->{ControlAddress}, 0x01, 0x06, 0x04, SYNC );
|
||||
$self->sendCmd( \@msg );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,252 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder mjpg STreamer Control Protocol Module, $Date: 2007-11-04 17:30:29 +0000 (Sun, 04 Nov 2007) $, $Revision: 2229 $
|
||||
# Copyright (C) 2003, 2004, 2005, 2006 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the implementation of the mjpg streamer camera control
|
||||
# protocol
|
||||
#
|
||||
package ZoneMinder::Control::mjpgStreamer;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
require ZoneMinder::Control;
|
||||
|
||||
our @ISA = qw(ZoneMinder::Control);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# mjpgSTreamer Control Protocol
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
use ZoneMinder::Config qw(:all);
|
||||
|
||||
use Time::HiRes qw( usleep );
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my $id = shift;
|
||||
my $self = ZoneMinder::Control->new( $id );
|
||||
Debug( "Camera New" );
|
||||
bless( $self, $class );
|
||||
srand( time() );
|
||||
return $self;
|
||||
}
|
||||
|
||||
our $AUTOLOAD;
|
||||
|
||||
sub AUTOLOAD
|
||||
{
|
||||
my $self = shift;
|
||||
my $class = ref($self) || croak( "$self not object" );
|
||||
my $name = $AUTOLOAD;
|
||||
Debug( "Camera AUTOLOAD" );
|
||||
$name =~ s/.*://;
|
||||
if ( exists($self->{$name}) )
|
||||
{
|
||||
return( $self->{$name} );
|
||||
}
|
||||
Fatal( "Can't access $name member of object of class $class" );
|
||||
}
|
||||
|
||||
sub open
|
||||
{
|
||||
my $self = shift;
|
||||
|
||||
$self->loadMonitor();
|
||||
Debug( "Camera open" );
|
||||
use LWP::UserAgent;
|
||||
$self->{ua} = LWP::UserAgent->new;
|
||||
$self->{ua}->agent( "ZoneMinder Control Agent/".ZM_VERSION );
|
||||
|
||||
$self->{state} = 'open';
|
||||
}
|
||||
|
||||
sub close
|
||||
{
|
||||
my $self = shift;
|
||||
$self->{state} = 'closed';
|
||||
}
|
||||
|
||||
sub printMsg
|
||||
{
|
||||
my $self = shift;
|
||||
my $msg = shift;
|
||||
my $msg_len = length($msg);
|
||||
|
||||
Debug( $msg."[".$msg_len."]" );
|
||||
}
|
||||
|
||||
sub sendCmd
|
||||
{
|
||||
my $self = shift;
|
||||
my $cmd = shift;
|
||||
|
||||
my $result = undef;
|
||||
|
||||
printMsg( $cmd, "Tx" );
|
||||
|
||||
my $req = HTTP::Request->new( GET=>"http://".$self->{Monitor}->{ControlAddress}."/$cmd" );
|
||||
my $res = $self->{ua}->request($req);
|
||||
|
||||
if ( $res->is_success )
|
||||
{
|
||||
$result = !undef;
|
||||
}
|
||||
else
|
||||
{
|
||||
Error( "Error check failed: '".$res->status_line()."'" );
|
||||
}
|
||||
|
||||
return( $result );
|
||||
}
|
||||
|
||||
sub Up
|
||||
{
|
||||
my $self = shift;
|
||||
$self->moveConUp();
|
||||
}
|
||||
|
||||
sub Down
|
||||
{
|
||||
my $self = shift;
|
||||
$self->moveConDown();
|
||||
}
|
||||
|
||||
sub Left
|
||||
{
|
||||
my $self = shift;
|
||||
$self->moveConLeft();
|
||||
}
|
||||
|
||||
sub Right
|
||||
{
|
||||
my $self = shift;
|
||||
$self->moveConRight();
|
||||
}
|
||||
|
||||
|
||||
sub reset
|
||||
{
|
||||
my $self = shift;
|
||||
$self->cameraReset();
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub cameraReset
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Camera Reset" );
|
||||
my $cmd = "?action=command&command=reset_pan_tilt";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConUp
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Up" );
|
||||
my $cmd = "?action=command&command=tilt_minus";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConDown
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Down" );
|
||||
my $cmd = "?action=command&command=tilt_plus";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConLeft
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Left" );
|
||||
my $cmd = "?action=command&command=pan_plus";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub moveConRight
|
||||
{
|
||||
my $self = shift;
|
||||
Debug( "Move Right" );
|
||||
my $cmd = "?action=command&command=pan_minus";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2005 by Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,238 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Database Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the common definitions and functions used by the rest
|
||||
# of the ZoneMinder scripts
|
||||
#
|
||||
package ZoneMinder::Database;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require Exporter;
|
||||
require ZoneMinder::Base;
|
||||
|
||||
our @ISA = qw(Exporter ZoneMinder::Base);
|
||||
|
||||
# Items to export into callers namespace by default. Note: do not export
|
||||
# names by default without a very good reason. Use EXPORT_OK instead.
|
||||
# Do not simply export all your public functions/methods/constants.
|
||||
|
||||
# This allows declaration use ZoneMinder ':all';
|
||||
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
|
||||
# will save memory.
|
||||
our %EXPORT_TAGS = (
|
||||
'functions' => [ qw(
|
||||
zmDbConnect
|
||||
zmDbDisconnect
|
||||
zmDbGetMonitors
|
||||
zmDbGetMonitor
|
||||
zmDbGetMonitorAndControl
|
||||
) ]
|
||||
);
|
||||
push( @{$EXPORT_TAGS{all}}, @{$EXPORT_TAGS{$_}} ) foreach keys %EXPORT_TAGS;
|
||||
|
||||
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
|
||||
|
||||
our @EXPORT = qw();
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Database Access
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
use ZoneMinder::Config qw(:all);
|
||||
|
||||
use Carp;
|
||||
|
||||
our $dbh = undef;
|
||||
|
||||
sub zmDbConnect( ;$ )
|
||||
{
|
||||
my $force = shift;
|
||||
if ( $force )
|
||||
{
|
||||
zmDbDisconnect();
|
||||
}
|
||||
if ( !defined( $dbh ) )
|
||||
{
|
||||
my ( $host, $port ) = ( ZM_DB_HOST =~ /^([^:]+)(?::(.+))?$/ );
|
||||
|
||||
if ( defined($port) )
|
||||
{
|
||||
$dbh = DBI->connect( "DBI:mysql:database=".ZM_DB_NAME.";host=".$host.";port=".$port, ZM_DB_USER, ZM_DB_PASS );
|
||||
}
|
||||
else
|
||||
{
|
||||
$dbh = DBI->connect( "DBI:mysql:database=".ZM_DB_NAME.";host=".ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );
|
||||
}
|
||||
$dbh->trace( 0 );
|
||||
}
|
||||
return( $dbh );
|
||||
}
|
||||
|
||||
sub zmDbDisconnect()
|
||||
{
|
||||
if ( defined( $dbh ) )
|
||||
{
|
||||
$dbh->disconnect();
|
||||
$dbh = undef;
|
||||
}
|
||||
}
|
||||
|
||||
use constant DB_MON_ALL => 0; # All monitors
|
||||
use constant DB_MON_CAPT => 1; # All monitors that are capturing
|
||||
use constant DB_MON_ACTIVE => 2; # All monitors that are active
|
||||
use constant DB_MON_MOTION => 3; # All monitors that are doing motion detection
|
||||
use constant DB_MON_RECORD => 4; # All monitors that are doing unconditional recording
|
||||
use constant DB_MON_PASSIVE => 5; # All monitors that are in nodect state
|
||||
|
||||
sub zmDbGetMonitors( ;$ )
|
||||
{
|
||||
zmDbConnect();
|
||||
|
||||
my $function = shift || DB_MON_ALL;
|
||||
my $sql = "select * from Monitors";
|
||||
|
||||
if ( $function )
|
||||
{
|
||||
if ( $function == DB_MON_CAPT )
|
||||
{
|
||||
$sql .= " where Function >= 'Monitor'";
|
||||
}
|
||||
elsif ( $function == DB_MON_ACTIVE )
|
||||
{
|
||||
$sql .= " where Function > 'Monitor'";
|
||||
}
|
||||
elsif ( $function == DB_MON_MOTION )
|
||||
{
|
||||
$sql .= " where Function = 'Modect' or Function = 'Mocord'";
|
||||
}
|
||||
elsif ( $function == DB_MON_RECORD )
|
||||
{
|
||||
$sql .= " where Function = 'Record' or Function = 'Mocord'";
|
||||
}
|
||||
elsif ( $function == DB_MON_PASSIVE )
|
||||
{
|
||||
$sql .= " where Function = 'Nodect'";
|
||||
}
|
||||
}
|
||||
my $sth = $dbh->prepare_cached( $sql ) or croak( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
my $res = $sth->execute() or croak( "Can't execute '$sql': ".$sth->errstr() );
|
||||
|
||||
my @monitors;
|
||||
while( my $monitor = $sth->fetchrow_hashref() )
|
||||
{
|
||||
push( @monitors, $monitor );
|
||||
}
|
||||
$sth->finish();
|
||||
return( \@monitors );
|
||||
}
|
||||
|
||||
sub zmDbGetMonitor( $ )
|
||||
{
|
||||
zmDbConnect();
|
||||
|
||||
my $id = shift;
|
||||
|
||||
return( undef ) if ( !defined($id) );
|
||||
|
||||
my $sql = "select * from Monitors where Id = ?";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or croak( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
my $res = $sth->execute( $id ) or croak( "Can't execute '$sql': ".$sth->errstr() );
|
||||
my $monitor = $sth->fetchrow_hashref();
|
||||
|
||||
return( $monitor );
|
||||
}
|
||||
|
||||
sub zmDbGetMonitorAndControl( $ )
|
||||
{
|
||||
zmDbConnect();
|
||||
|
||||
my $id = shift;
|
||||
|
||||
return( undef ) if ( !defined($id) );
|
||||
|
||||
my $sql = "select C.*,M.*,C.Protocol from Monitors as M inner join Controls as C on (M.ControlId = C.Id) where M.Id = ?";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
my $res = $sth->execute( $id ) or Fatal( "Can't execute '$sql': ".$sth->errstr() );
|
||||
my $monitor = $sth->fetchrow_hashref();
|
||||
|
||||
return( $monitor );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,768 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder General Utility Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the common definitions and functions used by the rest
|
||||
# of the ZoneMinder scripts
|
||||
#
|
||||
package ZoneMinder::General;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require Exporter;
|
||||
require ZoneMinder::Base;
|
||||
|
||||
our @ISA = qw(Exporter ZoneMinder::Base);
|
||||
|
||||
# Items to export into callers namespace by default. Note: do not export
|
||||
# names by default without a very good reason. Use EXPORT_OK instead.
|
||||
# Do not simply export all your public functions/methods/constants.
|
||||
|
||||
# This allows declaration use ZoneMinder ':all';
|
||||
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
|
||||
# will save memory.
|
||||
our %EXPORT_TAGS = (
|
||||
'functions' => [ qw(
|
||||
executeShellCommand
|
||||
getCmdFormat
|
||||
runCommand
|
||||
setFileOwner
|
||||
getEventPath
|
||||
createEventPath
|
||||
createEvent
|
||||
deleteEventFiles
|
||||
makePath
|
||||
jsonEncode
|
||||
jsonDecode
|
||||
) ]
|
||||
);
|
||||
push( @{$EXPORT_TAGS{all}}, @{$EXPORT_TAGS{$_}} ) foreach keys %EXPORT_TAGS;
|
||||
|
||||
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
|
||||
|
||||
our @EXPORT = qw();
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# General Utility Functions
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Config qw(:all);
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
use ZoneMinder::Database qw(:all);
|
||||
|
||||
use POSIX;
|
||||
|
||||
# For running general shell commands
|
||||
sub executeShellCommand( $ )
|
||||
{
|
||||
my $command = shift;
|
||||
my $output = qx( $command );
|
||||
my $status = $? >> 8;
|
||||
if ( $status || logDebugging() )
|
||||
{
|
||||
Debug( "Command: $command\n" );
|
||||
chomp( $output );
|
||||
Debug( "Output: $output\n" );
|
||||
}
|
||||
return( $status );
|
||||
}
|
||||
|
||||
sub getCmdFormat()
|
||||
{
|
||||
Debug( "Testing valid shell syntax\n" );
|
||||
|
||||
my ( $name ) = getpwuid( $> );
|
||||
if ( $name eq ZM_WEB_USER )
|
||||
{
|
||||
Debug( "Running as '$name', su commands not needed\n" );
|
||||
return( "" );
|
||||
}
|
||||
|
||||
my $null_command = "true";
|
||||
|
||||
my $prefix = "sudo -u ".ZM_WEB_USER." ";
|
||||
my $suffix = "";
|
||||
my $command = $prefix.$null_command.$suffix;
|
||||
Debug( "Testing \"$command\"\n" );
|
||||
$command .= " > /dev/null 2>&1";
|
||||
my $output = qx($command);
|
||||
my $status = $? >> 8;
|
||||
if ( !$status )
|
||||
{
|
||||
Debug( "Test ok, using format \"$prefix<command>$suffix\"\n" );
|
||||
return( $prefix, $suffix );
|
||||
}
|
||||
else
|
||||
{
|
||||
chomp( $output );
|
||||
Debug( "Test failed, '$output'\n" );
|
||||
|
||||
$prefix = "su ".ZM_WEB_USER." --shell=/bin/sh --command='";
|
||||
$suffix = "'";
|
||||
$command = $prefix.$null_command.$suffix;
|
||||
Debug( "Testing \"$command\"\n" );
|
||||
my $output = qx($command);
|
||||
my $status = $? >> 8;
|
||||
if ( !$status )
|
||||
{
|
||||
Debug( "Test ok, using format \"$prefix<command>$suffix\"\n" );
|
||||
return( $prefix, $suffix );
|
||||
}
|
||||
else
|
||||
{
|
||||
chomp( $output );
|
||||
Debug( "Test failed, '$output'\n" );
|
||||
|
||||
$prefix = "su ".ZM_WEB_USER." -c '";
|
||||
$suffix = "'";
|
||||
$command = $prefix.$null_command.$suffix;
|
||||
Debug( "Testing \"$command\"\n" );
|
||||
$output = qx($command);
|
||||
$status = $? >> 8;
|
||||
if ( !$status )
|
||||
{
|
||||
Debug( "Test ok, using format \"$prefix<command>$suffix\"\n" );
|
||||
return( $prefix, $suffix );
|
||||
}
|
||||
else
|
||||
{
|
||||
chomp( $output );
|
||||
Debug( "Test failed, '$output'\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
Error( "Unable to find valid 'su' syntax\n" );
|
||||
exit( -1 );
|
||||
}
|
||||
|
||||
our $testedShellSyntax = 0;
|
||||
our ( $cmdPrefix, $cmdSuffix );
|
||||
|
||||
# For running ZM daemons etc
|
||||
sub runCommand( $ )
|
||||
{
|
||||
if ( !$testedShellSyntax )
|
||||
{
|
||||
# Determine the appropriate syntax for the su command
|
||||
( $cmdPrefix, $cmdSuffix ) = getCmdFormat();
|
||||
$testedShellSyntax = !undef;
|
||||
}
|
||||
|
||||
my $command = shift;
|
||||
$command = ZM_PATH_BIN."/".$command;
|
||||
if ( $cmdPrefix )
|
||||
{
|
||||
$command = $cmdPrefix.$command.$cmdSuffix;
|
||||
}
|
||||
Debug( "Command: $command\n" );
|
||||
my $output = qx($command);
|
||||
my $status = $? >> 8;
|
||||
chomp( $output );
|
||||
if ( $status || logDebugging() )
|
||||
{
|
||||
if ( $status )
|
||||
{
|
||||
Error( "Unable to run \"$command\", output is \"$output\"\n" );
|
||||
exit( -1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug( "Output: $output\n" );
|
||||
}
|
||||
}
|
||||
return( $output );
|
||||
}
|
||||
|
||||
sub getEventPath( $ )
|
||||
{
|
||||
my $event = shift;
|
||||
|
||||
my $event_path = "";
|
||||
if ( ZM_USE_DEEP_STORAGE )
|
||||
{
|
||||
$event_path = ZM_DIR_EVENTS.'/'.$event->{MonitorId}.'/'.strftime( "%y/%m/%d/%H/%M/%S", localtime($event->{Time}) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$event_path = ZM_DIR_EVENTS.'/'.$event->{MonitorId}.'/'.$event->{Id};
|
||||
}
|
||||
$event_path = ZM_PATH_WEB.'/'.$event_path if ( index(ZM_DIR_EVENTS,'/') != 0 );
|
||||
return( $event_path );
|
||||
}
|
||||
|
||||
sub createEventPath( $ )
|
||||
{
|
||||
#
|
||||
# WARNING assumes running from events directory
|
||||
#
|
||||
my $event = shift;
|
||||
my $eventRootPath = (ZM_DIR_EVENTS=~m|/|)?ZM_DIR_EVENTS:(ZM_PATH_WEB.'/'.ZM_DIR_EVENTS);
|
||||
my $eventPath = $eventRootPath.'/'.$event->{MonitorId};
|
||||
|
||||
if ( ZM_USE_DEEP_STORAGE )
|
||||
{
|
||||
my @startTime = localtime( $event->{StartTime} );
|
||||
|
||||
my @datetimeParts = ();
|
||||
$datetimeParts[0] = sprintf( "%02d", $startTime[5]-100 );
|
||||
$datetimeParts[1] = sprintf( "%02d", $startTime[4]+1 );
|
||||
$datetimeParts[2] = sprintf( "%02d", $startTime[3] );
|
||||
$datetimeParts[3] = sprintf( "%02d", $startTime[2] );
|
||||
$datetimeParts[4] = sprintf( "%02d", $startTime[1] );
|
||||
$datetimeParts[5] = sprintf( "%02d", $startTime[0] );
|
||||
|
||||
my $datePath = join('/',@datetimeParts[0..2]);
|
||||
my $timePath = join('/',@datetimeParts[3..5]);
|
||||
|
||||
makePath( $datePath, $eventPath );
|
||||
$eventPath .= '/'.$datePath;
|
||||
|
||||
# Create event id symlink
|
||||
my $idFile = sprintf( "%s/.%d", $eventPath, $event->{Id} );
|
||||
symlink( $timePath, $idFile ) or Fatal( "Can't symlink $idFile -> $eventPath: $!" );
|
||||
|
||||
makePath( $timePath, $eventPath );
|
||||
$eventPath .= '/'.$timePath;
|
||||
setFileOwner( $idFile ); # Must come after directory has been created
|
||||
|
||||
# Create empty id tag file
|
||||
$idFile = sprintf( "%s/.%d", $eventPath, $event->{Id} );
|
||||
open( ID_FP, ">$idFile" ) or Fatal( "Can't open $idFile: $!" );
|
||||
close( ID_FP );
|
||||
setFileOwner( $idFile );
|
||||
}
|
||||
else
|
||||
{
|
||||
makePath( $event->{Id}, $eventPath );
|
||||
$eventPath .= '/'.$event->{Id};
|
||||
|
||||
my $idFile = sprintf( "%s/.%d", $eventPath, $event->{Id} );
|
||||
open( ID_FP, ">$idFile" ) or Fatal( "Can't open $idFile: $!" );
|
||||
close( ID_FP );
|
||||
setFileOwner( $idFile );
|
||||
}
|
||||
return( $eventPath );
|
||||
}
|
||||
|
||||
use Data::Dumper;
|
||||
|
||||
our $_setFileOwner = undef;
|
||||
our ( $_ownerUid, $_ownerGid );
|
||||
|
||||
sub _checkProcessOwner()
|
||||
{
|
||||
if ( !defined($_setFileOwner) )
|
||||
{
|
||||
my ( $processOwner ) = getpwuid( $> );
|
||||
if ( $processOwner ne ZM_WEB_USER )
|
||||
{
|
||||
# Not running as web user, so should be root in whch case chown the temporary directory
|
||||
( my $ownerName, my $ownerPass, $_ownerUid, $_ownerGid ) = getpwnam( ZM_WEB_USER ) or Fatal( "Can't get user details for web user '".ZM_WEB_USER."': $!" );
|
||||
$_setFileOwner = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$_setFileOwner = 0;
|
||||
}
|
||||
}
|
||||
return( $_setFileOwner );
|
||||
}
|
||||
|
||||
sub setFileOwner( $ )
|
||||
{
|
||||
my $file = shift;
|
||||
|
||||
if ( _checkProcessOwner() )
|
||||
{
|
||||
chown( $_ownerUid, $_ownerGid, $file ) or Fatal( "Can't change ownership of file '$file' to '".ZM_WEB_USER.":".ZM_WEB_GROUP."': $!" );
|
||||
}
|
||||
}
|
||||
|
||||
our $_hasImageInfo = undef;
|
||||
|
||||
sub _checkForImageInfo()
|
||||
{
|
||||
if ( !defined($_hasImageInfo) )
|
||||
{
|
||||
my $result = eval
|
||||
{
|
||||
require Image::Info;
|
||||
Image::Info->import();
|
||||
};
|
||||
$_hasImageInfo = $@?0:1;
|
||||
}
|
||||
return( $_hasImageInfo );
|
||||
}
|
||||
|
||||
sub createEvent( $;$ )
|
||||
{
|
||||
my $event = shift;
|
||||
|
||||
Debug( "Creating event" );
|
||||
#print( Dumper( $event )."\n" );
|
||||
|
||||
_checkForImageInfo();
|
||||
|
||||
my $dbh = zmDbConnect();
|
||||
|
||||
if ( $event->{monitor} )
|
||||
{
|
||||
$event->{MonitorId} = $event->{monitor}->{Id};
|
||||
}
|
||||
elsif ( $event->{MonitorId} )
|
||||
{
|
||||
my $sql = "select * from Monitors where Id = ?";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare sql '$sql': ".$dbh->errstr() );
|
||||
my $res = $sth->execute( $event->{MonitorId} ) or Fatal( "Can't execute sql '$sql': ".$sth->errstr() );
|
||||
$event->{monitor} = $sth->fetchrow_hashref() or Fatal( "Unable to create event, can't load monitor with id '".$event->{MonitorId}."'" );
|
||||
$sth->finish();
|
||||
}
|
||||
else
|
||||
{
|
||||
Fatal( "Unable to create event, no monitor or monitor id supplied" );
|
||||
}
|
||||
$event->{Name} = "New Event" unless( $event->{Name} );
|
||||
$event->{Frames} = int(@{$event->{frames}});
|
||||
$event->{TotScore} = $event->{MaxScore} = 0;
|
||||
|
||||
my $lastTimestamp = 0.0;
|
||||
foreach my $frame ( @{$event->{frames}} )
|
||||
{
|
||||
if ( !$event->{Width} )
|
||||
{
|
||||
if ( $_hasImageInfo )
|
||||
{
|
||||
my $imageInfo = Image::Info::image_info( $frame->{imagePath} );
|
||||
if ( $imageInfo->{error} )
|
||||
{
|
||||
Error( "Unable to extract image info from '".$frame->{imagePath}."': ".$imageInfo->{error} );
|
||||
}
|
||||
else
|
||||
{
|
||||
( $event->{Width}, $event->{Height} ) = Image::Info::dim( $imageInfo );
|
||||
}
|
||||
}
|
||||
}
|
||||
$frame->{Type} = $frame->{Score}>0?'Alarm':'Normal' unless( $frame->{Type} );
|
||||
$frame->{Delta} = $lastTimestamp?($frame->{TimeStamp}-$lastTimestamp):0.0;
|
||||
$event->{StartTime} = $frame->{TimeStamp} unless ( $event->{StartTime} );
|
||||
$event->{TotScore} += $frame->{Score};
|
||||
$event->{MaxScore} = $frame->{Score} if ( $frame->{Score} > $event->{MaxScore} );
|
||||
$event->{AlarmFrames}++ if ( $frame->{Type} eq 'Alarm' );
|
||||
$event->{EndTime} = $frame->{TimeStamp};
|
||||
$lastTimestamp = $frame->{TimeStamp};
|
||||
}
|
||||
$event->{Width} = $event->{monitor}->{Width} unless( $event->{Width} );
|
||||
$event->{Height} = $event->{monitor}->{Height} unless( $event->{Height} );
|
||||
$event->{AvgScore} = $event->{TotScore}/int($event->{AlarmFrames});
|
||||
$event->{Length} = $event->{EndTime} - $event->{StartTime};
|
||||
|
||||
my %formats = (
|
||||
StartTime => 'from_unixtime(?)',
|
||||
EndTime => 'from_unixtime(?)',
|
||||
);
|
||||
|
||||
my ( @fields, @formats, @values );
|
||||
while ( my ( $field, $value ) = each( %$event ) )
|
||||
{
|
||||
next unless $field =~ /^[A-Z]/;
|
||||
push( @fields, $field );
|
||||
push( @formats, ($formats{$field} or '?') );
|
||||
push( @values, $event->{$field} );
|
||||
}
|
||||
|
||||
my $sql = "insert into Events (".join(',',@fields).") values (".join(',',@formats).")";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare sql '$sql': ".$dbh->errstr() );
|
||||
my $res = $sth->execute( @values ) or Fatal( "Can't execute sql '$sql': ".$sth->errstr() );
|
||||
$event->{Id} = $dbh->{mysql_insertid};
|
||||
Info( "Created event ".$event->{Id} );
|
||||
|
||||
if ( $event->{EndTime} )
|
||||
{
|
||||
$event->{Name} = $event->{monitor}->{EventPrefix}.$event->{Id} if ( $event->{Name} eq 'New Event' );
|
||||
my $sql = "update Events set Name = ? where Id = ?";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare sql '$sql': ".$dbh->errstr() );
|
||||
my $res = $sth->execute( $event->{Name}, $event->{Id} ) or Fatal( "Can't execute sql '$sql': ".$sth->errstr() );
|
||||
}
|
||||
|
||||
my $eventPath = createEventPath( $event );
|
||||
|
||||
my %frameFormats = (
|
||||
TimeStamp => 'from_unixtime(?)',
|
||||
);
|
||||
my $frameId = 1;
|
||||
foreach my $frame ( @{$event->{frames}} )
|
||||
{
|
||||
$frame->{EventId} = $event->{Id};
|
||||
$frame->{FrameId} = $frameId++;
|
||||
|
||||
my ( @fields, @formats, @values );
|
||||
while ( my ( $field, $value ) = each( %$frame ) )
|
||||
{
|
||||
next unless $field =~ /^[A-Z]/;
|
||||
push( @fields, $field );
|
||||
push( @formats, ($frameFormats{$field} or '?') );
|
||||
push( @values, $frame->{$field} );
|
||||
}
|
||||
|
||||
my $sql = "insert into Frames (".join(',',@fields).") values (".join(',',@formats).")";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare sql '$sql': ".$dbh->errstr() );
|
||||
my $res = $sth->execute( @values ) or Fatal( "Can't execute sql '$sql': ".$sth->errstr() );
|
||||
#$frame->{FrameId} = $dbh->{mysql_insertid};
|
||||
if ( $frame->{imagePath} )
|
||||
{
|
||||
$frame->{capturePath} = sprintf( "%s/%0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg", $eventPath, $frame->{FrameId} );
|
||||
rename( $frame->{imagePath}, $frame->{capturePath} ) or Fatal( "Can't copy ".$frame->{imagePath}." to ".$frame->{capturePath}.": $!" );
|
||||
setFileOwner( $frame->{capturePath} );
|
||||
if ( 0 && ZM_CREATE_ANALYSIS_IMAGES )
|
||||
{
|
||||
$frame->{analysePath} = sprintf( "%s/%0".ZM_EVENT_IMAGE_DIGITS."d-analyse.jpg", $eventPath, $frame->{FrameId} );
|
||||
link( $frame->{capturePath}, $frame->{analysePath} ) or Fatal( "Can't link ".$frame->{capturePath}." to ".$frame->{analysePath}.": $!" );
|
||||
setFileOwner( $frame->{analysePath} );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub addEventImage( $$ )
|
||||
{
|
||||
my $event = shift;
|
||||
my $frame = shift;
|
||||
|
||||
# TBD
|
||||
}
|
||||
|
||||
sub updateEvent( $ )
|
||||
{
|
||||
my $event = shift;
|
||||
|
||||
if ( !$event->{EventId} )
|
||||
{
|
||||
Error( "Unable to update event, no event id supplied" );
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
my $dbh = zmDbConnect();
|
||||
|
||||
$event->{Name} = $event->{monitor}->{EventPrefix}.$event->{Id} if ( $event->{Name} eq 'New Event' );
|
||||
|
||||
my %formats = (
|
||||
StartTime => 'from_unixtime(?)',
|
||||
EndTime => 'from_unixtime(?)',
|
||||
);
|
||||
|
||||
my ( @values, @sets );
|
||||
while ( my ( $field, $value ) = each( %$event ) )
|
||||
{
|
||||
next if ( $field eq 'Id' );
|
||||
push( @values, $event->{$field} );
|
||||
push( @sets, $field." = ".($formats{$field} or '?') );
|
||||
}
|
||||
my $sql = "update Events set ".join(',',@sets)." where Id = ?";
|
||||
push( @values, $event->{Id} );
|
||||
|
||||
my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare sql '$sql': ".$dbh->errstr() );
|
||||
my $res = $sth->execute( @values ) or Fatal( "Can't execute sql '$sql': ".$sth->errstr() );
|
||||
}
|
||||
|
||||
sub deleteEventFiles( $;$ )
|
||||
{
|
||||
#
|
||||
# WARNING assumes running from events directory
|
||||
#
|
||||
my $event_id = shift;
|
||||
my $monitor_id = shift;
|
||||
$monitor_id = '*' if ( !defined($monitor_id) );
|
||||
|
||||
if ( ZM_USE_DEEP_STORAGE )
|
||||
{
|
||||
my $link_path = $monitor_id."/*/*/*/.".$event_id;
|
||||
#Debug( "LP1:$link_path" );
|
||||
my @links = glob($link_path);
|
||||
#Debug( "L:".$links[0].": $!" );
|
||||
if ( @links )
|
||||
{
|
||||
( $link_path ) = ( $links[0] =~ /^(.*)$/ ); # De-taint
|
||||
#Debug( "LP2:$link_path" );
|
||||
|
||||
( my $day_path = $link_path ) =~ s/\.\d+//;
|
||||
#Debug( "DP:$day_path" );
|
||||
my $event_path = $day_path.readlink( $link_path );
|
||||
( $event_path ) = ( $event_path =~ /^(.*)$/ ); # De-taint
|
||||
#Debug( "EP:$event_path" );
|
||||
my $command = "/bin/rm -rf ".$event_path;
|
||||
#Debug( "C:$command" );
|
||||
executeShellCommand( $command );
|
||||
|
||||
unlink( $link_path ) or Error( "Unable to unlink '$link_path': $!" );
|
||||
my @path_parts = split( /\//, $event_path );
|
||||
for ( my $i = int(@path_parts)-2; $i >= 1; $i-- )
|
||||
{
|
||||
my $delete_path = join( '/', @path_parts[0..$i] );
|
||||
#Debug( "DP$i:$delete_path" );
|
||||
my @has_files = glob( $delete_path."/*" );
|
||||
#Debug( "HF1:".$has_files[0] ) if ( @has_files );
|
||||
last if ( @has_files );
|
||||
@has_files = glob( $delete_path."/.[0-9]*" );
|
||||
#Debug( "HF2:".$has_files[0] ) if ( @has_files );
|
||||
last if ( @has_files );
|
||||
my $command = "/bin/rm -rf ".$delete_path;
|
||||
executeShellCommand( $command );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
my $command = "/bin/rm -rf $monitor_id/$event_id";
|
||||
executeShellCommand( $command );
|
||||
}
|
||||
}
|
||||
|
||||
sub makePath( $;$ )
|
||||
{
|
||||
my $path = shift;
|
||||
my $root = shift;
|
||||
$root = (( $path =~ m|^/| )?'':'.' ) unless( $root );
|
||||
|
||||
Debug( "Creating path '$path' in $root'\n" );
|
||||
my @parts = split( '/', $path );
|
||||
my $fullPath = $root;
|
||||
foreach my $dir ( @parts )
|
||||
{
|
||||
$fullPath .= '/'.$dir;
|
||||
if ( !-d $fullPath )
|
||||
{
|
||||
if ( -e $fullPath )
|
||||
{
|
||||
Fatal( "Can't create '$fullPath', already exists as non directory" );
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug( "Creating '$fullPath'\n" );
|
||||
mkdir( $fullPath, 0755 ) or Fatal( "Can't mkdir '$fullPath': $!" );
|
||||
setFileOwner( $fullPath );
|
||||
}
|
||||
}
|
||||
}
|
||||
return( $fullPath );
|
||||
}
|
||||
|
||||
our $testedJSON = 0;
|
||||
our $hasJSONAny = 0;
|
||||
|
||||
sub _testJSON
|
||||
{
|
||||
return if ( $testedJSON );
|
||||
my $result = eval
|
||||
{
|
||||
require JSON::Any;
|
||||
JSON::Any->import();
|
||||
};
|
||||
$testedJSON = 1;
|
||||
$hasJSONAny = 1 if ( $result );
|
||||
}
|
||||
|
||||
sub _getJSONType( $ )
|
||||
{
|
||||
my $value = shift;
|
||||
return( 'null' ) unless( defined($value) );
|
||||
return( 'integer' ) if ( $value =~ /^\d+$/ );
|
||||
return( 'double' ) if ( $value =~ /^\d+$/ );
|
||||
return( 'hash' ) if ( ref($value) eq 'HASH' );
|
||||
return( 'array' ) if ( ref($value) eq 'ARRAY' );
|
||||
return( 'string' );
|
||||
}
|
||||
|
||||
sub jsonEncode( $ );
|
||||
|
||||
sub jsonEncode( $ )
|
||||
{
|
||||
my $value = shift;
|
||||
|
||||
_testJSON();
|
||||
if ( $hasJSONAny )
|
||||
{
|
||||
my $string = eval { JSON::Any->objToJson( $value ) };
|
||||
Fatal( "Unable to encode object to JSON: $@" ) unless( $string );
|
||||
return( $string );
|
||||
}
|
||||
|
||||
my $type = _getJSONType($value);
|
||||
if ( $type eq 'integer' || $type eq 'double' )
|
||||
{
|
||||
return( $value );
|
||||
}
|
||||
elsif ( $type eq 'boolean' )
|
||||
{
|
||||
return( $value?'true':'false' );
|
||||
}
|
||||
elsif ( $type eq 'string' )
|
||||
{
|
||||
$value =~ s|(["\\/])|\\$1|g;
|
||||
$value =~ s|\r?\n|\n|g;
|
||||
return( '"'.$value.'"' );
|
||||
}
|
||||
elsif ( $type eq 'null' )
|
||||
{
|
||||
return( 'null' );
|
||||
}
|
||||
elsif ( $type eq 'array' )
|
||||
{
|
||||
return( '['.join( ',', map { jsonEncode( $_ ) } @$value ).']' );
|
||||
}
|
||||
elsif ( $type eq 'hash' )
|
||||
{
|
||||
my $result = '{';
|
||||
while ( my ( $subKey=>$subValue ) = each( %$value ) )
|
||||
{
|
||||
$result .= ',' if ( $result ne '{' );
|
||||
$result .= '"'.$subKey.'":'.jsonEncode( $subValue );
|
||||
}
|
||||
return( $result.'}' );
|
||||
}
|
||||
else
|
||||
{
|
||||
Fatal( "Unexpected type '$type'" );
|
||||
}
|
||||
}
|
||||
|
||||
sub jsonDecode( $ )
|
||||
{
|
||||
my $value = shift;
|
||||
|
||||
_testJSON();
|
||||
if ( $hasJSONAny )
|
||||
{
|
||||
my $object = eval { JSON::Any->jsonToObj( $value ) };
|
||||
Fatal( "Unable to decode JSON string '$value': $@" ) unless( $object );
|
||||
return( $object );
|
||||
}
|
||||
|
||||
my $comment = 0;
|
||||
my $unescape = 0;
|
||||
my $out = '';
|
||||
my @chars = split( //, $value );
|
||||
for ( my $i = 0; $i < @chars; $i++ )
|
||||
{
|
||||
if ( !$comment )
|
||||
{
|
||||
if ( $chars[$i] eq ':' )
|
||||
{
|
||||
$out .= '=>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$out .= $chars[$i];
|
||||
}
|
||||
}
|
||||
elsif ( !$unescape )
|
||||
{
|
||||
if ( $chars[$i] eq '\\' )
|
||||
{
|
||||
$unescape = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$out .= $chars[$i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $chars[$i] ne '/' )
|
||||
{
|
||||
$out .= '\\';
|
||||
}
|
||||
$out .= $chars[$i];
|
||||
$unescape = 0;
|
||||
}
|
||||
if ( $chars[$i] eq '"' )
|
||||
{
|
||||
$comment = !$comment;
|
||||
}
|
||||
}
|
||||
$out =~ s/=>true/=>1/g;
|
||||
$out =~ s/=>false/=>0/g;
|
||||
$out =~ s/=>null/=>undef/g;
|
||||
$out =~ s/`/'/g;
|
||||
$out =~ s/qx/qq/g;
|
||||
( $out ) = $out =~ m/^({.+})$/; # Detaint and check it's a valid object syntax
|
||||
my $result = eval $out;
|
||||
Fatal( $@ ) if ( $@ );
|
||||
return( $result );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,861 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Logger Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the debug definitions and functions used by the rest
|
||||
# of the ZoneMinder scripts
|
||||
#
|
||||
package ZoneMinder::Logger;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require Exporter;
|
||||
require ZoneMinder::Base;
|
||||
|
||||
our @ISA = qw(Exporter ZoneMinder::Base);
|
||||
|
||||
# Items to export into callers namespace by default. Note: do not export
|
||||
# names by default without a very good reason. Use EXPORT_OK instead.
|
||||
# Do not simply export all your public functions/methods/constants.
|
||||
|
||||
# This allows declaration use ZoneMinder ':all';
|
||||
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
|
||||
# will save memory.
|
||||
our %EXPORT_TAGS = (
|
||||
'constants' => [ qw(
|
||||
DEBUG
|
||||
INFO
|
||||
WARNING
|
||||
ERROR
|
||||
FATAL
|
||||
PANIC
|
||||
NOLOG
|
||||
) ],
|
||||
'functions' => [ qw(
|
||||
logInit
|
||||
logReinit
|
||||
logTerm
|
||||
logSetSignal
|
||||
logClearSignal
|
||||
logDebugging
|
||||
logLevel
|
||||
logTermLevel
|
||||
logDatabaseLevel
|
||||
logFileLevel
|
||||
logSyslogLevel
|
||||
Mark
|
||||
Dump
|
||||
Debug
|
||||
Info
|
||||
Warning
|
||||
Error
|
||||
Fatal
|
||||
Panic
|
||||
) ]
|
||||
);
|
||||
push( @{$EXPORT_TAGS{all}}, @{$EXPORT_TAGS{$_}} ) foreach keys %EXPORT_TAGS;
|
||||
|
||||
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
|
||||
|
||||
our @EXPORT = qw();
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Logger Facilities
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Config qw(:all);
|
||||
|
||||
use DBI;
|
||||
use Carp;
|
||||
use POSIX;
|
||||
use IO::Handle;
|
||||
use Data::Dumper;
|
||||
use Time::HiRes qw/gettimeofday/;
|
||||
use Sys::Syslog;
|
||||
|
||||
use constant {
|
||||
DEBUG => 1,
|
||||
INFO => 0,
|
||||
WARNING => -1,
|
||||
ERROR => -2,
|
||||
FATAL => -3,
|
||||
PANIC => -4,
|
||||
NOLOG => -5
|
||||
};
|
||||
|
||||
our %codes = (
|
||||
&DEBUG => "DBG",
|
||||
&INFO => "INF",
|
||||
&WARNING => "WAR",
|
||||
&ERROR => "ERR",
|
||||
&FATAL => "FAT",
|
||||
&PANIC => "PNC",
|
||||
&NOLOG => "OFF"
|
||||
);
|
||||
|
||||
our %priorities = (
|
||||
&DEBUG => "debug",
|
||||
&INFO => "info",
|
||||
&WARNING => "warning",
|
||||
&ERROR => "err",
|
||||
&FATAL => "err",
|
||||
&PANIC => "err"
|
||||
);
|
||||
|
||||
our $logger;
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my $this = {};
|
||||
|
||||
$this->{initialised} = undef;
|
||||
|
||||
#$this->{id} = "zmundef";
|
||||
( $this->{id} ) = $0 =~ m|^(?:.*/)?([^/]+?)(?:\.[^/.]+)?$|;
|
||||
$this->{idRoot} = $this->{id};
|
||||
$this->{idArgs} = "";
|
||||
|
||||
$this->{level} = INFO;
|
||||
$this->{termLevel} = NOLOG;
|
||||
$this->{databaseLevel} = NOLOG;
|
||||
$this->{fileLevel} = NOLOG;
|
||||
$this->{syslogLevel} = NOLOG;
|
||||
$this->{effectiveLevel} = INFO;
|
||||
|
||||
$this->{autoFlush} = 1;
|
||||
$this->{hasTerm} = -t STDERR;
|
||||
|
||||
( $this->{fileName} = $0 ) =~ s|^.*/||;
|
||||
$this->{logPath} = ZM_PATH_LOGS;
|
||||
$this->{logFile} = $this->{logPath}."/".$this->{id}.".log";
|
||||
|
||||
$this->{trace} = 0;
|
||||
|
||||
bless( $this, $class );
|
||||
return $this;
|
||||
}
|
||||
|
||||
sub BEGIN
|
||||
{
|
||||
# Fake the config variables that are used in case they are not defined yet
|
||||
# Only really necessary to support upgrade from previous version
|
||||
if ( !eval('defined(ZM_LOG_DEBUG)') )
|
||||
{
|
||||
no strict 'subs';
|
||||
no strict 'refs';
|
||||
my %dbgConfig = (
|
||||
ZM_LOG_LEVEL_DATABASE => 0,
|
||||
ZM_LOG_LEVEL_FILE => 0,
|
||||
ZM_LOG_LEVEL_SYSLOG => 0,
|
||||
ZM_LOG_DEBUG => 0,
|
||||
ZM_LOG_DEBUG_TARGET => "",
|
||||
ZM_LOG_DEBUG_LEVEL => 1,
|
||||
ZM_LOG_DEBUG_FILE => ""
|
||||
);
|
||||
while ( my ( $name, $value ) = each( %dbgConfig ) )
|
||||
{
|
||||
*{$name} = sub { $value };
|
||||
}
|
||||
use strict 'subs';
|
||||
use strict 'refs';
|
||||
}
|
||||
}
|
||||
|
||||
sub DESTROY
|
||||
{
|
||||
my $this = shift;
|
||||
$this->terminate();
|
||||
}
|
||||
|
||||
sub initialise( @ )
|
||||
{
|
||||
my $this = shift;
|
||||
my %options = @_;
|
||||
|
||||
$this->{id} = $options{id} if ( defined($options{id}) );
|
||||
|
||||
$this->{logPath} = $options{logPath} if ( defined($options{logPath}) );
|
||||
|
||||
my $tempLogFile;
|
||||
$tempLogFile = $this->{logPath}."/".$this->{id}.".log";
|
||||
$tempLogFile = $options{logFile} if ( defined($options{logFile}) );
|
||||
if ( my $logFile = $this->getTargettedEnv('LOG_FILE') )
|
||||
{
|
||||
$tempLogFile = $logFile;
|
||||
}
|
||||
|
||||
my $tempLevel = INFO;
|
||||
my $tempTermLevel = $this->{termLevel};
|
||||
my $tempDatabaseLevel = $this->{databaseLevel};
|
||||
my $tempFileLevel = $this->{fileLevel};
|
||||
my $tempSyslogLevel = $this->{syslogLevel};
|
||||
|
||||
$tempTermLevel = $options{termLevel} if ( defined($options{termLevel}) );
|
||||
if ( defined($options{databaseLevel}) )
|
||||
{
|
||||
$tempDatabaseLevel = $options{databaseLevel};
|
||||
}
|
||||
else
|
||||
{
|
||||
$tempDatabaseLevel = ZM_LOG_LEVEL_DATABASE;
|
||||
}
|
||||
if ( defined($options{fileLevel}) )
|
||||
{
|
||||
$tempFileLevel = $options{fileLevel};
|
||||
}
|
||||
else
|
||||
{
|
||||
$tempFileLevel = ZM_LOG_LEVEL_FILE;
|
||||
}
|
||||
if ( defined($options{syslogLevel}) )
|
||||
{
|
||||
$tempSyslogLevel = $options{syslogLevel};
|
||||
}
|
||||
else
|
||||
{
|
||||
$tempSyslogLevel = ZM_LOG_LEVEL_SYSLOG;
|
||||
}
|
||||
|
||||
if ( defined($ENV{'LOG_PRINT'}) )
|
||||
{
|
||||
$tempTermLevel = $ENV{'LOG_PRINT'}? DEBUG : NOLOG;
|
||||
}
|
||||
|
||||
my $level;
|
||||
$tempLevel = $level if ( defined($level = $this->getTargettedEnv('LOG_LEVEL')) );
|
||||
|
||||
$tempTermLevel = $level if ( defined($level = $this->getTargettedEnv('LOG_LEVEL_TERM')) );
|
||||
$tempDatabaseLevel = $level if ( defined($level = $this->getTargettedEnv('LOG_LEVEL_DATABASE')) );
|
||||
$tempFileLevel = $level if ( defined($level = $this->getTargettedEnv('LOG_LEVEL_FILE')) );
|
||||
$tempSyslogLevel = $level if ( defined($level = $this->getTargettedEnv('LOG_LEVEL_SYSLOG')) );
|
||||
|
||||
if ( ZM_LOG_DEBUG )
|
||||
{
|
||||
foreach my $target ( split( /\|/, ZM_LOG_DEBUG_TARGET ) )
|
||||
{
|
||||
if ( $target eq $this->{id} || $target eq "_".$this->{id} || $target eq $this->{idRoot} || $target eq "_".$this->{idRoot} || $target eq "" )
|
||||
{
|
||||
if ( ZM_LOG_DEBUG_LEVEL > NOLOG )
|
||||
{
|
||||
$tempLevel = $this->limit( ZM_LOG_DEBUG_LEVEL );
|
||||
if ( ZM_LOG_DEBUG_FILE ne "" )
|
||||
{
|
||||
$tempLogFile = ZM_LOG_DEBUG_FILE;
|
||||
$tempFileLevel = $tempLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->logFile( $tempLogFile );
|
||||
|
||||
$this->termLevel( $tempTermLevel );
|
||||
$this->databaseLevel( $tempDatabaseLevel );
|
||||
$this->fileLevel( $tempFileLevel );
|
||||
$this->syslogLevel( $tempSyslogLevel );
|
||||
|
||||
$this->level( $tempLevel );
|
||||
|
||||
$this->{trace} = $options{trace} if ( defined($options{trace}) );
|
||||
|
||||
$this->{autoFlush} = $ENV{'LOG_FLUSH'}?1:0 if ( defined($ENV{'LOG_FLUSH'}) );
|
||||
|
||||
$this->{initialised} = !undef;
|
||||
|
||||
Debug( "LogOpts: level=".$codes{$this->{level}}."/".$codes{$this->{effectiveLevel}}.", screen=".$codes{$this->{termLevel}}.", database=".$codes{$this->{databaseLevel}}.", logfile=".$codes{$this->{fileLevel}}."->".$this->{logFile}.", syslog=".$codes{$this->{syslogLevel}} );
|
||||
}
|
||||
|
||||
sub terminate()
|
||||
{
|
||||
my $this = shift;
|
||||
return unless ( $this->{initialised} );
|
||||
$this->syslogLevel( NOLOG );
|
||||
$this->fileLevel( NOLOG );
|
||||
$this->databaseLevel( NOLOG );
|
||||
$this->termLevel( NOLOG );
|
||||
}
|
||||
|
||||
sub reinitialise()
|
||||
{
|
||||
my $this = shift;
|
||||
|
||||
return unless ( $this->{initialised} );
|
||||
|
||||
# Bit of a nasty hack to reopen connections to log files and the DB
|
||||
my $syslogLevel = $this->syslogLevel();
|
||||
$this->syslogLevel( NOLOG );
|
||||
my $logfileLevel = $this->fileLevel();
|
||||
$this->fileLevel( NOLOG );
|
||||
my $databaseLevel = $this->databaseLevel();
|
||||
$this->databaseLevel( NOLOG );
|
||||
my $screenLevel = $this->termLevel();
|
||||
$this->termLevel( NOLOG );
|
||||
|
||||
$this->syslogLevel( $syslogLevel ) if ( $syslogLevel > NOLOG );
|
||||
$this->fileLevel( $logfileLevel ) if ( $logfileLevel > NOLOG );
|
||||
$this->databaseLevel( $databaseLevel ) if ( $databaseLevel > NOLOG );
|
||||
$this->databaseLevel( $databaseLevel ) if ( $databaseLevel > NOLOG );
|
||||
}
|
||||
|
||||
sub limit( $ )
|
||||
{
|
||||
my $this = shift;
|
||||
my $level = shift;
|
||||
return( DEBUG ) if ( $level > DEBUG );
|
||||
return( NOLOG ) if ( $level < NOLOG );
|
||||
return( $level );
|
||||
}
|
||||
|
||||
sub getTargettedEnv( $ )
|
||||
{
|
||||
my $this = shift;
|
||||
my $name = shift;
|
||||
my $envName = $name."_".$this->{id};
|
||||
my $value;
|
||||
$value = $ENV{$envName} if ( defined($ENV{$envName}) );
|
||||
if ( !defined($value) && $this->{id} ne $this->{idRoot} )
|
||||
{
|
||||
$envName = $name."_".$this->{idRoot};
|
||||
$value = $ENV{$envName} if ( defined($ENV{$envName}) );
|
||||
}
|
||||
if ( !defined($value) )
|
||||
{
|
||||
$value = $ENV{$name} if ( defined($ENV{$name}) );
|
||||
}
|
||||
if ( defined($value) )
|
||||
{
|
||||
( $value ) = $value =~ m/(.*)/;
|
||||
}
|
||||
return( $value );
|
||||
}
|
||||
|
||||
sub fetch()
|
||||
{
|
||||
if ( !$logger )
|
||||
{
|
||||
$logger = ZoneMinder::Logger->new();
|
||||
$logger->initialise( 'syslogLevel'=>INFO, 'databaseLevel'=>INFO );
|
||||
}
|
||||
return( $logger );
|
||||
}
|
||||
|
||||
sub id( ;$ )
|
||||
{
|
||||
my $this = shift;
|
||||
my $id = shift;
|
||||
if ( defined($id) && $this->{id} ne $id )
|
||||
{
|
||||
# Remove whitespace
|
||||
$id =~ s/\S//g;
|
||||
# Replace non-alphanum with underscore
|
||||
$id =~ s/[^a-zA-Z_]/_/g;
|
||||
|
||||
if ( $this->{id} ne $id )
|
||||
{
|
||||
$this->{id} = $this->{idRoot} = $id;
|
||||
if ( $id =~ /^([^_]+)_(.+)$/ )
|
||||
{
|
||||
$this->{idRoot} = $1;
|
||||
$this->{idArgs} = $2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return( $this->{id} );
|
||||
}
|
||||
|
||||
sub level( ;$ )
|
||||
{
|
||||
my $this = shift;
|
||||
my $level = shift;
|
||||
if ( defined($level) )
|
||||
{
|
||||
$this->{level} = $this->limit( $level );
|
||||
$this->{effectiveLevel} = NOLOG;
|
||||
$this->{effectiveLevel} = $this->{termLevel} if ( $this->{termLevel} > $this->{effectiveLevel} );
|
||||
$this->{effectiveLevel} = $this->{databaseLevel} if ( $this->{databaseLevel} > $this->{effectiveLevel} );
|
||||
$this->{effectiveLevel} = $this->{fileLevel} if ( $this->{fileLevel} > $this->{effectiveLevel} );
|
||||
$this->{effectiveLevel} = $this->{syslogLevel} if ( $this->{syslogLevel} > $this->{level} );
|
||||
$this->{effectiveLevel} = $this->{level} if ( $this->{effectiveLevel} > $this->{level} );
|
||||
}
|
||||
return( $this->{level} );
|
||||
}
|
||||
|
||||
sub debugOn()
|
||||
{
|
||||
my $this = shift;
|
||||
return( $this->{effectiveLevel} >= DEBUG );
|
||||
}
|
||||
|
||||
sub trace( ;$ )
|
||||
{
|
||||
my $this = shift;
|
||||
$this->{trace} = $_[0] if ( @_ );
|
||||
return( $this->{trace} );
|
||||
}
|
||||
|
||||
sub termLevel( ;$ )
|
||||
{
|
||||
my $this = shift;
|
||||
my $termLevel = shift;
|
||||
if ( defined($termLevel) )
|
||||
{
|
||||
$termLevel = NOLOG if ( !$this->{hasTerm} );
|
||||
$termLevel = $this->limit( $termLevel );
|
||||
if ( $this->{termLevel} != $termLevel )
|
||||
{
|
||||
$this->{termLevel} = $termLevel;
|
||||
}
|
||||
}
|
||||
return( $this->{termLevel} );
|
||||
}
|
||||
|
||||
sub databaseLevel( ;$ )
|
||||
{
|
||||
my $this = shift;
|
||||
my $databaseLevel = shift;
|
||||
if ( defined($databaseLevel) )
|
||||
{
|
||||
$databaseLevel = $this->limit( $databaseLevel );
|
||||
if ( $this->{databaseLevel} != $databaseLevel )
|
||||
{
|
||||
if ( $databaseLevel > NOLOG && $this->{databaseLevel} <= NOLOG )
|
||||
{
|
||||
if ( !$this->{dbh} )
|
||||
{
|
||||
my ( $host, $port ) = ( ZM_DB_HOST =~ /^([^:]+)(?::(.+))?$/ );
|
||||
|
||||
if ( defined($port) )
|
||||
{
|
||||
$this->{dbh} = DBI->connect( "DBI:mysql:database=".ZM_DB_NAME.";host=".$host.";port=".$port, ZM_DB_USER, ZM_DB_PASS );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->{dbh} = DBI->connect( "DBI:mysql:database=".ZM_DB_NAME.";host=".ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );
|
||||
}
|
||||
if ( !$this->{dbh} )
|
||||
{
|
||||
$databaseLevel = NOLOG;
|
||||
Error( "Unable to write log entries to DB, can't connect to database '".ZM_DB_NAME."' on host '".ZM_DB_HOST."'" );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->{dbh}->{AutoCommit} = 1;
|
||||
Fatal( "Can't set AutoCommit on in database connection" ) unless( $this->{dbh}->{AutoCommit} );
|
||||
$this->{dbh}->{mysql_auto_reconnect} = 1;
|
||||
Fatal( "Can't set mysql_auto_reconnect on in database connection" ) unless( $this->{dbh}->{mysql_auto_reconnect} );
|
||||
$this->{dbh}->trace( 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
elsif ( $databaseLevel <= NOLOG && $this->{databaseLevel} > NOLOG )
|
||||
{
|
||||
if ( $this->{dbh} )
|
||||
{
|
||||
$this->{dbh}->disconnect();
|
||||
undef($this->{dbh});
|
||||
}
|
||||
}
|
||||
$this->{databaseLevel} = $databaseLevel;
|
||||
}
|
||||
}
|
||||
return( $this->{databaseLevel} );
|
||||
}
|
||||
|
||||
sub fileLevel( ;$ )
|
||||
{
|
||||
my $this = shift;
|
||||
my $fileLevel = shift;
|
||||
if ( defined($fileLevel) )
|
||||
{
|
||||
$fileLevel = $this->limit($fileLevel);
|
||||
if ( $this->{fileLevel} != $fileLevel )
|
||||
{
|
||||
$this->closeFile() if ( $this->{fileLevel} > NOLOG );
|
||||
$this->{fileLevel} = $fileLevel;
|
||||
$this->openFile() if ( $this->{fileLevel} > NOLOG );
|
||||
}
|
||||
}
|
||||
return( $this->{fileLevel} );
|
||||
}
|
||||
|
||||
sub syslogLevel( ;$ )
|
||||
{
|
||||
my $this = shift;
|
||||
my $syslogLevel = shift;
|
||||
if ( defined($syslogLevel) )
|
||||
{
|
||||
$syslogLevel = $this->limit($syslogLevel);
|
||||
if ( $this->{syslogLevel} != $syslogLevel )
|
||||
{
|
||||
$this->closeSyslog() if ( $syslogLevel <= NOLOG && $this->{syslogLevel} > NOLOG );
|
||||
$this->openSyslog() if ( $syslogLevel > NOLOG && $this->{syslogLevel} <= NOLOG );
|
||||
$this->{syslogLevel} = $syslogLevel;
|
||||
}
|
||||
}
|
||||
return( $this->{syslogLevel} );
|
||||
}
|
||||
|
||||
sub openSyslog()
|
||||
{
|
||||
my $this = shift;
|
||||
openlog( $this->{id}, "pid", "local1" );
|
||||
}
|
||||
|
||||
sub closeSyslog()
|
||||
{
|
||||
my $this = shift;
|
||||
#closelog();
|
||||
}
|
||||
|
||||
sub logFile( $ )
|
||||
{
|
||||
my $this = shift;
|
||||
my $logFile = shift;
|
||||
if ( $logFile =~ /^(.+)\+$/ )
|
||||
{
|
||||
$this->{logFile} = $1.'.'.$$;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->{logFile} = $logFile;
|
||||
}
|
||||
}
|
||||
|
||||
sub openFile()
|
||||
{
|
||||
my $this = shift;
|
||||
if ( open( LOGFILE, ">>".$this->{logFile} ) )
|
||||
{
|
||||
LOGFILE->autoflush() if ( $this->{autoFlush} );
|
||||
|
||||
my $webUid = (getpwnam( ZM_WEB_USER ))[2];
|
||||
my $webGid = (getgrnam( ZM_WEB_GROUP ))[2];
|
||||
if ( $> == 0 )
|
||||
{
|
||||
chown( $webUid, $webGid, $this->{logFile} ) or Fatal( "Can't change permissions on log file '".$this->{logFile}."': $!" )
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->fileLevel( NOLOG );
|
||||
Error( "Can't open log file '".$this->{logFile}."': $!" );
|
||||
}
|
||||
}
|
||||
|
||||
sub closeFile()
|
||||
{
|
||||
my $this = shift;
|
||||
close( LOGFILE ) if ( fileno(LOGFILE) );
|
||||
}
|
||||
|
||||
sub logPrint( $;$ )
|
||||
{
|
||||
my $this = shift;
|
||||
my $level = shift;
|
||||
my $string = shift;
|
||||
|
||||
if ( $level <= $this->{effectiveLevel} )
|
||||
{
|
||||
$string =~ s/[\r\n]+$//g;
|
||||
|
||||
my $code = $codes{$level};
|
||||
|
||||
my ($seconds, $microseconds) = gettimeofday();
|
||||
my $message = sprintf( "%s.%06d %s[%d].%s [%s]", strftime( "%x %H:%M:%S", localtime( $seconds ) ), $microseconds, $this->{id}, $$, $code, $string );
|
||||
if ( $this->{trace} )
|
||||
{
|
||||
$message = Carp::shortmess( $message );
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = $message."\n";
|
||||
}
|
||||
syslog( $priorities{$level}, $code." [%s]", $string ) if ( $level <= $this->{syslogLevel} );
|
||||
print( LOGFILE $message ) if ( $level <= $this->{fileLevel} );
|
||||
if ( $level <= $this->{databaseLevel} )
|
||||
{
|
||||
my $sql = "insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( ?, ?, ?, ?, ?, ?, ?, NULL )";
|
||||
$this->{sth} = $this->{dbh}->prepare_cached( $sql );
|
||||
if ( !$this->{sth} )
|
||||
{
|
||||
$this->{databaseLevel} = NOLOG;
|
||||
Fatal( "Can't prepare log entry '$sql': ".$this->{dbh}->errstr() );
|
||||
}
|
||||
my $res = $this->{sth}->execute( $seconds+($microseconds/1000000.0), $this->{id}, $$, $level, $code, $string, $this->{fileName} );
|
||||
if ( !$res )
|
||||
{
|
||||
$this->{databaseLevel} = NOLOG;
|
||||
Fatal( "Can't execute log entry '$sql': ".$this->{sth}->errstr() );
|
||||
}
|
||||
}
|
||||
print( STDERR $message ) if ( $level <= $this->{termLevel} );
|
||||
}
|
||||
}
|
||||
|
||||
sub logInit( ;@ )
|
||||
{
|
||||
my %options = @_ ? @_ : ();
|
||||
$logger = ZoneMinder::Logger->new() if ( !$logger );
|
||||
$logger->initialise( %options );
|
||||
}
|
||||
|
||||
sub logReinit()
|
||||
{
|
||||
fetch()->reinitialise();
|
||||
}
|
||||
|
||||
sub logTerm
|
||||
{
|
||||
return unless ( $logger );
|
||||
$logger->terminate();
|
||||
$logger = undef;
|
||||
}
|
||||
|
||||
sub logHupHandler()
|
||||
{
|
||||
my $savedErrno = $!;
|
||||
return unless( $logger );
|
||||
fetch()->reinitialise();
|
||||
logSetSignal();
|
||||
$! = $savedErrno;
|
||||
}
|
||||
|
||||
sub logSetSignal()
|
||||
{
|
||||
$SIG{HUP} = \&logHupHandler;
|
||||
}
|
||||
|
||||
sub logClearSignal()
|
||||
{
|
||||
$SIG{HUP} = 'DEFAULT';
|
||||
}
|
||||
|
||||
sub logLevel( ;$ )
|
||||
{
|
||||
return( fetch()->level( @_ ) );
|
||||
}
|
||||
|
||||
sub logDebugging()
|
||||
{
|
||||
return( fetch()->debugOn() );
|
||||
}
|
||||
|
||||
sub logTermLevel( ;$ )
|
||||
{
|
||||
return( fetch()->termLevel( @_ ) );
|
||||
}
|
||||
|
||||
sub logDatabaseLevel( ;$ )
|
||||
{
|
||||
return( fetch()->databaseLevel( @_ ) );
|
||||
}
|
||||
|
||||
sub logFileLevel( ;$ )
|
||||
{
|
||||
return( fetch()->fileLevel( @_ ) );
|
||||
}
|
||||
|
||||
sub logSyslogLevel( ;$ )
|
||||
{
|
||||
return( fetch()->syslogLevel( @_ ) );
|
||||
}
|
||||
|
||||
sub Mark( ;$$ )
|
||||
{
|
||||
my $level = shift;
|
||||
$level = DEBUG unless( defined($level) );
|
||||
my $tag = "Mark";
|
||||
fetch()->logPrint( $level, $tag );
|
||||
}
|
||||
|
||||
sub Dump( \$;$ )
|
||||
{
|
||||
my $var = shift;
|
||||
my $label = shift;
|
||||
$label = "VAR" unless( defined($label) );
|
||||
fetch()->logPrint( DEBUG, Data::Dumper->Dump( [ $var ], [ $label ] ) );
|
||||
}
|
||||
|
||||
sub Debug( @ )
|
||||
{
|
||||
fetch()->logPrint( DEBUG, @_ );
|
||||
}
|
||||
|
||||
sub Info( @ )
|
||||
{
|
||||
fetch()->logPrint( INFO, @_ );
|
||||
}
|
||||
|
||||
sub Warning( @ )
|
||||
{
|
||||
fetch()->logPrint( WARNING, @_ );
|
||||
}
|
||||
|
||||
sub Error( @ )
|
||||
{
|
||||
fetch()->logPrint( ERROR, @_ );
|
||||
}
|
||||
|
||||
sub Fatal( @ )
|
||||
{
|
||||
fetch()->logPrint( FATAL, @_ );
|
||||
exit( -1 );
|
||||
}
|
||||
|
||||
sub Panic( @ )
|
||||
{
|
||||
fetch()->logPrint( PANIC, @_ );
|
||||
confess( $_[0] );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Logger - ZoneMinder Logger module
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Logger;
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
logInit( "myproc", DEBUG );
|
||||
|
||||
Debug( "This is what is happening" );
|
||||
Info( "Something interesting is happening" );
|
||||
Warning( "Something might be going wrong." );
|
||||
Error( "Something has gone wrong!!" );
|
||||
Fatal( "Something has gone badly wrong, gotta stop!!" );
|
||||
Panic( "Something fundamental has gone wrong, die with stack trace );
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The ZoneMinder:Logger module contains the common debug and error reporting routines used by the ZoneMinder scripts.
|
||||
|
||||
To use debug in your scripts you need to include this module, and call logInit. Thereafter you can sprinkle Debug or Error calls etc throughout the code safe in the knowledge that they will be reported to your error log, and possibly the syslogger, in a meaningful and consistent format.
|
||||
|
||||
Debug is discussed in terms of levels where 1 and above (currently only 1 for scripts) is considered debug, 0 is considered as informational, -1 is a warning, -2 is an error and -3 is a fatal error or panic. Where levels are mentioned below as thresholds the value given and anything with a lower level (ie. more serious) will be included.
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=over 4
|
||||
|
||||
=item logInit ( $id, %options );
|
||||
|
||||
Initialises the debug and prepares the logging for forthcoming operations. If not called explicitly it will be called by the first debug call in your script, but with default (and probably meaningless) options. The only compulsory arguments are $id which must be a string that will identify debug coming from this script in mixed logs. Other options may be provided as below,
|
||||
|
||||
Option Default Description
|
||||
--------- --------- -----------
|
||||
level INFO The initial debug level which defines which statements are output and which are ignored
|
||||
trace 0 Whether to use the Carp::shortmess format in debug statements to identify where the debug was emitted from
|
||||
termLevel NOLOG At what level debug is written to terminal standard error, 0 is no, 1 is yes, 2 is write only if terminal
|
||||
databaseLevel INFO At what level debug is written to the Log table in the database;
|
||||
fileLevel NOLOG At what level debug is written to a log file of the format of <id>.log in the standard log directory.
|
||||
syslogLevel INFO At what level debug is written to syslog.
|
||||
|
||||
To disable any of these action entirely set to NOLOG
|
||||
|
||||
=item logTerm ();
|
||||
|
||||
Used to end the debug session and close any logs etc. Not usually necessary.
|
||||
|
||||
=item $id = logId ( [$id] );
|
||||
|
||||
=item $level = logLevel ( [$level] );
|
||||
|
||||
=item $trace = logTrace ( [$trace] );
|
||||
|
||||
=item $level = logLevel ( [$level] );
|
||||
|
||||
=item $termLevel = logTermLevel ( [$termLevel] );
|
||||
|
||||
=item $databaseLevel = logDatabaseLevel ( [$databaseLevel] );
|
||||
|
||||
=item $fileLevel = logFileLevel ( [$fileLevel] );
|
||||
|
||||
=item $syslogLevel = logSyslogLevel ( [$syslogLevel] );
|
||||
|
||||
These methods can be used to get and set the current settings as defined in logInit.
|
||||
|
||||
=item Debug( $string );
|
||||
|
||||
This method will output a debug message if the current debug level permits it, otherwise does nothing. This message will be tagged with the DBG string in the logs.
|
||||
|
||||
=item Info( $string );
|
||||
|
||||
This method will output an informational message if the current debug level permits it, otherwise does nothing. This message will be tagged with the INF string in the logs.
|
||||
|
||||
=item Warning( $string );
|
||||
|
||||
This method will output a warning message if the current debug level permits it, otherwise does nothing. This message will be tagged with the WAR string in the logs.
|
||||
|
||||
=item Error( $string );
|
||||
|
||||
This method will output an error message if the current debug level permits it, otherwise does nothing. This message will be tagged with the ERR string in the logs.
|
||||
|
||||
=item Fatal( $string );
|
||||
|
||||
This method will output a fatal error message and then die if the current debug level permits it, otherwise does nothing. This message will be tagged with the FAT string in the logs.
|
||||
|
||||
=item Panic( $string );
|
||||
|
||||
This method will output a panic error message and then die with a stack trace if the current debug level permits it, otherwise does nothing. This message will be tagged with the PNC string in the logs.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
The :constants tag will export the debug constants which define the various levels of debug
|
||||
The :variables tag will export variables containing the current debug id and level
|
||||
The :functions tag will export the debug functions. This or :all is what you would normally use.
|
||||
The :all tag will export all above symbols.
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Carp
|
||||
Sys::Syslog
|
||||
|
||||
The ZoneMinder README file Troubleshooting section for an extended discussion on the use and configuration of syslog with ZoneMinder.
|
||||
|
||||
http://www.zoneminder.com
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,873 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Memory Access Module, $Date: 2008-02-25 10:13:13 +0000 (Mon, 25 Feb 2008) $, $Revision: 2323 $
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the common definitions and functions used by the rest
|
||||
# of the ZoneMinder scripts
|
||||
#
|
||||
package ZoneMinder::Memory;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require Exporter;
|
||||
require ZoneMinder::Base;
|
||||
|
||||
our @ISA = qw(Exporter ZoneMinder::Base);
|
||||
|
||||
# Items to export into callers namespace by default. Note: do not export
|
||||
# names by default without a very good reason. Use EXPORT_OK instead.
|
||||
# Do not simply export all your public functions/methods/constants.
|
||||
|
||||
# This allows declaration use ZoneMinder ':all';
|
||||
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
|
||||
# will save memory.
|
||||
our %EXPORT_TAGS = (
|
||||
'constants' => [ qw(
|
||||
STATE_IDLE
|
||||
STATE_PREALARM
|
||||
STATE_ALARM
|
||||
STATE_ALERT
|
||||
STATE_TAPE
|
||||
ACTION_GET
|
||||
ACTION_SET
|
||||
ACTION_RELOAD
|
||||
ACTION_SUSPEND
|
||||
ACTION_RESUME
|
||||
TRIGGER_CANCEL
|
||||
TRIGGER_ON
|
||||
TRIGGER_OFF
|
||||
) ],
|
||||
'functions' => [ qw(
|
||||
zmMemVerify
|
||||
zmMemInvalidate
|
||||
zmMemRead
|
||||
zmMemWrite
|
||||
zmMemTidy
|
||||
zmGetMonitorState
|
||||
zmGetAlarmLocation
|
||||
zmIsAlarmed
|
||||
zmInAlarm
|
||||
zmHasAlarmed
|
||||
zmGetLastEvent
|
||||
zmGetLastWriteTime
|
||||
zmGetLastReadTime
|
||||
zmMonitorEnable
|
||||
zmMonitorDisable
|
||||
zmMonitorSuspend
|
||||
zmMonitorResume
|
||||
zmTriggerEventOn
|
||||
zmTriggerEventOff
|
||||
zmTriggerEventCancel
|
||||
zmTriggerShowtext
|
||||
) ],
|
||||
);
|
||||
push( @{$EXPORT_TAGS{all}}, @{$EXPORT_TAGS{$_}} ) foreach keys %EXPORT_TAGS;
|
||||
|
||||
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
|
||||
|
||||
our @EXPORT = qw();
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Shared Memory Facilities
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Config qw(:all);
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
use constant STATE_IDLE => 0;
|
||||
use constant STATE_PREALARM => 1;
|
||||
use constant STATE_ALARM => 2;
|
||||
use constant STATE_ALERT => 3;
|
||||
use constant STATE_TAPE => 4;
|
||||
|
||||
use constant ACTION_GET => 1;
|
||||
use constant ACTION_SET => 2;
|
||||
use constant ACTION_RELOAD => 4;
|
||||
use constant ACTION_SUSPEND => 16;
|
||||
use constant ACTION_RESUME => 32;
|
||||
|
||||
use constant TRIGGER_CANCEL => 0;
|
||||
use constant TRIGGER_ON => 1;
|
||||
use constant TRIGGER_OFF => 2;
|
||||
|
||||
use Storable qw( freeze thaw );
|
||||
|
||||
if ( "yes" eq 'yes' ) # 'yes' if memory is mmapped
|
||||
{
|
||||
require ZoneMinder::Memory::Mapped;
|
||||
ZoneMinder::Memory::Mapped->import();
|
||||
}
|
||||
else
|
||||
{
|
||||
require ZoneMinder::Memory::Shared;
|
||||
ZoneMinder::Memory::Shared->import();
|
||||
}
|
||||
|
||||
# Native architecture
|
||||
our $arch = int(3.2*length(~0));
|
||||
our $native = $arch/8;
|
||||
our $mem_seq = 0;
|
||||
|
||||
our $mem_data =
|
||||
{
|
||||
"shared_data" => { "type"=>"SharedData", "seq"=>$mem_seq++, "contents"=> {
|
||||
"size" => { "type"=>"uint32", "seq"=>$mem_seq++ },
|
||||
"last_write_index" => { "type"=>"uint32", "seq"=>$mem_seq++ },
|
||||
"last_read_index" => { "type"=>"uint32", "seq"=>$mem_seq++ },
|
||||
"state" => { "type"=>"uint32", "seq"=>$mem_seq++ },
|
||||
"last_event" => { "type"=>"uint32", "seq"=>$mem_seq++ },
|
||||
"action" => { "type"=>"uint32", "seq"=>$mem_seq++ },
|
||||
"brightness" => { "type"=>"int32", "seq"=>$mem_seq++ },
|
||||
"hue" => { "type"=>"int32", "seq"=>$mem_seq++ },
|
||||
"colour" => { "type"=>"int32", "seq"=>$mem_seq++ },
|
||||
"contrast" => { "type"=>"int32", "seq"=>$mem_seq++ },
|
||||
"alarm_x" => { "type"=>"int32", "seq"=>$mem_seq++ },
|
||||
"alarm_y" => { "type"=>"int32", "seq"=>$mem_seq++ },
|
||||
"valid" => { "type"=>"uint8", "seq"=>$mem_seq++ },
|
||||
"active" => { "type"=>"uint8", "seq"=>$mem_seq++ },
|
||||
"signal" => { "type"=>"uint8", "seq"=>$mem_seq++ },
|
||||
"format" => { "type"=>"uint8", "seq"=>$mem_seq++ },
|
||||
"imagesize" => { "type"=>"uint32", "seq"=>$mem_seq++ },
|
||||
"epadding1" => { "type"=>"uint32", "seq"=>$mem_seq++ },
|
||||
"epadding2" => { "type"=>"uint32", "seq"=>$mem_seq++ },
|
||||
"last_write_time" => { "type"=>"time_t64", "seq"=>$mem_seq++ },
|
||||
"last_read_time" => { "type"=>"time_t64", "seq"=>$mem_seq++ },
|
||||
"control_state" => { "type"=>"uint8[256]", "seq"=>$mem_seq++ },
|
||||
}
|
||||
},
|
||||
"trigger_data" => { "type"=>"TriggerData", "seq"=>$mem_seq++, "contents"=> {
|
||||
"size" => { "type"=>"uint32", "seq"=>$mem_seq++ },
|
||||
"trigger_state" => { "type"=>"uint32", "seq"=>$mem_seq++ },
|
||||
"trigger_score" => { "type"=>"uint32", "seq"=>$mem_seq++ },
|
||||
"padding" => { "type"=>"uint32", "seq"=>$mem_seq++ },
|
||||
"trigger_cause" => { "type"=>"int8[32]", "seq"=>$mem_seq++ },
|
||||
"trigger_text" => { "type"=>"int8[256]", "seq"=>$mem_seq++ },
|
||||
"trigger_showtext" => { "type"=>"int8[256]", "seq"=>$mem_seq++ },
|
||||
}
|
||||
},
|
||||
"end" => { "seq"=>$mem_seq++, "size"=> 0 }
|
||||
};
|
||||
|
||||
our $mem_size = 0;
|
||||
our $mem_verified = {};
|
||||
|
||||
sub zmMemInit
|
||||
{
|
||||
my $offset = 0;
|
||||
|
||||
foreach my $section_data ( sort { $a->{seq} <=> $b->{seq} } values( %$mem_data ) )
|
||||
{
|
||||
$section_data->{offset} = $offset;
|
||||
$section_data->{align} = 0;
|
||||
|
||||
if ( $section_data->{align} > 1 )
|
||||
{
|
||||
my $rem = $offset % $section_data->{align};
|
||||
if ( $rem > 0 )
|
||||
{
|
||||
$offset += ($section_data->{align} - $rem);
|
||||
}
|
||||
}
|
||||
foreach my $member_data ( sort { $a->{seq} <=> $b->{seq} } values( %{$section_data->{contents}} ) )
|
||||
{
|
||||
if ( $member_data->{type} eq "long" || $member_data->{type} eq "ulong" || $member_data->{type} eq "size_t")
|
||||
{
|
||||
$member_data->{size} = $member_data->{align} = $native;
|
||||
}
|
||||
elsif( $member_data->{type} eq "int64" || $member_data->{type} eq "uint64" || $member_data->{type} eq "time_t64")
|
||||
{
|
||||
$member_data->{size} = $member_data->{align} = 8;
|
||||
}
|
||||
elsif ( $member_data->{type} eq "int32" || $member_data->{type} eq "uint32" || $member_data->{type} eq "bool4" )
|
||||
{
|
||||
$member_data->{size} = $member_data->{align} = 4;
|
||||
}
|
||||
elsif ($member_data->{type} eq "int16" || $member_data->{type} eq "uint16")
|
||||
{
|
||||
$member_data->{size} = $member_data->{align} = 2;
|
||||
}
|
||||
elsif ( $member_data->{type} eq "int8" || $member_data->{type} eq "uint8" || $member_data->{type} eq "bool1" )
|
||||
{
|
||||
$member_data->{size} = $member_data->{align} = 1;
|
||||
}
|
||||
elsif ( $member_data->{type} =~ /^u?int8\[(\d+)\]$/ )
|
||||
{
|
||||
$member_data->{size} = $1;
|
||||
$member_data->{align} = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Fatal( "Unexpected type '".$member_data->{type}."' found in shared data definition." );
|
||||
}
|
||||
|
||||
if ( $member_data->{align} > 1 && ($offset%$member_data->{align}) > 0 )
|
||||
{
|
||||
$offset += ($member_data->{align} - ($offset%$member_data->{align}));
|
||||
}
|
||||
$member_data->{offset} = $offset;
|
||||
$offset += $member_data->{size}
|
||||
}
|
||||
$section_data->{size} = $offset - $section_data->{offset};
|
||||
}
|
||||
|
||||
$mem_size = $offset;
|
||||
}
|
||||
|
||||
&zmMemInit();
|
||||
|
||||
sub zmMemVerify( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
if ( !zmMemAttach( $monitor, $mem_size ) )
|
||||
{
|
||||
return( undef );
|
||||
}
|
||||
|
||||
my $mem_key = zmMemKey( $monitor );
|
||||
if ( !defined($mem_verified->{$mem_key}) )
|
||||
{
|
||||
my $sd_size = zmMemRead( $monitor, "shared_data:size", 1 );
|
||||
if ( $sd_size != $mem_data->{shared_data}->{size} )
|
||||
{
|
||||
if ( $sd_size )
|
||||
{
|
||||
Error( "Shared data size conflict in shared_data for monitor ".$monitor->{Name}.", expected ".$mem_data->{shared_data}->{size}.", got ".$sd_size );
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug( "Shared data size conflict in shared_data for monitor ".$monitor->{Name}.", expected ".$mem_data->{shared_data}->{size}.", got ".$sd_size );
|
||||
}
|
||||
return( undef );
|
||||
}
|
||||
my $td_size = zmMemRead( $monitor, "trigger_data:size", 1 );
|
||||
if ( $td_size != $mem_data->{trigger_data}->{size} )
|
||||
{
|
||||
if ( $td_size )
|
||||
{
|
||||
Error( "Shared data size conflict in trigger_data for monitor ".$monitor->{Name}.", expected ".$mem_data->{triggger_data}->{size}.", got ".$td_size );
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug( "Shared data size conflict in trigger_data for monitor ".$monitor->{Name}.", expected ".$mem_data->{triggger_data}->{size}.", got ".$td_size );
|
||||
}
|
||||
return( undef );
|
||||
}
|
||||
$mem_verified->{$mem_key} = !undef;
|
||||
}
|
||||
return( !undef );
|
||||
}
|
||||
|
||||
sub zmMemRead( $$;$ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $fields = shift;
|
||||
my $nocheck = shift;
|
||||
|
||||
if ( !($nocheck || zmMemVerify( $monitor )) )
|
||||
{
|
||||
return( undef );
|
||||
}
|
||||
|
||||
if ( !ref($fields) )
|
||||
{
|
||||
$fields = [ $fields ];
|
||||
}
|
||||
my @values;
|
||||
foreach my $field ( @$fields )
|
||||
{
|
||||
my ( $section, $element ) = split( /[\/:.]/, $field );
|
||||
Fatal( "Invalid shared data selector '$field'" ) if ( !$section || !$element );
|
||||
|
||||
my $offset = $mem_data->{$section}->{contents}->{$element}->{offset};
|
||||
my $type = $mem_data->{$section}->{contents}->{$element}->{type};
|
||||
my $size = $mem_data->{$section}->{contents}->{$element}->{size};
|
||||
|
||||
my $data = zmMemGet( $monitor, $offset, $size );
|
||||
if ( !defined($data) )
|
||||
{
|
||||
Error( "Unable to read '$field' from memory for monitor ".$monitor->{Id} );
|
||||
zmMemInvalidate( $monitor );
|
||||
return( undef );
|
||||
}
|
||||
my $value;
|
||||
if ( $type eq "long" )
|
||||
{
|
||||
( $value ) = unpack( "l!", $data );
|
||||
}
|
||||
elsif ( $type eq "ulong" || $type eq "size_t" )
|
||||
{
|
||||
( $value ) = unpack( "L!", $data );
|
||||
}
|
||||
elsif ( $type eq "int64" || $type eq "time_t64" )
|
||||
{
|
||||
# The "q" type is only available on 64bit platforms, so use native.
|
||||
( $value ) = unpack( "l!", $data );
|
||||
}
|
||||
elsif ( $type eq "uint64" )
|
||||
{
|
||||
# The "q" type is only available on 64bit platforms, so use native.
|
||||
( $value ) = unpack( "L!", $data );
|
||||
}
|
||||
elsif ( $type eq "int32" )
|
||||
{
|
||||
( $value ) = unpack( "l", $data );
|
||||
}
|
||||
elsif ( $type eq "uint32" || $type eq "bool4" )
|
||||
{
|
||||
( $value ) = unpack( "L", $data );
|
||||
}
|
||||
elsif ( $type eq "int16" )
|
||||
{
|
||||
( $value ) = unpack( "s", $data );
|
||||
}
|
||||
elsif ( $type eq "uint16" )
|
||||
{
|
||||
( $value ) = unpack( "S", $data );
|
||||
}
|
||||
elsif ( $type eq "int8" )
|
||||
{
|
||||
( $value ) = unpack( "c", $data );
|
||||
}
|
||||
elsif ( $type eq "uint8" || $type eq "bool1" )
|
||||
{
|
||||
( $value ) = unpack( "C", $data );
|
||||
}
|
||||
elsif ( $type =~ /^int8\[\d+\]$/ )
|
||||
{
|
||||
( $value ) = unpack( "Z".$size, $data );
|
||||
}
|
||||
elsif ( $type =~ /^uint8\[\d+\]$/ )
|
||||
{
|
||||
( $value ) = unpack( "C".$size, $data );
|
||||
}
|
||||
else
|
||||
{
|
||||
Fatal( "Unexpected type '".$type."' found for '".$field."'" );
|
||||
}
|
||||
push( @values, $value );
|
||||
}
|
||||
if ( wantarray() )
|
||||
{
|
||||
return( @values )
|
||||
}
|
||||
return( $values[0] );
|
||||
}
|
||||
|
||||
sub zmMemInvalidate( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $mem_key = zmMemKey($monitor);
|
||||
if ( $mem_key )
|
||||
{
|
||||
delete $mem_verified->{$mem_key};
|
||||
zmMemDetach( $monitor );
|
||||
}
|
||||
}
|
||||
|
||||
sub zmMemTidy()
|
||||
{
|
||||
zmMemClean();
|
||||
}
|
||||
|
||||
sub zmMemWrite( $$;$ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $field_values = shift;
|
||||
my $nocheck = shift;
|
||||
|
||||
if ( !($nocheck || zmMemVerify( $monitor )) )
|
||||
{
|
||||
return( undef );
|
||||
}
|
||||
|
||||
while ( my ( $field, $value ) = each( %$field_values ) )
|
||||
{
|
||||
my ( $section, $element ) = split( /[\/:.]/, $field );
|
||||
Fatal( "Invalid shared data selector '$field'" ) if ( !$section || !$element );
|
||||
|
||||
my $offset = $mem_data->{$section}->{contents}->{$element}->{offset};
|
||||
my $type = $mem_data->{$section}->{contents}->{$element}->{type};
|
||||
my $size = $mem_data->{$section}->{contents}->{$element}->{size};
|
||||
|
||||
my $data;
|
||||
if ( $type eq "long" )
|
||||
{
|
||||
$data = pack( "l!", $value );
|
||||
}
|
||||
elsif ( $type eq "ulong" || $type eq "size_t" )
|
||||
{
|
||||
$data = pack( "L!", $value );
|
||||
}
|
||||
elsif ( $type eq "int64" || $type eq "time_t64" )
|
||||
{
|
||||
# The "q" type is only available on 64bit platforms, so use native.
|
||||
$data = pack( "l!", $value );
|
||||
}
|
||||
elsif ( $type eq "uint64" )
|
||||
{
|
||||
# The "q" type is only available on 64bit platforms, so use native.
|
||||
$data = pack( "L!", $value );
|
||||
}
|
||||
elsif ( $type eq "int32" )
|
||||
{
|
||||
$data = pack( "l", $value );
|
||||
}
|
||||
elsif ( $type eq "uint32" || $type eq "bool4" )
|
||||
{
|
||||
$data = pack( "L", $value );
|
||||
}
|
||||
elsif ( $type eq "int16" )
|
||||
{
|
||||
$data = pack( "s", $value );
|
||||
}
|
||||
elsif ( $type eq "uint16" )
|
||||
{
|
||||
$data = pack( "S", $value );
|
||||
}
|
||||
elsif ( $type eq "int8" )
|
||||
{
|
||||
$data = pack( "c", $value );
|
||||
}
|
||||
elsif ( $type eq "uint8" || $type eq "bool1" )
|
||||
{
|
||||
$data = pack( "C", $value );
|
||||
}
|
||||
elsif ( $type =~ /^int8\[\d+\]$/ )
|
||||
{
|
||||
$data = pack( "Z".$size, $value );
|
||||
}
|
||||
elsif ( $type =~ /^uint8\[\d+\]$/ )
|
||||
{
|
||||
$data = pack( "C".$size, $value );
|
||||
}
|
||||
else
|
||||
{
|
||||
Fatal( "Unexpected type '".$type."' found for '".$field."'" );
|
||||
}
|
||||
|
||||
if ( !zmMemPut( $monitor, $offset, $size, $data ) )
|
||||
{
|
||||
Error( "Unable to write '$value' to '$field' in memory for monitor ".$monitor->{Id} );
|
||||
zmMemInvalidate( $monitor );
|
||||
return( undef );
|
||||
}
|
||||
}
|
||||
return( !undef );
|
||||
}
|
||||
|
||||
sub zmGetMonitorState( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
return( zmMemRead( $monitor, "shared_data:state" ) );
|
||||
}
|
||||
|
||||
sub zmGetAlarmLocation( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
return( zmMemRead( $monitor, [ "shared_data:alarm_x", "shared_data:alarm_y" ] ) );
|
||||
}
|
||||
|
||||
sub zmSetControlState( $$ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $control_state = shift;
|
||||
|
||||
zmMemWrite( $monitor, { "shared_data:control_state" => $control_state } );
|
||||
}
|
||||
|
||||
sub zmGetControlState( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
return( zmMemRead( $monitor, "shared_data:control_state" ) );
|
||||
}
|
||||
|
||||
sub zmSaveControlState( $$ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $control_state = shift;
|
||||
|
||||
zmSetControlState( $monitor, freeze( $control_state ) );
|
||||
}
|
||||
|
||||
sub zmRestoreControlState( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
return( thaw( zmGetControlState( $monitor ) ) );
|
||||
}
|
||||
|
||||
sub zmIsAlarmed( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
my $state = zmGetMonitorState( $monitor );
|
||||
|
||||
return( $state == STATE_ALARM );
|
||||
}
|
||||
|
||||
sub zmInAlarm( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
my $state = zmGetMonitorState( $monitor );
|
||||
|
||||
return( $state == STATE_ALARM || $state == STATE_ALERT );
|
||||
}
|
||||
|
||||
sub zmHasAlarmed( $$ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $last_event_id = shift;
|
||||
|
||||
my ( $state, $last_event ) = zmMemRead( $monitor, [ "shared_data:state", "shared_data:last_event" ] );
|
||||
|
||||
if ( $state == STATE_ALARM || $state == STATE_ALERT )
|
||||
{
|
||||
return( $last_event );
|
||||
}
|
||||
elsif( $last_event != $last_event_id )
|
||||
{
|
||||
return( $last_event );
|
||||
}
|
||||
return( undef );
|
||||
}
|
||||
|
||||
sub zmGetLastEvent( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
return( zmMemRead( $monitor, "shared_data:last_event" ) );
|
||||
}
|
||||
|
||||
sub zmGetLastWriteTime( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
return( zmMemRead( $monitor, "shared_data:last_write_time" ) );
|
||||
}
|
||||
|
||||
sub zmGetLastReadTime( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
return( zmMemRead( $monitor, "shared_data:last_read_time" ) );
|
||||
}
|
||||
|
||||
sub zmGetMonitorActions( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
return( zmMemRead( $monitor, "shared_data:action" ) );
|
||||
}
|
||||
|
||||
sub zmMonitorEnable( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
my $action = zmMemRead( $monitor, "shared_data:action" );
|
||||
$action |= ACTION_SUSPEND;
|
||||
zmMemWrite( $monitor, { "shared_data:action" => $action } );
|
||||
}
|
||||
|
||||
sub zmMonitorDisable( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
my $action = zmMemRead( $monitor, "shared_data:action" );
|
||||
$action |= ACTION_RESUME;
|
||||
zmMemWrite( $monitor, { "shared_data:action" => $action } );
|
||||
}
|
||||
|
||||
sub zmMonitorSuspend( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
my $action = zmMemRead( $monitor, "shared_data:action" );
|
||||
$action |= ACTION_SUSPEND;
|
||||
zmMemWrite( $monitor, { "shared_data:action" => $action } );
|
||||
}
|
||||
|
||||
sub zmMonitorResume( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
my $action = zmMemRead( $monitor, "shared_data:action" );
|
||||
$action |= ACTION_RESUME;
|
||||
zmMemWrite( $monitor, { "shared_data:action" => $action } );
|
||||
}
|
||||
|
||||
sub zmGetTriggerState( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
return( zmMemRead( $monitor, "trigger_data:trigger_state" ) );
|
||||
}
|
||||
|
||||
sub zmTriggerEventOn( $$$;$$ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $score = shift;
|
||||
my $cause = shift;
|
||||
my $text = shift;
|
||||
my $showtext = shift;
|
||||
|
||||
my $values = {
|
||||
"trigger_data:trigger_score" => $score,
|
||||
"trigger_data:trigger_cause" => $cause,
|
||||
};
|
||||
$values->{"trigger_data:trigger_text"} = $text if ( defined($text) );
|
||||
$values->{"trigger_data:trigger_showtext"} = $showtext if ( defined($showtext) );
|
||||
$values->{"trigger_data:trigger_state"} = TRIGGER_ON; # Write state last so event not read incomplete
|
||||
|
||||
zmMemWrite( $monitor, $values );
|
||||
}
|
||||
|
||||
sub zmTriggerEventOff( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
my $values = {
|
||||
"trigger_data:trigger_state" => TRIGGER_OFF,
|
||||
"trigger_data:trigger_score" => 0,
|
||||
"trigger_data:trigger_cause" => "",
|
||||
"trigger_data:trigger_text" => "",
|
||||
"trigger_data:trigger_showtext" => "",
|
||||
};
|
||||
|
||||
zmMemWrite( $monitor, $values );
|
||||
}
|
||||
|
||||
sub zmTriggerEventCancel( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
my $values = {
|
||||
"trigger_data:trigger_state" => TRIGGER_CANCEL,
|
||||
"trigger_data:trigger_score" => 0,
|
||||
"trigger_data:trigger_cause" => "",
|
||||
"trigger_data:trigger_text" => "",
|
||||
"trigger_data:trigger_showtext" => "",
|
||||
};
|
||||
|
||||
zmMemWrite( $monitor, $values );
|
||||
}
|
||||
|
||||
sub zmTriggerShowtext( $$ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $showtext = shift;
|
||||
|
||||
my $values = {
|
||||
"trigger_data:trigger_showtext" => $showtext,
|
||||
};
|
||||
|
||||
zmMemWrite( $monitor, $values );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::MappedMem - ZoneMinder Mapped Memory access module
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::MappedMem;
|
||||
use ZoneMinder::MappedMem qw(:all);
|
||||
|
||||
if ( zmMemVerify( $monitor ) )
|
||||
{
|
||||
$state = zmGetMonitorState( $monitor );
|
||||
if ( $state == STATE_ALARM )
|
||||
{
|
||||
...
|
||||
}
|
||||
}
|
||||
|
||||
( $lri, $lwi ) = zmMemRead( $monitor, [ "shared_data:last_read_index", "shared_data:last_write_index" ] );
|
||||
zmMemWrite( $monitor, { "trigger_data:trigger_showtext" => "Some Text" } );
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The ZoneMinder:MappedMem module contains methods for accessing and writing to mapped memory as well as helper methods for common operations.
|
||||
|
||||
The core elements of ZoneMinder used mapped memory to allow multiple access to resources. Although ZoneMinder scripts have used this information before, up until now it was difficult to access and prone to errors. This module introduces a common API for mapped memory access (both reading and writing) making it a lot easier to customise scripts or even create your own.
|
||||
|
||||
All the methods listed below require a 'monitor' parameter. This must be a reference to a hash with at least the 'Id' field set to the monitor id of the mapped memory you wish to access. Using database methods to select the monitor details will also return this kind of data. Some of the mapped memory methods will add and amend new fields to this hash.
|
||||
|
||||
=over 4
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=item zmMemVerify ( $monitor );
|
||||
|
||||
Verify that the mapped memory of the monitor given exists and is valid. It will return an undefined value if it is not valid. You should generally call this method first before using any of the other methods, but most of the remaining methods will also do so if the memory has not already been verified.
|
||||
|
||||
=item zmMemInvalidate ( $monitor );
|
||||
|
||||
Following an error, reset the mapped memory ids and attempt to reverify on the next operation. This is mostly used when a mapped memory segment has gone away and been recreated with a different id.
|
||||
|
||||
=item zmMemRead ( $monitor, $readspec );
|
||||
|
||||
This method is used to read data from mapped memory attached to the given monitor. The mapped memory will be verified if it has not already been. The 'readspec' must either be a string of the form "<section>:<field>" or a reference to an array of strings of the same format. In the first case a single value is returned, in the latter case a list of values is return. Errors will cause undefined to be returned. The allowable sections and field names are described below.
|
||||
|
||||
=item zmMemWrite ( $monitor, $writespec );
|
||||
|
||||
This method is used to write data to mapped memory attached to the given monitor. The mapped memory will be verified if it has not already been. The 'writespec' must be a reference to a hash with keys of the form "<section>:<field>" and values as the data to be written. Errors will cause undefined to be returned, otherwise a non-undefined value will be returned. The allowable sections and field names are described below.
|
||||
|
||||
=item $state = zmGetMonitorState ( $monitor );
|
||||
|
||||
Return the current state of the given monitor. This is an integer value and can be compared with the STATE constants given below.
|
||||
|
||||
=item $event_id = zmGetLastEvent ( $monitor );
|
||||
|
||||
Return the event id of the last event that the monitor generated, or 0 if no event has been generated by the current monitor process.
|
||||
|
||||
=item zmIsAlarmed ( $monitor );
|
||||
|
||||
Return 1 if the monitor given is currently in an alarm state, 0 otherwise.
|
||||
|
||||
=item zmInAlarm ( $monitor );
|
||||
|
||||
Return 1 if the monitor given is currently in an alarm or alerted state, 0 otherwise.
|
||||
|
||||
=item zmHasAlarmed ( $monitor );
|
||||
|
||||
Return 1 if the given monitor is in an alarm state, or has been in an alarm state since the last call to this method.
|
||||
|
||||
=item ( $x, $y ) = zmGetAlarmLocation ( $monitor );
|
||||
|
||||
Return an x,y pair indicating the image co-ordinates of the centre of the last motion event generated by the given monitor. If no event has been generated by the current monitor process, or the alarm was not motion related, returns -1,-1.
|
||||
|
||||
=item zmGetLastWriteTime ( $monitor );
|
||||
|
||||
Returns the time (in utc seconds) since the last image was captured by the given monitor and written to shared memory, or 0 otherwise.
|
||||
|
||||
=item zmGetLastReadTime ( $monitor );
|
||||
|
||||
Returns the time (in utc seconds) since the last image was read from shared memory by the analysis daemon of the given monitor, or 0 otherwise or if the monitor is in monitor only mode.
|
||||
|
||||
=item zmMonitorSuspend ( $monitor );
|
||||
|
||||
Suspend the given monitor from generating events caused by motion. This method can be used to prevent camera actions such as panning or zooming from causing events. If configured to do so, the monitor may automatically resume after a defined period.
|
||||
|
||||
=item zmMonitorResume ( $monitor );
|
||||
|
||||
Allow the given monitor to resume generating events caused by motion.
|
||||
|
||||
=item zmTriggerEventOn ( $monitor, $score, $cause [, $text, $showtext ] );
|
||||
|
||||
Trigger the given monitor to generate an event. You must supply an event score and a cause string indicating the reason for the event. You may also supply a text string containing further details about the event and a showtext string which may be included in the timestamp annotation on any images captured during the event, if configured to do so.
|
||||
|
||||
=item zmTriggerEventOff ( $monitor );
|
||||
|
||||
Trigger the given monitor to not generate any events. This method does not cancel zmTriggerEventOn, but is exclusive to it. This method is intended to allow external triggers to prevent normal events being generated by monitors in the same way as zmMonitorSuspend but applies to all events and not just motion, and is intended for longer timescales than are appropriate for suspension.
|
||||
|
||||
=item zmTriggerEventCancel ( $monitor );
|
||||
|
||||
Cancel any previous trigger on or off requests. This stops a triggered alarm if it exists from a previous 'on' and allows events to be generated once more following a previous 'off'.
|
||||
|
||||
=item zmTriggerShowtext ( $monitor, $showtest );
|
||||
|
||||
Indicate that the given text should be displayed in the timestamp annotation on any images captured, if the format of the annotation string defined for the monitor permits.
|
||||
|
||||
=head1 DATA
|
||||
|
||||
The data fields in mapped memory that may be accessed are as follows. There are two main sections, shared_data which is general data and trigger_data which is used for event triggering. Whilst reading from these fields is harmless, extreme care must be taken when writing to mapped memory, especially in the shared_data section as this is normally written to only by monitor capture and analysis processes.
|
||||
|
||||
shared_data The general mapped memory section
|
||||
size The size, in bytes, of this section
|
||||
valid Flag indicating whether this section has been initialised
|
||||
active Flag indicating whether this monitor is active (enabled/disabled)
|
||||
signal Flag indicating whether this monitor is reciving a valid signal
|
||||
state The current monitor state, see the STATE constants below
|
||||
last_write_index The last index, in the image buffer, that an image has been saved to
|
||||
last_read_index The last index, in the image buffer, that an image has been analysed from
|
||||
last_write_time The time (in utc seconds) when the last image was captured
|
||||
last_read_time The time (in utc seconds) when the last image was analysed
|
||||
last_event The id of the last event generated by the monitor analysis process, 0 if none
|
||||
action The monitor actions bitmask, see the ACTION constants below
|
||||
brightness Read/write location for the current monitor brightness
|
||||
hue Read/write location for the current monitor hue
|
||||
colour Read/write location for the current monitor colour
|
||||
contrast Read/write location for the current monitor contrast
|
||||
alarm_x Image x co-ordinate (from left) of the centre of the last motion event, -1 if none
|
||||
alarm_y Image y co-ordinate (from top) of the centre of the last motion event, -1 if none
|
||||
|
||||
trigger_data The triggered event mapped memory section
|
||||
size The size, in bytes of this section
|
||||
trigger_state The current trigger state, see the TRIGGER constants below
|
||||
trigger_score The current triggered event score
|
||||
trigger_cause The current triggered event cause string
|
||||
trigger_text The current triggered event descriptive text string
|
||||
trigger_showtext The triggered text that will be displayed on captured image timestamps
|
||||
|
||||
=head1 CONSTANTS
|
||||
|
||||
The following constants are used by the methods above, but can also be used by user scripts if required.
|
||||
|
||||
=item STATE_IDLE STATE_PREALARM STATE_ALARM STATE_ALERT STATE_TAPE
|
||||
|
||||
These constants define the state of the monitor with respect to alarms and events. They are used in the shared_data:state field.
|
||||
|
||||
=item ACTION_GET ACTION_SET ACTION_RELOAD ACTION_SUSPEND ACTION_RESUME
|
||||
|
||||
These constants defines the various values that can exist in the shared_data:action field. This is a bitmask which when non-zero defines an action that an executing monitor process should take. ACTION_GET requires that the current values of brightness, contrast, colour and hue are taken from the camera and written to the equivalent mapped memory fields. ACTION_SET implies the reverse, that the values in mapped memory should be written to the camera. ACTION_RELOAD signal that the monitor process should reload itself from the database in case any settings have changed there. ACTION_SUSPEND signals that a monitor should stop exaiming images for motion, though other alarms may still occur. ACTION_RESUME sigansl that a monitor should resume motion detectiom.
|
||||
|
||||
=item TRIGGER_CANCEL TRIGGER_ON TRIGGER_OFF
|
||||
|
||||
These constants are used in the definition of external triggers. TRIGGER_CANCEL is used to indicated that any previous trigger settings should be cancelled, TRIGGER_ON signals that an alarm should be created (or continued)) as a result of the current trigger and TRIGGER_OFF signals that the trigger should prevent any alarms from being generated. See the trigger methods above for further details.
|
||||
|
||||
=head1 EXPORT
|
||||
|
||||
None by default.
|
||||
The :constants tag will export the mapped memory constants which mostly define enumerations for the variables held in memory
|
||||
The :functions tag will export the mapped memory access functions.
|
||||
The :all tag will export all above symbols.
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.zoneminder.com
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,169 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Mapped Memory Access Module, $Date: 2008-02-25 10:13:13 +0000 (Mon, 25 Feb 2008) $, $Revision: 2323 $
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the definitions and functions used when accessing mapped memory
|
||||
#
|
||||
package ZoneMinder::Memory::Mapped;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require Exporter;
|
||||
require ZoneMinder::Base;
|
||||
|
||||
our @ISA = qw(Exporter ZoneMinder::Base);
|
||||
|
||||
# Items to export into callers namespace by default. Note: do not export
|
||||
# names by default without a very good reason. Use EXPORT_OK instead.
|
||||
# Do not simply export all your public functions/methods/constants.
|
||||
|
||||
# This allows declaration use ZoneMinder ':all';
|
||||
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
|
||||
# will save memory.
|
||||
our %EXPORT_TAGS = (
|
||||
'functions' => [ qw(
|
||||
zmMemKey
|
||||
zmMemAttach
|
||||
zmMemDetach
|
||||
zmMemGet
|
||||
zmMemPut
|
||||
zmMemClean
|
||||
) ],
|
||||
);
|
||||
push( @{$EXPORT_TAGS{all}}, @{$EXPORT_TAGS{$_}} ) foreach keys %EXPORT_TAGS;
|
||||
|
||||
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
|
||||
|
||||
our @EXPORT = @EXPORT_OK;
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Mapped Memory Facilities
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Config qw(:all);
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
use Sys::Mmap;
|
||||
|
||||
sub zmMemKey( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
return( defined($monitor->{MMapAddr})?$monitor->{MMapAddr}:undef );
|
||||
}
|
||||
|
||||
sub zmMemAttach( $$ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $size = shift;
|
||||
if ( !defined($monitor->{MMapAddr}) )
|
||||
{
|
||||
my $mmap_file = ZM_PATH_MAP."/zm.mmap.".$monitor->{Id};
|
||||
if ( !open( MMAP, "+<".$mmap_file ) )
|
||||
{
|
||||
Error( sprintf( "Can't open memory map file '%s': $!\n", $mmap_file ) );
|
||||
return( undef );
|
||||
}
|
||||
my $mmap = undef;
|
||||
my $mmap_addr = mmap( $mmap, $size, PROT_READ|PROT_WRITE, MAP_SHARED, \*MMAP );
|
||||
if ( !$mmap_addr || !$mmap )
|
||||
{
|
||||
Error( sprintf( "Can't mmap to file '%s': $!\n", $mmap_file ) );
|
||||
return( undef );
|
||||
}
|
||||
$monitor->{MMapHandle} = \*MMAP;
|
||||
$monitor->{MMapAddr} = $mmap_addr;
|
||||
$monitor->{MMap} = \$mmap;
|
||||
}
|
||||
return( !undef );
|
||||
}
|
||||
|
||||
sub zmMemDetach( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
if ( $monitor->{MMap} )
|
||||
{
|
||||
munmap( ${$monitor->{MMap}} );
|
||||
delete $monitor->{MMap};
|
||||
}
|
||||
if ( $monitor->{MMapAddr} )
|
||||
{
|
||||
delete $monitor->{MMapAddr};
|
||||
}
|
||||
if ( $monitor->{MMapHandle} )
|
||||
{
|
||||
close( $monitor->{MMapHandle} );
|
||||
delete $monitor->{MMapHandle};
|
||||
}
|
||||
}
|
||||
|
||||
sub zmMemGet( $$$ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $offset = shift;
|
||||
my $size = shift;
|
||||
|
||||
my $mmap = $monitor->{MMap};
|
||||
if ( !$mmap || !$$mmap )
|
||||
{
|
||||
Error( sprintf( "Can't read from mapped memory for monitor '%d', gone away?", $monitor->{Id} ) );
|
||||
return( undef );
|
||||
}
|
||||
my $data = substr( $$mmap, $offset, $size );
|
||||
return( $data );
|
||||
}
|
||||
|
||||
sub zmMemPut( $$$$ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $offset = shift;
|
||||
my $size = shift;
|
||||
my $data = shift;
|
||||
|
||||
my $mmap = $monitor->{MMap};
|
||||
if ( !$mmap || !$$mmap )
|
||||
{
|
||||
Error( sprintf( "Can't write mapped memory for monitor '%d', gone away?", $monitor->{Id} ) );
|
||||
return( undef );
|
||||
}
|
||||
substr( $$mmap, $offset, $size ) = $data;
|
||||
return( !undef );
|
||||
}
|
||||
|
||||
sub zmMemClean
|
||||
{
|
||||
Debug( "Removing memory map files\n" );
|
||||
my $mapPath = ZM_PATH_MAP."/zm.mmap.*";
|
||||
foreach my $mapFile( glob( $mapPath ) )
|
||||
{
|
||||
( $mapFile ) = $mapFile =~ /^(.+)$/;
|
||||
Debug( "Removing memory map file '$mapFile'\n" );
|
||||
unlink( $mapFile );
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
|
@ -0,0 +1,161 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Shared Memory Access Module, $Date: 2007-08-29 19:11:09 +0100 (Wed, 29 Aug 2007) $, $Revision: 2175 $
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the common definitions and functions used by the rest
|
||||
# of the ZoneMinder scripts
|
||||
#
|
||||
package ZoneMinder::Memory::Shared;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require Exporter;
|
||||
require ZoneMinder::Base;
|
||||
|
||||
our @ISA = qw(Exporter ZoneMinder::Base);
|
||||
|
||||
# Items to export into callers namespace by default. Note: do not export
|
||||
# names by default without a very good reason. Use EXPORT_OK instead.
|
||||
# Do not simply export all your public functions/methods/constants.
|
||||
|
||||
# This allows declaration use ZoneMinder ':all';
|
||||
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
|
||||
# will save memory.
|
||||
our %EXPORT_TAGS = (
|
||||
'functions' => [ qw(
|
||||
zmMemKey
|
||||
zmMemAttach
|
||||
zmMemDetach
|
||||
zmMemGet
|
||||
zmMemPut
|
||||
zmMemClean
|
||||
) ],
|
||||
);
|
||||
push( @{$EXPORT_TAGS{all}}, @{$EXPORT_TAGS{$_}} ) foreach keys %EXPORT_TAGS;
|
||||
|
||||
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
|
||||
|
||||
our @EXPORT = @EXPORT_OK;
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Shared Memory Facilities
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Config qw(:all);
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
sub zmMemKey( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
return( defined($monitor->{ShmKey})?$monitor->{ShmKey}:undef );
|
||||
}
|
||||
|
||||
sub zmMemAttach( $$ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $size = shift;
|
||||
if ( !defined($monitor->{ShmId}) )
|
||||
{
|
||||
my $shm_key = (hex(ZM_SHM_KEY)&0xffff0000)|$monitor->{Id};
|
||||
my $shm_id = shmget( $shm_key, $size, 0 );
|
||||
if ( !defined($shm_id) )
|
||||
{
|
||||
Error( sprintf( "Can't get shared memory id '%x', %d: $!\n", $shm_key, $monitor->{Id} ) );
|
||||
return( undef );
|
||||
}
|
||||
$monitor->{ShmKey} = $shm_key;
|
||||
$monitor->{ShmId} = $shm_id;
|
||||
}
|
||||
return( !undef );
|
||||
}
|
||||
|
||||
sub zmMemDetach( $ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
|
||||
delete $monitor->{ShmId};
|
||||
}
|
||||
|
||||
sub zmMemGet( $$$ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $offset = shift;
|
||||
my $size = shift;
|
||||
|
||||
my $shm_key = $monitor->{ShmKey};
|
||||
my $shm_id = $monitor->{ShmId};
|
||||
|
||||
my $data;
|
||||
if ( !shmread( $shm_id, $data, $offset, $size ) )
|
||||
{
|
||||
Error( sprintf( "Can't read from shared memory '%x/%d': $!", $shm_key, $shm_id ) );
|
||||
return( undef );
|
||||
}
|
||||
return( $data );
|
||||
}
|
||||
|
||||
sub zmMemPut( $$$$ )
|
||||
{
|
||||
my $monitor = shift;
|
||||
my $offset = shift;
|
||||
my $size = shift;
|
||||
my $data = shift;
|
||||
|
||||
my $shm_key = $monitor->{ShmKey};
|
||||
my $shm_id = $monitor->{ShmId};
|
||||
|
||||
if ( !shmwrite( $shm_id, $data, $offset, $size ) )
|
||||
{
|
||||
Error( sprintf( "Can't write to shared memory '%x/%d': $!", $shm_key, $shm_id ) );
|
||||
return( undef );
|
||||
}
|
||||
return( !undef );
|
||||
}
|
||||
|
||||
sub zmMemClean
|
||||
{
|
||||
Debug( "Removing shared memory\n" );
|
||||
# Find ZoneMinder shared memory
|
||||
my $command = "ipcs -m | grep '^".substr( sprintf( "0x%x", hex(ZM_SHM_KEY) ), 0, -2 )."'";
|
||||
Debug( "Checking for shared memory with '$command'\n" );
|
||||
open( CMD, "$command |" ) or Fatal( "Can't execute '$command': $!" );
|
||||
while( <CMD> )
|
||||
{
|
||||
chomp;
|
||||
my ( $key, $id ) = split( /\s+/ );
|
||||
if ( $id =~ /^(\d+)/ )
|
||||
{
|
||||
$id = $1;
|
||||
$command = "ipcrm shm $id";
|
||||
Debug( "Removing shared memory with '$command'\n" );
|
||||
qx( $command );
|
||||
}
|
||||
}
|
||||
close( CMD );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
|
@ -0,0 +1,166 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Trigger Channel Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the base class definition of the trigger channel
|
||||
# class tree
|
||||
#
|
||||
package ZoneMinder::Trigger::Channel;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Database Access
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
use Carp;
|
||||
|
||||
our $AUTOLOAD;
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my $self = {};
|
||||
$self->{readable} = !undef;
|
||||
$self->{writeable} = !undef;
|
||||
$self->{selectable} = undef;
|
||||
$self->{state} = 'closed';
|
||||
bless( $self, $class );
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub clone
|
||||
{
|
||||
my $self = shift;
|
||||
my $clone = { %$self };
|
||||
bless $clone, ref $self;
|
||||
}
|
||||
|
||||
sub open()
|
||||
{
|
||||
my $self = shift;
|
||||
my $class = ref($self) or croak( "Can't get class for non object $self" );
|
||||
croak( "Abstract base class method called for object of class $class" );
|
||||
}
|
||||
|
||||
sub close()
|
||||
{
|
||||
my $self = shift;
|
||||
my $class = ref($self) or croak( "Can't get class for non object $self" );
|
||||
croak( "Abstract base class method called for object of class $class" );
|
||||
}
|
||||
|
||||
sub getState()
|
||||
{
|
||||
my $self = shift;
|
||||
return( $self->{state} );
|
||||
}
|
||||
|
||||
sub isOpen()
|
||||
{
|
||||
my $self = shift;
|
||||
return( $self->{state} eq "open" );
|
||||
}
|
||||
|
||||
sub isConnected()
|
||||
{
|
||||
my $self = shift;
|
||||
return( $self->{state} eq "connected" );
|
||||
}
|
||||
|
||||
sub DESTROY
|
||||
{
|
||||
}
|
||||
|
||||
sub AUTOLOAD
|
||||
{
|
||||
my $self = shift;
|
||||
my $class = ref($self) || croak( "$self not object" );
|
||||
my $name = $AUTOLOAD;
|
||||
$name =~ s/.*://;
|
||||
if ( !exists($self->{$name}) )
|
||||
{
|
||||
croak( "Can't access $name member of object of class $class" );
|
||||
}
|
||||
return( $self->{$name} );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,121 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Trigger Channel Handle Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the class definition of the simple file based trigger
|
||||
# channel class
|
||||
#
|
||||
package ZoneMinder::Trigger::Channel::File;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
require ZoneMinder::Trigger::Channel::Handle;
|
||||
|
||||
our @ISA = qw(ZoneMinder::Trigger::Channel::Handle);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Simple file based trigger channel
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
use Carp;
|
||||
use Fcntl;
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my %params = @_;
|
||||
my $self = ZoneMinder::Trigger::Channel::Handle->new;
|
||||
$self->{path} = $params{path};
|
||||
bless( $self, $class );
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub open()
|
||||
{
|
||||
my $self = shift;
|
||||
local *sfh;
|
||||
#sysopen( *sfh, $conn->{path}, O_NONBLOCK|O_RDONLY ) or croak( "Can't sysopen: $!" );
|
||||
#open( *sfh, "<".$conn->{path} ) or croak( "Can't open: $!" );
|
||||
open( *sfh, "+<".$self->{path} ) or croak( "Can't open: $!" );
|
||||
$self->{state} = 'open';
|
||||
$self->{handle} = *sfh;
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,154 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Trigger Channel Handle Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the class definition of the handle based trigger channel
|
||||
# class
|
||||
#
|
||||
package ZoneMinder::Trigger::Channel::Handle;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
require ZoneMinder::Trigger::Channel;
|
||||
|
||||
our @ISA = qw(ZoneMinder::Trigger::Channel);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Base class for handle based trigger channels
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
use POSIX;
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my $port = shift;
|
||||
my $self = ZoneMinder::Trigger::Channel->new();
|
||||
$self->{handle} = undef;
|
||||
bless( $self, $class );
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub spawns
|
||||
{
|
||||
return( undef );
|
||||
}
|
||||
|
||||
sub close()
|
||||
{
|
||||
my $self = shift;
|
||||
close( $self->{handle} );
|
||||
$self->{state} = 'closed';
|
||||
$self->{handle} = undef;
|
||||
}
|
||||
|
||||
sub read()
|
||||
{
|
||||
my $self = shift;
|
||||
my $buffer;
|
||||
my $nbytes = sysread( $self->{handle}, $buffer, POSIX::BUFSIZ );
|
||||
if ( !$nbytes )
|
||||
{
|
||||
return( undef );
|
||||
}
|
||||
Debug( "Read '$buffer' ($nbytes bytes)\n" );
|
||||
return( $buffer );
|
||||
}
|
||||
|
||||
sub write()
|
||||
{
|
||||
my $self = shift;
|
||||
my $buffer = shift;
|
||||
my $nbytes = syswrite( $self->{handle}, $buffer );
|
||||
if ( !defined( $nbytes) || $nbytes < length($buffer) )
|
||||
{
|
||||
Error( "Unable to write buffer '".$buffer.", expected ".length($buffer)." bytes, sent ".$nbytes.": $!\n" );
|
||||
return( undef );
|
||||
}
|
||||
Debug( "Wrote '$buffer' ($nbytes bytes)\n" );
|
||||
return( !undef );
|
||||
}
|
||||
|
||||
sub fileno()
|
||||
{
|
||||
my $self = shift;
|
||||
return( defined($self->{handle})?fileno($self->{handle}):-1 );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,142 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Trigger Channel Handle Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the class definition of the tcp socket based trigger
|
||||
# channel class
|
||||
#
|
||||
package ZoneMinder::Trigger::Channel::Inet;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
require ZoneMinder::Trigger::Channel::Spawning;
|
||||
|
||||
our @ISA = qw(ZoneMinder::Trigger::Channel::Spawning);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Internet (TCP) based trigger channel
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
use Carp;
|
||||
use Socket;
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my %params = @_;
|
||||
my $self = ZoneMinder::Trigger::Channel::Spawning->new();
|
||||
$self->{selectable} = !undef;
|
||||
$self->{port} = $params{port};
|
||||
bless( $self, $class );
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub open()
|
||||
{
|
||||
my $self = shift;
|
||||
local *sfh;
|
||||
my $saddr = sockaddr_in( $self->{port}, INADDR_ANY );
|
||||
socket( *sfh, PF_INET, SOCK_STREAM, getprotobyname('tcp') ) or croak( "Can't open socket: $!" );
|
||||
setsockopt( *sfh, SOL_SOCKET, SO_REUSEADDR, 1 );
|
||||
bind( *sfh, $saddr ) or croak( "Can't bind: $!" );
|
||||
listen( *sfh, SOMAXCONN ) or croak( "Can't listen: $!" );
|
||||
$self->{state} = 'open';
|
||||
$self->{handle} = *sfh;
|
||||
}
|
||||
|
||||
sub _spawn( $ )
|
||||
{
|
||||
my $self = shift;
|
||||
my $new_handle = shift;
|
||||
my $clone = $self->clone();
|
||||
$clone->{handle} = $new_handle;
|
||||
$clone->{state} = 'connected';
|
||||
return( $clone );
|
||||
}
|
||||
|
||||
sub accept()
|
||||
{
|
||||
my $self = shift;
|
||||
local *cfh;
|
||||
my $paddr = accept( *cfh, $self->{handle} );
|
||||
return( $self->_spawn( *cfh ) );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,160 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Trigger Channel Handle Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the class definition of the serial port trigger channel
|
||||
# class
|
||||
#
|
||||
package ZoneMinder::Trigger::Channel::Serial;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
require ZoneMinder::Trigger::Channel;
|
||||
|
||||
our @ISA = qw(ZoneMinder::Trigger::Channel);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Serial access trigger channel
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
use Device::SerialPort;
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my %params = @_;
|
||||
my $self = ZoneMinder::Trigger::Channel->new;
|
||||
$self->{path} = $params{path};
|
||||
bless( $self, $class );
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub open()
|
||||
{
|
||||
my $self = shift;
|
||||
my $device = new Device::SerialPort( $self->{path} );
|
||||
$device->baudrate(9600);
|
||||
$device->databits(8);
|
||||
$device->parity('none');
|
||||
$device->stopbits(1);
|
||||
$device->handshake('none');
|
||||
|
||||
$device->read_const_time(50);
|
||||
$device->read_char_time(10);
|
||||
|
||||
$self->{device} = $device;
|
||||
$self->{state} = 'open';
|
||||
$self->{state} = 'connected';
|
||||
}
|
||||
|
||||
sub close()
|
||||
{
|
||||
my $self = shift;
|
||||
$self->{device}->close();
|
||||
$self->{state} = 'closed';
|
||||
}
|
||||
|
||||
sub read()
|
||||
{
|
||||
my $self = shift;
|
||||
my $buffer = $self->{device}->lookfor();
|
||||
if ( !$buffer || !length($buffer) )
|
||||
{
|
||||
return( undef );
|
||||
}
|
||||
Debug( "Read '$buffer' (".length($buffer)." bytes)\n" );
|
||||
return( $buffer );
|
||||
}
|
||||
|
||||
sub write()
|
||||
{
|
||||
my $self = shift;
|
||||
my $buffer = shift;
|
||||
my $nbytes = $self->{device}->write( $buffer );
|
||||
$self->{device}->write_drain();
|
||||
if ( !defined( $nbytes) || $nbytes < length($buffer) )
|
||||
{
|
||||
Error( "Unable to write buffer '".$buffer.", expected ".length($buffer)." bytes, sent ".$nbytes.": $!\n" );
|
||||
return( undef );
|
||||
}
|
||||
Debug( "Wrote '$buffer' ($nbytes bytes)\n" );
|
||||
return( !undef );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,112 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Trigger Channel Handle Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the class definition of the handle based trigger channel
|
||||
# classes that spawn new connections when connected.
|
||||
#
|
||||
package ZoneMinder::Trigger::Channel::Spawning;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
require ZoneMinder::Trigger::Channel::Handle;
|
||||
|
||||
our @ISA = qw(ZoneMinder::Trigger::Channel::Handle);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Base class for handle based triggers that spawn new connections
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my $port = shift;
|
||||
my $self = ZoneMinder::Trigger::Channel::Handle->new();
|
||||
$self->{spawns} = !undef;
|
||||
bless( $self, $class );
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub spawns
|
||||
{
|
||||
return( !undef );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,141 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Trigger Channel Handle Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the class definition of the unix socket based trigger
|
||||
# channel class
|
||||
#
|
||||
package ZoneMinder::Trigger::Channel::Unix;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
require ZoneMinder::Trigger::Channel::Spawning;
|
||||
|
||||
our @ISA = qw(ZoneMinder::Trigger::Channel::Spawning);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Unix socket based trigger channel
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
use Carp;
|
||||
use Socket;
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my %params = @_;
|
||||
my $self = ZoneMinder::Trigger::Channel->new;
|
||||
$self->{selectable} = !undef;
|
||||
$self->{path} = $params{path};
|
||||
bless( $self, $class );
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub open()
|
||||
{
|
||||
my $self = shift;
|
||||
local *sfh;
|
||||
unlink( $self->{path} );
|
||||
my $saddr = sockaddr_un( $self->{path} );
|
||||
socket( *sfh, PF_UNIX, SOCK_STREAM, 0 ) or croak( "Can't open socket: $!" );
|
||||
bind( *sfh, $saddr ) or croak( "Can't bind: $!" );
|
||||
listen( *sfh, SOMAXCONN ) or croak( "Can't listen: $!" );
|
||||
$self->{handle} = *sfh;
|
||||
}
|
||||
|
||||
sub _spawn( $ )
|
||||
{
|
||||
my $self = shift;
|
||||
my $new_handle = shift;
|
||||
my $clone = $self->clone();
|
||||
$clone->{handle} = $new_handle;
|
||||
$clone->{state} = 'connected';
|
||||
return( $clone );
|
||||
}
|
||||
|
||||
sub accept()
|
||||
{
|
||||
my $self = shift;
|
||||
local *cfh;
|
||||
my $paddr = accept( *cfh, $self->{handle} );
|
||||
return( $self->_spawn( *cfh ) );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,239 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Trigger Connection Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the base class definition of the trigger connection
|
||||
# class tree
|
||||
#
|
||||
package ZoneMinder::Trigger::Connection;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Base connection class
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
use Carp;
|
||||
|
||||
our $AUTOLOAD;
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my %params = @_;
|
||||
my $self = {};
|
||||
$self->{name} = $params{name};
|
||||
$self->{channel} = $params{channel};
|
||||
$self->{input} = $params{mode} =~ /r/i;
|
||||
$self->{output} = $params{mode} =~ /w/i;
|
||||
bless( $self, $class );
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub clone
|
||||
{
|
||||
my $self = shift;
|
||||
my $clone = { %$self };
|
||||
bless $clone, ref $self;
|
||||
return( $clone );
|
||||
}
|
||||
|
||||
sub spawns
|
||||
{
|
||||
my $self = shift;
|
||||
return( $self->{channel}->spawns() );
|
||||
}
|
||||
|
||||
sub _spawn( $ )
|
||||
{
|
||||
my $self = shift;
|
||||
my $new_channel = shift;
|
||||
my $clone = $self->clone();
|
||||
$clone->{channel} = $new_channel;
|
||||
return( $clone );
|
||||
}
|
||||
|
||||
sub accept()
|
||||
{
|
||||
my $self = shift;
|
||||
my $new_channel = $self->{channel}->accept();
|
||||
return( $self->_spawn( $new_channel ) );
|
||||
}
|
||||
|
||||
sub open()
|
||||
{
|
||||
my $self = shift;
|
||||
return( $self->{channel}->open() );
|
||||
}
|
||||
|
||||
sub close()
|
||||
{
|
||||
my $self = shift;
|
||||
return( $self->{channel}->close() );
|
||||
}
|
||||
|
||||
sub fileno()
|
||||
{
|
||||
my $self = shift;
|
||||
return( $self->{channel}->fileno() );
|
||||
}
|
||||
|
||||
sub isOpen()
|
||||
{
|
||||
my $self = shift;
|
||||
return( $self->{channel}->isOpen() );
|
||||
}
|
||||
|
||||
sub isConnected()
|
||||
{
|
||||
my $self = shift;
|
||||
return( $self->{channel}->isConnected() );
|
||||
}
|
||||
|
||||
sub canRead()
|
||||
{
|
||||
my $self = shift;
|
||||
return( $self->{input} && $self->isConnected() );
|
||||
}
|
||||
|
||||
sub canWrite()
|
||||
{
|
||||
my $self = shift;
|
||||
return( $self->{output} && $self->isConnected() );
|
||||
}
|
||||
|
||||
sub getMessages
|
||||
{
|
||||
my $self = shift;
|
||||
my $buffer = $self->{channel}->read();
|
||||
|
||||
return( undef ) if ( !defined($buffer) );
|
||||
|
||||
my @messages = split( /\r?\n/, $buffer );
|
||||
return( \@messages );
|
||||
}
|
||||
|
||||
sub putMessages
|
||||
{
|
||||
my $self = shift;
|
||||
my $messages = shift;
|
||||
|
||||
if ( @$messages )
|
||||
{
|
||||
my $buffer = join( "\n", @$messages );
|
||||
$buffer .= "\n";
|
||||
if ( !$self->{channel}->write( $buffer ) )
|
||||
{
|
||||
Error( "Unable to write buffer '".$buffer." to connection ".$self->{name}." (".$self->fileno().")\n" );
|
||||
}
|
||||
}
|
||||
return( undef );
|
||||
}
|
||||
|
||||
sub timedActions
|
||||
{
|
||||
}
|
||||
|
||||
sub DESTROY
|
||||
{
|
||||
}
|
||||
|
||||
sub AUTOLOAD
|
||||
{
|
||||
my $self = shift;
|
||||
my $class = ref($self) || croak( "$self not object" );
|
||||
my $name = $AUTOLOAD;
|
||||
$name =~ s/.*://;
|
||||
if ( exists($self->{$name}) )
|
||||
{
|
||||
return( $self->{$name} );
|
||||
}
|
||||
elsif ( defined($self->{channel}) )
|
||||
{
|
||||
if ( exists($self->{channel}->{$name}) )
|
||||
{
|
||||
return( $self->{channel}->{$name} );
|
||||
}
|
||||
}
|
||||
croak( "Can't access $name member of object of class $class" );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,134 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Trigger Channel Handle Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains an example overriden trigger connection class
|
||||
#
|
||||
package ZoneMinder::Trigger::Connection::Example;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require ZoneMinder::Base;
|
||||
require ZoneMinder::Trigger::Connection;
|
||||
|
||||
our @ISA = qw(ZoneMinder::Trigger::Connection);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Example overridden connection class
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my $path = shift;
|
||||
my $self = ZoneMinder::Trigger::Connection->new( @_ );
|
||||
bless( $self, $class );
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub getMessages
|
||||
{
|
||||
my $self = shift;
|
||||
my $buffer = $self->{channel}->read();
|
||||
|
||||
return( undef ) if ( !defined($buffer) );
|
||||
|
||||
Debug( "Handling buffer '$buffer'\n" );
|
||||
my @messages = grep { s/-/|/g; 1; } split( /\r?\n/, $buffer );
|
||||
return( \@messages );
|
||||
}
|
||||
|
||||
sub putMessages
|
||||
{
|
||||
my $self = shift;
|
||||
my $messages = shift;
|
||||
|
||||
if ( @$messages )
|
||||
{
|
||||
my $buffer = join( "\n", grep{ s/\|/-/; 1; } @$messages );
|
||||
$buffer .= "\n";
|
||||
if ( !$self->{channel}->write( $buffer ) )
|
||||
{
|
||||
Error( "Unable to write buffer '".$buffer." to connection ".$self->{name}." (".$self->fileno().")\n" );
|
||||
}
|
||||
}
|
||||
return( undef );
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
# Below is stub documentation for your module. You'd better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Database - Perl extension for blah blah blah
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Database;
|
||||
blah blah blah
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
|
||||
Blah blah blah.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in UNIX), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
|
||||
If you have a web site set up for your module, mention it here.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,177 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder 3pm"
|
||||
.TH ZoneMinder 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder \- Container module for common ZoneMinder modules
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& use ZoneMinder;
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
This module is a convenience container module that uses the
|
||||
ZoneMinder::Base, ZoneMinder::Common, ZoneMinder::Logger,
|
||||
ZoneMinder::Database and ZoneMinder::Memory modules. It also
|
||||
exports by default all symbols provided by the 'all' tag of
|
||||
each of the modules.
|
||||
.PP
|
||||
Thus 'use'ing this module is equivalent to the following
|
||||
.PP
|
||||
.Vb 5
|
||||
\& use ZoneMinder::Base qw(:all);
|
||||
\& use ZoneMinder::Config qw(:all);
|
||||
\& use ZoneMinder::Logger qw(:all);
|
||||
\& use ZoneMinder::Database qw(:all);
|
||||
\& use ZoneMinder::Memory qw(:all);
|
||||
.Ve
|
||||
.PP
|
||||
but is somewhat easier.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
All symbols exported by the 'all' tag of each of the included
|
||||
modules.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
ZoneMinder::Base, ZoneMinder::Common, ZoneMinder::Logger,
|
||||
ZoneMinder::Database, ZoneMinder::Memory
|
||||
.PP
|
||||
http://www.zoneminder.com
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2005 by Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,157 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Base 3pm"
|
||||
.TH ZoneMinder::Base 3pm "2012-09-11" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Base \- Base perl module for ZoneMinder
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& use ZoneMinder::Base;
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
This module is the base module for the rest of the ZoneMinder modules. It is included by each of the other modules but serves no purpose other than to propagate the perl module version amongst the other modules. You will never need to use this module directly but if you write new ZoneMinder modules they should include it.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
http://www.zoneminder.com
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,166 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Config 3pm"
|
||||
.TH ZoneMinder::Config 3pm "2012-09-11" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Config \- ZoneMinder configuration module.
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& use ZoneMinder::Config qw(:all);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
The ZoneMinder::Config module is used to import the ZoneMinder configuration from the database. It will do this at compile time in a \s-1BEGIN\s0 block and require access to the zm.conf file either in the current directory or in its defined location in order to determine database access details, configuration from this file will also be included. If the :all or :config tags are used then this configuration is exported into the namespace of the calling program or module.
|
||||
.PP
|
||||
Once the configuration has been imported then configuration variables are defined as constants and can be accessed directory by name, e.g.
|
||||
.PP
|
||||
.Vb 1
|
||||
\& $lang = ZM_LANG_DEFAULT;
|
||||
.Ve
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
The :constants tag will export the \s-1ZM_PID\s0 constant which details the location of the zm.pid file
|
||||
The :config tag will export all configuration from the database as well as any from the zm.conf file
|
||||
The :all tag will export all above symbols.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
http://www.zoneminder.com
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,180 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::ConfigAdmin 3pm"
|
||||
.TH ZoneMinder::ConfigAdmin 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::ConfigAdmin \- ZoneMinder Configuration Administration module
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::ConfigAdmin;
|
||||
\& use ZoneMinder::ConfigAdmin qw(:all);
|
||||
\&
|
||||
\& loadConfigFromDB();
|
||||
\& saveConfigToDB();
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
The ZoneMinder:ConfigAdmin module contains the master definition of the ZoneMinder configuration options as well as helper methods. This module is intended for specialist confguration management and would not normally be used by end users.
|
||||
.PP
|
||||
The configuration held in this module, which was previously in zmconfig.pl, includes the name, default value, description, help text, type and category for each option, as well as a number of additional fields in a small number of cases.
|
||||
.SH "METHODS"
|
||||
.IX Header "METHODS"
|
||||
.IP "loadConfigFromDB ();" 4
|
||||
.IX Item "loadConfigFromDB ();"
|
||||
Loads existing configuration from the database (if any) and merges it with the definitions held in this module. This results in the merging of any new configuration and the removal of any deprecated configuration while preserving the existing values of every else.
|
||||
.IP "saveConfigToDB ();" 4
|
||||
.IX Item "saveConfigToDB ();"
|
||||
Saves configuration held in memory to the database. The act of loading and saving configuration is a convenient way to ensure that the configuration held in the database corresponds with the most recent definitions and that all components are using the same set of configuration.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
The :data tag will export the various configuration data structures
|
||||
The :functions tag will export the helper functions.
|
||||
The :all tag will export all above symbols.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
http://www.zoneminder.com
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
.SH "POD ERRORS"
|
||||
.IX Header "POD ERRORS"
|
||||
Hey! \fBThe above document had some coding errors, which are explained below:\fR
|
||||
.IP "Around line 188:" 4
|
||||
.IX Item "Around line 188:"
|
||||
You forgot a '=back' before '=head2'
|
|
@ -0,0 +1,180 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::ConfigData 3pm"
|
||||
.TH ZoneMinder::ConfigData 3pm "2012-09-11" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::ConfigData \- ZoneMinder Configuration Data module
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::ConfigData;
|
||||
\& use ZoneMinder::ConfigData qw(:all);
|
||||
\&
|
||||
\& loadConfigFromDB();
|
||||
\& saveConfigToDB();
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
The ZoneMinder:ConfigData module contains the master definition of the ZoneMinder configuration options as well as helper methods. This module is intended for specialist confguration management and would not normally be used by end users.
|
||||
.PP
|
||||
The configuration held in this module, which was previously in zmconfig.pl, includes the name, default value, description, help text, type and category for each option, as well as a number of additional fields in a small number of cases.
|
||||
.SH "METHODS"
|
||||
.IX Header "METHODS"
|
||||
.IP "loadConfigFromDB ();" 4
|
||||
.IX Item "loadConfigFromDB ();"
|
||||
Loads existing configuration from the database (if any) and merges it with the definitions held in this module. This results in the merging of any new configuration and the removal of any deprecated configuration while preserving the existing values of every else.
|
||||
.IP "saveConfigToDB ();" 4
|
||||
.IX Item "saveConfigToDB ();"
|
||||
Saves configuration held in memory to the database. The act of loading and saving configuration is a convenient way to ensure that the configuration held in the database corresponds with the most recent definitions and that all components are using the same set of configuration.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
The :data tag will export the various configuration data structures
|
||||
The :functions tag will export the helper functions.
|
||||
The :all tag will export all above symbols.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
http://www.zoneminder.com
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
.SH "POD ERRORS"
|
||||
.IX Header "POD ERRORS"
|
||||
Hey! \fBThe above document had some coding errors, which are explained below:\fR
|
||||
.IP "Around line 2031:" 4
|
||||
.IX Item "Around line 2031:"
|
||||
You forgot a '=back' before '=head2'
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Control 3pm"
|
||||
.TH ZoneMinder::Control 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Control::AxisV2 3pm"
|
||||
.TH ZoneMinder::Control::AxisV2 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Control::Ncs370 3pm"
|
||||
.TH ZoneMinder::Control::Ncs370 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Control::PanasonicIP 3pm"
|
||||
.TH ZoneMinder::Control::PanasonicIP 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Control::PelcoD 3pm"
|
||||
.TH ZoneMinder::Control::PelcoD 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Control::Visca 3pm"
|
||||
.TH ZoneMinder::Control::Visca 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Control::mjpgStreamer 3pm"
|
||||
.TH ZoneMinder::Control::mjpgStreamer 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2005 by Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Database 3pm"
|
||||
.TH ZoneMinder::Database 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::General 3pm"
|
||||
.TH ZoneMinder::General 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,259 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Logger 3pm"
|
||||
.TH ZoneMinder::Logger 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Logger \- ZoneMinder Logger module
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Logger;
|
||||
\& use ZoneMinder::Logger qw(:all);
|
||||
\&
|
||||
\& logInit( "myproc", DEBUG );
|
||||
\&
|
||||
\& Debug( "This is what is happening" );
|
||||
\& Info( "Something interesting is happening" );
|
||||
\& Warning( "Something might be going wrong." );
|
||||
\& Error( "Something has gone wrong!!" );
|
||||
\& Fatal( "Something has gone badly wrong, gotta stop!!" );
|
||||
\& Panic( "Something fundamental has gone wrong, die with stack trace );
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
The ZoneMinder:Logger module contains the common debug and error reporting routines used by the ZoneMinder scripts.
|
||||
.PP
|
||||
To use debug in your scripts you need to include this module, and call logInit. Thereafter you can sprinkle Debug or Error calls etc throughout the code safe in the knowledge that they will be reported to your error log, and possibly the syslogger, in a meaningful and consistent format.
|
||||
.PP
|
||||
Debug is discussed in terms of levels where 1 and above (currently only 1 for scripts) is considered debug, 0 is considered as informational, \-1 is a warning, \-2 is an error and \-3 is a fatal error or panic. Where levels are mentioned below as thresholds the value given and anything with a lower level (ie. more serious) will be included.
|
||||
.SH "METHODS"
|
||||
.IX Header "METHODS"
|
||||
.ie n .IP "logInit ( $id, %options );" 4
|
||||
.el .IP "logInit ( \f(CW$id\fR, \f(CW%options\fR );" 4
|
||||
.IX Item "logInit ( $id, %options );"
|
||||
Initialises the debug and prepares the logging for forthcoming operations. If not called explicitly it will be called by the first debug call in your script, but with default (and probably meaningless) options. The only compulsory arguments are \f(CW$id\fR which must be a string that will identify debug coming from this script in mixed logs. Other options may be provided as below,
|
||||
.Sp
|
||||
.Vb 8
|
||||
\& Option Default Description
|
||||
\& \-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-
|
||||
\& level INFO The initial debug level which defines which statements are output and which are ignored
|
||||
\& trace 0 Whether to use the Carp::shortmess format in debug statements to identify where the debug was emitted from
|
||||
\& termLevel NOLOG At what level debug is written to terminal standard error, 0 is no, 1 is yes, 2 is write only if terminal
|
||||
\& databaseLevel INFO At what level debug is written to the Log table in the database;
|
||||
\& fileLevel NOLOG At what level debug is written to a log file of the format of <id>.log in the standard log directory.
|
||||
\& syslogLevel INFO At what level debug is written to syslog.
|
||||
.Ve
|
||||
.Sp
|
||||
To disable any of these action entirely set to \s-1NOLOG\s0
|
||||
.IP "logTerm ();" 4
|
||||
.IX Item "logTerm ();"
|
||||
Used to end the debug session and close any logs etc. Not usually necessary.
|
||||
.ie n .IP "$id = logId ( [$id] );" 4
|
||||
.el .IP "\f(CW$id\fR = logId ( [$id] );" 4
|
||||
.IX Item "$id = logId ( [$id] );"
|
||||
.PD 0
|
||||
.ie n .IP "$level = logLevel ( [$level] );" 4
|
||||
.el .IP "\f(CW$level\fR = logLevel ( [$level] );" 4
|
||||
.IX Item "$level = logLevel ( [$level] );"
|
||||
.ie n .IP "$trace = logTrace ( [$trace] );" 4
|
||||
.el .IP "\f(CW$trace\fR = logTrace ( [$trace] );" 4
|
||||
.IX Item "$trace = logTrace ( [$trace] );"
|
||||
.ie n .IP "$level = logLevel ( [$level] );" 4
|
||||
.el .IP "\f(CW$level\fR = logLevel ( [$level] );" 4
|
||||
.IX Item "$level = logLevel ( [$level] );"
|
||||
.ie n .IP "$termLevel = logTermLevel ( [$termLevel] );" 4
|
||||
.el .IP "\f(CW$termLevel\fR = logTermLevel ( [$termLevel] );" 4
|
||||
.IX Item "$termLevel = logTermLevel ( [$termLevel] );"
|
||||
.ie n .IP "$databaseLevel = logDatabaseLevel ( [$databaseLevel] );" 4
|
||||
.el .IP "\f(CW$databaseLevel\fR = logDatabaseLevel ( [$databaseLevel] );" 4
|
||||
.IX Item "$databaseLevel = logDatabaseLevel ( [$databaseLevel] );"
|
||||
.ie n .IP "$fileLevel = logFileLevel ( [$fileLevel] );" 4
|
||||
.el .IP "\f(CW$fileLevel\fR = logFileLevel ( [$fileLevel] );" 4
|
||||
.IX Item "$fileLevel = logFileLevel ( [$fileLevel] );"
|
||||
.ie n .IP "$syslogLevel = logSyslogLevel ( [$syslogLevel] );" 4
|
||||
.el .IP "\f(CW$syslogLevel\fR = logSyslogLevel ( [$syslogLevel] );" 4
|
||||
.IX Item "$syslogLevel = logSyslogLevel ( [$syslogLevel] );"
|
||||
.PD
|
||||
These methods can be used to get and set the current settings as defined in logInit.
|
||||
.ie n .IP "Debug( $string );" 4
|
||||
.el .IP "Debug( \f(CW$string\fR );" 4
|
||||
.IX Item "Debug( $string );"
|
||||
This method will output a debug message if the current debug level permits it, otherwise does nothing. This message will be tagged with the \s-1DBG\s0 string in the logs.
|
||||
.ie n .IP "Info( $string );" 4
|
||||
.el .IP "Info( \f(CW$string\fR );" 4
|
||||
.IX Item "Info( $string );"
|
||||
This method will output an informational message if the current debug level permits it, otherwise does nothing. This message will be tagged with the \s-1INF\s0 string in the logs.
|
||||
.ie n .IP "Warning( $string );" 4
|
||||
.el .IP "Warning( \f(CW$string\fR );" 4
|
||||
.IX Item "Warning( $string );"
|
||||
This method will output a warning message if the current debug level permits it, otherwise does nothing. This message will be tagged with the \s-1WAR\s0 string in the logs.
|
||||
.ie n .IP "Error( $string );" 4
|
||||
.el .IP "Error( \f(CW$string\fR );" 4
|
||||
.IX Item "Error( $string );"
|
||||
This method will output an error message if the current debug level permits it, otherwise does nothing. This message will be tagged with the \s-1ERR\s0 string in the logs.
|
||||
.ie n .IP "Fatal( $string );" 4
|
||||
.el .IP "Fatal( \f(CW$string\fR );" 4
|
||||
.IX Item "Fatal( $string );"
|
||||
This method will output a fatal error message and then die if the current debug level permits it, otherwise does nothing. This message will be tagged with the \s-1FAT\s0 string in the logs.
|
||||
.ie n .IP "Panic( $string );" 4
|
||||
.el .IP "Panic( \f(CW$string\fR );" 4
|
||||
.IX Item "Panic( $string );"
|
||||
This method will output a panic error message and then die with a stack trace if the current debug level permits it, otherwise does nothing. This message will be tagged with the \s-1PNC\s0 string in the logs.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
The :constants tag will export the debug constants which define the various levels of debug
|
||||
The :variables tag will export variables containing the current debug id and level
|
||||
The :functions tag will export the debug functions. This or :all is what you would normally use.
|
||||
The :all tag will export all above symbols.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Carp
|
||||
Sys::Syslog
|
||||
.PP
|
||||
The ZoneMinder \s-1README\s0 file Troubleshooting section for an extended discussion on the use and configuration of syslog with ZoneMinder.
|
||||
.PP
|
||||
http://www.zoneminder.com
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
.SH "POD ERRORS"
|
||||
.IX Header "POD ERRORS"
|
||||
Hey! \fBThe above document had some coding errors, which are explained below:\fR
|
||||
.IP "Around line 830:" 4
|
||||
.IX Item "Around line 830:"
|
||||
You forgot a '=back' before '=head2'
|
|
@ -0,0 +1,313 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Memory 3pm"
|
||||
.TH ZoneMinder::Memory 3pm "2012-09-11" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::MappedMem \- ZoneMinder Mapped Memory access module
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::MappedMem;
|
||||
\& use ZoneMinder::MappedMem qw(:all);
|
||||
\&
|
||||
\& if ( zmMemVerify( $monitor ) )
|
||||
\& {
|
||||
\& $state = zmGetMonitorState( $monitor );
|
||||
\& if ( $state == STATE_ALARM )
|
||||
\& {
|
||||
\& ...
|
||||
\& }
|
||||
\& }
|
||||
\&
|
||||
\& ( $lri, $lwi ) = zmMemRead( $monitor, [ "shared_data:last_read_index", "shared_data:last_write_index" ] );
|
||||
\& zmMemWrite( $monitor, { "trigger_data:trigger_showtext" => "Some Text" } );
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
The ZoneMinder:MappedMem module contains methods for accessing and writing to mapped memory as well as helper methods for common operations.
|
||||
.PP
|
||||
The core elements of ZoneMinder used mapped memory to allow multiple access to resources. Although ZoneMinder scripts have used this information before, up until now it was difficult to access and prone to errors. This module introduces a common \s-1API\s0 for mapped memory access (both reading and writing) making it a lot easier to customise scripts or even create your own.
|
||||
.PP
|
||||
All the methods listed below require a 'monitor' parameter. This must be a reference to a hash with at least the 'Id' field set to the monitor id of the mapped memory you wish to access. Using database methods to select the monitor details will also return this kind of data. Some of the mapped memory methods will add and amend new fields to this hash.
|
||||
.SH "METHODS"
|
||||
.IX Header "METHODS"
|
||||
.ie n .IP "zmMemVerify ( $monitor );" 4
|
||||
.el .IP "zmMemVerify ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "zmMemVerify ( $monitor );"
|
||||
Verify that the mapped memory of the monitor given exists and is valid. It will return an undefined value if it is not valid. You should generally call this method first before using any of the other methods, but most of the remaining methods will also do so if the memory has not already been verified.
|
||||
.ie n .IP "zmMemInvalidate ( $monitor );" 4
|
||||
.el .IP "zmMemInvalidate ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "zmMemInvalidate ( $monitor );"
|
||||
Following an error, reset the mapped memory ids and attempt to reverify on the next operation. This is mostly used when a mapped memory segment has gone away and been recreated with a different id.
|
||||
.ie n .IP "zmMemRead ( $monitor, $readspec );" 4
|
||||
.el .IP "zmMemRead ( \f(CW$monitor\fR, \f(CW$readspec\fR );" 4
|
||||
.IX Item "zmMemRead ( $monitor, $readspec );"
|
||||
This method is used to read data from mapped memory attached to the given monitor. The mapped memory will be verified if it has not already been. The 'readspec' must either be a string of the form \*(L"<section>:<field>\*(R" or a reference to an array of strings of the same format. In the first case a single value is returned, in the latter case a list of values is return. Errors will cause undefined to be returned. The allowable sections and field names are described below.
|
||||
.ie n .IP "zmMemWrite ( $monitor, $writespec );" 4
|
||||
.el .IP "zmMemWrite ( \f(CW$monitor\fR, \f(CW$writespec\fR );" 4
|
||||
.IX Item "zmMemWrite ( $monitor, $writespec );"
|
||||
This method is used to write data to mapped memory attached to the given monitor. The mapped memory will be verified if it has not already been. The 'writespec' must be a reference to a hash with keys of the form \*(L"<section>:<field>\*(R" and values as the data to be written. Errors will cause undefined to be returned, otherwise a non-undefined value will be returned. The allowable sections and field names are described below.
|
||||
.ie n .IP "$state = zmGetMonitorState ( $monitor );" 4
|
||||
.el .IP "\f(CW$state\fR = zmGetMonitorState ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "$state = zmGetMonitorState ( $monitor );"
|
||||
Return the current state of the given monitor. This is an integer value and can be compared with the \s-1STATE\s0 constants given below.
|
||||
.ie n .IP "$event_id = zmGetLastEvent ( $monitor );" 4
|
||||
.el .IP "\f(CW$event_id\fR = zmGetLastEvent ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "$event_id = zmGetLastEvent ( $monitor );"
|
||||
Return the event id of the last event that the monitor generated, or 0 if no event has been generated by the current monitor process.
|
||||
.ie n .IP "zmIsAlarmed ( $monitor );" 4
|
||||
.el .IP "zmIsAlarmed ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "zmIsAlarmed ( $monitor );"
|
||||
Return 1 if the monitor given is currently in an alarm state, 0 otherwise.
|
||||
.ie n .IP "zmInAlarm ( $monitor );" 4
|
||||
.el .IP "zmInAlarm ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "zmInAlarm ( $monitor );"
|
||||
Return 1 if the monitor given is currently in an alarm or alerted state, 0 otherwise.
|
||||
.ie n .IP "zmHasAlarmed ( $monitor );" 4
|
||||
.el .IP "zmHasAlarmed ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "zmHasAlarmed ( $monitor );"
|
||||
Return 1 if the given monitor is in an alarm state, or has been in an alarm state since the last call to this method.
|
||||
.ie n .IP "( $x, $y ) = zmGetAlarmLocation ( $monitor );" 4
|
||||
.el .IP "( \f(CW$x\fR, \f(CW$y\fR ) = zmGetAlarmLocation ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "( $x, $y ) = zmGetAlarmLocation ( $monitor );"
|
||||
Return an x,y pair indicating the image co-ordinates of the centre of the last motion event generated by the given monitor. If no event has been generated by the current monitor process, or the alarm was not motion related, returns \-1,\-1.
|
||||
.ie n .IP "zmGetLastWriteTime ( $monitor );" 4
|
||||
.el .IP "zmGetLastWriteTime ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "zmGetLastWriteTime ( $monitor );"
|
||||
Returns the time (in utc seconds) since the last image was captured by the given monitor and written to shared memory, or 0 otherwise.
|
||||
.ie n .IP "zmGetLastReadTime ( $monitor );" 4
|
||||
.el .IP "zmGetLastReadTime ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "zmGetLastReadTime ( $monitor );"
|
||||
Returns the time (in utc seconds) since the last image was read from shared memory by the analysis daemon of the given monitor, or 0 otherwise or if the monitor is in monitor only mode.
|
||||
.ie n .IP "zmMonitorSuspend ( $monitor );" 4
|
||||
.el .IP "zmMonitorSuspend ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "zmMonitorSuspend ( $monitor );"
|
||||
Suspend the given monitor from generating events caused by motion. This method can be used to prevent camera actions such as panning or zooming from causing events. If configured to do so, the monitor may automatically resume after a defined period.
|
||||
.ie n .IP "zmMonitorResume ( $monitor );" 4
|
||||
.el .IP "zmMonitorResume ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "zmMonitorResume ( $monitor );"
|
||||
Allow the given monitor to resume generating events caused by motion.
|
||||
.ie n .IP "zmTriggerEventOn ( $monitor, $score, $cause [, $text, $showtext ] );" 4
|
||||
.el .IP "zmTriggerEventOn ( \f(CW$monitor\fR, \f(CW$score\fR, \f(CW$cause\fR [, \f(CW$text\fR, \f(CW$showtext\fR ] );" 4
|
||||
.IX Item "zmTriggerEventOn ( $monitor, $score, $cause [, $text, $showtext ] );"
|
||||
Trigger the given monitor to generate an event. You must supply an event score and a cause string indicating the reason for the event. You may also supply a text string containing further details about the event and a showtext string which may be included in the timestamp annotation on any images captured during the event, if configured to do so.
|
||||
.ie n .IP "zmTriggerEventOff ( $monitor );" 4
|
||||
.el .IP "zmTriggerEventOff ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "zmTriggerEventOff ( $monitor );"
|
||||
Trigger the given monitor to not generate any events. This method does not cancel zmTriggerEventOn, but is exclusive to it. This method is intended to allow external triggers to prevent normal events being generated by monitors in the same way as zmMonitorSuspend but applies to all events and not just motion, and is intended for longer timescales than are appropriate for suspension.
|
||||
.ie n .IP "zmTriggerEventCancel ( $monitor );" 4
|
||||
.el .IP "zmTriggerEventCancel ( \f(CW$monitor\fR );" 4
|
||||
.IX Item "zmTriggerEventCancel ( $monitor );"
|
||||
Cancel any previous trigger on or off requests. This stops a triggered alarm if it exists from a previous 'on' and allows events to be generated once more following a previous 'off'.
|
||||
.ie n .IP "zmTriggerShowtext ( $monitor, $showtest );" 4
|
||||
.el .IP "zmTriggerShowtext ( \f(CW$monitor\fR, \f(CW$showtest\fR );" 4
|
||||
.IX Item "zmTriggerShowtext ( $monitor, $showtest );"
|
||||
Indicate that the given text should be displayed in the timestamp annotation on any images captured, if the format of the annotation string defined for the monitor permits.
|
||||
.SH "DATA"
|
||||
.IX Header "DATA"
|
||||
The data fields in mapped memory that may be accessed are as follows. There are two main sections, shared_data which is general data and trigger_data which is used for event triggering. Whilst reading from these fields is harmless, extreme care must be taken when writing to mapped memory, especially in the shared_data section as this is normally written to only by monitor capture and analysis processes.
|
||||
.PP
|
||||
.Vb 10
|
||||
\& shared_data The general mapped memory section
|
||||
\& size The size, in bytes, of this section
|
||||
\& valid Flag indicating whether this section has been initialised
|
||||
\& active Flag indicating whether this monitor is active (enabled/disabled)
|
||||
\& signal Flag indicating whether this monitor is reciving a valid signal
|
||||
\& state The current monitor state, see the STATE constants below
|
||||
\& last_write_index The last index, in the image buffer, that an image has been saved to
|
||||
\& last_read_index The last index, in the image buffer, that an image has been analysed from
|
||||
\& last_write_time The time (in utc seconds) when the last image was captured
|
||||
\& last_read_time The time (in utc seconds) when the last image was analysed
|
||||
\& last_event The id of the last event generated by the monitor analysis process, 0 if none
|
||||
\& action The monitor actions bitmask, see the ACTION constants below
|
||||
\& brightness Read/write location for the current monitor brightness
|
||||
\& hue Read/write location for the current monitor hue
|
||||
\& colour Read/write location for the current monitor colour
|
||||
\& contrast Read/write location for the current monitor contrast
|
||||
\& alarm_x Image x co\-ordinate (from left) of the centre of the last motion event, \-1 if none
|
||||
\& alarm_y Image y co\-ordinate (from top) of the centre of the last motion event, \-1 if none
|
||||
\&
|
||||
\& trigger_data The triggered event mapped memory section
|
||||
\& size The size, in bytes of this section
|
||||
\& trigger_state The current trigger state, see the TRIGGER constants below
|
||||
\& trigger_score The current triggered event score
|
||||
\& trigger_cause The current triggered event cause string
|
||||
\& trigger_text The current triggered event descriptive text string
|
||||
\& trigger_showtext The triggered text that will be displayed on captured image timestamps
|
||||
.Ve
|
||||
.SH "CONSTANTS"
|
||||
.IX Header "CONSTANTS"
|
||||
The following constants are used by the methods above, but can also be used by user scripts if required.
|
||||
.IP "\s-1STATE_IDLE\s0 \s-1STATE_PREALARM\s0 \s-1STATE_ALARM\s0 \s-1STATE_ALERT\s0 \s-1STATE_TAPE\s0" 4
|
||||
.IX Item "STATE_IDLE STATE_PREALARM STATE_ALARM STATE_ALERT STATE_TAPE"
|
||||
These constants define the state of the monitor with respect to alarms and events. They are used in the shared_data:state field.
|
||||
.IP "\s-1ACTION_GET\s0 \s-1ACTION_SET\s0 \s-1ACTION_RELOAD\s0 \s-1ACTION_SUSPEND\s0 \s-1ACTION_RESUME\s0" 4
|
||||
.IX Item "ACTION_GET ACTION_SET ACTION_RELOAD ACTION_SUSPEND ACTION_RESUME"
|
||||
These constants defines the various values that can exist in the shared_data:action field. This is a bitmask which when non-zero defines an action that an executing monitor process should take. \s-1ACTION_GET\s0 requires that the current values of brightness, contrast, colour and hue are taken from the camera and written to the equivalent mapped memory fields. \s-1ACTION_SET\s0 implies the reverse, that the values in mapped memory should be written to the camera. \s-1ACTION_RELOAD\s0 signal that the monitor process should reload itself from the database in case any settings have changed there. \s-1ACTION_SUSPEND\s0 signals that a monitor should stop exaiming images for motion, though other alarms may still occur. \s-1ACTION_RESUME\s0 sigansl that a monitor should resume motion detectiom.
|
||||
.IP "\s-1TRIGGER_CANCEL\s0 \s-1TRIGGER_ON\s0 \s-1TRIGGER_OFF\s0" 4
|
||||
.IX Item "TRIGGER_CANCEL TRIGGER_ON TRIGGER_OFF"
|
||||
These constants are used in the definition of external triggers. \s-1TRIGGER_CANCEL\s0 is used to indicated that any previous trigger settings should be cancelled, \s-1TRIGGER_ON\s0 signals that an alarm should be created (or continued)) as a result of the current trigger and \s-1TRIGGER_OFF\s0 signals that the trigger should prevent any alarms from being generated. See the trigger methods above for further details.
|
||||
.SH "EXPORT"
|
||||
.IX Header "EXPORT"
|
||||
None by default.
|
||||
The :constants tag will export the mapped memory constants which mostly define enumerations for the variables held in memory
|
||||
The :functions tag will export the mapped memory access functions.
|
||||
The :all tag will export all above symbols.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
http://www.zoneminder.com
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
.SH "POD ERRORS"
|
||||
.IX Header "POD ERRORS"
|
||||
Hey! \fBThe above document had some coding errors, which are explained below:\fR
|
||||
.IP "Around line 727:" 4
|
||||
.IX Item "Around line 727:"
|
||||
You forgot a '=back' before '=head1'
|
||||
.IP "Around line 729:" 4
|
||||
.IX Item "Around line 729:"
|
||||
\&'=item' outside of any '=over'
|
||||
.IP "Around line 801:" 4
|
||||
.IX Item "Around line 801:"
|
||||
You forgot a '=back' before '=head1'
|
||||
.IP "Around line 836:" 4
|
||||
.IX Item "Around line 836:"
|
||||
\&'=item' outside of any '=over'
|
||||
.IP "Around line 848:" 4
|
||||
.IX Item "Around line 848:"
|
||||
You forgot a '=back' before '=head1'
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Trigger::Channel 3pm"
|
||||
.TH ZoneMinder::Trigger::Channel 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Trigger::Channel::File 3pm"
|
||||
.TH ZoneMinder::Trigger::Channel::File 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Trigger::Channel::Handle 3pm"
|
||||
.TH ZoneMinder::Trigger::Channel::Handle 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Trigger::Channel::Inet 3pm"
|
||||
.TH ZoneMinder::Trigger::Channel::Inet 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Trigger::Channel::Serial 3pm"
|
||||
.TH ZoneMinder::Trigger::Channel::Serial 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Trigger::Channel::Spawning 3pm"
|
||||
.TH ZoneMinder::Trigger::Channel::Spawning 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Trigger::Channel::Unix 3pm"
|
||||
.TH ZoneMinder::Trigger::Channel::Unix 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Trigger::Connection 3pm"
|
||||
.TH ZoneMinder::Trigger::Connection 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,169 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ZoneMinder::Trigger::Connection::Example 3pm"
|
||||
.TH ZoneMinder::Trigger::Connection::Example 3pm "2012-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
ZoneMinder::Database \- Perl extension for blah blah blah
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& use ZoneMinder::Database;
|
||||
\& blah blah blah
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Stub documentation for ZoneMinder, created by h2xs. It looks like the
|
||||
author of the extension was negligent enough to leave the stub
|
||||
unedited.
|
||||
.PP
|
||||
Blah blah blah.
|
||||
.SS "\s-1EXPORT\s0"
|
||||
.IX Subsection "EXPORT"
|
||||
None by default.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
Mention other useful documentation such as the documentation of
|
||||
related modules or operating system documentation (such as man pages
|
||||
in \s-1UNIX\s0), or any relevant external documentation such as RFCs or
|
||||
standards.
|
||||
.PP
|
||||
If you have a mailing list set up for your module, mention it here.
|
||||
.PP
|
||||
If you have a web site set up for your module, mention it here.
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Philip Coombes, <philip.coombes@zoneminder.com>
|
||||
.SH "COPYRIGHT AND LICENSE"
|
||||
.IX Header "COPYRIGHT AND LICENSE"
|
||||
Copyright (C) 2001\-2008 Philip Coombes
|
||||
.PP
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
|
@ -0,0 +1,86 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Base Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the common definitions and functions used by the rest
|
||||
# of the ZoneMinder scripts
|
||||
#
|
||||
package ZoneMinder::Base;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require Exporter;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
|
||||
# Items to export into callers namespace by default. Note: do not export
|
||||
# names by default without a very good reason. Use EXPORT_OK instead.
|
||||
# Do not simply export all your public functions/methods/constants.
|
||||
|
||||
# This allows declaration use ZoneMinder ':all';
|
||||
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
|
||||
# will save memory.
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
||||
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
|
||||
|
||||
our @EXPORT = qw();
|
||||
|
||||
our $VERSION = "1.25.0";
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Base - Base perl module for ZoneMinder
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Base;
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This module is the base module for the rest of the ZoneMinder modules. It is included by each of the other modules but serves no purpose other than to propagate the perl module version amongst the other modules. You will never need to use this module directly but if you write new ZoneMinder modules they should include it.
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.zoneminder.com
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
|
@ -0,0 +1,145 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Config Module, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 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.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This module contains the common definitions and functions used by the rest
|
||||
# of the ZoneMinder scripts
|
||||
#
|
||||
package ZoneMinder::Config;
|
||||
|
||||
use 5.006;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require Exporter;
|
||||
require ZoneMinder::Base;
|
||||
|
||||
our @ISA = qw(Exporter ZoneMinder::Base);
|
||||
|
||||
# Items to export into callers namespace by default. Note: do not export
|
||||
# names by default without a very good reason. Use EXPORT_OK instead.
|
||||
# Do not simply export all your public functions/methods/constants.
|
||||
|
||||
# This allows declaration use ZoneMinder ':all';
|
||||
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
|
||||
# will save memory.
|
||||
our @EXPORT_CONFIG; # Get populated by BEGIN
|
||||
|
||||
our %EXPORT_TAGS = (
|
||||
'constants' => [ qw(
|
||||
ZM_PID
|
||||
) ]
|
||||
);
|
||||
push( @{$EXPORT_TAGS{config}}, @EXPORT_CONFIG );
|
||||
push( @{$EXPORT_TAGS{all}}, @{$EXPORT_TAGS{$_}} ) foreach keys %EXPORT_TAGS;
|
||||
|
||||
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
|
||||
|
||||
our @EXPORT = qw();
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
use constant ZM_PID => "/var/run/zm/zm.pid"; # Path to the ZoneMinder run pid file
|
||||
use constant ZM_CONFIG => "/etc/zm/zm.conf"; # Path to the ZoneMinder config file
|
||||
|
||||
use Carp;
|
||||
|
||||
# Load the config from the database into the symbol table
|
||||
BEGIN
|
||||
{
|
||||
no strict 'refs';
|
||||
|
||||
my $config_file = ZM_CONFIG;
|
||||
( my $local_config_file = $config_file ) =~ s|^.*/|./|;
|
||||
if ( -s $local_config_file && -r $local_config_file )
|
||||
{
|
||||
print( STDERR "Warning, overriding installed $local_config_file file with local copy\n" );
|
||||
$config_file = $local_config_file;
|
||||
}
|
||||
open( CONFIG, "<".$config_file ) or croak( "Can't open config file '$config_file': $!" );
|
||||
foreach my $str ( <CONFIG> )
|
||||
{
|
||||
next if ( $str =~ /^\s*$/ );
|
||||
next if ( $str =~ /^\s*#/ );
|
||||
my ( $name, $value ) = $str =~ /^\s*([^=\s]+)\s*=\s*(.+?)\s*$/;
|
||||
$name =~ tr/a-z/A-Z/;
|
||||
*{$name} = sub { $value };
|
||||
push( @EXPORT_CONFIG, $name );
|
||||
}
|
||||
close( CONFIG );
|
||||
|
||||
use DBI;
|
||||
my $dbh = DBI->connect( "DBI:mysql:database=".&ZM_DB_NAME.";host=".&ZM_DB_HOST, &ZM_DB_USER, &ZM_DB_PASS );
|
||||
my $sql = "select * from Config";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or croak( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
my $res = $sth->execute() or croak( "Can't execute: ".$sth->errstr() );
|
||||
while( my $config = $sth->fetchrow_hashref() )
|
||||
{
|
||||
*{$config->{Name}} = sub { $config->{Value} };
|
||||
push( @EXPORT_CONFIG, $config->{Name} );
|
||||
}
|
||||
$sth->finish();
|
||||
$dbh->disconnect();
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ZoneMinder::Config - ZoneMinder configuration module.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use ZoneMinder::Config qw(:all);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The ZoneMinder::Config module is used to import the ZoneMinder configuration from the database. It will do this at compile time in a BEGIN block and require access to the zm.conf file either in the current directory or in its defined location in order to determine database access details, configuration from this file will also be included. If the :all or :config tags are used then this configuration is exported into the namespace of the calling program or module.
|
||||
|
||||
Once the configuration has been imported then configuration variables are defined as constants and can be accessed directory by name, e.g.
|
||||
|
||||
$lang = ZM_LANG_DEFAULT;
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
The :constants tag will export the ZM_PID constant which details the location of the zm.pid file
|
||||
The :config tag will export all configuration from the database as well as any from the zm.conf file
|
||||
The :all tag will export all above symbols.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.zoneminder.com
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2001-2008 Philip Coombes
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.3 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
|
||||
=cut
|
File diff suppressed because it is too large
Load Diff
|
@ -1925,6 +1925,47 @@ body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% s
|
|||
type => $types{string},
|
||||
category => "eyeZm",
|
||||
},
|
||||
{
|
||||
name => "ZM_PATH_PLUGINS",
|
||||
default => "/usr/share/zm",
|
||||
description => "Path to the plugin folder",
|
||||
help => "3d-party plugins have to be placed here.",
|
||||
type => $types{abs_path},
|
||||
category => "paths",
|
||||
},
|
||||
{
|
||||
name => "ZM_PLUGIN_EXTENSION",
|
||||
default => ".zmpl",
|
||||
description => "Default extension of plugins to found.",
|
||||
help => "Default extension of plugins to found.",
|
||||
type => $types{rel_path},
|
||||
category => "paths",
|
||||
},
|
||||
{
|
||||
name => "ZM_PLUGINS_CONFIG_PATH",
|
||||
default => "/usr/share/zm/plugins.conf",
|
||||
description => "Path to the config file for plugins.",
|
||||
help => "Path to the config file for plugins.",
|
||||
type => $types{abs_path},
|
||||
category => "paths",
|
||||
},
|
||||
{
|
||||
name => "ZM_LOAD_PLUGINS",
|
||||
default => "no",
|
||||
description => "Load and use 3d-party plugins",
|
||||
help => "3d-party plugins will be loaded and used for analysing.",
|
||||
type => $types{boolean},
|
||||
category => "config",
|
||||
},
|
||||
{
|
||||
name => "ZM_TURNOFF_NATIVE_ANALYSIS",
|
||||
default => "no",
|
||||
description => "Turn native ZM\'s image analysis possibility off",
|
||||
help => "Image analysis with ZM\'s motion detected function will be turned off. Only detection functions from loaded plugins will be used. Note, that if no plugins have be loaded, no detection will be done.",
|
||||
type => $types{boolean},
|
||||
category => "config",
|
||||
},
|
||||
|
||||
);
|
||||
|
||||
our %options_hash = map { ( $_->{name}, $_ ) } @options;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue