Merge branch 'master' of https://github.com/ZoneMinder/ZoneMinder into memory_fix_mismatches

This commit is contained in:
Emmanuel Papin 2014-11-29 03:39:05 +01:00
commit 73b25a1de0
84 changed files with 1367 additions and 221 deletions

View File

@ -4,6 +4,10 @@ notifications:
branches:
except:
- modern
addons:
sauce_connect:
username: "zoneminder"
access_key: "046ec7c1-c598-4e7e-949a-f86e725d1722"
env:
global:
- LD_LIBRARY_PATH="/usr/local/lib:/opt/libjpeg-turbo/lib:$LD_LIBRARY_PATH"

View File

@ -105,29 +105,39 @@ root@host:~# gdebi /root/zoneminder_1.26.4-1_amd64.deb;
Additional repositories must be added before one can build zoneminder on CentOS or RHEL:
1. RepoForge (formerly RPMForge) http://repoforge.org/use/
1. Zmrepo [ZoneMinder WiKi](http://www.zoneminder.com/wiki/index.php/CentOS#Zmrepo_-_A_ZoneMinder_repository_for_RPM_based_distros)
2. EPEL https://fedoraproject.org/wiki/EPEL
3. Optional RPMFusion: http://rpmfusion.org/ [SEE NOTE]
[NOTE]<br>
The RPMFusion repo contains significantly newer versions of ffmpeg and vlc. This leads to significantly better camera support. However, the RPMFusion repo contains packages that conflict with the other two repos. In order to resolve this, one must also install the yum priorities pacakge and use that to prioritize your repos in the following order:
3. RPMFusion: http://rpmfusion.org/
When adding third party repositories, it is highly recommended that the user also install and configure yum priorities as documented in the [CentOS WiKi](http://wiki.centos.org/PackageManagement/Yum/Priorities)
Prioritize the repositories:
1. Base
2. RPMFusion
3. EPEL
4. RPMForge
For instructions on yum priorities, visit this page:
http://wiki.centos.org/PackageManagement/Yum/Priorities
2. EPEL
3. RPMFusion
4. Zmrepo
Once your repos are in order, install the following:
```bash
sudo yum install automake bzip2-devel ffmpeg ffmpeg-devel gnutls-devel httpd libjpeg-turbo libjpeg-turbo-devel mysql-devel mysql-server pcre-devel \
sudo yum install cmake bzip2-devel ffmpeg ffmpeg-devel gnutls-devel httpd libjpeg-turbo libjpeg-turbo-devel mysql-devel mysql-server pcre-devel \
perl-Archive-Tar perl-Archive-Zip perl-Convert-BinHex perl-Date-Manip perl-DBD-MySQL perl-DBI perl-Device-SerialPort perl-Email-Date-Format perl-IO-stringy \
perl-IO-Zlib perl-MailTools perl-MIME-Lite perl-MIME-tools perl-MIME-Types perl-Module-Load perl-Package-Constants perl-Sys-Mmap perl-Time-HiRes \
perl-TimeDate perl-YAML-Syck php php-cli php-mysql x264 vlc-devel vlc-core libcurl libcurl-devel
perl-TimeDate perl-YAML-Syck perl-X10 perl-URI-Encode php php-cli php-mysql x264 vlc-devel vlc-core \
libcurl libcurl-devel polkit-devel git
```
To build from the master branch:
```bash
git clone https://github.com/ZoneMinder/ZoneMinder.git
cd ZoneMinder
cmake .
make
sudo make install
```
IMPORTANT: Don't forget the trailing "." when calling cmake
#### Docker
Docker is a system to run applications inside isolated containers. ZoneMinder, and the ZM webserver, will run using the
@ -159,4 +169,14 @@ the following steps.
6. Create new Pull Request
7. The team will then review, discuss and hopefully merge your changes.
### Package Maintainters
Many of the ZoneMinder configration variable default values are not configurable at build time through autotools or cmake. A new tool called *zmeditconfigdata.sh* has been added to allow package maintainers to manipulate any variable stored in ConfigData.pm without patching the source.
For example, let's say I have created a new ZoneMinder package that contains the cambolzola javascript file. However, by default cambozola support is turned off. To fix that, add this to the pacakging script:
```bash
./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes
```
Note that zmeditconfigdata.sh is intended to be called, from the root build folder, prior to running cmake or configure.
[![Analytics](https://ga-beacon.appspot.com/UA-15147273-6/ZoneMinder/README.md)](https://github.com/igrigorik/ga-beacon)

View File

@ -2,12 +2,12 @@ Source: zoneminder
Section: net
Priority: optional
Maintainer: Isaac Connor <iconnor@connortechnology.com>
Build-Depends: debhelper (>= 7.0.50), autoconf, automake, dpatch, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg | libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, libjpeg8, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev, libpolkit-gobject-1-dev
Build-Depends: debhelper (>= 7.0.50), autoconf, automake, dpatch, libphp-serialization-perl, libgnutls-dev|libgnutls28-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg | libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev|libgcrypt20-dev, libpolkit-gobject-1-dev
Standards-Version: 3.9.2
Package: zoneminder
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2 | httpd, libapache2-mod-php5 | libapache2-mod-fcgid | php5-fpm, php5, php5-mysql|php5-mysqlnd, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client|mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore5 | libvlccore7, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5 | libapache2-mod-fcgid, php5, php5-mysql|php5-mysqlnd, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client|mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53 | libavdevice55, libjpeg8|libjpeg9|libjpeg62-turbo, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore5 | libvlccore7 | libvlccore8, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0, liburi-encode-perl
Recommends: mysql-server|mariadb-server
Description: A video camera security and surveillance solution
ZoneMinder is intended for use in single or multi-camera video security

View File

@ -22,8 +22,6 @@ URL: http://www.zoneminder.com/
#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz
Source: ZoneMinder-%{version}.tar.gz
Patch1: zoneminder-1.28.0-defaults.patch
BuildRequires: cmake gnutls-devel systemd-units bzip2-devel
BuildRequires: community-mysql-devel pcre-devel libjpeg-turbo-devel
BuildRequires: perl(Archive::Tar) perl(Archive::Zip)
@ -66,7 +64,14 @@ too much degradation of performance.
%prep
%setup -q -n ZoneMinder-%{version}
%patch1 -p0 -b .defaults
# Change the following default values
./utils/zmeditconfigdata.sh ZM_PATH_ZMS /cgi-bin/zm/nph-zms
./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes
./utils/zmeditconfigdata.sh ZM_PATH_SWAP /dev/shm
./utils/zmeditconfigdata.sh ZM_UPLOAD_FTP_LOC_DIR /var/spool/zoneminder-upload
./utils/zmeditconfigdata.sh ZM_OPT_CONTROL yes
./utils/zmeditconfigdata.sh ZM_CHECK_FOR_UPDATES no
./utils/zmeditconfigdata.sh ZM_DYN_SHOW_DONATE_REMINDER no
%build
%cmake \

View File

@ -1,11 +1,12 @@
module local_zoneminder 1.1;
module local_zoneminder 1.2;
require {
type afs_ka_port_t;
type netsupport_port_t;
type port_t;
type presence_port_t;
type postfix_master_t;
type postfix_qmgr_t;
type postfix_pickup_t;
type httpd_t;
type var_lib_t;
@ -28,74 +29,75 @@ require {
type git_port_t;
type ipp_port_t;
type aol_port_t;
type unconfined_t;
type kernel_t;
type init_t;
type auditd_t;
type mysqld_t;
type httpd_log_t;
type syslogd_t;
type httpd_t;
type initrc_state_t;
type initrc_t;
type var_lib_t;
type udev_t;
type mysqld_safe_t;
type sshd_t;
type crond_t;
type getty_t;
type httpd_var_lib_t;
type initrc_var_run_t;
type tmpfs_t;
type dhcpc_t;
type v4l_device_t;
type file_t;
class sock_file { write create unlink };
class unix_stream_socket { read connectto };
class lnk_file { write create getattr read lock unlink };
class dir search;
type unconfined_t;
type kernel_t;
type init_t;
type auditd_t;
type mysqld_t;
type httpd_log_t;
type syslogd_t;
type httpd_t;
type initrc_state_t;
type initrc_t;
type var_lib_t;
type udev_t;
type mysqld_safe_t;
type sshd_t;
type crond_t;
type getty_t;
type httpd_var_lib_t;
type initrc_var_run_t;
type tmpfs_t;
type dhcpc_t;
type v4l_device_t;
type file_t;
class sock_file { write create unlink };
class unix_stream_socket { read connectto };
class lnk_file { write create getattr read lock unlink };
class dir {search getattr };
class udp_socket name_bind;
class file { write getattr read lock unlink open };
class shm { unix_read unix_write associate read write getattr };
class chr_file getattr;
class file { write getattr read lock unlink open };
class shm { unix_read unix_write associate read write getattr };
class chr_file getattr;
}
#============= httpd_t ==============
allow httpd_t auditd_t:dir search;
allow httpd_t auditd_t:dir { search getattr };
allow httpd_t auditd_t:file { read getattr open };
allow httpd_t crond_t:dir search;
allow httpd_t crond_t:dir { search getattr };
allow httpd_t crond_t:file { read getattr open };
allow httpd_t dhcpc_t:dir search;
allow httpd_t dhcpc_t:dir { search getattr };
allow httpd_t dhcpc_t:file { read getattr open };
allow httpd_t getty_t:dir search;
allow httpd_t getty_t:dir { search getattr };
allow httpd_t getty_t:file { read getattr open };
allow httpd_t httpd_log_t:file write;
allow httpd_t httpd_var_lib_t:lnk_file { write getattr read lock unlink };
allow httpd_t init_t:dir search;
allow httpd_t init_t:dir { search getattr };
allow httpd_t init_t:file { read getattr open };
#!!!! The source type 'httpd_t' can write to a 'file' of the following types:
# squirrelmail_spool_t, dirsrvadmin_config_t, httpd_lock_t, dirsrv_config_t, httpd_tmp_t, dirsrvadmin_tmp_t, httpd_cache_t, httpd_tmpfs_t, httpd_squirrelmail_t, dirsrv_var_log_t, zarafa_var_lib_t, dirsrv_var_run_t, httpd_var_lib_t, httpd_var_run_t, passenger_tmp_t, httpd_nutups_cgi_rw_content_t, httpd_apcupsd_cgi_rw_content_t, httpd_dspam_rw_content_t, httpd_mediawiki_rw_content_t, httpd_squid_rw_content_t, httpd_prewikka_rw_content_t, httpd_smokeping_cgi_rw_content_t, passenger_var_run_t, httpd_openshift_rw_content_t, httpd_dirsrvadmin_rw_content_t, httpd_w3c_validator_rw_content_t, httpd_user_rw_content_t, httpd_awstats_rw_content_t, httpdcontent, httpd_cobbler_rw_content_t, root_t, httpd_munin_rw_content_t, httpd_bugzilla_rw_content_t, httpd_cvs_rw_content_t, httpd_git_rw_content_t, httpd_sys_rw_content_t, httpd_sys_rw_content_t, httpd_nagios_rw_content_t
#squirrelmail_spool_t, mirrormanager_var_run_t, dirsrvadmin_config_t, httpd_lock_t, httpd_tmp_t, dirsrv_config_t, dirsrvadmin_tmp_t, httpd_cache_t, httpd_tmpfs_t, httpd_squirrelmail_t, dirsrv_var_run_t, dirsrv_var_log_t, httpd_var_lib_t, httpd_var_run_t, zarafa_var_lib_t, httpd_prewikka_rw_content_t, httpd_mediawiki_rw_content_t, httpd_squid_rw_content_t, passenger_var_run_t, httpd_smokeping_cgi_rw_content_t, httpd_openshift_rw_content_t, httpd_dirsrvadmin_rw_content_t, httpd_w3c_validator_rw_content_t, httpd_collectd_rw_content_t, cluster_var_lib_t, cluster_var_run_t, httpd_user_rw_content_t, httpd_awstats_rw_content_t, httpdcontent, root_t, httpd_cobbler_rw_content_t, httpd_munin_rw_content_t, cluster_conf_t, httpd_bugzilla_rw_content_t, passenger_tmp_t, httpd_cvs_rw_content_t, httpd_git_rw_content_t, httpd_sys_rw_content_t, httpd_sys_rw_content_t, httpd_nagios_rw_content_t, httpd_apcupsd_cgi_rw_content_t, httpd_nutups_cgi_rw_content_t, httpd_dspam_rw_content_t
allow httpd_t initrc_state_t:file { read write getattr unlink open };
allow httpd_t initrc_t:unix_stream_socket connectto;
allow httpd_t initrc_t:shm { unix_read unix_write associate read write getattr };
allow httpd_t initrc_var_run_t:file { read lock open };
allow httpd_t kernel_t:dir search;
allow httpd_t initrc_var_run_t:file { write read lock open };
allow httpd_t kernel_t:dir { search getattr };
allow httpd_t kernel_t:file { read getattr open };
allow httpd_t mysqld_safe_t:dir search;
allow httpd_t mysqld_safe_t:dir { search getattr };
allow httpd_t mysqld_safe_t:file { read getattr open };
allow httpd_t mysqld_t:dir search;
allow httpd_t mysqld_t:dir { search getattr };
allow httpd_t mysqld_t:file { read getattr open };
allow httpd_t sshd_t:dir search;
allow httpd_t sshd_t:dir { search getattr };
allow httpd_t sshd_t:file { read getattr open };
allow httpd_t syslogd_t:dir search;
allow httpd_t syslogd_t:dir { search getattr };
allow httpd_t syslogd_t:file { read getattr open };
allow httpd_t tmpfs_t:sock_file write;
allow httpd_t udev_t:dir search;
allow httpd_t udev_t:dir { search getattr };
allow httpd_t udev_t:file { read getattr open };
allow httpd_t unconfined_t:dir search;
allow httpd_t unconfined_t:dir { search getattr };
allow httpd_t unconfined_t:file { read getattr open };
allow httpd_t var_lib_t:lnk_file { write getattr read lock unlink };
allow httpd_t var_lib_t:sock_file { write unlink };
allow httpd_t v4l_device_t:chr_file getattr;
allow httpd_t afs_fs_port_t:udp_socket name_bind;
allow httpd_t afs_ka_port_t:udp_socket name_bind;
@ -114,10 +116,10 @@ allow httpd_t mmcc_port_t:udp_socket name_bind;
allow httpd_t netsupport_port_t:udp_socket name_bind;
allow httpd_t nodejs_debug_port_t:udp_socket name_bind;
allow httpd_t port_t:udp_socket name_bind;
allow httpd_t postfix_master_t:dir search;
allow httpd_t postfix_master_t:dir { search getattr };
allow httpd_t postfix_master_t:file { read getattr open };
allow httpd_t postfix_pickup_t:dir search;
allow httpd_t postfix_pickup_t:dir { search getattr };
allow httpd_t postfix_pickup_t:file { read getattr open };
allow httpd_t postfix_qmgr_t:dir search;
allow httpd_t postfix_qmgr_t:dir { search getattr };
allow httpd_t postfix_qmgr_t:file { read getattr open };
allow httpd_t presence_port_t:udp_socket name_bind;

View File

@ -17,8 +17,6 @@ URL: http://www.zoneminder.com/
#Source0: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz
Source0: ZoneMinder-%{version}.tar.gz
Patch1: zoneminder-1.28.0-defaults.patch
BuildRequires: cmake gnutls-devel bzip2-devel
BuildRequires: mysql-devel pcre-devel libjpeg-turbo-devel
BuildRequires: perl(Archive::Tar) perl(Archive::Zip)
@ -63,7 +61,14 @@ too much degradation of performance.
%prep
%setup -q -n ZoneMinder-%{version}
%patch1 -p0 -b .defaults
# Change the following default values
./utils/zmeditconfigdata.sh ZM_PATH_ZMS /cgi-bin/zm/nph-zms
./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes
./utils/zmeditconfigdata.sh ZM_PATH_SWAP /dev/shm
./utils/zmeditconfigdata.sh ZM_UPLOAD_FTP_LOC_DIR /var/spool/zoneminder-upload
./utils/zmeditconfigdata.sh ZM_OPT_CONTROL yes
./utils/zmeditconfigdata.sh ZM_CHECK_FOR_UPDATES no
./utils/zmeditconfigdata.sh ZM_DYN_SHOW_DONATE_REMINDER no
%build
# Have to override CMAKE_INSTALL_LIBDIR for cmake < 2.8.7 due to this bug:

View File

@ -51,9 +51,9 @@ copyright = u'2014, https://github.com/ZoneMinder/ZoneMinder/graphs/contributors
# built documents.
#
# The short X.Y version.
version = '1.27.0'
version = '1.28.0'
# The full version, including alpha/beta/rc tags.
release = '1.27.0'
release = '1.28.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@ -1,17 +1,24 @@
Options
=======
The final area covered by the tutorial is the options and user section. If you are running in authenticated mode and dont have system privileges then you will not see this section at all and if you are running in un-authenticated mode then no user section will be displayed.
The various options you can specify are displayed in a tabbed dialog with each group of options displayed under a different heading. Each option is displayed with its name, a short description and the current value. You can also click on the ? link following each description to get a fuller explanation about each option. This is the same as you would get from zmconfig.pl. A number of option groups have a master option near the top which enables or disables the whole group so you should be aware of the state of this before modifying options and expecting them to make any difference.
If you have changed the value of an option you should then save it. A number of the option groups will then prompt you to let you know that the option(s) you have changed will require a system restart. This is not done automatically in case you will be changing many values in the same session, however once you have made all of your changes you should restart ZoneMinder as soon as possible. The reason for this is that web and some scripts will pick up the new changes immediately but some of the daemons will still be using the old values and this can lead to data inconsistency or loss.
One of the options you may notice in the System tab allows you to specify the default language for your installation of ZoneMinder. Versions 1.17.0 and later support multiple languages but rely on users to assist in creating language files for specific languages. To specify a language you will have to give the applicable code, thus for UK English this is en_gb, and for US English it would be en_us, if no language is given then UK English is assumed. Most languages will be specified in this nn_mm format and to check which languages are available look for files named zm_lang_*.php in the ZoneMinder build directory where the parts represented by the * would be what you would enter as a language. This is slightly unwieldy and will probably be improved in future to make it easier to determine language availability. On checking which languages are available it may be that your preferred language is not currently included and if this is the case please consider doing a translation and sending it back to it may be included in future releases. All the language elements are given in the zm_lang_en_gb.php file along with a few notes to help you understand the format.
.. toctree::
As mentioned above, you may also see a users tab in the Options area. In this section you will see a list of the current users defined on the system. You can also add or delete users from here. It is recommended you do not delete the admin user unless you have created another fully privileged user to take over the same role. Each user is defined with a name and password (which is hidden) as well as an enabled setting which you can use to temporarily enable or disable users, for example a guest user for limited time access. As well as that there is a language setting that allows you to define user specific languages. Setting a language here that is different than the system language will mean that when that user logs in they will have the web interface presented in their own language rather than the system default, if it is available. Specifying a language here is done in the same way as for the system default language described above.
There are also five values that define the user permissions, these are Stream, Events, Control, Monitors and System Each can have values of None, View or Edit apart from Stream which has no Edit setting. These values cover access to the following areas; Stream defines whether a user is allowed to view the live video feeds coming from the cameras. You may wish to allow a user to view historical events only in which case this setting should be none. The Events setting determines whether a user can view and modify or delete any retained historical events. The Control setting allows you to indicate whether the user is able to control any Pan/Tilt/Zoom type cameras you may have on your system. The Monitors setting specifies whether a user can see the current monitor settings and change them. Finally the System setting determines whether a user can view or modify the system settings as a whole, such as options and users or controlling the running of the system as a whole.
As well as these settings there is also a Bandwidth setting which can be used to limit the maximum bandwidth that a user can view at and a Monitor Ids setting that can be used for non-System users to restrict them to only being able to access streams, events or monitors for the given monitors ids as a comma separated list with no spaces. If a user with Monitors edit privileges is limited to specific monitors here they will not be able to add or delete monitors but only change the details of those they have access to. If a user has System privileges then the Monitors Ids setting is ignored and has no effect.
Thats pretty much is it for the tour, though there is a lot more to ZoneMinder as you will discover. You should experiment with the various settings to get the results you think are right for your requirements.
options/options_display
options/options_system
options/options_config
options/options_paths
options/options_web
options/options_images
options/options_logging
options/options_network
options/options_email
options/options_upload
options/options_x10
options/options_bw
options/options_phonebw
options/options_eyezm
options/options_users

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

View File

@ -0,0 +1,42 @@
Options - High, Medium and Low B/W
----------------------------------
.. image:: images/Options_BW.png
There are now a number of options that are grouped into bandwidth categories, this allows you to configure the ZoneMinder client to work optimally over the various access methods you might to access the client. The following options are available in H, M and L options. These 3 groups control what happens when the client is running in 'high', 'medium' and 'low' bandwidth mode respectively. In most cases the default values will be suitable as a starting point.
High - You should set these options for when accessing the ZoneMinder client over a local network or high speed link.
Medium - You should set these options for when accessing the ZoneMinder client over a slower cable or DSL link.
Slow - You should set these options for when accessing Zoneminder client over a slow network link.
WEB_H_REFRESH_MAIN, WEB_M_REFRESH_MAIN, WEB_L_REFRESH_MAIN - How often (in seconds) the main console window should refresh itself. 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.
WEB_H_REFRESH_CYCLE, WEB_M_REFRESH_CYCLE, WEB_L_REFRESH_CYCLE - How often (in seconds) the cycle watch window swaps to the next monitor. 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.
WEB_H_REFRESH_IMAGE, WEB_M_REFRESH_IMAGE, WEB_L_REFRESH_IMAGE - How often (in seconds) the watched image is refreshed (if not streaming). 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.
WEB_H_REFRESH_STATUS, WEB_M_REFRESH_STATUS, WEB_L_REFRESH_STATUS - How often (in seconds) the status refreshes itself in the watch window. 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.
WEB_H_REFRESH_EVENTS, WEB_M_REFRESH_EVENTS, WEB_L_REFRESH_EVENTS - How often (in seconds) the event listing is refreshed in the watch window. 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.
WEB_H_CAN_STREAM, WEB_M_CAN_STREAM, WEB_L_CAN_STREAM - 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 nativ
WEB_H_STREAM_METHOD, WEB_M_STREAM_METHOD, WEB_H_STREAM_METHOD - 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
WEB_H_DEFAULT_SCALE, WEB_M_DEFAULT_SCALE, WEB_L_DEFAULT_SCALE - 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.
WEB_H_DEFAULT_RATE, WEB_M_DEFAULT_RATE, WEB_L_DEFAULT_RATE - 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.
WEB_H_VIDEO_BITRATE, WEB_M_VIDEO_BITRATE, WEB_L_VIDEO_BITRATE - 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.
WEB_H_VIDEO_MAXFPS, WEB_M_VIDEO_MAXFPS, WEB_L_VIDEO_MAXFPS - 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.
WEB_H_SCALE_THUMBS, WEB_M_SCALE_THUMBS, WEB_L_SCALE_THUMBS - 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.
WEB_H_EVENTS_VIEW, WEB_M_EVENTS_VIEW, WEB_L_EVENTS_VIEW - 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.
WEB_H_SHOW_PROGRESS, WEB_M_SHOW_PROGRESS, WEB_L_SHOW_PROGRESS - 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.
WEB_H_AJAX_TIMEOUT, WEB_M_AJAX_TIMEOUT, WEB_L_AJAX_TIMEOUT - 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.

View File

@ -0,0 +1,38 @@
Options - Config
----------------
.. image:: images/Options_Config.png
TIMESTAMP_ON_CAPTURE - 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.
CPU_EXTENSIONS - 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.
FAST_IMAGE_BLENDS - 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.
OPT_ADAPTIVE_SKIP - 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.
MAX_SUSPEND_TIME - 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.
STRICT_VIDEO_CONFIG - 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.
SIGNAL_CHECK_POINTS - 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.
V4L_MULTI_BUFFER - 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. If you have different capture cards that need different values you can ovveride them in each individual monitor on the source page.
CAPTURES_PER_FRAME - 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. If you have different capture cards that need different values you can ovveride them in each individual monitor on the source page.
FORCED_ALARM_SCORE - 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.
BULK_FRAME_INTERVAL - 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.
EVENT_CLOSE_MODE - 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.
CREATE_ANALYSIS_IMAGES - 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.
WEIGHTED_ALARM_CENTRES - 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.
EVENT_IMAGE_DIGITS - 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.
DEFAULT_ASPECT_RATIO - 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.
USER_SELF_EDIT - 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

View File

@ -0,0 +1,13 @@
Options - Display
-----------------
.. image:: images/Options_Display.png
This option screen allows user to select the skin for ZoneMinder. Currently available skins are:
* Classic
* Flat
* XML (Deprecated in favour of web/API)
* Mobile (Deprecated)

View File

@ -0,0 +1,96 @@
Options - Email
---------------
.. image:: images/Options_email.png
OPT_EMAIL - 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.
EMAIL_ADDRESS - This option is used to define the email address that any events that match the appropriate filters will be sent to.
EMAIL_SUBJECT - This option is used to define the subject of the email that is sent for any events that match the appropriate filters.
EMAIL_BODY - This option is used to define the content of the email that is sent for any events that match the appropriate filters.
+--------+--------------------------------------------------------+
| Token | Description |
+========+========================================================+
| %EI% | Id of the event |
+--------+--------------------------------------------------------+
| %EN% | Name of the event |
+--------+--------------------------------------------------------+
| %EC% | Cause of the event |
+--------+--------------------------------------------------------+
| %ED% | Event description |
+--------+--------------------------------------------------------+
| %ET% | Time of the event |
+--------+--------------------------------------------------------+
| %EL% | Length of the event |
+--------+--------------------------------------------------------+
| %EF% | Number of frames in the event |
+--------+--------------------------------------------------------+
| %EFA% | Number of alarm frames in the event |
+--------+--------------------------------------------------------+
| %EST% | Total score of the event |
+--------+--------------------------------------------------------+
| %ESA% | Average score of the event |
+--------+--------------------------------------------------------+
| %ESM% | Maximum score of the event |
+--------+--------------------------------------------------------+
| %EP% | Path to the event |
+--------+--------------------------------------------------------+
| %EPS% | Path to the event stream |
+--------+--------------------------------------------------------+
| %EPI% | Path to the event images |
+--------+--------------------------------------------------------+
| %EPI1% | Path to the first alarmed event image |
+--------+--------------------------------------------------------+
| %EPIM% | Path to the (first) event image with the highest score |
+--------+--------------------------------------------------------+
| %EI1% | Attach first alarmed event image |
+--------+--------------------------------------------------------+
| %EIM% | Attach (first) event image with the highest score |
+--------+--------------------------------------------------------+
| %EV% | Attach event mpeg video |
+--------+--------------------------------------------------------+
| %MN% | Name of the monitor |
+--------+--------------------------------------------------------+
| %MET% | Total number of events for the monitor |
+--------+--------------------------------------------------------+
| %MEH% | Number of events for the monitor in the last hour |
+--------+--------------------------------------------------------+
| %MED% | Number of events for the monitor in the last day |
+--------+--------------------------------------------------------+
| %MEW% | Number of events for the monitor in the last week |
+--------+--------------------------------------------------------+
| %MEM% | Number of events for the monitor in the last month |
+--------+--------------------------------------------------------+
| %MEA% | Number of archived events for the monitor |
+--------+--------------------------------------------------------+
| %MP% | Path to the monitor window |
+--------+--------------------------------------------------------+
| %MPS% | Path to the monitor stream |
+--------+--------------------------------------------------------+
| %MPI% | Path to the monitor recent image |
+--------+--------------------------------------------------------+
| %FN% | Name of the current filter that matched |
+--------+--------------------------------------------------------+
| %FP% | Path to the current filter that matched |
+--------+--------------------------------------------------------+
| %ZP% | Path to your ZoneMinder console |
+--------+--------------------------------------------------------+
OPT_MESSAGE - 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.
MESSAGE_ADDRESS - This option is used to define the short message email address that any events that match the appropriate filters will be sent to.
MESSAGE_SUBJECT - This option is used to define the subject of the message that is sent for any events that match the appropriate filters.
MESSAGE_BODY - This option is used to define the content of the message that is sent for any events that match the appropriate filters.
NEW_MAIL_MODULES - 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.
EMAIL_HOST - 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.
FROM_EMAIL - 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.
URL - 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.

View File

@ -0,0 +1,22 @@
Options - eyeZM
---------------
.. image:: images/Options_eyezm.png
EYEZM_DEBUG - 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
EYEZM_LOG_TO_FILE - 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.
EYEZM_LOG_FILE - Default filename to use when logging eyeZm Output and EYEZM_LOG_TO_FILE is enabled. This file will contain it's own output from the eyeZm Plugin when EYEZM_LOG_TO_FILE and EYEZM_DEBUG are both enabled.
EYEZM_EVENT_VCODEC - 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+).
EYEZM_FEED_VCODEC - 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.
EYEZM_H264_DEFAULT_BR - Default bit-rate to use with FFMPEG for H264 streaming. 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.
EYEZM_H264_DEFAULT_EVBR - Default bit-rate to use with FFMPEG for H264 event viewing. 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.
EYEZM_H264_TIMEOUT - Timeout (sec) to wait for H264 stream to start before terminating. 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.
EYEZM_SEG_DURATION - Segment duration used for streaming using HTTP-5 Streaming protocol. 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.

View File

@ -0,0 +1,44 @@
Options - Images
----------------
.. image:: images/Options_images.png
OPT_FFMPEG - 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.
PATH_FFMPEG - This path should point to where ffmpeg has been installed.
FFMPEG_INPUT_OPTIONS - 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.
FFMPEG_OUTPUT_OPTIONS - 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.
FFMPEG_FORMATS - 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.
FFMPEG_OPEN_TIMEOUT - When Ffmpeg is opening a stream, it can take a long time before failing; certain circumstances even seem to be able to lock indefinitely. This option allows you to set a maximum time in seconds to pass before closing the stream and trying to reopen it again.
JPEG_STREAM_QUALITY - 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.
MPEG_TIMED_FRAMES - 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.
MPEG_LIVE_FORMAT - 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
MPEG_REPLAY_FORMAT - 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
RAND_STREAM - 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.
OPT_CAMBOZOLA - 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.
PATH_CAMBOZOLA - 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.
RELOAD_CAMBOZOLA - 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.
OPT_FFMPEG - 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.
PATH_FFMPEG - This path should point to where ffmpeg has been installed.
FFMPEG_INPUT_OPTIONS - 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.
FFMPEG_OUTPUT_OPTIONS - 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.
FFMPEG_FORMATS - 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.
FFMPEG_OPEN_TIMEOUT - When Ffmpeg is opening a stream, it can take a long time before failing; certain circumstances even seem to be able to lock indefinitely. This option allows you to set a maximum time in seconds to pass before closing the stream and trying to reopen it again.

View File

@ -0,0 +1,42 @@
Options - Logging
-----------------
.. image:: images/Options_Logging.png
LOG_LEVEL_SYSLOG - 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
LOG_LEVEL_FILE - 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
LOG_LEVEL_WEBLOG - 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
LOG_LEVEL_DATABASE - 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
LOG_DATABASE_LIMIT - 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.
LOG_DEBUG" - 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.
LOG_DEBUG_TARGET - 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.
LOG_DEBUG_LEVEL - 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.
LOG_DEBUG_FILE - 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.
LOG_CHECK_PERIOD - 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.
LOG_ALERT_WAR_COUNT - 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.
LOG_ALERT_ERR_COUNT - 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.
LOG_ALERT_FAT_COUNT - 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.
LOG_ALARM_WAR_COUNT - 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.
LOG_ALARM_ERR_COUNT - 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.
LOG_ALARM_FAT_COUNT - 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.
RECORD_EVENT_STATS - 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.
RECORD_DIAG_IMAGES - 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.
DUMP_CORES - 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.

View File

@ -0,0 +1,14 @@
Options - Network
-----------------
.. image:: images/Options_Network.png
HTTP_VERSION - 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 with 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.
HTTP_UA - 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.
HTTP_TIMEOUT - 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.
MIN_RTP_PORT - 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.
MAX_RTP_PORT - 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.

View File

@ -0,0 +1,22 @@
Options - Paths
---------------
.. image:: images/Options_Paths.png
ZM_DIR_EVENTS - This is the path to the events directory where all the event images and other miscellaneous files are stored. CAUTION: The directory you specify here cannot be outside the web root. This is a common mistake. Most users should never change this value. If you intend to record events to a second disk or network share, then you should mount the drive or share directly to the ZoneMinder events folder or follow the instructions in the ZoneMinder Wiki titled Using a dedicated Hard Drive.
USE_DEEP_STORAGE - 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.
DIR_IMAGES - ZoneMinder generates a myriad of images, mostly of which are associated with events. For those that aren't this is where they go. CAUTION: The directory you specify here cannot be outside the web root. This is a common mistake. Most users should never change this value. If you intend to save images to a second disk or network share, then you should mount the drive or share directly to the ZoneMinder images folder or follow the instructions in the ZoneMinder Wiki titled Using a dedicated Hard Drive.
DIR_SOUNDS - ZoneMinder can optionally play a sound file when an alarm is detected. This indicates where to look for this file. CAUTION: The directory you specify here cannot be outside the web root. Most users should never change this value.
PATH_ZMS - 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'.
PATH_MAP - 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.
PATH_SOCKS - 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.
PATH_LOGS - 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.
PATH_SWAP - 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.

View File

@ -0,0 +1,20 @@
Options - Phone Bandwidth
-------------------------
.. image:: images/Options_BW_Phone.png
WEB_P_CAN_STREAM - Override the automatic detection of browser streaming capability. 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.
WEB_P_STREAM_METHOD - 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"
WEB_P_DEFAULT_SCALE - 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.
WEB_P_DEFAULT_RATE - 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.
WEB_P_VIDEO_BITRATE - 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.
WEB_P_VIDEO_MAXFPS - 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.
WEB_P_SCALE_THUMBS - 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.
WEB_P_AJAX_TIMEOUT - 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.

View File

@ -0,0 +1,48 @@
Options - System
----------------
.. image:: images/Options_System.png
LANG_DEFAULT - 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.
OPT_USE_AUTH - 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. Authenticated mode alone should not be relied up for securing Internet connected ZoneMinder.
AUTH_TYPE - 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.
AUTH_RELAY - 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.
AUTH_HASH_SECRET - 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.
AUTH_HASH_IPS - 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.
AUTH_HASH_LOGINS - 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.
OPT_FAST_DELETE - 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.
FILTER_RELOAD_DELAY - 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 in seconds 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.
FILTER_EXECUTE_INTERVAL - 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.
MAX_RESTART_DELAY - 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.
WATCH_CHECK_INTERVAL - 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.
WATCH_MAX_DELAY - 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.
RUN_AUDIT - 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.
AUDIT_CHECK_INTERVAL - 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.
OPT_FRAME_SERVER - 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.
FRAME_SOCKET_SIZE - 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
OPT_CONTROL - 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.
OPT_TRIGGERS - 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.
CHECK_FOR_UPDATES - 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
UPDATE_CHECK_PROXY - 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>/
SHM_KEY - 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.

View File

@ -0,0 +1,32 @@
Options - Upload
----------------
.. image:: images/Options_upload.png
OPT_UPLOAD - 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
UPLOAD_ARCH_FORMAT - 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.
UPLOAD_ARCH_COMPRESS - 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.
UPLOAD_ARCH_ANALYSE - 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.
UPLOAD_PROTOCOL - 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.
UPLOAD_HOST - 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.
UPLOAD_PORT - 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.
UPLOAD_USER - 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.
UPLOAD_PASS - 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.
UPLOAD_LOC_DIR - 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.
UPLOAD_REM_DIR - 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.
UPLOAD_TIMEOUT - 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.
UPLOAD_FTP_PASSIVE - You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates that ftp transfers should be done in passive mode. This uses a single connection for all ftp activity and, whilst slower than active transfers, is more robust and likely to work from behind filewalls. This option is ignored for SFTP transfers.
UPLOAD_DEBUG - 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.

View File

@ -0,0 +1,10 @@
Options - Users
---------------
.. image:: images/Options_Users.png
In this section you will see a list of the current users defined on the system. You can also add or delete users from here. It is recommended you do not delete the admin user unless you have created another fully privileged user to take over the same role. Each user is defined with a name and password (which is hidden) as well as an enabled setting which you can use to temporarily enable or disable users, for example a guest user for limited time access. As well as that there is a language setting that allows you to define user specific languages. Setting a language here that is different than the system language will mean that when that user logs in they will have the web interface presented in their own language rather than the system default, if it is available.
There are also five values that define the user permissions, these are Stream, Events, Control, Monitors and System Each can have values of None, View or Edit apart from Stream which has no Edit setting. These values cover access to the following areas; Stream defines whether a user is allowed to view the live video feeds coming from the cameras. You may wish to allow a user to view historical events only in which case this setting should be none. The Events setting determines whether a user can view and modify or delete any retained historical events. The Control setting allows you to indicate whether the user is able to control any Pan/Tilt/Zoom type cameras you may have on your system. The Monitors setting specifies whether a user can see the current monitor settings and change them. Finally the System setting determines whether a user can view or modify the system settings as a whole, such as options and users or controlling the running of the system as a whole.
As well as these settings there is also a Bandwidth setting which can be used to limit the maximum bandwidth that a user can view at and a Monitor Ids setting that can be used for non-System users to restrict them to only being able to access streams, events or monitors for the given monitors ids as a comma separated list with no spaces. If a user with Monitors edit privileges is limited to specific monitors here they will not be able to add or delete monitors but only change the details of those they have access to. If a user has System privileges then the Monitors Ids setting is ignored and has no effect.

View File

@ -0,0 +1,30 @@
Options - Web
-------------
.. image:: images/Options_web.png
WEB_TITLE_PREFIX - 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.
WEB_RESIZE_CONSOLE - 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
WEB_POPUP_ON_ALARM - 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.
WEB_SOUND_ON_ALARM - 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.
WEB_ALARM_SOUND - 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.
WEB_COMPACT_MONTAGE - 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.
WEB_EVENT_SORT_FIELD - 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.
WEB_EVENT_SORT_ORDER - 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.
WEB_EVENTS_PER_PAGE - 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.
WEB_LIST_THUMBS - 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.
WEB_LIST_THUMB_WIDTH - 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.
WEB_LIST_THUMB_HEIGHT - 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.
WEB_USE_OBJECT_TAGS - 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.

View File

@ -0,0 +1,12 @@
Options - X10
-------------
.. image:: images/Options_X10.png
OPT_X10 - 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.
X10_DEVICE - 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.
X10_HOUSE_CODE - 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.
X10_DB_RELOAD_INTERVAL - 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.

View File

@ -33,8 +33,6 @@ require ZoneMinder::Control;
our @ISA = qw(ZoneMinder::Control);
our $VERSION = $ZoneMinder::Base::VERSION;
# ==========================================================================
#
# Axis V2 Control Protocol
@ -79,7 +77,7 @@ sub open
use LWP::UserAgent;
$self->{ua} = LWP::UserAgent->new;
$self->{ua}->agent( "ZoneMinder Control Agent/".ZM_VERSION );
$self->{ua}->agent( "ZoneMinder Control Agent/".ZoneMinder::Base::ZM_VERSION );
$self->{state} = 'open';
}

View File

@ -3,6 +3,9 @@
# chkconfig: 2345 99 00
# processname: zmpkg.pl
# This script is intended for use with legacy SysV init environments ONLY
# For systemd environments, use the ZoneMinder systemd unit file instead
# Source function library.
. /etc/rc.d/init.d/functions

View File

@ -49,7 +49,7 @@ use ZoneMinder;
use POSIX;
use Socket;
use IO::Handle;
use Data::Dumper;
#use Data::Dumper;
use constant SOCK_FILE => $Config{ZM_PATH_SOCKS}.'/zmdc.sock';
@ -214,7 +214,7 @@ use ZoneMinder;
use POSIX;
use Socket;
use IO::Handle;
use Data::Dumper;
#use Data::Dumper;
our %cmd_hash;
our %pid_hash;

View File

@ -89,6 +89,8 @@ Parameters are :-
-u<dbuser>, --user=<dbuser> - Alternate DB user with privileges to alter DB
-p<dbpass>, --pass=<dbpass> - Password of alternate DB user with privileges to alter DB
-d<dir>,--dir=<dir> - Directory containing update files if not in default build location
-interactive - interact with the user
-nointeractive - do not interact with the user
");
exit( -1 );
}
@ -319,34 +321,37 @@ if ( $freshen )
saveConfigToDB();
}
# Now check for MyISAM Tables
my @MyISAM_Tables;
my $sql = "SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='zm' AND engine = 'MyISAM'";
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
my $res = $sth->execute() or die( "Can't execute: ".$sth->errstr() );
# Don't do innoDB upgrade if not interactive
if ( $interactive ) {
# Now check for MyISAM Tables
my @MyISAM_Tables;
my $sql = "SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='zm' AND engine = 'MyISAM'";
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
my $res = $sth->execute() or die( "Can't execute: ".$sth->errstr() );
while( my $dbTable = $sth->fetchrow() ) {
push @MyISAM_Tables, $dbTable;
}
$sth->finish();
while( my $dbTable = $sth->fetchrow() ) {
push @MyISAM_Tables, $dbTable;
}
$sth->finish();
if ( @MyISAM_Tables ) {
print( "\nPrevious versions of ZoneMinder used the MyISAM database engine.\nHowever, the recommended database engine is InnoDB.\n");
print( "\nHint: InnoDB tables are much less likely to be corrupted during an unclean shutdown.\n\nPress 'y' to convert your tables to InnoDB or 'n' to skip : ");
my $response = <STDIN>;
chomp( $response );
if ( $response =~ /^[yY]$/ ) {
print "\nConverting MyISAM tables to InnoDB. Please wait.\n";
foreach (@MyISAM_Tables) {
if ( @MyISAM_Tables ) {
print( "\nPrevious versions of ZoneMinder used the MyISAM database engine.\nHowever, the recommended database engine is InnoDB.\n");
print( "\nHint: InnoDB tables are much less likely to be corrupted during an unclean shutdown.\n\nPress 'y' to convert your tables to InnoDB or 'n' to skip : ");
my $response = <STDIN>;
chomp( $response );
if ( $response =~ /^[yY]$/ ) {
$dbh->do(q|SET sql_mode='traditional'|); # Elevate warnings to errors
my $sql = "ALTER TABLE $_ ENGINE = InnoDB";
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
my $res = $sth->execute() or die( "Can't execute: ".$sth->errstr() );
$sth->finish();
print "\nConverting MyISAM tables to InnoDB. Please wait.\n";
foreach (@MyISAM_Tables) {
my $sql = "ALTER TABLE $_ ENGINE = InnoDB";
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
my $res = $sth->execute() or die( "Can't execute: ".$sth->errstr() );
$sth->finish();
}
$dbh->do(q|SET sql_mode=''|); # Set mode back to default
}
}
}
} # end if interactive
if ( $version )
{

View File

@ -64,3 +64,14 @@ void zmDbConnect()
zmDbConnected = true;
}
void zmDbClose()
{
if ( zmDbConnected )
{
mysql_close( &dbconn );
// mysql_init() call implicitly mysql_library_init() but
// mysql_close() does not call mysql_library_end()
mysql_library_end();
zmDbConnected = false;
}
}

View File

@ -30,6 +30,8 @@ extern MYSQL dbconn;
extern int zmDbConnected;
void zmDbConnect();
void zmDbClose();
#ifdef __cplusplus
} /* extern "C" */
#endif

View File

@ -339,21 +339,23 @@ void Image::AssignDirect( const unsigned int p_width, const unsigned int p_heigh
Error("Attempt to directly assign buffer from a NULL pointer");
return;
}
if(buffer_size < (unsigned int)((p_width*p_height)*p_colours)) {
Error("Attempt to directly assign buffer from an undersized buffer of size: %zu",buffer_size);
return;
}
if(!p_height || !p_width) {
Error("Attempt to directly assign buffer with invalid width or height: %d %d",p_width,p_height);
return;
}
if(p_colours != ZM_COLOUR_GRAY8 && p_colours != ZM_COLOUR_RGB24 && p_colours != ZM_COLOUR_RGB32) {
Error("Attempt to directly assign buffer with unexpected colours per pixel: %d",p_colours);
return;
}
unsigned int new_buffer_size = ((p_width*p_height)*p_colours);
if(buffer_size < new_buffer_size) {
Error("Attempt to directly assign buffer from an undersized buffer of size: %zu, needed %dx%d*%d colours = %zu",buffer_size, p_width, p_height, p_colours );
return;
}
if(holdbuffer && buffer) {
if((unsigned int)((p_height*p_width)*p_colours) > allocation) {
@ -365,7 +367,7 @@ void Image::AssignDirect( const unsigned int p_width, const unsigned int p_heigh
colours = p_colours;
subpixelorder = p_subpixelorder;
pixels = height*width;
size = pixels*colours;
size = new_buffer_size; // was pixels*colours, but we already calculated it above as new_buffer_size
/* Copy into the held buffer */
if(new_buffer != buffer)
@ -383,7 +385,7 @@ void Image::AssignDirect( const unsigned int p_width, const unsigned int p_heigh
colours = p_colours;
subpixelorder = p_subpixelorder;
pixels = height*width;
size = pixels*colours;
size = new_buffer_size; // was pixels*colours, but we already calculated it above as new_buffer_size
allocation = buffer_size;
buffertype = p_buffertype;

View File

@ -239,6 +239,9 @@ void Logger::terminate()
if ( mSyslogLevel > NOLOG )
closeSyslog();
if ( mDatabaseLevel > NOLOG )
closeDatabase();
}
bool Logger::boolEnv( const std::string &name, bool defaultValue )
@ -468,6 +471,15 @@ void Logger::closeFile()
}
}
void Logger::closeDatabase()
{
if ( mDbConnected )
{
mysql_close( &mDbConnection );
mDbConnected = false;
}
}
void Logger::openSyslog()
{
(void) openlog( mId.c_str(), LOG_PID|LOG_NDELAY, LOG_LOCAL1 );
@ -604,5 +616,6 @@ void logInit( const char *name, const Logger::Options &options )
void logTerm()
{
Logger::fetch()->terminate();
if ( Logger::smInstance )
delete Logger::smInstance;
}

View File

@ -115,6 +115,7 @@ private:
public:
friend void logInit( const char *name, const Options &options );
friend void logTerm();
static Logger *fetch()
{
@ -182,6 +183,7 @@ private:
void closeFile();
void openSyslog();
void closeSyslog();
void closeDatabase();
public:
void logPrint( bool hex, const char * const file, const int line, const int level, const char *fstring, ... );

View File

@ -416,12 +416,12 @@ Monitor::Monitor(
{
if ( purpose != QUERY )
{
Error( "Shared data not initialised by capture daemon" );
Error( "Shared data not initialised by capture daemon for monitor %s", name );
exit( -1 );
}
else
{
Warning( "Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results" );
Warning( "Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results for monitor %s", name );
}
}

View File

@ -91,7 +91,7 @@ RemoteCameraRtsp::~RemoteCameraRtsp()
if ( mCodecContext )
{
avcodec_close( mCodecContext );
mCodecContext = NULL; // Freed by av_close_input_file
mCodecContext = NULL; // Freed by avformat_free_context in the destructor of RtspThread class
}
if ( capture )

View File

@ -26,7 +26,6 @@
#include "zm_rtp_data.h"
#include "zm_rtp_ctrl.h"
#include "zm_db.h"
#include "zm_sdp.h"
#include <sys/time.h>
#include <signal.h>
@ -171,6 +170,7 @@ int RtspThread::requestPorts()
nMonitors = 1;
position = 0;
}
mysql_free_result(result);
int portRange = int(((config.max_rtp_port-config.min_rtp_port)+1)/nMonitors);
smMinDataPort = config.min_rtp_port + (position * portRange);
smMaxDataPort = smMinDataPort + portRange - 1;
@ -202,6 +202,7 @@ RtspThread::RtspThread( int id, RtspMethod method, const std::string &protocol,
mHost( host ),
mPort( port ),
mPath( path ),
mSessDesc( 0 ),
mFormatContext( 0 ),
mSeq( 0 ),
mSession( 0 ),
@ -236,6 +237,17 @@ RtspThread::RtspThread( int id, RtspMethod method, const std::string &protocol,
RtspThread::~RtspThread()
{
if ( mFormatContext )
{
avformat_free_context( mFormatContext );
mFormatContext = NULL;
}
if ( mSessDesc )
{
delete mSessDesc;
mSessDesc = NULL;
}
delete mAuthenticator;
}
int RtspThread::run()
@ -387,11 +399,10 @@ int RtspThread::run()
std::string sdp = response.substr( sdpStart );
Debug( 1, "Processing SDP '%s'", sdp.c_str() );
SessionDescriptor *sessDesc = 0;
try
{
sessDesc = new SessionDescriptor( mUrl, sdp );
mFormatContext = sessDesc->generateFormatContext();
mSessDesc = new SessionDescriptor( mUrl, sdp );
mFormatContext = mSessDesc->generateFormatContext();
}
catch( const Exception &e )
{
@ -421,7 +432,7 @@ int RtspThread::run()
{
for ( unsigned int i = 0; i < mFormatContext->nb_streams; i++ )
{
SessionDescriptor::MediaDescriptor *mediaDesc = sessDesc->getStream( i );
SessionDescriptor::MediaDescriptor *mediaDesc = mSessDesc->getStream( i );
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51,2,1)
if ( mFormatContext->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO )
#else
@ -481,20 +492,26 @@ int RtspThread::run()
return( -1 );
lines = split( response, "\r\n" );
char *session = 0;
std::string session;
int timeout = 0;
char transport[256] = "";
for ( size_t i = 0; i < lines.size(); i++ )
{
sscanf( lines[i].c_str(), "Session: %a[0-9a-fA-F]; timeout=%d", &session, &timeout );
if ( ( lines[i].size() > 8 ) && ( lines[i].substr( 0, 8 ) == "Session:" ) )
{
StringVector sessionLine = split( lines[i].substr(9), ";" );
session = trimSpaces( sessionLine[0] );
if ( sessionLine.size() == 2 )
sscanf( trimSpaces( sessionLine[1] ).c_str(), "timeout=%d", &timeout );
}
sscanf( lines[i].c_str(), "Transport: %s", transport );
}
if ( !session )
if ( session.empty() )
Fatal( "Unable to get session identifier from response '%s'", response.c_str() );
Debug( 2, "Got RTSP session %s, timeout %d secs", session, timeout );
Debug( 2, "Got RTSP session %s, timeout %d secs", session.c_str(), timeout );
if ( !transport[0] )
Fatal( "Unable to get transport details from response '%s'", response.c_str() );
@ -562,20 +579,21 @@ int RtspThread::run()
return( -1 );
lines = split( response, "\r\n" );
char *rtpInfo = 0;
std::string rtpInfo;
for ( size_t i = 0; i < lines.size(); i++ )
{
sscanf( lines[i].c_str(), "RTP-Info: %as", &rtpInfo );
if ( ( lines[i].size() > 9 ) && ( lines[i].substr( 0, 9 ) == "RTP-Info:" ) )
rtpInfo = trimSpaces( lines[i].substr( 9 ) );
}
if ( !rtpInfo )
if ( rtpInfo.empty() )
Fatal( "Unable to get RTP Info identifier from response '%s'", response.c_str() );
Debug( 2, "Got RTP Info %s", rtpInfo );
Debug( 2, "Got RTP Info %s", rtpInfo.c_str() );
int seq = 0;
unsigned long rtpTime = 0;
parts = split( rtpInfo, ";" );
parts = split( rtpInfo.c_str(), ";" );
for ( size_t i = 0; i < parts.size(); i++ )
{
if ( startsWith( parts[i], "seq=" ) )

View File

@ -26,6 +26,7 @@
#include "zm_thread.h"
#include "zm_rtp_source.h"
#include "zm_rtsp_auth.h"
#include "zm_sdp.h"
#include <set>
#include <map>
@ -73,6 +74,7 @@ private:
SourceMap mSources;
SessionDescriptor *mSessDesc;
AVFormatContext *mFormatContext;
uint16_t mSeq;

View File

@ -184,9 +184,15 @@ SessionDescriptor::SessionDescriptor( const std::string &url, const std::string
mInfo = line;
break;
case 'c' :
// This prevent a memory leak if the field appears more than one time
if ( mConnInfo )
delete mConnInfo;
mConnInfo = new ConnInfo( line );
break;
case 'b' :
// This prevent a memory leak if the field appears more than one time
if ( mBandInfo )
delete mBandInfo;
mBandInfo = new BandInfo( line );
break;
case 't' :
@ -339,6 +345,16 @@ SessionDescriptor::SessionDescriptor( const std::string &url, const std::string
}
}
SessionDescriptor::~SessionDescriptor()
{
if ( mConnInfo )
delete mConnInfo;
if ( mBandInfo )
delete mBandInfo;
for ( unsigned int i = 0; i < mMediaList.size(); i++ )
delete mMediaList[i];
}
AVFormatContext *SessionDescriptor::generateFormatContext() const
{
AVFormatContext *formatContext = avformat_alloc_context();

View File

@ -213,6 +213,7 @@ protected:
public:
SessionDescriptor( const std::string &url, const std::string &sdp );
~SessionDescriptor();
const std::string &getUrl() const
{

View File

@ -137,5 +137,7 @@ int main( int argc, char *argv[] )
{
fprintf( stderr, "Can't find monitor with id of %d\n", id );
}
logTerm();
zmDbClose();
return( 0 );
}

View File

@ -302,5 +302,8 @@ int main( int argc, char *argv[] )
delete [] next_delays;
delete [] last_capture_times;
logTerm();
zmDbClose();
return( result );
}

View File

@ -307,4 +307,6 @@ int main( int argc, char *argv[] )
sigprocmask( SIG_UNBLOCK, &block_set, 0 );
}
logTerm();
zmDbClose();
}

View File

@ -223,6 +223,8 @@ int main( int argc, const char *argv[] )
if ( !user )
{
Error( "Unable to authenticate user" );
logTerm();
zmDbClose();
return( -1 );
}
ValidateAccess( user, monitor_id );
@ -286,6 +288,8 @@ int main( int argc, const char *argv[] )
#else // HAVE_LIBAVCODEC
Error( "MPEG streaming of '%s' attempted while disabled", query );
fprintf( stderr, "MPEG streaming is disabled.\nYou should configure with the --with-ffmpeg option and rebuild to use this functionality.\n" );
logTerm();
zmDbClose();
return( -1 );
#endif // HAVE_LIBAVCODEC
}
@ -320,10 +324,16 @@ int main( int argc, const char *argv[] )
#else // HAVE_LIBAVCODEC
Error( "MPEG streaming of '%s' attempted while disabled", query );
fprintf( stderr, "MPEG streaming is disabled.\nYou should ensure the ffmpeg libraries are installed and detected and rebuild to use this functionality.\n" );
logTerm();
zmDbClose();
return( -1 );
#endif // HAVE_LIBAVCODEC
}
stream.runStream();
}
logTerm();
zmDbClose();
return( 0 );
}

View File

@ -169,6 +169,8 @@ int main(int argc, char** argv) {
stream.setStreamBitrate(bitrate); // default = 100000 (bitrate)
#else
fprintf(stderr, "MPEG streaming is disabled.\nYou should configure with the --with-ffmpeg option and rebuild to use this functionality.\n");
logTerm();
zmDbClose();
return EXIT_FAILURE;
#endif
}
@ -192,5 +194,8 @@ int main(int argc, char** argv) {
}
if (debug) printf("Done.\n");
logTerm();
zmDbClose();
return (EXIT_SUCCESS);
}

View File

@ -754,5 +754,8 @@ int main( int argc, char *argv[] )
}
delete user;
logTerm();
zmDbClose();
return( 0 );
}

100
utils/zmeditconfigdata.sh Executable file
View File

@ -0,0 +1,100 @@
#!/bin/bash
# This script allows the package maintainer to change the default value
# of any variable specified in ConfigData.pm without writing a patch.
# Run this script from your build folder, before running configure or cmake.
usage()
{
cat <<EOF
USAGE:
$0 VARIABLE DEFAULT [CONFIGDATA DIRECTORY]
Replace the default value, DEFAULT, of the specified ZoneMinder
variable, VARIABLE, located in ConfigData.pm.in.
Default folder for ConfigData is ./scripts/ZoneMinder/lib/ZoneMinder
Specify CONFIGDATA DIRETORY to override.
Run this script from your build folder, before running configure or cmake.
EXAMPLE:
zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes
WARNING:
The user supplied value for DEFAULT is not checked for sanity. For example,
changing ZM_LANG_DEFAULT to "pony" will cause bad things to happen!
EOF
}
if [ -z "$1" ] || [ -z "$2" ]; then
usage
exit 0
fi
# Check to see if this script has access to all the commands it needs
for CMD in set echo printf grep sed ; do
type $CMD &> /dev/null
if [ $? -ne 0 ]; then
echo
echo "ERROR: The script cannot find the required command \"${CMD}\"."
echo
exit 1
fi
done
escape()
{
escaped=""
local temp="$(printf %q "$1")"
escaped="$(echo $temp | sed 's/\//\\\//g')"
}
# Assign variables once they are properly escaped
escape $1
variable=$escaped
escape $2
default=$escaped
# Set the path to ConfigData
if [ -n "$3" ]; then
configdata="$3/ConfigData.pm.in"
else
configdata="./scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in"
fi
# Check to make sure we can find ConfigData
if [ ! -e "$configdata" ]; then
echo "CONFIGDATA FILE NOT FOUND: $configdata"
exit 1
fi
# Now that we've found ConfidData, verify the supplied variable
# is defined inside the ConfigData file.
if [ -z "$(grep $variable $configdata)" ]; then
echo "ZONEMINDER VARIABLE NOT FOUND: $variable"
exit 1
fi
# Update the supplied variable with the new default value.
# Don't stare too closely. You will burn your eyes out.
sed -i '/.*'${variable}'.*/{
$!{ N
s/\(.*'${variable}'.*\n.*\)\"\(.*\)\"/\1\"'${default}'\"/
t yes
P
D
:yes
}
}' $configdata
if [ "$?" != "0" ]; then
echo "SED RETURNED FAILURE"
exit 1
fi

