Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas
This commit is contained in:
commit
7520f4ddb5
|
@ -137,11 +137,11 @@ set(ZM_WEB_USER "" CACHE STRING
|
|||
set(ZM_WEB_GROUP "" CACHE STRING
|
||||
"The group apache or the local web server runs on,
|
||||
Leave empty to be the same as the web user")
|
||||
set(ZM_DIR_EVENTS "events" CACHE PATH
|
||||
"Location where events are recorded to, default: events")
|
||||
set(ZM_DIR_IMAGES "events" CACHE PATH
|
||||
set(ZM_DIR_EVENTS "${ZM_CONTENTDIR}/events" CACHE PATH
|
||||
"Location where events are recorded to, default: ZM_CONTENTDIR/events")
|
||||
set(ZM_DIR_IMAGES "${ZM_CONTENTDIR}/images" CACHE PATH
|
||||
"Location where images, not directly associated with events,
|
||||
are recorded to, default: images")
|
||||
are recorded to, default: ZM_CONTENTDIR/images")
|
||||
set(ZM_DIR_SOUNDS "sounds" CACHE PATH
|
||||
"Location to look for optional sound files, default: sounds")
|
||||
set(ZM_PATH_ZMS "/cgi-bin/nph-zms" CACHE PATH
|
||||
|
@ -154,7 +154,7 @@ set(ZM_PATH_ARP "" CACHE PATH
|
|||
"Full path to compatible arp binary. Leave empty for automatic detection.")
|
||||
set(ZM_CONFIG_DIR "/${CMAKE_INSTALL_SYSCONFDIR}" CACHE PATH
|
||||
"Location of ZoneMinder configuration, default system config directory")
|
||||
set(ZM_CONFIG_SUBDIR "${ZM_CONFIG_DIR}/conf.d" CACHE PATH
|
||||
set(ZM_CONFIG_SUBDIR "${ZM_CONFIG_DIR}/zm/conf.d" CACHE PATH
|
||||
"Location of ZoneMinder configuration subfolder, default: ZM_CONFIG_DIR/conf.d")
|
||||
set(ZM_EXTRA_LIBS "" CACHE STRING
|
||||
"A list of optional libraries, separated by semicolons, e.g. ssl;theora")
|
||||
|
@ -801,11 +801,12 @@ endif(ZM_PERL_SEARCH_PATH)
|
|||
|
||||
# If this is an out-of-source build, copy the files we need to the binary directory
|
||||
if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/conf.d" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/conf.d")
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/conf.d" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/conf.d" PATTERN "*.in" EXCLUDE)
|
||||
endif(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||
|
||||
# Generate files from the .in files
|
||||
configure_file(zm.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" @ONLY)
|
||||
configure_file(conf.d/01-system-paths.conf.in "${CMAKE_CURRENT_BINARY_DIR}/conf.d/01-system-paths.conf" @ONLY)
|
||||
configure_file(zoneminder-config.cmake "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY)
|
||||
configure_file(zmconfgen.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmconfgen.pl" @ONLY)
|
||||
configure_file(zmlinkcontent.sh.in "${CMAKE_CURRENT_BINARY_DIR}/zmlinkcontent.sh" @ONLY)
|
||||
|
@ -850,18 +851,7 @@ endif(zmconfgen_result EQUAL 0)
|
|||
|
||||
# Install zm.conf
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" DESTINATION "${ZM_CONFIG_DIR}")
|
||||
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/conf.d/" DESTINATION "${ZM_CONFIG_SUBDIR}")
|
||||
#install(CODE "
|
||||
#if (NOT EXISTS \"${ZM_CONFIG_DIR}/zm.conf\")
|
||||
#message(STATUS \"No zm.conf at ${CMAKE_CURRENT_BINARY_DIR}/zm.conf. Will install a new zm.conf\")
|
||||
#install(FILES \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf\" DESTINATION \"${ZM_CONFIG_DIR}\")
|
||||
#else (NOT EXISTS \"${ZM_CONFIG_DIR}/zm.conf\")
|
||||
#message(STATUS \"Found zm.conf at ${CMAKE_CURRENT_BINARY_DIR}/zm.conf. Not overwriting. Installing zm.conf.new instead.\")
|
||||
#file(RENAME \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf\" \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf.new\")
|
||||
#install(FILES \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf.new\" DESTINATION \"${ZM_CONFIG_DIR}\")
|
||||
#endif(NOT EXISTS \"${ZM_CONFIG_DIR}/zm.conf\")
|
||||
#")
|
||||
|
||||
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/conf.d/" DESTINATION "${ZM_CONFIG_SUBDIR}" PATTERN "*.in" EXCLUDE)
|
||||
|
||||
# Uninstall target
|
||||
configure_file(
|
||||
|
|
8
INSTALL
8
INSTALL
|
@ -47,7 +47,15 @@ Possible configuration options:
|
|||
ZM_DB_PASS Password of ZoneMinder database user, default: zmpass
|
||||
ZM_WEB_USER The user apache or the local web server runs on. Leave empty for automatic detection. If that fails, you can use this variable to force
|
||||
ZM_WEB_GROUP The group apache or the local web server runs on, Leave empty to be the same as the web user
|
||||
ZM_DIR_EVENTS Location where events are recorded to, default: ZM_CONTENTDIR/events
|
||||
ZM_DIR_IMAGES Location where images, not directly associated with events, are recorded to, default: ZM_CONTENTDIR/images
|
||||
ZM_DIR_SOUNDS Location to look for optional sound files, default: sounds
|
||||
ZM_PATH_ZMS Web url to zms streaming server, default: /cgi-bin/nph-zms
|
||||
Advanced:
|
||||
ZM_PATH_MAP Location to save mapped memory files, default: /dev/shm
|
||||
ZM_PATH_ARP Full path to compatible arp binary. Leave empty for automatic detection.
|
||||
ZM_CONFIG_DIR Location of the main ZoneMinder config file, zm.conf. default: /etc/zm
|
||||
ZM_CONFIG_SUBDIR Location of custom config files. default: ZM_CONFIG_DIR/conf.d
|
||||
ZM_EXTRA_LIBS A list of optional libraries, separated by semicolons, e.g. ssl;theora
|
||||
ZM_MYSQL_ENGINE MySQL engine to use with database, default: InnoDB
|
||||
ZM_NO_MMAP Set to ON to not use mmap shared memory. Shouldn't be enabled unless you experience problems with the shared memory. default: OFF
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder System Paths Configuration
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This config file contains the variables previously found under Options -> Paths
|
||||
#
|
||||
# *** DO NOT EDIT THIS FILE ***
|
||||
#
|
||||
# To make custom changes to the variables below, create a new configuration
|
||||
# file, with an extention of .conf, containing your desired modifications.
|
||||
#
|
||||
|
||||
# Full path to the folder events are recorded to.
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_DIR_EVENTS=@ZM_DIR_EVENTS@
|
||||
|
||||
# Full path to the folder images, not directly associated with events,
|
||||
# are recorded to.
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_DIR_IMAGES=@ZM_DIR_IMAGES@
|
||||
|
||||
# Foldername under the webroot where ZoneMinder looks for optional sound files
|
||||
# to play when an alarm is detected.
|
||||
ZM_DIR_SOUNDS=@ZM_DIR_SOUNDS@
|
||||
|
||||
# Full path to the folder where exported archives are stored
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_DIR_EXPORTS=@ZM_TMPDIR@
|
||||
|
||||
# ZoneMinder url path to the zms streaming server
|
||||
ZM_PATH_ZMS=@ZM_PATH_ZMS@
|
||||
|
||||
# Full Path to ZoneMinder's mapped memory files
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_PATH_MAP=@ZM_PATH_MAP@
|
||||
|
||||
# Full Path to ZoneMinder's socket folder
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_PATH_SOCKS=@ZM_SOCKDIR@
|
||||
|
||||
# Full path to ZoneMinder's log folder
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_PATH_LOGS=@ZM_LOGDIR@
|
||||
|
||||
# Full path to ZoneMinder's swap folder
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_PATH_SWAP=@ZM_TMPDIR@
|
||||
|
||||
# Full path to optional arp binary
|
||||
# ZoneMinder will find the arp binary automatically on most systems
|
||||
ZM_PATH_ARP=@ZM_PATH_ARP@
|
|
@ -0,0 +1,12 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Multiserver Configuration
|
||||
#
|
||||
# ==========================================================================
|
||||
# Do NOT set ZM_SERVER_HOST if you are not using Multi-Server
|
||||
# You have been warned
|
||||
#
|
||||
# The name specified here must have a corresponding entry
|
||||
# in the Servers tab under Options
|
||||
#ZM_SERVER_HOST=
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
# Do NOT set ZM_SERVER_HOST if you are not using Multi-Server
|
||||
# You have been warned
|
||||
#
|
||||
# The name specified here must have a corresponding entry
|
||||
# in the Servers tab under Options
|
||||
ZM_SERVER_HOST=
|
||||
|
|
@ -18,7 +18,6 @@ override_dh_auto_configure:
|
|||
-DZM_TMPDIR=/var/tmp/zm \
|
||||
-DZM_LOGDIR=/var/log/zm \
|
||||
-DZM_WEBDIR=/usr/share/zoneminder/www \
|
||||
-DZM_CONTENTDIR=/var/cache/zoneminder \
|
||||
-DZM_CGIDIR=/usr/lib/zoneminder/cgi-bin \
|
||||
-DZM_WEB_USER=www-data \
|
||||
-DZM_WEB_GROUP=www-data \
|
||||
|
|
|
@ -9,15 +9,15 @@ else(ZM_TARGET_DISTRO MATCHES "^el")
|
|||
message([WARNING] "Unknown Build Option Detected" ...)
|
||||
endif(ZM_TARGET_DISTRO MATCHES "^el")
|
||||
|
||||
if((ZM_TARGET_DISTRO STREQUAL "el6") AND (ZM_WEB_USER STREQUAL "nginx"))
|
||||
message([FATAL_ERROR] "Nginx is Not a Supported Build Option on EL6 Target Distro" ...)
|
||||
endif((ZM_TARGET_DISTRO STREQUAL "el6") AND (ZM_WEB_USER STREQUAL "nginx"))
|
||||
if((NOT ZM_TARGET_DISTRO MATCHES "^fc") AND (ZM_WEB_USER STREQUAL "nginx"))
|
||||
message([FATAL_ERROR] "Experimental Nginx support is currently only supported on Fedora" ...)
|
||||
endif((NOT ZM_TARGET_DISTRO MATCHES "^fc") AND (ZM_WEB_USER STREQUAL "nginx"))
|
||||
|
||||
# Configure the zoneminder service files
|
||||
if(ZM_TARGET_DISTRO STREQUAL "el6")
|
||||
configure_file(sysvinit/zoneminder.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.sysvinit @ONLY)
|
||||
configure_file(sysvinit/zoneminder.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.logrotate @ONLY)
|
||||
configure_file(sysvinit/zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY)
|
||||
configure_file(apache/zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY)
|
||||
else(ZM_TARGET_DISTRO STREQUAL "el6")
|
||||
configure_file(systemd/zoneminder.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.logrotate @ONLY)
|
||||
if(ZM_WEB_USER STREQUAL "nginx")
|
||||
|
@ -28,7 +28,7 @@ else(ZM_TARGET_DISTRO STREQUAL "el6")
|
|||
configure_file(nginx/README.Fedora ${CMAKE_CURRENT_SOURCE_DIR}/readme/README.Fedora COPYONLY)
|
||||
else(ZM_WEB_USER STREQUAL "nginx")
|
||||
configure_file(systemd/zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY)
|
||||
configure_file(systemd/zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY)
|
||||
configure_file(apache/zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY)
|
||||
configure_file(systemd/zoneminder.tmpfiles.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.tmpfiles @ONLY)
|
||||
endif(ZM_WEB_USER STREQUAL "nginx")
|
||||
endif(ZM_TARGET_DISTRO STREQUAL "el6")
|
||||
|
@ -55,10 +55,7 @@ install(DIRECTORY zoneminder DESTINATION /var/run DIRECTORY_PERMISSIONS OWNER_WR
|
|||
install(DIRECTORY zoneminder-upload DESTINATION /var/spool DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY events images temp DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
# Create symlinks
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/events \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/events\")")
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/images \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/images\")")
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/temp \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/temp\")")
|
||||
# Symlink the cake php temp folder to the ZoneMinder temp folder
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../../../../../var/lib/zoneminder/temp \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/api/app/tmp\")")
|
||||
|
||||
# Link to Cambozola
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# ZoneMinder systemd unit file for CentOS 7
|
||||
# ZoneMinder systemd unit file for RedHat distros and clones
|
||||
|
||||
[Unit]
|
||||
Description=ZoneMinder CCTV recording and security system
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
#
|
||||
# ZoneMinder Apache configuration file
|
||||
# With SSLRequire and HTTPS auto redirect
|
||||
# Modify this configuration to suit your requirements
|
||||
#
|
||||
|
||||
# Auto Redirect HTTP requests to HTTPS
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTPS} !=on
|
||||
RewriteRule ^/?(zm)(.*) https://%{SERVER_NAME}/$1$2 [R,L]
|
||||
|
||||
Alias /zm "@ZM_WEBDIR@"
|
||||
<Directory "@ZM_WEBDIR@">
|
||||
# explicitly set index.php as the only directoryindex
|
||||
DirectoryIndex disabled
|
||||
DirectoryIndex index.php
|
||||
SSLRequireSSL
|
||||
Options -Indexes +MultiViews +FollowSymLinks
|
||||
AllowOverride None
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
ScriptAlias /cgi-bin-zm "@ZM_CGIDIR@"
|
||||
<Directory "@ZM_CGIDIR@">
|
||||
SSLRequireSSL
|
||||
AllowOverride None
|
||||
Options +ExecCGI +FollowSymLinks
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
# For better visibility, the following directives have been migrated from the
|
||||
# default .htaccess files included with the CakePHP project.
|
||||
# Parameters not set here are inherited from the parent directive above.
|
||||
<Directory "@ZM_WEBDIR@/api">
|
||||
RewriteEngine on
|
||||
RewriteRule ^$ app/webroot/ [L]
|
||||
RewriteRule (.*) app/webroot/$1 [L]
|
||||
RewriteBase /zm/api
|
||||
</Directory>
|
||||
|
||||
<Directory "@ZM_WEBDIR@/api/app">
|
||||
RewriteEngine on
|
||||
RewriteRule ^$ webroot/ [L]
|
||||
RewriteRule (.*) webroot/$1 [L]
|
||||
RewriteBase /zm/api
|
||||
</Directory>
|
||||
|
||||
<Directory "@ZM_WEBDIR@/api/app/webroot">
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
RewriteBase /zm/api
|
||||
</Directory>
|
||||
|
|
@ -286,12 +286,18 @@ rm -rf %{_docdir}/%{name}-%{version}
|
|||
%files
|
||||
%license COPYING
|
||||
%doc AUTHORS README.md distros/redhat/readme/README.%{readme_suffix} distros/redhat/readme/README.https distros/redhat/jscalendar-doc
|
||||
|
||||
# We want these two folders to have "normal" read permission
|
||||
# compared to the folder contents
|
||||
%dir %{_sysconfdir}/zm
|
||||
%dir %{_sysconfdir}/zm/conf.d
|
||||
|
||||
# Config folder contents contain sensitive info
|
||||
# and should not be readable by normal users
|
||||
%{_sysconfdir}/zm/conf.d/README
|
||||
# Always overwrite zm.conf now that ZoneMinder supports conf.d folder
|
||||
%attr(640,root,%{zmgid_final}) %{_sysconfdir}/zm/zm.conf
|
||||
%config(noreplace) %attr(640,root,%{zmgid_final}) %{_sysconfdir}/zm/zm.conf
|
||||
%config(noreplace) %attr(640,root,%{zmgid_final}) %{_sysconfdir}/zm/conf.d/*.conf
|
||||
%ghost %attr(640,root,%{zmgid_final}) %{_sysconfdir}/zm/conf.d/zmcustom.conf
|
||||
|
||||
%config(noreplace) %attr(644,root,root) %{wwwconfdir}/zoneminder.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/zoneminder
|
||||
|
|
|
@ -25,7 +25,6 @@ override_dh_auto_configure:
|
|||
-DZM_SOCKDIR="/var/run/zm" \
|
||||
-DZM_TMPDIR="/tmp/zm" \
|
||||
-DZM_CGIDIR="/usr/lib/zoneminder/cgi-bin" \
|
||||
-DZM_CONTENTDIR="/var/cache/zoneminder" \
|
||||
-DZM_DIR_EVENTS="/var/cache/zoneminder/events" \
|
||||
-DZM_DIR_IMAGES="/var/cache/zoneminder/images" \
|
||||
-DZM_PATH_ZMS="/zm/cgi-bin/nph-zms" \
|
||||
|
|
|
@ -1,4 +1 @@
|
|||
/var/cache/zoneminder/events /usr/share/zoneminder/www/events
|
||||
/var/cache/zoneminder/images /usr/share/zoneminder/www/images
|
||||
/var/cache/zoneminder/temp /usr/share/zoneminder/www/temp
|
||||
/tmp/zm /usr/share/zoneminder/www/api/app/tmp
|
||||
|
|
|
@ -58,7 +58,6 @@ override_dh_auto_configure:
|
|||
-DZM_TMPDIR=/var/tmp/zm \
|
||||
-DZM_LOGDIR=/var/log/zm \
|
||||
-DZM_WEBDIR=/usr/share/zoneminder \
|
||||
-DZM_CONTENTDIR=/var/cache/zoneminder \
|
||||
-DZM_CGIDIR=/usr/lib/cgi-bin \
|
||||
-DZM_WEB_USER=www-data \
|
||||
-DZM_WEB_GROUP=www-data \
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
var/cache/zoneminder/events usr/share/zoneminder/www/events
|
||||
var/cache/zoneminder/images usr/share/zoneminder/www/images
|
||||
var/cache/zoneminder/temp usr/share/zoneminder/www/temp
|
|
@ -1 +0,0 @@
|
|||
usr/lib/cgi-bin usr/share/zoneminder/cgi-bin
|
|
@ -25,7 +25,6 @@ override_dh_auto_configure:
|
|||
-DZM_SOCKDIR="/var/run/zm" \
|
||||
-DZM_TMPDIR="/tmp/zm" \
|
||||
-DZM_CGIDIR="/usr/lib/zoneminder/cgi-bin" \
|
||||
-DZM_CONTENTDIR="/var/cache/zoneminder" \
|
||||
-DZM_DIR_EVENTS="/var/cache/zoneminder/events" \
|
||||
-DZM_DIR_IMAGES="/var/cache/zoneminder/images" \
|
||||
-DZM_PATH_ZMS="/zm/cgi-bin/nph-zms"
|
||||
|
|
|
@ -1,4 +1 @@
|
|||
/var/cache/zoneminder/events /usr/share/zoneminder/www/events
|
||||
/var/cache/zoneminder/images /usr/share/zoneminder/www/images
|
||||
/var/cache/zoneminder/temp /usr/share/zoneminder/www/temp
|
||||
/var/tmp /usr/share/zoneminder/www/api/app/tmp
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
|
|
|
@ -238,6 +238,11 @@ sub GenerateVideo {
|
|||
|
||||
sub delete {
|
||||
my $event = $_[0];
|
||||
if ( ! ( $event->{Id} and $event->{MonitorId} and $event->{StartTime} ) ) {
|
||||
my ( $caller, undef, $line ) = caller;
|
||||
Warning( "Can't Delete event $event->{Id} from Monitor $event->{MonitorId} $event->{StartTime} from $caller:$line\n" );
|
||||
return;
|
||||
}
|
||||
Info( "Deleting event $event->{Id} from Monitor $event->{MonitorId} $event->{StartTime}\n" );
|
||||
$ZoneMinder::Database::dbh->ping();
|
||||
# Do it individually to avoid locking up the table for new events
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
|
|
|
@ -1319,14 +1319,15 @@ bool Monitor::Analyse() {
|
|||
score += motion_score;
|
||||
}
|
||||
noteSetMap[MOTION_CAUSE] = zoneSet;
|
||||
|
||||
}
|
||||
} // end if motion_score
|
||||
shared_data->active = signal;
|
||||
}
|
||||
} // end if signal change
|
||||
|
||||
if ( (!signal_change && signal) && n_linked_monitors > 0 ) {
|
||||
bool first_link = true;
|
||||
Event::StringSet noteSet;
|
||||
for ( int i = 0; i < n_linked_monitors; i++ ) {
|
||||
// TODO: Shouldn't we try to connect?
|
||||
if ( linked_monitors[i]->isConnected() ) {
|
||||
if ( linked_monitors[i]->hasAlarmed() ) {
|
||||
if ( !event ) {
|
||||
|
@ -1352,11 +1353,12 @@ bool Monitor::Analyse() {
|
|||
if ( (!signal_change && signal) && (function == RECORD || function == MOCORD) ) {
|
||||
if ( event ) {
|
||||
//TODO: We shouldn't have to do this every time. Not sure why it clears itself if this isn't here??
|
||||
snprintf(video_store_data->event_file, sizeof(video_store_data->event_file), "%s", event->getEventFile());
|
||||
//snprintf(video_store_data->event_file, sizeof(video_store_data->event_file), "%s", event->getEventFile());
|
||||
Debug( 3, "Detected new event at (%d.%d)", timestamp->tv_sec,timestamp->tv_usec );
|
||||
|
||||
if ( section_length ) {
|
||||
int section_mod = timestamp->tv_sec%section_length;
|
||||
// TODO: Wouldn't this be clearer if we just did something like if now - event->start > section_length ?
|
||||
int section_mod = timestamp->tv_sec % section_length;
|
||||
Debug( 3, "Section length (%d) Last Section Mod(%d), new section mod(%d)", section_length, last_section_mod, section_mod );
|
||||
if ( section_mod < last_section_mod ) {
|
||||
//if ( state == IDLE || state == TAPE || event_close_mode == CLOSE_TIME ) {
|
||||
|
@ -1374,8 +1376,8 @@ bool Monitor::Analyse() {
|
|||
} else {
|
||||
last_section_mod = section_mod;
|
||||
}
|
||||
}
|
||||
} // end if section_length
|
||||
} // end if section_length
|
||||
} // end if event
|
||||
|
||||
if ( ! event ) {
|
||||
|
||||
|
|
|
@ -732,8 +732,9 @@ void MonitorStream::runStream() {
|
|||
if ( rmdir( swap_path ) < 0 ) {
|
||||
Error( "Can't rmdir '%s': %s", swap_path, strerror(errno) );
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end if checking for swap_path
|
||||
} // end if buffered_playback
|
||||
|
||||
if ( swap_path ) free( swap_path );
|
||||
closeComms();
|
||||
}
|
||||
|
|
|
@ -138,15 +138,15 @@ if ( is_dir($configSubFolder) ) {
|
|||
# Now that our array our finalized, define each key => value
|
||||
# pair in the array as a constant
|
||||
foreach( $configvals as $key => $value) {
|
||||
define( $key, $value );
|
||||
Configure::write( $matches[1], $matches[2] );
|
||||
define( $key, $value );
|
||||
Configure::write( $key, $value );
|
||||
}
|
||||
|
||||
function process_configfile($configFile) {
|
||||
if ( is_readable( $configFile ) ) {
|
||||
$configvals = array();
|
||||
|
||||
$cfg = fopen( $configFile, "r") or die("Could not open config file.");
|
||||
$cfg = fopen( $configFile, 'r') or die('Could not open config file.');
|
||||
while ( !feof($cfg) ) {
|
||||
$str = fgets( $cfg, 256 );
|
||||
if ( preg_match( '/^\s*$/', $str ))
|
||||
|
|
|
@ -51,7 +51,7 @@ $eventCounts = array(
|
|||
'filter' => array(
|
||||
'Query' => array(
|
||||
'terms' => array(
|
||||
array( 'attr' => "DateTime", 'op' => '>=', 'val' => '-1 day' ),
|
||||
array( 'attr' => 'DateTime', 'op' => '>=', 'val' => '-1 day' ),
|
||||
)
|
||||
)
|
||||
),
|
||||
|
@ -62,7 +62,7 @@ $eventCounts = array(
|
|||
'filter' => array(
|
||||
'Query' => array(
|
||||
'terms' => array(
|
||||
array( 'attr' => "DateTime", 'op' => '>=', 'val' => '-7 day' ),
|
||||
array( 'attr' => 'DateTime', 'op' => '>=', 'val' => '-7 day' ),
|
||||
)
|
||||
)
|
||||
),
|
||||
|
@ -73,7 +73,7 @@ $eventCounts = array(
|
|||
'filter' => array(
|
||||
'Query' => array(
|
||||
'terms' => array(
|
||||
array( 'attr' => "DateTime", 'op' => '>=', 'val' => '-1 month' ),
|
||||
array( 'attr' => 'DateTime', 'op' => '>=', 'val' => '-1 month' ),
|
||||
)
|
||||
)
|
||||
),
|
||||
|
@ -84,7 +84,7 @@ $eventCounts = array(
|
|||
'filter' => array(
|
||||
'Query' => array(
|
||||
'terms' => array(
|
||||
array( 'attr' => "Archived", 'op' => '=', 'val' => '1' ),
|
||||
array( 'attr' => 'Archived', 'op' => '=', 'val' => '1' ),
|
||||
)
|
||||
)
|
||||
),
|
||||
|
@ -107,7 +107,7 @@ for( $i = 0; $i < count($displayMonitors); $i += 1 ) {
|
|||
for ( $j = 0; $j < count($eventCounts); $j += 1 ) {
|
||||
$filter = addFilterTerm( $eventCounts[$j]['filter'], count($eventCounts[$j]['filter']['Query']['terms']), array( 'cnj' => 'and', 'attr' => 'MonitorId', 'op' => '=', 'val' => $monitor['Id'] ) );
|
||||
parseFilter( $filter );
|
||||
$counts[] = "count(if(1".$filter['sql'].",1,NULL)) as EventCount$j";
|
||||
$counts[] = 'count(if(1'.$filter['sql'].",1,NULL)) as EventCount$j";
|
||||
$monitor['eventCounts'][$j]['filter'] = $filter;
|
||||
}
|
||||
$sql = 'select '.join($counts,', ').' from Events as E where MonitorId = ?';
|
||||
|
@ -203,45 +203,27 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
|
|||
<td class="colServer"><?php $Server = new Server( $monitor['ServerId'] ); echo $Server->Name(); ?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$source = '';
|
||||
if ( $monitor['Type'] == 'Local' ) {
|
||||
?>
|
||||
<td class="colSource"><?php echo makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$monitor['Device'].' ('.$monitor['Channel'].')</span>', canEdit( 'Monitors' ) ) ?></td>
|
||||
<?php
|
||||
} elseif ( $monitor['Type'] == 'Remote' ) {
|
||||
?>
|
||||
<td class="colSource"><?php echo makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.preg_replace( '/^.*@/', '', $monitor['Host'] ).'</span>', canEdit( 'Monitors' ) ) ?></td>
|
||||
<?php
|
||||
} elseif ( $monitor['Type'] == 'File' ) {
|
||||
?>
|
||||
<td class="colSource"><?php echo makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.preg_replace( '/^.*\//', '', $monitor['Path'] ).'</span>', canEdit( 'Monitors' ) ) ?></td>
|
||||
<?php
|
||||
$source = $monitor['Device'].' ('.$monitor['Channel'].')';
|
||||
} elseif ( $monitor['Type'] == 'Remote' ) {
|
||||
$source = $monitor['Host'];
|
||||
} elseif ( $monitor['Type'] == 'File' || $monitor['Type'] == 'cURL' ) {
|
||||
$source = preg_replace( '/^.*\//', '', $monitor['Path'] );
|
||||
} elseif ( $monitor['Type'] == 'Ffmpeg' || $monitor['Type'] == 'Libvlc' ) {
|
||||
$domain = parse_url( $monitor['Path'], PHP_URL_HOST );
|
||||
$shortpath = $domain ? $domain : preg_replace( '/^.*\//', '', $monitor['Path'] );
|
||||
if ( $shortpath == '' ) {
|
||||
$shortpath = 'Monitor ' . $monitor['Id'];
|
||||
}
|
||||
?>
|
||||
<td class="colSource"><?php echo makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$shortpath.'</span>', canEdit( 'Monitors' ) ) ?></td>
|
||||
<?php
|
||||
} elseif ( $monitor['Type'] == 'cURL' ) {
|
||||
?>
|
||||
<td class="colSource"><?php echo makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.preg_replace( '/^.*\//', '', $monitor['Path'] ).'</span>', canEdit( 'Monitors' ) ) ?></td>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<td class="colSource"> </td>
|
||||
<?php
|
||||
$source = $domain ? $domain : preg_replace( '/^.*\//', '', $monitor['Path'] );
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ( $source == '' ) {
|
||||
$source = 'Monitor ' . $monitor['Id'];
|
||||
}
|
||||
echo '<td class="colSource">'. makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$source.'</span>', canEdit( 'Monitors' ) ).'</td>';
|
||||
if ( $show_storage_areas ) {
|
||||
?>
|
||||
<td class="colStorage"><?php $Storage = new Storage( $monitor['StorageId'] ); echo $Storage->Name(); ?></td>
|
||||
<?php
|
||||
}
|
||||
|
||||
for ( $i = 0; $i < count($eventCounts); $i++ ) {
|
||||
?>
|
||||
<td class="colEvents"><?php echo makePopupLink( '?view='.$eventsView.'&page=1'.$monitor['eventCounts'][$i]['filter']['query'], $eventsWindow, $eventsView, $monitor['EventCount'.$i], canView( 'Events' ) ) ?></td>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
//
|
||||
|
||||
if ( !canView( 'Events' ) )
|
||||
|
|
|
@ -155,14 +155,14 @@ function fourcc( $a, $b, $c, $d ) {
|
|||
}
|
||||
|
||||
if ( isset( $_REQUEST['newMonitor'] ) ) {
|
||||
# Update the monitor object with whatever has been set so far.
|
||||
# Update the monitor object with whatever has been set so far.
|
||||
$monitor->set( $_REQUEST['newMonitor'] );
|
||||
|
||||
if ( ZM_OPT_X10 )
|
||||
$newX10Monitor = $_REQUEST['newX10Monitor'];
|
||||
} else {
|
||||
# FIXME: Triggers in the db is a comma separated string. Needs to be an array.
|
||||
#$monitor->Triggers()= explode( ',', isset($monitor->Triggers())?$monitor->Triggers:"" );
|
||||
# FIXME: Triggers in the db is a comma separated string. Needs to be an array.
|
||||
#$monitor->Triggers()= explode( ',', isset($monitor->Triggers())?$monitor->Triggers:"" );
|
||||
if ( ZM_OPT_X10 )
|
||||
$newX10Monitor = $x10Monitor;
|
||||
}
|
||||
|
@ -178,9 +178,9 @@ if ( $monitor->AlarmMaxFPS() == '0.00' )
|
|||
if ( !empty($_REQUEST['preset']) ) {
|
||||
$preset = dbFetchOne( 'SELECT Type, Device, Channel, Format, Protocol, Method, Host, Port, Path, Width, Height, Palette, MaxFPS, Controllable, ControlId, ControlDevice, ControlAddress, DefaultRate, DefaultScale FROM MonitorPresets WHERE Id = ?', NULL, array($_REQUEST['preset']) );
|
||||
foreach ( $preset as $name=>$value ) {
|
||||
# Does isset handle NULL's? I don't think this code is correct.
|
||||
# Does isset handle NULL's? I don't think this code is correct.
|
||||
if ( isset($value) ) {
|
||||
$monitor->$name = $value;
|
||||
$monitor->$name = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -188,17 +188,17 @@ if ( !empty($_REQUEST['probe']) ) {
|
|||
$probe = unserialize(base64_decode($_REQUEST['probe']));
|
||||
foreach ( $probe as $name=>$value ) {
|
||||
if ( isset($value) ) {
|
||||
# Does isset handle NULL's? I don't think this code is correct.
|
||||
$monitor->$name = $value;
|
||||
# Does isset handle NULL's? I don't think this code is correct.
|
||||
$monitor->$name = $value;
|
||||
}
|
||||
}
|
||||
if ( ZM_HAS_V4L && $monitor->Type() == 'Local' ) {
|
||||
$monitor->Palette( fourCC( substr($monitor->Palette,0,1), substr($monitor->Palette,1,1), substr($monitor->Palette,2,1), substr($monitor->Palette,3,1) ) );
|
||||
if ( $monitor->Format() == 'PAL' )
|
||||
$monitor->Format( 0x000000ff );
|
||||
elseif ( $monitor->Format() == 'NTSC' )
|
||||
$monitor->Format( 0x0000b000 );
|
||||
}
|
||||
if ( ZM_HAS_V4L && $monitor->Type() == 'Local' ) {
|
||||
$monitor->Palette( fourCC( substr($monitor->Palette,0,1), substr($monitor->Palette,1,1), substr($monitor->Palette,2,1), substr($monitor->Palette,3,1) ) );
|
||||
if ( $monitor->Format() == 'PAL' )
|
||||
$monitor->Format( 0x000000ff );
|
||||
elseif ( $monitor->Format() == 'NTSC' )
|
||||
$monitor->Format( 0x0000b000 );
|
||||
}
|
||||
}
|
||||
|
||||
$sourceTypes = array(
|
||||
|
@ -683,19 +683,19 @@ switch ( $tab ) {
|
|||
</td></tr>
|
||||
<tr><td><?php echo translate('StorageArea') ?></td><td>
|
||||
<?php
|
||||
$storage_areas = array(0=>'Default');
|
||||
$result = dbQuery( 'SELECT * FROM Storage ORDER BY Name');
|
||||
$results = $result->fetchALL(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Storage' );
|
||||
foreach ( $results as $row => $storage_obj ) {
|
||||
$storage_areas[$storage_obj->Id] = $storage_obj->Name();
|
||||
}
|
||||
echo htmlSelect( 'newMonitor[StorageId]', $storage_areas, $monitor->StorageId() );
|
||||
$storage_areas = array(0=>'Default');
|
||||
$result = dbQuery( 'SELECT * FROM Storage ORDER BY Name');
|
||||
$results = $result->fetchALL(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Storage' );
|
||||
foreach ( $results as $row => $storage_obj ) {
|
||||
$storage_areas[$storage_obj->Id] = $storage_obj->Name();
|
||||
}
|
||||
echo htmlSelect( 'newMonitor[StorageId]', $storage_areas, $monitor->StorageId() );
|
||||
?>
|
||||
</td></tr>
|
||||
<tr><td><?php echo translate('SourceType') ?></td><td><?php echo htmlSelect( "newMonitor[Type]", $sourceTypes, $monitor->Type() ); ?></td></tr>
|
||||
<tr><td><?php echo translate('Function') ?></td><td><select name="newMonitor[Function]">
|
||||
<?php
|
||||
foreach ( getEnumValues( 'Monitors', 'Function' ) as $optFunction ) {
|
||||
foreach ( getEnumValues( 'Monitors', 'Function' ) as $optFunction ) {
|
||||
?>
|
||||
<option value="<?php echo $optFunction ?>"<?php if ( $optFunction == $monitor->Function()) { ?> selected="selected"<?php } ?>><?php echo translate('Fn'.$optFunction) ?></option>
|
||||
<?php
|
||||
|
@ -704,25 +704,25 @@ switch ( $tab ) {
|
|||
</select></td></tr>
|
||||
<tr><td><?php echo translate('Enabled') ?></td><td><input type="checkbox" name="newMonitor[Enabled]" value="1"<?php if ( !empty($monitor->Enabled()) ) { ?> checked="checked"<?php } ?>/></td></tr>
|
||||
<tr>
|
||||
<td><?php echo translate('LinkedMonitors') ?></td>
|
||||
<td>
|
||||
<select name="monitorIds" size="4" multiple="multiple" onchange="updateLinkedMonitors( this )">
|
||||
<td><?php echo translate('LinkedMonitors') ?></td>
|
||||
<td>
|
||||
<select name="monitorIds" size="4" multiple="multiple" onchange="updateLinkedMonitors( this )">
|
||||
<?php
|
||||
$monitors = dbFetchAll( 'select Id,Name from Monitors order by Sequence asc' );
|
||||
if ( !empty($monitor->LinkedMonitors()) )
|
||||
$monitorIds = array_flip( explode( ',', $monitor->LinkedMonitors()) );
|
||||
else
|
||||
$monitorIds = array();
|
||||
foreach ( $monitors as $linked_monitor ) {
|
||||
if ( (empty($monitor->Id()) || ($monitor->Id()!= $linked_monitor['Id'])) && visibleMonitor( $linked_monitor['Id'] ) ) {
|
||||
$monitors = dbFetchAll( 'select Id,Name from Monitors order by Sequence asc' );
|
||||
if ( !empty($monitor->LinkedMonitors()) )
|
||||
$monitorIds = array_flip( explode( ',', $monitor->LinkedMonitors()) );
|
||||
else
|
||||
$monitorIds = array();
|
||||
foreach ( $monitors as $linked_monitor ) {
|
||||
if ( (empty($monitor->Id()) || ($monitor->Id()!= $linked_monitor['Id'])) && visibleMonitor( $linked_monitor['Id'] ) ) {
|
||||
?>
|
||||
<option value="<?php echo $linked_monitor['Id'] ?>"<?php if ( array_key_exists( $linked_monitor['Id'], $monitorIds ) ) { ?> selected="selected"<?php } ?>><?php echo validHtmlStr($linked_monitor['Name']) ?></option>
|
||||
<option value="<?php echo $linked_monitor['Id'] ?>"<?php if ( array_key_exists( $linked_monitor['Id'], $monitorIds ) ) { ?> selected="selected"<?php } ?>><?php echo validHtmlStr($linked_monitor['Name']) ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td><?php echo translate('AnalysisFPS') ?></td><td><input type="text" name="newMonitor[AnalysisFPS]" value="<?php echo validHtmlStr($monitor->AnalysisFPS()) ?>" size="6"/></td></tr>
|
||||
<?php
|
||||
|
@ -800,25 +800,25 @@ switch ( $tab ) {
|
|||
<?php
|
||||
if ( ZM_HAS_V4L1 && $monitor->Method() == 'v4l1' ) {
|
||||
?>
|
||||
<tr><td><?php echo translate('DeviceChannel') ?></td><td><select name="newMonitor[Channel]"><?php foreach ( $v4l1DeviceChannels as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Channel()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?php echo translate('DeviceFormat') ?></td><td><select name="newMonitor[Format]"><?php foreach ( $v4l1DeviceFormats as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Format()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?php echo translate('CapturePalette') ?></td><td><select name="newMonitor[Palette]"><?php foreach ( $v4l1LocalPalettes as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Palette()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?php echo translate('DeviceChannel') ?></td><td><select name="newMonitor[Channel]"><?php foreach ( $v4l1DeviceChannels as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Channel()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?php echo translate('DeviceFormat') ?></td><td><select name="newMonitor[Format]"><?php foreach ( $v4l1DeviceFormats as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Format()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?php echo translate('CapturePalette') ?></td><td><select name="newMonitor[Palette]"><?php foreach ( $v4l1LocalPalettes as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Palette()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<tr><td><?php echo translate('DeviceChannel') ?></td><td><select name="newMonitor[Channel]"><?php foreach ( $v4l2DeviceChannels as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Channel()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?php echo translate('DeviceFormat') ?></td><td><select name="newMonitor[Format]"><?php foreach ( $v4l2DeviceFormats as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Format()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?php echo translate('CapturePalette') ?></td><td><select name="newMonitor[Palette]"><?php foreach ( $v4l2LocalPalettes as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Palette()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?php echo translate('DeviceChannel') ?></td><td><select name="newMonitor[Channel]"><?php foreach ( $v4l2DeviceChannels as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Channel()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?php echo translate('DeviceFormat') ?></td><td><select name="newMonitor[Format]"><?php foreach ( $v4l2DeviceFormats as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Format()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?php echo translate('CapturePalette') ?></td><td><select name="newMonitor[Palette]"><?php foreach ( $v4l2LocalPalettes as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Palette()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr><td><?php echo translate('V4LMultiBuffer') ?></td><td>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]1" value="1" <?php echo ( $monitor->V4LMultiBuffer() == 1 ? 'checked="checked"' : '' ) ?>/>
|
||||
<label for="newMonitor[V4LMultiBuffer]1">Yes</label>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]0" value="0" <?php echo ( $monitor->V4LMultiBuffer() == 0 ? 'checked="checked"' : '' ) ?>/>
|
||||
<label for="newMonitor[V4LMultiBuffer]0">No</label>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]" value="" <?php echo ( empty($monitor->V4LMultiBuffer()) ? 'checked="checked"' : '' ) ?>/>
|
||||
<label for="newMonitor[V4LMultiBuffer]">Use Config Value</label>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]1" value="1" <?php echo ( $monitor->V4LMultiBuffer() == 1 ? 'checked="checked"' : '' ) ?>/>
|
||||
<label for="newMonitor[V4LMultiBuffer]1">Yes</label>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]0" value="0" <?php echo ( $monitor->V4LMultiBuffer() == 0 ? 'checked="checked"' : '' ) ?>/>
|
||||
<label for="newMonitor[V4LMultiBuffer]0">No</label>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]" value="" <?php echo ( empty($monitor->V4LMultiBuffer()) ? 'checked="checked"' : '' ) ?>/>
|
||||
<label for="newMonitor[V4LMultiBuffer]">Use Config Value</label>
|
||||
</td></tr>
|
||||
<tr><td><?php echo translate('V4LCapturesPerFrame') ?></td><td><input type="number" name="newMonitor[V4LCapturesPerFrame]" value="<?php echo $monitor->V4LCapturesPerFrame()?>"/></td></tr>
|
||||
<?php
|
||||
|
@ -826,9 +826,9 @@ switch ( $tab ) {
|
|||
?>
|
||||
<tr><td><?php echo translate('RemoteProtocol') ?></td><td><?php echo htmlSelect( "newMonitor[Protocol]", $remoteProtocols, $monitor->Protocol(), "updateMethods( this );if(this.value=='rtsp'){\$('RTSPDescribe').setStyle('display','table-row');}else{\$('RTSPDescribe').hide();}" ); ?></td></tr>
|
||||
<?php
|
||||
if ( empty($monitor->Protocol()) || $monitor->Protocol() == 'http' ) {
|
||||
if ( empty($monitor->Protocol()) || $monitor->Protocol() == 'http' ) {
|
||||
?>
|
||||
<tr><td><?php echo translate('RemoteMethod') ?></td><td><?php echo htmlSelect( "newMonitor[Method]", $httpMethods, $monitor->Method() ); ?></td></tr>
|
||||
<tr><td><?php echo translate('RemoteMethod') ?></td><td><?php echo htmlSelect( "newMonitor[Method]", $httpMethods, $monitor->Method() ); ?></td></tr>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
@ -870,7 +870,7 @@ switch ( $tab ) {
|
|||
<?php
|
||||
} else {
|
||||
?>
|
||||
<tr><td><?php echo translate('Deinterlacing') ?></td><td><select name="newMonitor[Deinterlacing]"><?php foreach ( $deinterlaceopts as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Deinterlacing()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?php echo translate('Deinterlacing') ?></td><td><select name="newMonitor[Deinterlacing]"><?php foreach ( $deinterlaceopts as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Deinterlacing()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -954,41 +954,41 @@ switch ( $tab ) {
|
|||
<tr><td><?php echo translate('FPSReportInterval') ?></td><td><input type="text" name="newMonitor[FPSReportInterval]" value="<?php echo validHtmlStr($monitor->FPSReportInterval()) ?>" size="6"/></td></tr>
|
||||
<tr><td><?php echo translate('DefaultView') ?></td><td><select name="newMonitor[DefaultView]">
|
||||
<?php
|
||||
foreach ( getEnumValues( 'Monitors', 'DefaultView' ) as $opt_view ) {
|
||||
if ( $opt_view == 'Control' && ( !ZM_OPT_CONTROL || !$monitor->Controllable()) )
|
||||
continue;
|
||||
foreach ( getEnumValues( 'Monitors', 'DefaultView' ) as $opt_view ) {
|
||||
if ( $opt_view == 'Control' && ( !ZM_OPT_CONTROL || !$monitor->Controllable()) )
|
||||
continue;
|
||||
?>
|
||||
<option value="<?php echo $opt_view ?>"<?php if ( $opt_view == $monitor->DefaultView()) { ?> selected="selected"<?php } ?>><?php echo $opt_view ?></option>
|
||||
<option value="<?php echo $opt_view ?>"<?php if ( $opt_view == $monitor->DefaultView()) { ?> selected="selected"<?php } ?>><?php echo $opt_view ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select></td></tr>
|
||||
</select></td></tr>
|
||||
<tr><td><?php echo translate('DefaultRate') ?></td><td><?php echo htmlSelect( "newMonitor[DefaultRate]", $rates, $monitor->DefaultRate() ); ?></td></tr>
|
||||
<tr><td><?php echo translate('DefaultScale') ?></td><td><?php echo htmlSelect( "newMonitor[DefaultScale]", $scales, $monitor->DefaultScale() ); ?></td></tr>
|
||||
<?php
|
||||
if ( ZM_HAS_V4L && $monitor->Type() == 'Local' ) {
|
||||
if ( ZM_HAS_V4L && $monitor->Type() == 'Local' ) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo translate('SignalCheckColour') ?></td>
|
||||
<td>
|
||||
<input type="text" name="newMonitor[SignalCheckColour]" value="<?php echo validHtmlStr($monitor->SignalCheckColour()) ?>" size="10" onchange="$('SignalCheckSwatch').setStyle( 'backgroundColor', this.value )"/>
|
||||
<span id="SignalCheckSwatch" class="swatch" style="background-color: <?php echo $monitor->SignalCheckColour()?>;"> </span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo translate('SignalCheckColour') ?></td>
|
||||
<td>
|
||||
<input type="text" name="newMonitor[SignalCheckColour]" value="<?php echo validHtmlStr($monitor->SignalCheckColour()) ?>" size="10" onchange="$('SignalCheckSwatch').setStyle( 'backgroundColor', this.value )"/>
|
||||
<span id="SignalCheckSwatch" class="swatch" style="background-color: <?php echo $monitor->SignalCheckColour()?>;"> </span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo translate('WebColour') ?></td>
|
||||
<td>
|
||||
<input type="text" name="newMonitor[WebColour]" value="<?php echo validHtmlStr($monitor->WebColour()) ?>" size="10" onchange="$('WebSwatch').setStyle( 'backgroundColor', this.value )"/>
|
||||
<span id="WebSwatch" class="swatch" style="background-color: <?php echo validHtmlStr($monitor->WebColour()) ?>;"> </span>
|
||||
</td>
|
||||
</tr>
|
||||
<td><?php echo translate('WebColour') ?></td>
|
||||
<td>
|
||||
<input type="text" name="newMonitor[WebColour]" value="<?php echo validHtmlStr($monitor->WebColour()) ?>" size="10" onchange="$('WebSwatch').setStyle( 'backgroundColor', this.value )"/>
|
||||
<span id="WebSwatch" class="swatch" style="background-color: <?php echo validHtmlStr($monitor->WebColour()) ?>;"> </span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo translate('Exif') ?> (<?php echo makePopupLink( '?view=optionhelp&option=OPTIONS_EXIF', 'zmOptionHelp', 'optionhelp', '?' ) ?>) </td>
|
||||
<td><input type="checkbox" name="newMonitor[Exif]" value="1"<?php if ( !empty($monitor->Exif()) ) { ?> checked="checked"<?php } ?>/></td>
|
||||
</tr>
|
||||
<td><?php echo translate('Exif') ?> (<?php echo makePopupLink( '?view=optionhelp&option=OPTIONS_EXIF', 'zmOptionHelp', 'optionhelp', '?' ) ?>) </td>
|
||||
<td><input type="checkbox" name="newMonitor[Exif]" value="1"<?php if ( !empty($monitor->Exif()) ) { ?> checked="checked"<?php } ?>/></td>
|
||||
</tr>
|
||||
<?php
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
//
|
||||
|
||||
// Calling sequence: ... /zm/index.php?view=video&event_id=123
|
||||
|
|
56
zm.conf.in
56
zm.conf.in
|
@ -1,16 +1,15 @@
|
|||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Base Configuration File
|
||||
# ZoneMinder Base Configuration
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# *** DO NOT EDIT THIS FILE ***
|
||||
# Changes made directly to this configuration file are no longer supported.
|
||||
# They will be overwritten during an upgrade.
|
||||
#
|
||||
# Instead, create a custom configuration file, with an extention of ".conf"
|
||||
# under the @ZM_CONFIG_SUBDIR@ subfolder containing your desired modifications.
|
||||
#
|
||||
# To make custom changes to the variables below, create a new configuration
|
||||
# file, with an extention of .conf, under the @ZM_CONFIG_SUBDIR@
|
||||
# folder, containing your desired modifications.
|
||||
#
|
||||
|
||||
# Path to installed data directory, used mostly for finding DB upgrade scripts
|
||||
ZM_PATH_DATA=@PKGDATADIR@
|
||||
|
@ -50,43 +49,10 @@ ZM_DB_USER=@ZM_DB_USER@
|
|||
# ZoneMinder database password
|
||||
ZM_DB_PASS=@ZM_DB_PASS@
|
||||
|
||||
# Full path to the folder events are recorded to.
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_DIR_EVENTS=@ZM_DIR_EVENTS@
|
||||
|
||||
# Full path to the folder images, not directly associated with events,
|
||||
# are recorded to.
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_DIR_IMAGES=@ZM_DIR_IMAGES@
|
||||
|
||||
# Foldername under the webroot where ZoneMinder looks for optional sound files
|
||||
# to play when an alarm is detected.
|
||||
ZM_DIR_SOUNDS=@ZM_DIR_SOUNDS@
|
||||
|
||||
# Full path to the folder where exported archives are stored
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_DIR_EXPORTS=@ZM_TMPDIR@
|
||||
|
||||
# ZoneMinder url path to the zms streaming server
|
||||
ZM_PATH_ZMS=@ZM_PATH_ZMS@
|
||||
|
||||
# Full Path to ZoneMinder's mapped memory files
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_PATH_MAP=@ZM_PATH_MAP@
|
||||
|
||||
# Full Path to ZoneMinder's socket folder
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_PATH_SOCKS=@ZM_SOCKDIR@
|
||||
|
||||
# Full path to ZoneMinder's log folder
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_PATH_LOGS=@ZM_LOGDIR@
|
||||
|
||||
# Full path to ZoneMinder's swap folder
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_PATH_SWAP=@ZM_TMPDIR@
|
||||
|
||||
# Full path to optional arp binary
|
||||
# ZoneMinder will find the arp binary automatically on most systems
|
||||
ZM_PATH_ARP=@ZM_PATH_ARP@
|
||||
# Do NOT set ZM_SERVER_HOST if you are not using Multi-Server
|
||||
# You have been warned
|
||||
#
|
||||
# The name specified here must have a corresponding entry
|
||||
# in the Servers tab under Options
|
||||
ZM_SERVER_HOST=
|
||||
|
||||
|
|
Loading…
Reference in New Issue