View File

@ -0,0 +1,80 @@
<?php
App::uses('Component', 'Controller');
class ConfigParserComponent extends Component {
public function parseHints($hint) {
$string = "";
$hints = explode('|', $hint);
foreach ($hints as $hint) {
$string .= "<option value=\"$hint\">$hint</option>";
}
return $string;
}
public function getLabel($name) {
$width = 'col-md-4';
$string = '<div class="form-group">';
$string .= '<label for="%s" class="control-label %s">%s</label>';
$label = sprintf($string, $name, $width, $name);
$label .= '<div class="col-md-6">';
return $label;
}
public function getInput($name, $type, $id) {
if ($type == 'checkbox') {
$string = '<input id="%s" type="checkbox" ng-change="updateConfig(\'%s\', \'%s\')" ng-model="myModel.configData[\'%s\']" ng-true-value="1" ng-false-value="0"><span class="form-control-feedback"></span></div>';
} elseif ($type == 'text') {
$string = '<input id="%s" type="text" ng-change="updateConfig(\'%s\', \'%s\')" ng-model="myModel.configData[\'%s\']" class="form-control"><span class="form-control-feedback"></span></div>';
} elseif ($type == 'textarea') {
$string = '<textarea id="%s" ng-change="updateConfig(\'%s\', \'%s\')" class="form-control" rows="3" ng-model="myModel.configData[\'%s\']"></textarea><span class="form-control-feedback"></span></div>';
} elseif ($type == 'select') {
$string = '<select id="%s" ng-change="updateConfig(\'%s\', \'%s\')" class="form-control" ng-model="myModel.configData[\'%s\']">';
}
$input = sprintf($string, $name, $id, $name, $name);
return $input;
}
public function parseOptions($configs) {
$category = $configs[0]['Config']['Category'];
$string = "";
foreach ($configs as $option) {
$type = $option['Config']['Type'];
$name = $option['Config']['Name'];
$value = $option['Config']['Value'];
$hint = $option['Config']['Hint'];
$id = $option['Config']['Id'];
$string .= $this->getLabel($name);
switch ($type) {
case "boolean":
$string .= $this->getInput($name, 'checkbox', $id);
break;
case "text":
$string .= $this->getInput($name, 'textarea', $id);
break;
case "string":
if (strpos($hint, '|') === FALSE) {
$string .= $this->getInput($name, 'text', $id);
} else {
$string .= $this->getInput($name, 'select', $id);
$string .= $this->parseHints($hint);
$string .= '</select> <span class="form-control-feedback"></span> </div>';
}
break;
default:
$string .= $this->getInput($name, 'text', $id);
}
$string .= "</div><!-- End .form-group -->\n";
}
return $string;
}
}
?>

View File

@ -88,4 +88,50 @@ class ConfigsController extends AppController {
} else {
return $this->flash(__('The config could not be deleted. Please, try again.'), array('action' => 'index'));
}
}}
}
/**
* categories method
*
* Either return a list of distinct categories
* Or all configs under a certain category
*/
public function categories($category = null) {
if ($category != null) {
if (!$this->Config->find('first', array( 'conditions' => array('Config.Category' => $category)))) {
throw new NotFoundException(__('Invalid Config Category'));
}
$config = $this->Config->find('all', array(
'conditions' => array('Config.Category' => $category),
'recursive' => 0
));
$this->set(array(
'config' => $config,
'_serialize' => array('config')
));
} else {
$categories = $this->Config->find('all', array(
'fields' => array('DISTINCT Config.Category'),
'conditions' => array('Config.Category !=' => 'hidden'),
'recursive' => 0
));
$this->set(array(
'categories' => $categories,
'_serialize' => array('categories')
));
}
}
public function keyValue() {
$keyValues = $this->Config->find('list', array(
'fields' => array('Config.Name', 'Config.Value')
));
$this->set(array(
'keyValues' => $keyValues,
'_serialize' => array('keyValues')
));
}
}

View File

@ -0,0 +1,96 @@
<?php
App::uses('AppController', 'Controller');
/**
* Logs Controller
*
* @property Log $Log
* @property PaginatorComponent $Paginator
*/
class LogsController extends AppController {
/**
* Components
*
* @var array
*/
public $components = array('Paginator');
/**
* index method
*
* @return void
*/
public function index() {
$this->Log->recursive = 0;
$this->set('logs', $this->Paginator->paginate());
}
/**
* view method
*
* @throws NotFoundException
* @param string $id
* @return void
*/
public function view($id = null) {
if (!$this->Log->exists($id)) {
throw new NotFoundException(__('Invalid log'));
}
$options = array('conditions' => array('Log.' . $this->Log->primaryKey => $id));
$this->set('log', $this->Log->find('first', $options));
}
/**
* add method
*
* @return void
*/
public function add() {
if ($this->request->is('post')) {
$this->Log->create();
if ($this->Log->save($this->request->data)) {
return $this->flash(__('The log has been saved.'), array('action' => 'index'));
}
}
}
/**
* edit method
*
* @throws NotFoundException
* @param string $id
* @return void
*/
public function edit($id = null) {
if (!$this->Log->exists($id)) {
throw new NotFoundException(__('Invalid log'));
}
if ($this->request->is(array('post', 'put'))) {
if ($this->Log->save($this->request->data)) {
return $this->flash(__('The log has been saved.'), array('action' => 'index'));
}
} else {
$options = array('conditions' => array('Log.' . $this->Log->primaryKey => $id));
$this->request->data = $this->Log->find('first', $options);
}
}
/**
* delete method
*
* @throws NotFoundException
* @param string $id
* @return void
*/
public function delete($id = null) {
$this->Log->id = $id;
if (!$this->Log->exists()) {
throw new NotFoundException(__('Invalid log'));
}
$this->request->allowMethod('post', 'delete');
if ($this->Log->delete()) {
return $this->flash(__('The log has been deleted.'), array('action' => 'index'));
} else {
return $this->flash(__('The log could not be deleted. Please, try again.'), array('action' => 'index'));
}
}}

View File

@ -108,4 +108,21 @@ class MonitorsController extends AppController {
} else {
return $this->flash(__('The monitor could not be deleted. Please, try again.'), array('action' => 'index'));
}
}}
}
public function sourceTypes() {
$sourceTypes = $this->Monitor->query("describe Monitors Type;");
preg_match('/^enum\((.*)\)$/', $sourceTypes[0]['COLUMNS']['Type'], $matches);
foreach( explode(',', $matches[1]) as $value ) {
$enum[] = trim( $value, "'" );
}
$this->set(array(
'sourceTypes' => $enum,
'_serialize' => array('sourceTypes')
));
}
}

23
web/api/app/Model/Log.php Normal file
View File

@ -0,0 +1,23 @@
<?php
App::uses('AppModel', 'Model');
/**
* Log Model
*
*/
class Log extends AppModel {
/**
* Use table
*
* @var mixed False or table name
*/
public $useTable = 'Logs';
/**
* Primary key field
*
* @var string
*/
public $primaryKey = 'TimeKey';
}

View File

@ -0,0 +1 @@
echo json_encode($config);

View File

@ -0,0 +1,23 @@
<div class="logs form">
<?php echo $this->Form->create('Log'); ?>
<fieldset>
<legend><?php echo __('Add Log'); ?></legend>
<?php
echo $this->Form->input('Component');
echo $this->Form->input('Pid');
echo $this->Form->input('Level');
echo $this->Form->input('Code');
echo $this->Form->input('Message');
echo $this->Form->input('File');
echo $this->Form->input('Line');
?>
</fieldset>
<?php echo $this->Form->end(__('Submit')); ?>
</div>
<div class="actions">
<h3><?php echo __('Actions'); ?></h3>
<ul>
<li><?php echo $this->Html->link(__('List Logs'), array('action' => 'index')); ?></li>
</ul>
</div>

View File

@ -0,0 +1,25 @@
<div class="logs form">
<?php echo $this->Form->create('Log'); ?>
<fieldset>
<legend><?php echo __('Edit Log'); ?></legend>
<?php
echo $this->Form->input('TimeKey');
echo $this->Form->input('Component');
echo $this->Form->input('Pid');
echo $this->Form->input('Level');
echo $this->Form->input('Code');
echo $this->Form->input('Message');
echo $this->Form->input('File');
echo $this->Form->input('Line');
?>
</fieldset>
<?php echo $this->Form->end(__('Submit')); ?>
</div>
<div class="actions">
<h3><?php echo __('Actions'); ?></h3>
<ul>
<li><?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $this->Form->value('Log.TimeKey')), null, __('Are you sure you want to delete # %s?', $this->Form->value('Log.TimeKey'))); ?></li>
<li><?php echo $this->Html->link(__('List Logs'), array('action' => 'index')); ?></li>
</ul>
</div>

View File

@ -0,0 +1,52 @@
<div class="logs index">
<h2><?php echo __('Logs'); ?></h2>
<table cellpadding="0" cellspacing="0">
<tr>
<th><?php echo $this->Paginator->sort('TimeKey'); ?></th>
<th><?php echo $this->Paginator->sort('Component'); ?></th>
<th><?php echo $this->Paginator->sort('Pid'); ?></th>
<th><?php echo $this->Paginator->sort('Level'); ?></th>
<th><?php echo $this->Paginator->sort('Code'); ?></th>
<th><?php echo $this->Paginator->sort('Message'); ?></th>
<th><?php echo $this->Paginator->sort('File'); ?></th>
<th><?php echo $this->Paginator->sort('Line'); ?></th>
<th class="actions"><?php echo __('Actions'); ?></th>
</tr>
<?php foreach ($logs as $log): ?>
<tr>
<td><?php echo h($log['Log']['TimeKey']); ?>&nbsp;</td>
<td><?php echo h($log['Log']['Component']); ?>&nbsp;</td>
<td><?php echo h($log['Log']['Pid']); ?>&nbsp;</td>
<td><?php echo h($log['Log']['Level']); ?>&nbsp;</td>
<td><?php echo h($log['Log']['Code']); ?>&nbsp;</td>
<td><?php echo h($log['Log']['Message']); ?>&nbsp;</td>
<td><?php echo h($log['Log']['File']); ?>&nbsp;</td>
<td><?php echo h($log['Log']['Line']); ?>&nbsp;</td>
<td class="actions">
<?php echo $this->Html->link(__('View'), array('action' => 'view', $log['Log']['TimeKey'])); ?>
<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $log['Log']['TimeKey'])); ?>
<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $log['Log']['TimeKey']), array(), __('Are you sure you want to delete # %s?', $log['Log']['TimeKey'])); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<p>
<?php
echo $this->Paginator->counter(array(
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
));
?> </p>
<div class="paging">
<?php
echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
echo $this->Paginator->numbers(array('separator' => ''));
echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
?>
</div>
</div>
<div class="actions">
<h3><?php echo __('Actions'); ?></h3>
<ul>
<li><?php echo $this->Html->link(__('New Log'), array('action' => 'add')); ?></li>
</ul>
</div>

View File

@ -0,0 +1,54 @@
<div class="logs view">
<h2><?php echo __('Log'); ?></h2>
<dl>
<dt><?php echo __('TimeKey'); ?></dt>
<dd>
<?php echo h($log['Log']['TimeKey']); ?>
&nbsp;
</dd>
<dt><?php echo __('Component'); ?></dt>
<dd>
<?php echo h($log['Log']['Component']); ?>
&nbsp;
</dd>
<dt><?php echo __('Pid'); ?></dt>
<dd>
<?php echo h($log['Log']['Pid']); ?>
&nbsp;
</dd>
<dt><?php echo __('Level'); ?></dt>
<dd>
<?php echo h($log['Log']['Level']); ?>
&nbsp;
</dd>
<dt><?php echo __('Code'); ?></dt>
<dd>
<?php echo h($log['Log']['Code']); ?>
&nbsp;
</dd>
<dt><?php echo __('Message'); ?></dt>
<dd>
<?php echo h($log['Log']['Message']); ?>
&nbsp;
</dd>
<dt><?php echo __('File'); ?></dt>
<dd>
<?php echo h($log['Log']['File']); ?>
&nbsp;
</dd>
<dt><?php echo __('Line'); ?></dt>
<dd>
<?php echo h($log['Log']['Line']); ?>
&nbsp;
</dd>
</dl>
</div>
<div class="actions">
<h3><?php echo __('Actions'); ?></h3>
<ul>
<li><?php echo $this->Html->link(__('Edit Log'), array('action' => 'edit', $log['Log']['TimeKey'])); ?> </li>
<li><?php echo $this->Form->postLink(__('Delete Log'), array('action' => 'delete', $log['Log']['TimeKey']), null, __('Are you sure you want to delete # %s?', $log['Log']['TimeKey'])); ?> </li>
<li><?php echo $this->Html->link(__('List Logs'), array('action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(__('New Log'), array('action' => 'add')); ?> </li>
</ul>
</div>

View File

@ -854,11 +854,14 @@ if ( !empty($action) )
}
elseif ( $action == "group" )
{
if ( !empty($_POST['gid']) ) {
dbQuery( "UPDATE Groups SET Name=?, MonitorIds=? WHERE Id=?", array($_POST['newGroup']['Name'], $_POST['newGroup']['MonitorIds'], $_POST['gid']) );
} else {
dbQuery( "INSERT INTO Groups SET Name=?, MonitorIds=?", array( $_POST['newGroup']['Name'], empty($_POST['newGroup']['MonitorIds']) ? array() : $_POST['newGroup']['MonitorIds'] ) );
}
# Should probably verfy that each monitor id is a valid monitor, that we have access to. HOwever at the moment, you have to have System permissions to do this
$monitors = empty( $_POST['newGroup']['MonitorIds'] ) ? NULL : implode(',', $_POST['newGroup']['MonitorIds']);
if ( !empty($_POST['gid']) ) {
dbQuery( "UPDATE Groups SET Name=?, MonitorIds=? WHERE Id=?", array($_POST['newGroup']['Name'], $monitors, $_POST['gid']) );
} else {
dbQuery( "INSERT INTO Groups SET Name=?, MonitorIds=?", array( $_POST['newGroup']['Name'], $monitors ) );
}
$refreshParent = true;
$view = 'none';
}

View File

@ -75,9 +75,9 @@ $SLANG = array(
'32BitColour' => 'Couleur 32 bit', // Added - 2011-06-15
'8BitGrey' => 'Gris 8 bit',
'Action' => 'Action',
'Actual' => 'Réel',
'Actual' => 'Réel',
'AddNewControl' => 'Add New Control',
'AddNewMonitor' => 'Aj. nouv. écran',
'AddNewMonitor' => 'Aj. nouv. écran',
'AddNewUser' => 'Aj. nouv. util.',
'AddNewZone' => 'Aj. nouv. zone',
'Alarm' => 'Alarme',
@ -91,8 +91,8 @@ $SLANG = array(
'Alert' => 'Alerte',
'All' => 'Tous',
'Apply' => 'Appliquer',
'ApplyingStateChange' => 'Appl. chgt état',
'ArchArchived' => 'Archivé seul.',
'ApplyingStateChange' => 'Appl. chgt état',
'ArchArchived' => 'Archivé seul.',
'ArchUnarchived' => 'Non-arch. seul.',
'Archive' => 'Archiver',
'Archived' => 'Archived',
@ -106,12 +106,12 @@ $SLANG = array(
'AttrDateTime' => 'Date/temps',
'AttrDiskBlocks' => 'Disk Blocks',
'AttrDiskPercent' => 'Disk Percent',
'AttrDuration' => 'Durée',
'AttrDuration' => 'Durée',
'AttrFrames' => 'Images',
'AttrId' => 'Id',
'AttrMaxScore' => 'Score max.',
'AttrMonitorId' => 'N° écran',
'AttrMonitorName' => 'Nom écran',
'AttrMonitorId' => 'N° écran',
'AttrMonitorName' => 'Nom écran',
'AttrName' => 'Name',
'AttrNotes' => 'Notes',
'AttrSystemLoad' => 'System Load',
@ -139,7 +139,7 @@ $SLANG = array(
'BadLabelX' => 'Label X co-ordinate must be set to an integer of zero or more',
'BadLabelY' => 'Label Y co-ordinate must be set to an integer of zero or more',
'BadMaxFPS' => 'Maximum FPS must be a positive integer or floating point value',
'BadNameChars' => 'Les noms ne peuvent contenir que des lettres, chiffres, trait d\'union ou souligné',
'BadNameChars' => 'Les noms ne peuvent contenir que des lettres, chiffres, trait d\'union ou souligné',
'BadPalette' => 'Palette must be set to a valid value', // Added - 2009-03-31
'BadPath' => 'Path must be set to a valid value',
'BadPort' => 'Port must be set to a valid number',
@ -157,7 +157,7 @@ $SLANG = array(
'BlobPx' => 'Px forme',
'BlobSizes' => 'Taille forme',
'Blobs' => 'Formes',
'Brightness' => 'Luminosité;',
'Brightness' => 'Luminosité;',
'Buffers' => 'Tampons',
'CanAutoFocus' => 'Can Auto Focus',
'CanAutoGain' => 'Can Auto Gain',
@ -204,7 +204,7 @@ $SLANG = array(
'CapturePalette' => 'palette capture',
'CaptureWidth' => 'Larg. capture',
'Cause' => 'Cause',
'CheckMethod' => 'Méthode vérif. alarme',
'CheckMethod' => 'Méthode vérif. alarme',
'ChooseDetectedCamera' => 'Choose Detected Camera', // Added - 2009-03-31
'ChooseFilter' => 'Choisir filtre',
'ChooseLogFormat' => 'Choose a log format', // Added - 2011-06-17
@ -216,7 +216,7 @@ $SLANG = array(
'Command' => 'Command',
'Component' => 'Component', // Added - 2011-06-16
'Config' => 'Config',
'ConfiguredFor' => 'Configuré pour',
'ConfiguredFor' => 'Configuré pour',
'ConfirmDeleteEvents' => 'Are you sure you wish to delete the selected events?',
'ConfirmPassword' => 'Confirmer mt de pass.',
'ConjAnd' => 'et',
@ -243,13 +243,13 @@ $SLANG = array(
'Delete' => 'Eff.',
'DeleteAndNext' => 'Eff. &amp; suiv.',
'DeleteAndPrev' => 'Eff. &amp; prec.',
'DeleteSavedFilter' => 'Eff. filtre sauvé',
'DeleteSavedFilter' => 'Eff. filtre sauvé',
'Description' => 'Description',
'DetectedCameras' => 'Detected Cameras', // Added - 2009-03-31
'Device' => 'Device', // Added - 2009-02-08
'DeviceChannel' => 'Canal caméra',
'DeviceFormat' => 'Format caméra',
'DeviceNumber' => 'Numéro caméra',
'DeviceChannel' => 'Canal caméra',
'DeviceFormat' => 'Format caméra',
'DeviceNumber' => 'Numéro caméra',
'DevicePath' => 'Device Path',
'Devices' => 'Devices',
'Dimensions' => 'Dimensions',
@ -269,22 +269,22 @@ $SLANG = array(
'DoNativeMotionDetection'=> 'Do Native Motion Detection',
'Download' => 'Download',
'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
'Duration' => 'Durée',
'Duration' => 'Durée',
'Edit' => 'Editer',
'Email' => 'Courriel',
'EnableAlarms' => 'Enable Alarms',
'Enabled' => 'Activé',
'Enabled' => 'Activé',
'EnterNewFilterName' => 'Entrer nom nouv. filtre',
'Error' => 'Erreur',
'ErrorBrackets' => 'Erreur, vérifiez que toutes les parenthèses ouvertes sont fermées',
'ErrorValidValue' => 'Erreur, vérifiez que tous les termes ont une valeur valide',
'ErrorBrackets' => 'Erreur, vérifiez que toutes les parenthèses ouvertes sont fermées',
'ErrorValidValue' => 'Erreur, vérifiez que tous les termes ont une valeur valide',
'Etc' => 'etc',
'Event' => 'Evènt',
'EventFilter' => 'Filtre evènt',
'Event' => 'Evènt',
'EventFilter' => 'Filtre evènt',
'EventId' => 'Event Id',
'EventName' => 'Event Name',
'EventPrefix' => 'Event Prefix',
'Events' => 'Evènts',
'Events' => 'Evènts',
'Exclude' => 'Exclure',
'Execute' => 'Execute',
'Export' => 'Export',
@ -332,8 +332,8 @@ $SLANG = array(
'ForceAlarm' => 'Force Alarme',
'Format' => 'Format',
'Frame' => 'Image',
'FrameId' => 'N° image',
'FrameRate' => 'Débit image',
'FrameId' => 'N° image',
'FrameRate' => 'Débit image',
'FrameSkip' => 'Saut image',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'images',
@ -341,8 +341,8 @@ $SLANG = array(
'Function' => 'Fonction',
'Gain' => 'Gain',
'General' => 'General',
'GenerateVideo' => 'Générer Vidéo',
'GeneratingVideo' => 'Génération Vidéo',
'GenerateVideo' => 'Générer Vidéo',
'GeneratingVideo' => 'Génération Vidéo',
'GoToZoneMinder' => 'Aller sur ZoneMinder.com',
'Grey' => 'Gris',
'Group' => 'Group',
@ -363,7 +363,7 @@ $SLANG = array(
'Home' => 'Home',
'Hour' => 'Heure',
'Hue' => 'Teinte',
'Id' => 'N°',
'Id' => 'N°',
'Idle' => 'Vide',
'Ignore' => 'Ignorer',
'Image' => 'Image',
@ -371,7 +371,7 @@ $SLANG = array(
'Images' => 'Images',
'In' => 'In',
'Include' => 'Inclure',
'Inverted' => 'Inversé',
'Inverted' => 'Inversé',
'Iris' => 'Iris',
'KeyString' => 'Key String',
'Label' => 'Label',
@ -388,11 +388,11 @@ $SLANG = array(
'Load' => 'Load',
'Local' => 'Local',
'Log' => 'Log', // Added - 2011-06-16
'LoggedInAs' => 'Connecté cô',
'LoggedInAs' => 'Connecté cô',
'Logging' => 'Logging', // Added - 2011-06-16
'LoggingIn' => 'Connexion',
'Login' => 'Login',
'Logout' => 'Déconnexion',
'Logout' => 'Déconnexion',
'Logs' => 'Logs', // Added - 2011-06-17
'Low' => 'Bas',
'LowBW' => 'Basse&nbsp;N/B',
@ -430,10 +430,10 @@ $SLANG = array(
'Message' => 'Message', // Added - 2011-06-16
'MinAlarmAreaLtMax' => 'Minimum alarm area should be less than maximum',
'MinAlarmAreaUnset' => 'You must specify the minimum alarm pixel count',
'MinBlobAreaLtMax' => 'Aire blob min. doit ê < aire blob maximum',
'MinBlobAreaLtMax' => 'Aire blob min. doit ê < aire blob maximum',
'MinBlobAreaUnset' => 'You must specify the minimum blob pixel count',
'MinBlobLtMinFilter' => 'Minimum blob area should be less than or equal to minimum filter area',
'MinBlobsLtMax' => 'Blobs min. doit ê < blobs max.',
'MinBlobsLtMax' => 'Blobs min. doit ê < blobs max.',
'MinBlobsUnset' => 'You must specify the minimum blob count',
'MinFilterAreaLtMax' => 'Minimum filter area should be less than maximum',
'MinFilterAreaUnset' => 'You must specify the minimum filter pixel count',
@ -450,7 +450,7 @@ $SLANG = array(
'MinPanRange' => 'Min Pan Range',
'MinPanSpeed' => 'Min Pan Speed',
'MinPanStep' => 'Min Pan Step',
'MinPixelThresLtMax' => 'Seuil pixel min. doit ê < seuil pixel max.',
'MinPixelThresLtMax' => 'Seuil pixel min. doit ê < seuil pixel max.',
'MinPixelThresUnset' => 'You must specify a minimum pixel threshold',
'MinTiltRange' => 'Min Tilt Range',
'MinTiltSpeed' => 'Min Tilt Speed',
@ -463,7 +463,7 @@ $SLANG = array(
'MinZoomStep' => 'Min Zoom Step',
'Misc' => 'Div.',
'Monitor' => 'Ecran',
'MonitorIds' => 'N°&nbsp;écran',
'MonitorIds' => 'N°&nbsp;écran',
'MonitorPreset' => 'Monitor Preset',
'MonitorPresetIntro' => 'Select an appropriate preset from the list below.<br><br>Please note that this may overwrite any values you already have configured for this monitor.<br><br>',
'MonitorProbe' => 'Monitor Probe', // Added - 2009-03-31
@ -478,27 +478,27 @@ $SLANG = array(
'Mtg3widgrd' => '3-wide grid', // Added 2013.08.15.
'Mtg4widgrd' => '4-wide grid', // Added 2013.08.15.
'Mtg3widgrx' => '3-wide grid, scaled, enlarge on alarm', // Added 2013.08.15.
'MustBeGe' => 'doit être sup. ou égal à',
'MustBeLe' => 'doit être inf. ou égal à',
'MustBeGe' => 'doit être sup. ou égal à',
'MustBeLe' => 'doit être inf. ou égal à',
'MustConfirmPassword' => 'Confirmez le mot de passe',
'MustSupplyPassword' => 'Entrez un mot de passe',
'MustSupplyUsername' => 'Entrez un nom d\'utilisateur',
'Name' => 'Nom',
'Near' => 'Near',
'Network' => 'Réseau',
'Network' => 'Réseau',
'New' => 'Nouv.',
'NewGroup' => 'New Group',
'NewLabel' => 'New Label',
'NewPassword' => 'Nouv. mt de passe',
'NewState' => 'Nv état',
'NewState' => 'Nv état',
'NewUser' => 'Nv util.',
'Next' => 'Suiv.',
'No' => 'Non',
'NoDetectedCameras' => 'No Detected Cameras', // Added - 2009-03-31
'NoFramesRecorded' => 'Pas d\'image enregistrée pour cet évènement',
'NoFramesRecorded' => 'Pas d\'image enregistrée pour cet évènement',
'NoGroup' => 'No Group',
'NoSavedFilters' => 'Pasfiltressauv',
'NoStatisticsRecorded' => 'Pas de statistiques disponibles pour cet évènmnt/imag.',
'NoStatisticsRecorded' => 'Pas de statistiques disponibles pour cet évènmnt/imag.',
'None' => 'Aucun',
'NoneAvailable' => 'Aucun disponible',
'Normal' => 'Normal',
@ -506,12 +506,12 @@ $SLANG = array(
'NumPresets' => 'Num Presets',
'Off' => 'Off',
'On' => 'On',
'OpEq' => 'égal à',
'OpGt' => 'sup. à',
'OpGtEq' => 'plus grand ou égal à',
'OpEq' => 'égal à',
'OpGt' => 'sup. à',
'OpGtEq' => 'plus grand ou égal à',
'OpIn' => 'en lot',
'OpLt' => 'inf. à',
'OpLtEq' => 'inf. ou égal à',
'OpLt' => 'inf. à',
'OpLtEq' => 'inf. ou égal à',
'OpMatches' => 'correspond',
'OpNe' => 'diff. de',
'OpNotIn' => 'pas en lot',
@ -530,9 +530,9 @@ $SLANG = array(
'PanLeft' => 'Pan Left',
'PanRight' => 'Pan Right',
'PanTilt' => 'Pan/Tilt',
'Parameter' => 'Paramètre',
'Parameter' => 'Paramètre',
'Password' => 'Mt de passe',
'PasswordsDifferent' => 'Les 2 mots de passe sont différents',
'PasswordsDifferent' => 'Les 2 mots de passe sont différents',
'Paths' => 'Paths',
'Pause' => 'Pause',
'Phone' => 'Phone',
@ -553,11 +553,11 @@ $SLANG = array(
'Prev' => 'Prec.',
'Probe' => 'Probe', // Added - 2009-03-31
'Protocol' => 'Protocol',
'Rate' => 'Débit',
'Real' => 'Réel',
'Rate' => 'Débit',
'Real' => 'Réel',
'Record' => 'Enreg.',
'RefImageBlendPct' => 'Reference Image Blend %ge',
'Refresh' => 'Rafraîchir',
'Refresh' => 'Rafraîchir',
'Remote' => 'Remote',
'RemoteHostName' => 'Remote Host Name',
'RemoteHostPath' => 'Remote Host Path',
@ -572,10 +572,10 @@ $SLANG = array(
'ReplayGapless' => 'Gapless Events',
'ReplaySingle' => 'Single Event',
'Reset' => 'Reset',
'ResetEventCounts' => 'Rem. à 0 comptage des évts',
'Restart' => 'Redémarrer',
'Restarting' => 'Redémarrage',
'RestrictedCameraIds' => 'N° caméras confid.',
'ResetEventCounts' => 'Rem. à 0 comptage des évts',
'Restart' => 'Redémarrer',
'Restarting' => 'Redémarrage',
'RestrictedCameraIds' => 'N° caméras confid.',
'RestrictedMonitors' => 'Restricted Monitors',
'ReturnDelay' => 'Return Delay',
'ReturnLocation' => 'Return Location',
@ -599,9 +599,9 @@ $SLANG = array(
'SelectMonitors' => 'Select Monitors',
'SelfIntersecting' => 'Polygon edges must not intersect',
'Set' => 'Set',
'SetNewBandwidth' => 'Régler la bande passante',
'SetNewBandwidth' => 'Régler la bande passante',
'SetPreset' => 'Set Preset',
'Settings' => 'Réglages',
'Settings' => 'Réglages',
'ShowFilterWindow' => 'Montrerfen.filtre',
'ShowTimeline' => 'Show Timeline',
'SignalCheckColour' => 'Signal Check Colour',
@ -620,7 +620,7 @@ $SLANG = array(
'SpeedLow' => 'Low Speed',
'SpeedMedium' => 'Medium Speed',
'SpeedTurbo' => 'Turbo Speed',
'Start' => 'Démarrer',
'Start' => 'Démarrer',
'State' => 'Etat',
'Stats' => 'Stats',
'Status' => 'Statut',
@ -633,11 +633,11 @@ $SLANG = array(
'StepSmall' => 'Small Step',
'Stills' => 'Photos',
'Stop' => 'Stop',
'Stopped' => 'Arrêté',
'Stopped' => 'Arrêté',
'Stream' => 'Flux',
'StreamReplayBuffer' => 'Stream Replay Image Buffer',
'Submit' => 'Submit',
'System' => 'Système',
'System' => 'Système',
'SystemLog' => 'System Log', // Added - 2011-06-16
'Tele' => 'Tele',
'Thumbnail' => 'Thumbnail',
@ -660,17 +660,17 @@ $SLANG = array(
'TotalBrScore' => 'Score<br/>total',
'TrackDelay' => 'Track Delay',
'TrackMotion' => 'Track Motion',
'Triggers' => 'Déclenchements',
'Triggers' => 'Déclenchements',
'TurboPanSpeed' => 'Turbo Pan Speed',
'TurboTiltSpeed' => 'Turbo Tilt Speed',
'Type' => 'Type',
'Unarchive' => 'Désarchiv.',
'Unarchive' => 'Désarchiv.',
'Undefined' => 'Undefined', // Added - 2009-02-08
'Units' => 'Unités',
'Units' => 'Unités',
'Unknown' => 'Inconnu',
'Update' => 'Update',
'UpdateAvailable' => 'Mise à jour de ZM dispo.',
'UpdateNotNecessary' => 'Pas de mise à jour dispo.',
'UpdateAvailable' => 'Mise à jour de ZM dispo.',
'UpdateNotNecessary' => 'Pas de mise à jour dispo.',
'Updated' => 'Updated', // Added - 2011-06-16
'Upload' => 'Upload', // Added - 2011-08-23
'UsedPlugins' => 'Used Plugins',
@ -687,18 +687,18 @@ $SLANG = array(
'VersionRemindHour' => 'Me rappleler dans 1 h.',
'VersionRemindNever' => 'Ne pas avertir des nvelles versions',
'VersionRemindWeek' => 'Me rappeler ds 1 sem.',
'Video' => 'Vidéo',
'Video' => 'Vidéo',
'VideoFormat' => 'Video Format',
'VideoGenFailed' => 'Echec génération vidéo!',
'VideoGenFailed' => 'Echec génération vidéo!',
'VideoGenFiles' => 'Existing Video Files',
'VideoGenNoFiles' => 'No Video Files Found',
'VideoGenParms' => 'Paramètres génération vidéo',
'VideoGenParms' => 'Paramètres génération vidéo',
'VideoGenSucceeded' => 'Video Generation Succeeded!',
'VideoSize' => 'taille vidéo',
'VideoSize' => 'taille vidéo',
'View' => 'Voir',
'ViewAll' => 'Voir tt',
'ViewEvent' => 'View Event',
'ViewPaged' => 'Vue recherchée',
'ViewPaged' => 'Vue recherchée',
'Wake' => 'Wake',
'WarmupFrames' => 'Images test',
'Watch' => 'Regarder',
@ -710,12 +710,12 @@ $SLANG = array(
'Wide' => 'Wide',
'X' => 'X',
'X10' => 'X10',
'X10ActivationString' => 'X10:chaîne activation',
'X10InputAlarmString' => 'X10:chaîne alarme entrée',
'X10OutputAlarmString' => 'X10:chaîne alarme sortie',
'X10ActivationString' => 'X10:chaîne activation',
'X10InputAlarmString' => 'X10:chaîne alarme entrée',
'X10OutputAlarmString' => 'X10:chaîne alarme sortie',
'Y' => 'Y',
'Yes' => 'Oui',
'YouNoPerms' => 'Permissions nécessaires pour cette ressource.',
'YouNoPerms' => 'Permissions nécessaires pour cette ressource.',
'Zone' => 'Zone',
'ZoneAlarmColour' => 'Couleur alarme (Red/Green/Blue)',
'ZoneArea' => 'Zone Area',
@ -737,12 +737,12 @@ $SLANG = array(
// Complex replacements with formatting and/or placements, must be passed through sprintf
$CLANG = array(
'CurrentLogin' => 'Util. Actuel: \'%1$s\'',
'EventCount' => '%1$s %2$s', // par ex. '37 évènts' (voir Vlang ci-dessous)
'LastEvents' => '%1$s derniers %2$s', // par ex. '37 derniers évènts' (voir Vlang ci-dessous)
'LatestRelease' => 'La dernière version est v%1$s, vous avez v%2$s.',
'MonitorCount' => '%1$s %2$s', // par exemple '4 écrans' (voir Vlang ci-dessous)
'EventCount' => '%1$s %2$s', // par ex. '37 évènts' (voir Vlang ci-dessous)
'LastEvents' => '%1$s derniers %2$s', // par ex. '37 derniers évènts' (voir Vlang ci-dessous)
'LatestRelease' => 'La dernière version est v%1$s, vous avez v%2$s.',
'MonitorCount' => '%1$s %2$s', // par exemple '4 écrans' (voir Vlang ci-dessous)
'MonitorFunction' => 'Ecran %1$s Fonction',
'RunningRecentVer' => 'Vs avez la dernière version de ZoneMinder, v%s.',
'RunningRecentVer' => 'Vs avez la dernière version de ZoneMinder, v%s.',
'VersionMismatch' => 'Version mismatch, system is version %1$s, database is %2$s.', // Added - 2011-05-25
);
@ -780,8 +780,8 @@ $CLANG = array(
// Variable arrays expressing plurality, see the zmVlang description above
$VLANG = array(
'Event' => array( 0=>'évènts', 1=>'évènt', 2=>'évènts' ),
'Monitor' => array( 0=>'écrans', 1=>'écran', 2=>'écrans' ),
'Event' => array( 0=>'évènts', 1=>'évènt', 2=>'évènts' ),
'Monitor' => array( 0=>'écrans', 1=>'écran', 2=>'écrans' ),
);
// You will need to choose or write a function that can correlate the plurality string arrays