Update meta makefiles
This commit is contained in:
commit
f1b2ba091c
|
@ -18,7 +18,7 @@ compiler:
|
|||
- gcc
|
||||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -y -qq zlib1g-dev apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf cmake libjpeg-turbo8-dev apache2-mpm-prefork libapache2-mod-php5 php5-cli libtheora-dev libvorbis-dev libvpx-dev libx264-dev 2>&1 > /dev/null
|
||||
- sudo apt-get install -y -qq libpolkit-gobject-1-dev zlib1g-dev apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf cmake libjpeg-turbo8-dev apache2-mpm-prefork libapache2-mod-php5 php5-cli libtheora-dev libvorbis-dev libvpx-dev libx264-dev 2>&1 > /dev/null
|
||||
install:
|
||||
- git clone --depth=10 --branch=master git://source.ffmpeg.org/ffmpeg.git
|
||||
- cd ffmpeg
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
cmake_minimum_required (VERSION 2.6)
|
||||
project (zoneminder)
|
||||
set(zoneminder_VERSION "1.27.1")
|
||||
set(zoneminder_VERSION "1.27.99.0")
|
||||
|
||||
# CMake does not allow out-of-source build if CMakeCache.exists in the source folder. Abort and notify the user to save him from headache why it doesn't work.
|
||||
if((NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) AND (EXISTS "${CMAKE_SOURCE_DIR}/CMakeCache.txt"))
|
||||
|
@ -476,6 +476,12 @@ endif(NOT ZM_WEB_GROUP)
|
|||
message(STATUS "Using web user: ${ZM_WEB_USER}")
|
||||
message(STATUS "Using web group: ${ZM_WEB_GROUP}")
|
||||
|
||||
# Check for polkit
|
||||
find_package(Polkit)
|
||||
if(NOT POLKIT_FOUND)
|
||||
message(FATAL_ERROR "Running ZoneMinder requires polkit. Building ZoneMinder requires the polkit development package.")
|
||||
endif(NOT POLKIT_FOUND)
|
||||
|
||||
# Some variables that zm expects
|
||||
set(ZM_PID "${ZM_RUNDIR}/zm.pid")
|
||||
set(ZM_CONFIG "/${CMAKE_INSTALL_SYSCONFDIR}/zm.conf")
|
||||
|
@ -502,9 +508,10 @@ add_subdirectory(src)
|
|||
add_subdirectory(scripts)
|
||||
add_subdirectory(db)
|
||||
add_subdirectory(web)
|
||||
add_subdirectory(misc)
|
||||
add_subdirectory(onvif)
|
||||
|
||||
# Process misc subdirectories
|
||||
# Process distro subdirectories
|
||||
if(ZM_TARGET_DISTRO STREQUAL "f19")
|
||||
add_subdirectory(distros/fedora)
|
||||
elseif(ZM_TARGET_DISTRO STREQUAL "el6")
|
||||
|
|
25
README.md
25
README.md
|
@ -138,26 +138,19 @@ This release of ZoneMinder has been tested on and works with ffmpeg version N-55
|
|||
* Source hosted at [GitHub](https://github.com/ZoneMinder/ZoneMinder/)
|
||||
* Report issues/questions/feature requests on [GitHub Issues](https://github.com/ZoneMinder/ZoneMinder/issues)
|
||||
|
||||
Pull requests are very welcome! If you would like to contribute,
|
||||
please follow the following steps. Also please create a feature branch
|
||||
for what you are working on.
|
||||
Pull requests are very welcome! If you would like to contribute, please follow
|
||||
the following steps.
|
||||
|
||||
1. Fork the repo
|
||||
2. Open an issue at our [GitHub Issues](https://github.com/ZoneMinder/ZoneMinder/issues) page and jot down the issue number (e.g. 456)
|
||||
2. Open an issue at our [GitHub Issues Tracker](https://github.com/ZoneMinder/ZoneMinder/issues).
|
||||
Describe the bug that you've found, or the feature which you're asking for.
|
||||
Jot down the issue number (e.g. 456)
|
||||
3. Create your feature branch (`git checkout -b 456-my-new-feature`)
|
||||
4. Commit your changes (`git commit -am 'Added some feature'`)
|
||||
5. Push to the branch (`git push origin 456-my-new-feature`)
|
||||
It is preferred that you 'commit early and often' instead of bunching all
|
||||
changes into a single commit.
|
||||
5. Push your branch to your fork on github (`git push origin 456-my-new-feature`)
|
||||
6. Create new Pull Request
|
||||
7. The team will then review your changes
|
||||
|
||||
If you are instead working on a bug - not a feature - please do the following:
|
||||
|
||||
1. Fork the repo
|
||||
2. Open an issue at our [GitHub Issues](https://github.com/ZoneMinder/ZoneMinder/issues) page and jot down the issue number (e.g. 123)
|
||||
3. Create your feature branch (`git checkout -b 123-short-description `)
|
||||
4. Commit your changes (`git commit -am 'Added some feature. Fixes #123'`)
|
||||
5. Push to the branch (`git push origin 123-short-description`)
|
||||
6. Create new Pull Request
|
||||
7. The team will then review your changes
|
||||
7. The team will then review, discuss and hopefully merge your changes.
|
||||
|
||||
[![Analytics](https://ga-beacon.appspot.com/UA-15147273-6/ZoneMinder/README.md)](https://github.com/igrigorik/ga-beacon)
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
# - Try to find the GLIB2 libraries
|
||||
# Once done this will define
|
||||
#
|
||||
# GLIB2_FOUND - system has glib2
|
||||
# GLIB2_INCLUDE_DIR - the glib2 include directory
|
||||
# GLIB2_LIBRARIES - glib2 library
|
||||
|
||||
# Copyright (c) 2008 Laurent Montel, <montel@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
|
||||
if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
|
||||
# Already in cache, be silent
|
||||
set(GLIB2_FIND_QUIETLY TRUE)
|
||||
endif(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
|
||||
|
||||
if (NOT WIN32)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_LibGLIB2 glib-2.0)
|
||||
endif (PKG_CONFIG_FOUND)
|
||||
endif(NOT WIN32)
|
||||
|
||||
if (PC_LibGLIB2_INCLUDEDIR)
|
||||
set(GLIB2_MAIN_INCLUDE_DIR ${PC_LibGLIB2_INCLUDEDIR})
|
||||
else (PC_LibGLIB2_INCLUDEDIR)
|
||||
find_path(GLIB2_MAIN_INCLUDE_DIR NAMES glib.h PATH_SUFFIXES glib-2.0)
|
||||
endif (PC_LibGLIB2_INCLUDEDIR)
|
||||
|
||||
# search the glibconfig.h include dir under the same root where the library is found
|
||||
find_library(GLIB2_LIBRARIES
|
||||
NAMES glib-2.0
|
||||
HINTS ${PC_LibGLIB2_LIBDIR}
|
||||
)
|
||||
|
||||
get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH)
|
||||
|
||||
find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h
|
||||
PATH_SUFFIXES glib-2.0/include
|
||||
HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH})
|
||||
|
||||
set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}")
|
||||
|
||||
# not sure if this include dir is optional or required
|
||||
# for now it is optional
|
||||
if(GLIB2_INTERNAL_INCLUDE_DIR)
|
||||
set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}")
|
||||
endif(GLIB2_INTERNAL_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES)
|
|
@ -0,0 +1,63 @@
|
|||
# - Try to find Polkit
|
||||
# Once done this will define
|
||||
#
|
||||
# POLKIT_FOUND - system has Polkit
|
||||
# POLKIT_INCLUDE_DIRS - Polkit's include directories
|
||||
# POLKIT_AGENT_INCLUDE_DIRS - Polkit-agent's include directories
|
||||
# POLKIT_LIBRARIES - Link this to use polkit's gobject library
|
||||
# POLKIT_AGENT_LIBRARY - Link this to use the agent wrapper in polkit
|
||||
# POLKIT_DEFINITIONS - Compiler switches required for using Polkit
|
||||
# Copyright (c) 2009, Dario Freddi, <drf@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#NOTE: Polkit agent library is disabled!
|
||||
if (POLKIT_INCLUDE_DIR AND POLKIT_LIB)
|
||||
set(POLKIT_FIND_QUIETLY TRUE)
|
||||
endif (POLKIT_INCLUDE_DIR AND POLKIT_LIB)
|
||||
if (NOT WIN32)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_POLKIT polkit-gobject-1)
|
||||
#pkg_check_modules(PC_POLKIT_AGENT polkit-agent-1)
|
||||
set(POLKIT_DEFINITIONS ${PC_POLKIT_CFLAGS_OTHER})
|
||||
endif (NOT WIN32)
|
||||
# We must include glib paths too... which sucks balls
|
||||
find_package(GLIB2)
|
||||
find_path( GLIB_CONFIG_INCLUDE_DIR
|
||||
NAMES glibconfig.h
|
||||
PATH_SUFFIXES glib-2.0/include
|
||||
HINTS ${PC_POLKIT_INCLUDE_DIRS}
|
||||
)
|
||||
find_path( POLKIT_INCLUDE_DIR
|
||||
NAMES polkit/polkit.h
|
||||
PATH_SUFFIXES polkit-1
|
||||
HINTS ${PC_POLKIT_INCLUDE_DIRS}
|
||||
)
|
||||
#find_path( POLKIT_AGENT_INCLUDE_DIR
|
||||
# NAMES polkitagent/polkitagent.h
|
||||
# PATH_SUFFIXES polkit-1
|
||||
# HINTS ${PC_POLKIT_AGENT_INCLUDE_DIRS}
|
||||
#)
|
||||
#set(POLKIT_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${_POLKIT_INCLUDE_DIR})
|
||||
#set(POLKIT_AGENT_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${_POLKIT_AGENT_INCLUDE_DIR})
|
||||
find_library( POLKIT_LIBRARIES
|
||||
NAMES polkit-gobject-1
|
||||
HINTS ${PC_POLKIT_LIBDIR}
|
||||
)
|
||||
#find_library( POLKIT_AGENT_LIBRARY
|
||||
# NAMES polkit-agent-1
|
||||
# HINTS ${PC_POLKIT_AGENT_LIBDIR}
|
||||
#)
|
||||
#set(POLKIT_LIBRARIES ${_POLKIT_LIBRARIES} ${GLIB2_LIBRARIES})
|
||||
#set(POLKIT_AGENT_LIBRARY ${_POLKIT_AGENT_LIBRARY} ${GLIB2_LIBRARIES})
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set POLKIT_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
#find_package_handle_standard_args(Polkit DEFAULT_MSG POLKIT_LIBRARIES POLKIT_AGENT_LIBRARY
|
||||
# POLKIT_INCLUDE_DIR POLKIT_AGENT_INCLUDE_DIR GLIB2_FOUND)
|
||||
find_package_handle_standard_args(Polkit DEFAULT_MSG POLKIT_LIBRARIES
|
||||
POLKIT_INCLUDE_DIR GLIB2_FOUND)
|
||||
mark_as_advanced(POLKIT_INCLUDE_DIRS POLKIT_AGENT_INCLUDE_DIRS POLKIT_LIBRARIES POLKIT_AGENT_LIBRARY GLIB_INCLUDE_DIR)
|
||||
set(POLKIT_POLICY_FILES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/polkit-1/actions)
|
67
configure.ac
67
configure.ac
|
@ -1,5 +1,5 @@
|
|||
AC_PREREQ(2.59)
|
||||
AC_INIT(zm,1.27.1,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html)
|
||||
AC_INIT(zm,1.27.99.0,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html)
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_CONFIG_SRCDIR(src/zm.h)
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
@ -7,6 +7,33 @@ AC_CONFIG_HEADERS(config.h)
|
|||
AC_SUBST([AM_CXXFLAGS], [-D__STDC_CONSTANT_MACROS])
|
||||
|
||||
AC_SUBST(VERSION)
|
||||
#
|
||||
# Platform specific setup
|
||||
#
|
||||
#############################
|
||||
AC_CANONICAL_HOST
|
||||
# Check for which host we are on and setup a few things
|
||||
# specifically based on the host
|
||||
case $host_os in
|
||||
darwin* )
|
||||
# Do something specific for mac
|
||||
HOST_OS='darwin'
|
||||
;;
|
||||
linux*)
|
||||
# Do something specific for linux
|
||||
HOST_OS='linux'
|
||||
;;
|
||||
*BSD*)
|
||||
# Do something specific for BSD
|
||||
HOST_OS='BSD'
|
||||
;;
|
||||
*)
|
||||
#Default Case
|
||||
AC_MSG_ERROR([Your platform is not currently supported])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(HOST_OS)
|
||||
|
||||
AC_ARG_VAR(ZM_DB_TYPE,[Type of the ZoneMinder database, default mysql])
|
||||
AC_ARG_VAR(ZM_DB_HOST,[Hostname where ZoneMinder database located, default localhost])
|
||||
|
@ -61,6 +88,8 @@ AC_ARG_WITH(libarch,
|
|||
)
|
||||
AC_SUBST(LIB_ARCH)
|
||||
|
||||
LDFLAGS="-L/usr/lib/${build_alias} ${LDFLAGS}"
|
||||
|
||||
MYSQL_PREFIX=/usr
|
||||
AC_ARG_WITH(mysql,
|
||||
[ --with-mysql=<path> prefix of MySQL installation, default /usr],
|
||||
|
@ -75,8 +104,34 @@ MYSQL_LIBS="-L${MYSQL_PREFIX}/${LIB_ARCH}/mysql"
|
|||
MYSQL_CFLAGS="-I${MYSQL_PREFIX}/include"
|
||||
AC_SUBST(MYSQL_LIBS)
|
||||
AC_SUBST(MYSQL_CFLAGS)
|
||||
LDFLAGS="$LDFLAGS ${MYSQL_LIBS}"
|
||||
|
||||
LDFLAGS="${MYSQL_LIBS} $LDFLAGS"
|
||||
|
||||
MARIADB_PREFIX=/usr
|
||||
AC_ARG_WITH(mariadb,
|
||||
[ --with-mariadb=<path> prefix of MariaDB installation, default /usr],
|
||||
[MYSQL_PREFIX=$with_mariadb],
|
||||
AC_MSG_WARN([You can call configure with the --with-mariadb option.
|
||||
This tells configure where to find the mariaDB C library and headers if configure cannot
|
||||
locate them automatically.
|
||||
e.g. --with-mariadb=/usr/local or --with-mariadb=/usr])
|
||||
)
|
||||
AC_SUBST(MARIADB_PREFIX)
|
||||
MARIADB_LIBS="-L${MARIADB_PREFIX}/${LIB_ARCH}/mariadb"
|
||||
MARIADB_CFLAGS="-I${MARIADB_PREFIX}/include"
|
||||
AC_SUBST(MARIADB_LIBS)
|
||||
AC_SUBST(MARIADB_CFLAGS)
|
||||
LDFLAGS="$LDFLAGS ${MARIADB_LIBS}"
|
||||
|
||||
POLKIT_PREFIX=/usr
|
||||
AC_ARG_WITH(polkit,
|
||||
[ --with-polkit=<path> prefix of polkit root directory, default /usr],
|
||||
[POLKIT_PREFIX=$with_polkit],
|
||||
AC_MSG_WARN([You can call configure with the --with-polkit option.
|
||||
This tells configure where to place the polkit policy files.])
|
||||
)
|
||||
AC_SUBST(POLKIT_PREFIX)
|
||||
PKG_CHECK_MODULES(POLKIT, polkit-gobject-1)
|
||||
|
||||
FFMPEG_PREFIX=/usr
|
||||
AC_ARG_WITH(ffmpeg,
|
||||
|
@ -244,7 +299,7 @@ PATH_NETPBM=`dirname $PATH_NETPBM`
|
|||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR(zm requires libmysqlclient.a))
|
||||
AC_SEARCH_LIBS(mysql_init,[mysqlclient mariadbclient],,AC_MSG_ERROR(zm requires libmysqlclient.a or libmariadbclient.a))
|
||||
AC_CHECK_LIB(jpeg,jpeg_start_compress,,AC_MSG_ERROR(zm requires libjpeg.a))
|
||||
AC_CHECK_LIB(pthread,pthread_create,,AC_MSG_ERROR(zm requires libpthread.a))
|
||||
AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a))
|
||||
|
@ -412,15 +467,11 @@ case $host_os in
|
|||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(HOST_OS)
|
||||
|
||||
AC_CONFIG_FILES([Makefile zm.conf zmconfgen.pl db/Makefile db/zm_create.sql misc/Makefile misc/apache.conf misc/logrotate.conf misc/syslog.conf onvif/Makefile onvif/scripts/Makefile scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmcamtool.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/skins/classic/lang/Makefile web/skins/classic/views/Makefile web/skins/classic/views/css/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile web/skins/flat/Makefile web/skins/flat/ajax/Makefile web/skins/flat/css/Makefile web/skins/flat/graphics/Makefile web/skins/flat/includes/Makefile web/skins/flat/js/Makefile web/skins/flat/lang/Makefile web/skins/flat/views/Makefile web/skins/flat/views/css/Makefile web/skins/flat/views/js/Makefile])
|
||||
AC_CONFIG_FILES([Makefile zm.conf zmconfgen.pl db/Makefile db/zm_create.sql misc/Makefile misc/apache.conf misc/logrotate.conf misc/syslog.conf misc/com.zoneminder.systemctl.policy misc/com.zoneminder.systemctl.rules scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmcamtool.pl scripts/zmsystemctl.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/skins/classic/lang/Makefile web/skins/classic/views/Makefile web/skins/classic/views/css/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile web/skins/flat/Makefile web/skins/flat/ajax/Makefile web/skins/flat/css/Makefile web/skins/flat/graphics/Makefile web/skins/flat/includes/Makefile web/skins/flat/js/Makefile web/skins/flat/lang/Makefile web/skins/flat/views/Makefile web/skins/flat/views/css/Makefile web/skins/flat/views/js/Makefile])
|
||||
|
||||
# Create the definitions for compilation and defaults for the database
|
||||
AC_CONFIG_COMMANDS([src/zm_config_defines.h],[perl ./zmconfgen.pl])
|
||||
# Manually generate the perl Makefile maker
|
||||
AC_CONFIG_COMMANDS([scripts/ZoneMinder/Makefile],[(cd scripts/ZoneMinder; echo "perl Makefile.PL $PERL_MM_PARMS"; perl Makefile.PL $PERL_MM_PARMS)],[PERL_MM_PARMS=$PERL_MM_PARMS])
|
||||
AC_CONFIG_COMMANDS([onvif/modules/Makefile],[(cd onvif/modules; echo "perl Makefile.PL $PERL_MM_PARMS"; perl Makefile.PL $PERL_MM_PARMS)],[PERL_MM_PARMS=$PERL_MM_PARMS])
|
||||
AC_CONFIG_COMMANDS([onvif/proxy/Makefile],[(cd onvif/proxy; echo "perl Makefile.PL $PERL_MM_PARMS"; perl Makefile.PL $PERL_MM_PARMS)],[PERL_MM_PARMS=$PERL_MM_PARMS])
|
||||
|
||||
AC_OUTPUT
|
||||
|
|
|
@ -323,6 +323,8 @@ CREATE TABLE `Monitors` (
|
|||
`Device` varchar(64) NOT NULL default '',
|
||||
`Channel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Format` int(10) unsigned NOT NULL default '0',
|
||||
`V4LMultiBuffer` tinyint(1) unsigned,
|
||||
`V4LCapturesPerFrame` tinyint(3) unsigned,
|
||||
`Protocol` varchar(16) NOT NULL default '',
|
||||
`Method` varchar(16) NOT NULL default '',
|
||||
`Host` varchar(64) NOT NULL default '',
|
||||
|
|
|
@ -173,3 +173,34 @@ SET @s = (SELECT IF(
|
|||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
--
|
||||
-- Add V4LMultiBuffer and V4LCapturesPerFrame to Monitor
|
||||
--
|
||||
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Monitors'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'V4LMultiBuffer'
|
||||
) > 0,
|
||||
"SELECT 'Column V4LMultiBuffer exists in Monitors'",
|
||||
"ALTER TABLE `Monitors` ADD `V4LMultiBuffer` tinyint(1) unsigned AFTER `Format`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Monitors'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'V4LCapturesPerFrame'
|
||||
) > 0,
|
||||
"SELECT 'Column V4LCapturesPerFrame exists in Monitors'",
|
||||
"ALTER TABLE `Monitors` ADD `V4LCapturesPerFrame` tinyint(3) unsigned AFTER `V4LMultiBuffer`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
|
@ -1,18 +1,12 @@
|
|||
zoneminder (1.26.5-1) unstable; urgency=low
|
||||
zoneminder (1.27.99+1-testing-SNAPSHOT2014072901) testing; urgency=medium
|
||||
|
||||
* improvements to zmupdate.pl, cleanups
|
||||
* improve error messages
|
||||
* Make zmupdate re-run the most recent patch so that people running the daily builds get their db updates
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Thu, 03 Oct 2013 11:40:32 -0400
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Tue, 29 Jul 2014 14:50:20 -0400
|
||||
|
||||
zoneminder (1.26.3-1) unstable; urgency=low
|
||||
zoneminder (1.27.0+1-testing-v4ltomonitor-1) testing; urgency=high
|
||||
|
||||
* A 'minor' release focusing on performance improvement and bug fixes.
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Sun, 22 Sep 2013 09:36:42 +0800
|
||||
|
||||
zoneminder (1.25.1-1) unstable; urgency=low
|
||||
|
||||
* Initial Version.
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Mon, 29 Apr 2013 12:38:00 -0400
|
||||
* Snapshot release -
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Wed, 09 Jul 2014 21:35:29 -0400
|
||||
|
|
|
@ -2,13 +2,13 @@ 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, 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, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, libjpeg8, dh-autoreconf
|
||||
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
|
||||
Standards-Version: 3.9.2
|
||||
|
||||
Package: zoneminder
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5, php5, php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-lite-perl, mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg, 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
|
||||
Recommends: mysql-server
|
||||
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-lite-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
|
||||
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
|
||||
applications, including commercial or home CCTV, theft prevention and child
|
||||
|
|
|
@ -2,44 +2,36 @@
|
|||
|
||||
set -e
|
||||
|
||||
VERSION=1.26.5
|
||||
|
||||
if [ "$1" = "configure" ]; then
|
||||
#
|
||||
# Get mysql started if it isn't
|
||||
#
|
||||
if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then
|
||||
invoke-rc.d mysql start
|
||||
fi
|
||||
if $(/etc/init.d/mysql status >/dev/null 2>&1); then
|
||||
mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload
|
||||
# test if database if already present...
|
||||
if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then
|
||||
cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
|
||||
echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
fi
|
||||
if [ -e "/etc/init.d/mysql" ]; then
|
||||
#
|
||||
# Get mysql started if it isn't
|
||||
#
|
||||
if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then
|
||||
invoke-rc.d mysql start
|
||||
fi
|
||||
if $(/etc/init.d/mysql status >/dev/null 2>&1); then
|
||||
mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload
|
||||
# test if database if already present...
|
||||
if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then
|
||||
cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
|
||||
echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
fi
|
||||
|
||||
# get old version from upgrade...
|
||||
OLD_ZM_VERSION=${2%-*}
|
||||
if [ -z "$OLD_ZM_VERSION" ]; then
|
||||
# fall back to getting version from database itself, which may not necessarily be accurate?
|
||||
OLD_ZM_VERSION=$(echo 'select Value from Config where Name = "ZM_DYN_CURR_VERSION";' | mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names zm )
|
||||
fi
|
||||
if [ -n "$OLD_ZM_VERSION" ] && [ "$OLD_ZM_VERSION" != "$VERSION" ] ; then
|
||||
echo 'grant lock tables, create, alter on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
# stop zoneminder before performing database upgrade.
|
||||
invoke-rc.d zoneminder stop || true
|
||||
zmupdate.pl --nointeractive --version $OLD_ZM_VERSION
|
||||
fi
|
||||
invoke-rc.d zoneminder stop || true
|
||||
zmupdate.pl --nointeractive
|
||||
|
||||
else
|
||||
echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.'
|
||||
fi
|
||||
chown www-data:www-data /var/log/zm
|
||||
chown www-data:www-data /var/lib/zm/
|
||||
if [ -z "$2" ]; then
|
||||
chown www-data:www-data -R /var/cache/zoneminder
|
||||
fi
|
||||
else
|
||||
echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.'
|
||||
fi
|
||||
else
|
||||
echo 'mysql not found, assuming remote server.'
|
||||
fi
|
||||
chown www-data:www-data /var/log/zm
|
||||
chown www-data:www-data /var/lib/zm/
|
||||
if [ -z "$2" ]; then
|
||||
chown www-data:www-data -R /var/cache/zoneminder
|
||||
fi
|
||||
fi
|
||||
# Ensure zoneminder is stopped...
|
||||
if [ -x "/etc/init.d/zoneminder" ]; then
|
||||
|
@ -55,10 +47,7 @@ if [ "$1" = "configure" ]; then
|
|||
chown www-data:www-data -R /var/cache/zoneminder
|
||||
else
|
||||
chown www-data:www-data /var/log/zm
|
||||
OLD_ZM_VERSION=${2%-*}
|
||||
if [ "$OLD_ZM_VERSION" != "$VERSION" ] ; then
|
||||
zmupdate.pl --version $OLD_ZM_VERSION
|
||||
fi
|
||||
zmupdate.pl
|
||||
fi
|
||||
fi
|
||||
#DEBHELPER#
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
UPSTREAM_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -d - -f 1)
|
||||
POSTINST_VERSION := $(shell egrep ^VERSION= debian/postinst | cut -d = -f 2)
|
||||
|
||||
# These are used for cross-compiling and for saving the configure script
|
||||
# from having to guess our platform (since we know it already)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
|
@ -31,19 +28,16 @@ endif
|
|||
dh $@ --with autoreconf
|
||||
|
||||
override_dh_auto_configure:
|
||||
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-mysql=/usr --with-webdir=/usr/share/zoneminder --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=no --enable-mmap=yes
|
||||
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-mysql=/usr --with-mariadb=/usr --with-webdir=/usr/share/zoneminder --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=no --enable-mmap=yes
|
||||
|
||||
override_dh_clean:
|
||||
# check to make sure that postinst contains the correct upstream version
|
||||
[ $(UPSTREAM_VERSION) = $(POSTINST_VERSION) ]
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
[ ! -f Makefile ] || $(MAKE) distclean
|
||||
dh_clean
|
||||
|
||||
override_dh_install:
|
||||
# Add here commands to install the package into debian/zm.
|
||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/zoneminder
|
||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/zoneminder RUNDIR=$(CURDIR)/debian/zoneminder/var/run ZM_RUNDIR=$(CURDIR)/debian/zoneminder/var/run
|
||||
install -D -m 0644 db/zm_create.sql $(CURDIR)/debian/zoneminder/usr/share/zoneminder/db
|
||||
install -D -m 0644 db/zm_update-*.sql $(CURDIR)/debian/zoneminder/usr/share/zoneminder/db
|
||||
install -D -m 0644 debian/apache.conf $(CURDIR)/debian/zoneminder/etc/zm
|
||||
|
@ -74,4 +68,4 @@ override_dh_auto_test:
|
|||
|
||||
.PHONY: override_dh_strip
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=zoneminder-dbg
|
||||
dh_strip --dbg-package=zoneminder-dbg
|
||||
|
|
|
@ -37,10 +37,10 @@ BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel
|
|||
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
|
||||
%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)}
|
||||
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
|
||||
BuildRequires: httpd
|
||||
BuildRequires: httpd polkit-devel
|
||||
%{!?_without_ffmpeg:BuildRequires: ffmpeg}
|
||||
|
||||
Requires: httpd php php-mysql cambozola
|
||||
Requires: httpd php php-mysql cambozola polkit
|
||||
Requires: libjpeg-turbo vlc-core libcurl
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||
|
@ -149,6 +149,7 @@ fi
|
|||
%{_bindir}/zmvideo.pl
|
||||
%{_bindir}/zmwatch.pl
|
||||
%{_bindir}/zmcamtool.pl
|
||||
%{_bindir}/zmsystemctl.pl
|
||||
%{!?_without_x10:%{_bindir}/zmx10.pl}
|
||||
%{_bindir}/zmonvif-probe.pl
|
||||
|
||||
|
@ -165,6 +166,9 @@ fi
|
|||
%{_datadir}/zoneminder/db
|
||||
%{_datadir}/zoneminder/www
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images
|
||||
|
|
|
@ -49,11 +49,11 @@ BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
|||
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
||||
BuildRequires: perl(Expect) perl(Sys::Syslog)
|
||||
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel
|
||||
BuildRequires: autoconf autoconf-archive
|
||||
BuildRequires: autoconf autoconf-archive polkit-devel
|
||||
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
|
||||
%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)}
|
||||
|
||||
Requires: httpd php php-mysql cambozola
|
||||
Requires: httpd php php-mysql cambozola polkit
|
||||
Requires: libjpeg-turbo libcurl vlc-core ffmpeg
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||
|
@ -240,6 +240,7 @@ fi
|
|||
%{_bindir}/zmvideo.pl
|
||||
%{_bindir}/zmwatch.pl
|
||||
%{_bindir}/zmcamtool.pl
|
||||
%{_bindir}/zmsystemctl.pl
|
||||
%{!?_without_x10:%{_bindir}/zmx10.pl}
|
||||
%{_bindir}/zmonvif-probe.pl
|
||||
|
||||
|
@ -254,6 +255,9 @@ fi
|
|||
%{_datadir}/zoneminder/db
|
||||
%{_datadir}/zoneminder/www
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images
|
||||
|
|
|
@ -26,7 +26,7 @@ OpenSuse Notes
|
|||
|
||||
3. It is necessary to add repositories to allow the zoneminder rpm to install.
|
||||
These can be added using commands (as root):
|
||||
zypper ar -f http://packman.inode.at/suse/openSUSE_13.1/ packman
|
||||
zypper ar -f http://packman.inode.at/suse/openSUSE_13.1 packman
|
||||
zypper ar -f -n perl-modules http://download.opensuse.org/repositories/devel:/languages:/perl/openSUSE_13.1 perl-modules
|
||||
|
||||
The first time the repositories are accessed a prompt will be issued
|
||||
|
@ -35,7 +35,7 @@ OpenSuse Notes
|
|||
|
||||
4. There may be a prompt about the version of libavcodec.s0.55 and a change
|
||||
of vendor for libavutil52. In order to allow zoneminder to run correctly
|
||||
this solution change vendro should be accepted.
|
||||
this solution change vendor should be accepted.
|
||||
|
||||
New installs
|
||||
============
|
||||
|
@ -44,7 +44,7 @@ New installs
|
|||
remotely you will need to ensure that the server is installed and secured:
|
||||
|
||||
The rpm install should ensure that the database is installed. To ensure
|
||||
that it is running at boot time and scure for zoneminder run the
|
||||
that it is running at boot time and secure for zoneminder run the
|
||||
following commands (as root):
|
||||
|
||||
systemctl enable mysql
|
||||
|
@ -87,7 +87,7 @@ New installs
|
|||
show up in the zoneminder logging system as errors.
|
||||
|
||||
If you are not sure of the proper timezone specification to use, look at
|
||||
http://php.net/date.timezone
|
||||
http://php.net/manual/en/timezones.php
|
||||
|
||||
6. This package probably does not work with SELinux enabled at the moment. It
|
||||
may be necessary to disable SELinux for httpd, or even completely for
|
||||
|
|
|
@ -26,13 +26,13 @@ Source: ZoneMinder-%{version}.tar.gz
|
|||
# patch no longer necessary as OpenSuse now in standard build
|
||||
# Patch1: zoneminder-1.26.5-opensuse.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: cmake polkit-devel
|
||||
BuildRequires: perl-DBI perl-DBD-mysql perl-Date-Manip perl-Sys-Mmap
|
||||
BuildRequires: libjpeg62 libjpeg62-devel libmysqld-devel libSDL-devel libgcrypt-devel libgnutls-devel
|
||||
BuildRequires: libffmpeg-devel x264
|
||||
BuildRequires: pcre-devel w32codec-all
|
||||
|
||||
Requires: apache2 apache2-mod_php5 mysql
|
||||
Requires: apache2 apache2-mod_php5 mysql polkit
|
||||
Requires: ffmpeg libavformat55
|
||||
Requires: php php-mysql
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
|
@ -158,6 +158,10 @@ fi
|
|||
%{webcgi}/nph-zms
|
||||
%{webcgi}/zms
|
||||
%{webroot}/zoneminder
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{webroot}/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{webroot}/zoneminder/images
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{webroot}/zoneminder/temp
|
||||
|
|
|
@ -41,9 +41,20 @@
|
|||
sudo chkconfig httpd on
|
||||
sudo service httpd start
|
||||
|
||||
7. This package has automatically configured and installed an SELinux policy
|
||||
7. This package will automatically configure and install an SELinux policy
|
||||
called local_zoneminder. A copy of this policy is in the documentation
|
||||
folder.
|
||||
|
||||
Unfortunately, this has not resolved all the SELinux issues so
|
||||
most will want to disable SELinux permanently by editing the following:
|
||||
|
||||
/etc/selinux/conf
|
||||
|
||||
Change SELINUX line from "enforcing" to "disabled". This change will not
|
||||
take effect until a reboot, however. To avoid a reboot, execute the
|
||||
following from the commandline:
|
||||
|
||||
sudo setenforce 0
|
||||
|
||||
8. Finally, you may start the ZoneMinder service:
|
||||
|
||||
|
|
|
@ -28,11 +28,11 @@ BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
|
|||
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
||||
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
||||
BuildRequires: perl(Expect) perl(X10::ActiveHome) perl(Astro::SunTime)
|
||||
BuildRequires: libcurl-devel vlc-devel ffmpeg-devel
|
||||
BuildRequires: libcurl-devel vlc-devel ffmpeg-devel polkit-devel
|
||||
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
|
||||
BuildRequires: httpd ffmpeg
|
||||
|
||||
Requires: httpd php php-mysql mysql-server libjpeg-turbo
|
||||
Requires: httpd php php-mysql mysql-server libjpeg-turbo polkit
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||
Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
|
||||
|
@ -138,6 +138,7 @@ rm -rf %{_docdir}/%{name}-%{version}
|
|||
%{_bindir}/zmvideo.pl
|
||||
%{_bindir}/zmwatch.pl
|
||||
%{_bindir}/zmcamtool.pl
|
||||
%{_bindir}/zmsystemctl.pl
|
||||
%{_bindir}/zmx10.pl
|
||||
%{_bindir}/zmonvif-probe.pl
|
||||
|
||||
|
@ -154,6 +155,9 @@ rm -rf %{_docdir}/%{name}-%{version}
|
|||
%{_datadir}/%{name}/db
|
||||
%{_datadir}/%{name}/www
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/images
|
||||
|
|
|
@ -47,9 +47,9 @@ BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
|
|||
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
||||
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
||||
BuildRequires: perl(Expect) perl(X10::ActiveHome) perl(Astro::SunTime)
|
||||
BuildRequires: libcurl-devel vlc-devel ffmpeg-devel >= 0.4.9
|
||||
BuildRequires: libcurl-devel vlc-devel polkit-devel ffmpeg-devel >= 0.4.9
|
||||
|
||||
Requires: httpd php php-mysql mysql-server libjpeg-turbo
|
||||
Requires: httpd php php-mysql mysql-server libjpeg-turbo polkit
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||
Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
|
||||
|
@ -245,6 +245,7 @@ fi
|
|||
%{_bindir}/zmvideo.pl
|
||||
%{_bindir}/zmwatch.pl
|
||||
%{_bindir}/zmcamtool.pl
|
||||
%{_bindir}/zmsystemctl.pl
|
||||
%{_bindir}/zmx10.pl
|
||||
%{_bindir}/zmonvif-probe.pl
|
||||
|
||||
|
@ -259,6 +260,9 @@ fi
|
|||
%{_datadir}/%{name}/db
|
||||
%{_datadir}/%{name}/www
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/images
|
||||
|
|
|
@ -1,24 +1,12 @@
|
|||
zoneminder (1.27.1-1) precise; urgency=low
|
||||
zoneminder (1.27.99+1-trusty-SNAPSHOT2014072901) trusty; urgency=medium
|
||||
|
||||
* Convert from php mysql ext to PDO
|
||||
* improve error messages
|
||||
* Make zmupdate re-run the most recent patch so that people running the daily builds get their db updates
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Wed, 16 Oct 2013 15:51:39 -0400
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Tue, 29 Jul 2014 14:50:20 -0400
|
||||
|
||||
zoneminder (1.26.4-2) precise; urgency=high
|
||||
zoneminder (1.27.0+1-trusty-v4ltomonitor-1) trusty; urgency=high
|
||||
|
||||
* improvements to zmupdate.pl, cleanups
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Thu, 03 Oct 2013 11:40:32 -0400
|
||||
|
||||
zoneminder (1.26.3-1) unstable; urgency=low
|
||||
|
||||
* A 'minor' release focusing on performance improvement and bug fixes.
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Sun, 22 Sep 2013 09:36:42 +0800
|
||||
|
||||
zoneminder (1.25.1-1) unstable; urgency=low
|
||||
|
||||
* Initial Version.
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Mon, 29 Apr 2013 12:38:00 -0400
|
||||
* Snapshot release -
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Wed, 09 Jul 2014 21:35:29 -0400
|
||||
|
|
|
@ -2,13 +2,13 @@ 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, 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
|
||||
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
|
||||
Standards-Version: 3.9.2
|
||||
|
||||
Package: zoneminder
|
||||
Architecture: any
|
||||
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-lite-perl, 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
|
||||
SUggests: mysql-server
|
||||
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-lite-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 | libvlccore8, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0
|
||||
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
|
||||
applications, including commercial or home CCTV, theft prevention and child
|
||||
|
|
|
@ -28,7 +28,7 @@ endif
|
|||
dh $@ --with autoreconf
|
||||
|
||||
override_dh_auto_configure:
|
||||
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-mysql=/usr --with-webdir=/usr/share/zoneminder --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=no --enable-mmap=yes
|
||||
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-mysql=/usr --with-mariadb=/usr --with-webdir=/usr/share/zoneminder --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=no --enable-mmap=yes
|
||||
|
||||
override_dh_clean:
|
||||
# Add here commands to clean up after the build process.
|
||||
|
@ -68,4 +68,4 @@ override_dh_auto_test:
|
|||
|
||||
.PHONY: override_dh_strip
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=zoneminder-dbg
|
||||
dh_strip --dbg-package=zoneminder-dbg
|
||||
|
|
|
@ -4,7 +4,14 @@
|
|||
configure_file(apache.conf.in "${CMAKE_CURRENT_BINARY_DIR}/apache.conf" @ONLY)
|
||||
configure_file(logrotate.conf.in "${CMAKE_CURRENT_BINARY_DIR}/logrotate.conf" @ONLY)
|
||||
configure_file(syslog.conf.in "${CMAKE_CURRENT_BINARY_DIR}/syslog.conf" @ONLY)
|
||||
configure_file(com.zoneminder.systemctl.policy.in "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.policy" @ONLY)
|
||||
configure_file(com.zoneminder.systemctl.rules.in "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.rules" @ONLY)
|
||||
configure_file(zoneminder.service.in "${CMAKE_CURRENT_BINARY_DIR}/zoneminder.service" @ONLY)
|
||||
|
||||
# Do not install the misc files by default
|
||||
#install(FILES "${CMAKE_CURRENT_BINARY_DIR}/apache.conf" "${CMAKE_CURRENT_BINARY_DIR}/logrotate.conf" "${CMAKE_CURRENT_BINARY_DIR}/syslog.conf" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/misc")
|
||||
|
||||
# Install Policykit rules and actions into the proper folders
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.policy" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.rules" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/rules.d")
|
||||
|
||||
|
|
|
@ -3,4 +3,14 @@ AUTOMAKE_OPTIONS = gnu
|
|||
EXTRA_DIST = \
|
||||
apache.conf.in \
|
||||
logrotate.conf.in \
|
||||
syslog.conf.in
|
||||
syslog.conf.in \
|
||||
zoneminder.service.in \
|
||||
com.zoneminder.systemctl.policy.in \
|
||||
com.zoneminder.systemctl.rules.in
|
||||
|
||||
polkit_actiondir = @POLKIT_PREFIX@/share/polkit-1/actions
|
||||
dist_polkit_action_DATA = com.zoneminder.systemctl.policy
|
||||
|
||||
polkit_rulesdir = @POLKIT_PREFIX@/share/polkit-1/rules.d
|
||||
dist_polkit_rules_DATA = com.zoneminder.systemctl.rules
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
|
||||
<vendor>The ZoneMinder Project</vendor>
|
||||
<vendor_url>http://www.zoneminder.com/</vendor_url>
|
||||
|
||||
<action id="com.zoneminder.policykit.pkexec.run-zmsystemctl">
|
||||
<description>Allow the ZoneMinder webuser to run zmsystemctl.pl</description>
|
||||
<message>The ZoneMinder webuser is trusted to run zmsystemctl.pl</message>
|
||||
<defaults>
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/perl</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.argv1">@BINDIR@/zmsystemctl.pl</annotate>
|
||||
</action>
|
||||
|
||||
</policyconfig>
|
|
@ -0,0 +1,7 @@
|
|||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "com.zoneminder.policykit.pkexec.run-zmsystemctl" &&
|
||||
subject.user != "@WEB_USER@") {
|
||||
return polkit.Result.NO;
|
||||
}
|
||||
|
||||
});
|
|
@ -0,0 +1,19 @@
|
|||
# ZoneMinder systemd unit file
|
||||
# This file is intended to work with all Linux distributions
|
||||
|
||||
[Unit]
|
||||
Description=ZoneMinder CCTV recording and security system
|
||||
After=network.target mysqld.service httpd.service
|
||||
Requires=mysqld.service httpd.service
|
||||
|
||||
[Service]
|
||||
User=@WEB_USER@
|
||||
Type=forking
|
||||
ExecStart=@BINDIR@/zmpkg.pl start
|
||||
ExecReload=@BINDIR@/zmpkg.pl restart
|
||||
ExecStop=/bin/bash -c '[[ "$(@BINDIR@/pgrep zmdc.pl)" > 0 ]] && @BINDIR@/zmpkg.pl stop'
|
||||
PIDFile="@ZM_RUNDIR@/zm.pid"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -15,6 +15,7 @@ configure_file(zmupdate.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmupdate.pl" @ONLY)
|
|||
configure_file(zmvideo.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmvideo.pl" @ONLY)
|
||||
configure_file(zmwatch.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmwatch.pl" @ONLY)
|
||||
configure_file(zmcamtool.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmcamtool.pl" @ONLY)
|
||||
configure_file(zmsystemctl.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmsystemctl.pl" @ONLY)
|
||||
if(NOT ZM_NO_X10)
|
||||
configure_file(zmx10.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmx10.pl" @ONLY)
|
||||
endif(NOT ZM_NO_X10)
|
||||
|
@ -24,7 +25,8 @@ configure_file(zm.in "${CMAKE_CURRENT_BINARY_DIR}/zm" @ONLY)
|
|||
#configure_file(zmeventdump.in zmeventdump @ONLY)
|
||||
|
||||
# Install the perl scripts
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmaudit.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmcontrol.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmdc.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmfilter.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmpkg.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtrack.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtrigger.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmupdate.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmvideo.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmwatch.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmcamtool.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmaudit.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmcontrol.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmdc.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmfilter.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmpkg.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtrack.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtrigger.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmupdate.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmvideo.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmwatch.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmcamtool.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmsystemctl.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
if(NOT ZM_NO_X10)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmx10.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
endif(NOT ZM_NO_X10)
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@ bin_SCRIPTS = \
|
|||
zmvideo.pl \
|
||||
zmcontrol.pl \
|
||||
zmtrack.pl \
|
||||
zmcamtool.pl
|
||||
zmcamtool.pl \
|
||||
zmsystemctl.pl
|
||||
|
||||
SUBDIRS = \
|
||||
. \
|
||||
|
@ -37,6 +38,7 @@ EXTRA_DIST = \
|
|||
zmcontrol.pl.in \
|
||||
zmtrack.pl.in \
|
||||
zmcamtool.pl.in \
|
||||
zmsystemctl.pl.in \
|
||||
ZoneMinder/Makefile.PL \
|
||||
ZoneMinder/README \
|
||||
ZoneMinder/Changes \
|
||||
|
@ -70,3 +72,4 @@ EXTRA_DIST = \
|
|||
zmdbrestore.in \
|
||||
zmeventdump.in \
|
||||
zmlogrotate.conf.in
|
||||
|
||||
|
|
|
@ -741,7 +741,7 @@ our @options =
|
|||
name => "ZM_V4L_MULTI_BUFFER",
|
||||
default => "yes",
|
||||
description => "Use more than one buffer for Video 4 Linux devices",
|
||||
help => "Performance when using Video 4 Linux devices is usually best if multiple buffers are used allowing the next image to be captured while the previous one is being processed. If you have multiple devices on a card sharing one input that requires switching then this approach can sometimes cause frames from one source to be mixed up with frames from another. Switching this option off prevents multi buffering resulting in slower but more stable image capture. This option is ignored for non-local cameras or if only one input is present on a capture chip. This option addresses a similar problem to the ZM_CAPTURES_PER_FRAME option and you should normally change the value of only one of the options at a time.",
|
||||
help => "Performance when using Video 4 Linux devices is usually best if multiple buffers are used allowing the next image to be captured while the previous one is being processed. If you have multiple devices on a card sharing one input that requires switching then this approach can sometimes cause frames from one source to be mixed up with frames from another. Switching this option off prevents multi buffering resulting in slower but more stable image capture. This option is ignored for non-local cameras or if only one input is present on a capture chip. This option addresses a similar problem to the ZM_CAPTURES_PER_FRAME option and you should normally change the value of only one of the options at a time. If you have different capture cards that need different values you can ovveride them in each individual monitor on the source page.",
|
||||
type => $types{boolean},
|
||||
category => "config",
|
||||
},
|
||||
|
@ -749,7 +749,7 @@ our @options =
|
|||
name => "ZM_CAPTURES_PER_FRAME",
|
||||
default => "1",
|
||||
description => "How many images are captured per returned frame, for shared local cameras",
|
||||
help => "If you are using cameras attached to a video capture card which forces multiple inputs to share one capture chip, it can sometimes produce images with interlaced frames reversed resulting in poor image quality and a distinctive comb edge appearance. Increasing this setting allows you to force additional image captures before one is selected as the captured frame. This allows the capture hardware to 'settle down' and produce better quality images at the price of lesser capture rates. This option has no effect on (a) network cameras, or (b) where multiple inputs do not share a capture chip. This option addresses a similar problem to the ZM_V4L_MULTI_BUFFER option and you should normally change the value of only one of the options at a time.",
|
||||
help => "If you are using cameras attached to a video capture card which forces multiple inputs to share one capture chip, it can sometimes produce images with interlaced frames reversed resulting in poor image quality and a distinctive comb edge appearance. Increasing this setting allows you to force additional image captures before one is selected as the captured frame. This allows the capture hardware to 'settle down' and produce better quality images at the price of lesser capture rates. This option has no effect on (a) network cameras, or (b) where multiple inputs do not share a capture chip. This option addresses a similar problem to the ZM_V4L_MULTI_BUFFER option and you should normally change the value of only one of the options at a time. If you have different capture cards that need different values you can ovveride them in each individual monitor on the source page.",
|
||||
type => $types{integer},
|
||||
category => "config",
|
||||
},
|
||||
|
|
|
@ -109,7 +109,7 @@ sub printMsg
|
|||
}
|
||||
|
||||
sub sendCmd
|
||||
{
|
||||
{
|
||||
my $self = shift;
|
||||
my $cmd = shift;
|
||||
my $result = undef;
|
||||
|
@ -135,13 +135,13 @@ sub reset
|
|||
my $cmd = "setOSDSetting%26isEnableTimeStamp%3D0%26isEnableDevName%3D1%26dispPos%3D0%26isEnabledOSDMask%3D0";
|
||||
$self->sendCmd( $cmd );
|
||||
# Setup For Stream=0 Resolution=720p Bandwith=4M FPS=30 KeyFrameInterval/GOP=100 VBR=ON
|
||||
my $cmd = "setVideoStreamParam%26streamType%3D0%26resolution%3D0%26bitRate%3D4194304%26frameRate%3D30%26GOP%3D100%26isVBR%3D1";
|
||||
$cmd = "setVideoStreamParam%26streamType%3D0%26resolution%3D0%26bitRate%3D4194304%26frameRate%3D30%26GOP%3D100%26isVBR%3D1";
|
||||
$self->sendCmd( $cmd );
|
||||
# Setup For Infrared AUTO
|
||||
my $cmd = "setInfraLedConfig%26Mode%3D1";
|
||||
$cmd = "setInfraLedConfig%26Mode%3D1";
|
||||
$self->sendCmd( $cmd );
|
||||
# Reset image settings
|
||||
my $cmd = "resetImageSetting";
|
||||
$cmd = "resetImageSetting";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
|
@ -150,10 +150,10 @@ sub moveStop
|
|||
my $self = shift;
|
||||
Debug( "Move Stop" );
|
||||
my $cmd = "ptzStopRun";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "setDevName%26devName%3D.";
|
||||
$self->sendCmd( $cmd );
|
||||
$cmd = "setDevName%26devName%3D.";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "setOSDSetting%26isEnableDevName%3D1";
|
||||
$cmd = "setOSDSetting%26isEnableDevName%3D1";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ sub moveConUp
|
|||
if ( $tiltspeed < 0 ) {
|
||||
$tiltspeed = 0;
|
||||
}
|
||||
Debug( "Move Up" );
|
||||
Debug( "Move Up" );
|
||||
if ( $osd eq "on" )
|
||||
{
|
||||
my $cmd = "setDevName%26devName%3DMove Up $tiltspeed";
|
||||
|
@ -192,7 +192,7 @@ sub moveConUp
|
|||
}
|
||||
my $cmd = "setPTZSpeed%26speed%3D$tiltspeed";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "ptzMoveUp";
|
||||
$cmd = "ptzMoveUp";
|
||||
$self->sendCmd( $cmd );
|
||||
$self->autoStop( $self->{Monitor}->{AutoStopTimeout} );
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ sub moveConDown
|
|||
}
|
||||
my $cmd = "setPTZSpeed%26speed%3D$tiltspeed";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "ptzMoveDown";
|
||||
$cmd = "ptzMoveDown";
|
||||
$self->sendCmd( $cmd );
|
||||
$self->autoStop( $self->{Monitor}->{AutoStopTimeout} );
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ sub moveConLeft
|
|||
}
|
||||
my $cmd = "setPTZSpeed%26speed%3D$panspeed";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "ptzMoveLeft";
|
||||
$cmd = "ptzMoveLeft";
|
||||
$self->sendCmd( $cmd );
|
||||
$self->autoStop( $self->{Monitor}->{AutoStopTimeout} );
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ sub moveConRight
|
|||
}
|
||||
my $cmd = "setPTZSpeed%26speed%3D$panspeed";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "ptzMoveRight";
|
||||
$cmd = "ptzMoveRight";
|
||||
$self->sendCmd( $cmd );
|
||||
$self->autoStop( $self->{Monitor}->{AutoStopTimeout} );
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ sub moveConUpLeft
|
|||
}
|
||||
my $cmd = "setPTZSpeed%26speed%3D$tiltspeed";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "ptzMoveTopLeft";
|
||||
$cmd = "ptzMoveTopLeft";
|
||||
$self->sendCmd( $cmd );
|
||||
$self->autoStop( $self->{Monitor}->{AutoStopTimeout} );
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ sub moveConUpRight
|
|||
}
|
||||
my $cmd = "setPTZSpeed%26speed%3D$tiltspeed";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "ptzMoveTopRight";
|
||||
$cmd = "ptzMoveTopRight";
|
||||
$self->sendCmd( $cmd );
|
||||
$self->autoStop( $self->{Monitor}->{AutoStopTimeout} );
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ sub moveConDownLeft
|
|||
}
|
||||
my $cmd = "setPTZSpeed%26speed%3D$tiltspeed";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "ptzMoveBottomLeft";
|
||||
$cmd = "ptzMoveBottomLeft";
|
||||
$self->sendCmd( $cmd );
|
||||
$self->autoStop( $self->{Monitor}->{AutoStopTimeout} );
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ sub moveConDownRight
|
|||
}
|
||||
my $cmd = "setPTZSpeed%26speed%3D$tiltspeed";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "ptzMoveBottomRight";
|
||||
$cmd = "ptzMoveBottomRight";
|
||||
$self->sendCmd( $cmd );
|
||||
$self->autoStop( $self->{Monitor}->{AutoStopTimeout} );
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ sub zoomConTele
|
|||
}
|
||||
my $cmd = "setInfraLedConfig%26mode%3D1";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "openInfraLed";
|
||||
$cmd = "openInfraLed";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
|
@ -411,7 +411,7 @@ sub zoomConWide
|
|||
}
|
||||
my $cmd = "setInfraLedConfig%26mode%3D1";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "closeInfraLed";
|
||||
$cmd = "closeInfraLed";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
|
@ -425,7 +425,7 @@ sub wake
|
|||
$self->sendCmd( $cmd );
|
||||
}
|
||||
my $cmd = "setInfraLedConfig%26mode%3D0";
|
||||
$self->sendCmd( $cmd );
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
|
||||
sub focusConNear
|
||||
|
@ -445,7 +445,7 @@ sub focusConNear
|
|||
{
|
||||
my $cmd = "setDevName%26devName%3DSharpness $speed";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "setOSDSetting%26isEnableDevName%3D1";
|
||||
$cmd = "setOSDSetting%26isEnableDevName%3D1";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
my $cmd = "setSharpness%26sharpness%3D$speed";
|
||||
|
@ -668,7 +668,7 @@ sub presetSet
|
|||
my $cmd = "setDevName%26devName%3DSet Preset $preset";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
my $cmd = "ptzAddPresetPoint%26name%3D$preset";
|
||||
$cmd = "ptzAddPresetPoint%26name%3D$preset";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
}
|
||||
|
@ -687,7 +687,7 @@ sub presetGoto
|
|||
}
|
||||
my $cmd = "setPTZSpeed%26speed%3D0";
|
||||
$self->sendCmd( $cmd );
|
||||
my $cmd = "ptzGotoPresetPoint%26name%3D$preset";
|
||||
$cmd = "ptzGotoPresetPoint%26name%3D$preset";
|
||||
$self->sendCmd( $cmd );
|
||||
}
|
||||
}
|
||||
|
@ -744,3 +744,4 @@ at your option, any later version of Perl 5 you may have available.
|
|||
|
||||
|
||||
=cut
|
||||
|
||||
|
|
|
@ -83,9 +83,17 @@ sub zmMemAttach( $$ )
|
|||
}
|
||||
if ( !defined($monitor->{MMapAddr}) )
|
||||
{
|
||||
|
||||
my $mmap_file = $Config{ZM_PATH_MAP}."/zm.mmap.".$monitor->{Id};
|
||||
if ( -s $mmap_file < $size ) {
|
||||
Error( sprintf( "Memory map file '%s' should have been %d but was instead %d", $mmap_file, $size, -s $mmap_file ) );
|
||||
if ( ! -e $mmap_file ) {
|
||||
Error( sprintf( "Memory map file '%s' does not exist. zmc might not be running.", $mmap_file ) );
|
||||
return ( undef );
|
||||
}
|
||||
|
||||
my $mmap_file_size = -s $mmap_file;
|
||||
|
||||
if ( $mmap_file_size < $size ) {
|
||||
Error( sprintf( "Memory map file '%s' should have been %d but was instead %d", $mmap_file, $size, $mmap_file_size ) );
|
||||
return ( undef );
|
||||
}
|
||||
if ( !open( MMAP, "+<".$mmap_file ) )
|
||||
|
|
|
@ -123,6 +123,18 @@ if ( $command eq "state" )
|
|||
$command = "restart";
|
||||
}
|
||||
|
||||
# Check if we are running systemd and if we have been called by the system
|
||||
if ( $command =~ /^(start|stop|restart)$/ )
|
||||
{
|
||||
# We have to detaint to keep perl from complaining
|
||||
$command = $1;
|
||||
|
||||
if ( systemdRunning() && !calledBysystem() ) {
|
||||
qx(@BINDIR@/zmsystemctl.pl $command);
|
||||
$command = "";
|
||||
}
|
||||
}
|
||||
|
||||
if ( $command =~ /^(?:stop|restart)$/ )
|
||||
{
|
||||
my $status = runCommand( "zmdc.pl check" );
|
||||
|
@ -245,4 +257,32 @@ if ( $command eq "logrot" )
|
|||
|
||||
exit( $retval );
|
||||
|
||||
sub systemdRunning
|
||||
{
|
||||
my $result = 0;
|
||||
|
||||
my $output = qx(ps -o comm="" 1);
|
||||
chomp( $output );
|
||||
|
||||
if ($output =~ /systemd/) {
|
||||
$result = 1;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub calledBysystem
|
||||
{
|
||||
my $result = 0;
|
||||
my $ppid = getppid();
|
||||
|
||||
my $output = qx(ps -o comm="" $ppid);
|
||||
chomp( $output );
|
||||
|
||||
if ($output =~ /^(?:systemd|init)$/) {
|
||||
$result = 1;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
__END__
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/pkexec /usr/bin/perl
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Update Script, $Date$, $Revision$
|
||||
# Copyright (C) 2001-2008 Philip Coombes
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# This is a wrapper script that allows zoneminder to start and stop itself
|
||||
# in a manner that keeps it in-sync with systemd. This script is intended
|
||||
# to be called internally by zoneminder and may not give the desired results
|
||||
# if run from the command line.
|
||||
#
|
||||
use warnings;
|
||||
use strict;
|
||||
use bytes;
|
||||
|
||||
@EXTRA_PERL_LIB@
|
||||
use ZoneMinder::Logger qw(:all);
|
||||
|
||||
my $command = $ARGV[0];
|
||||
|
||||
if ( (scalar(@ARGV) == 1) && ($command =~ /^(start|stop|restart)$/ )) {
|
||||
$command = $1;
|
||||
} else {
|
||||
die(" USAGE: zmsystemctl.pl <start|stop|restart>\n");
|
||||
}
|
||||
|
||||
my $path = qx(which systemctl);
|
||||
chomp($path);
|
||||
|
||||
my $status = $? >> 8;
|
||||
if ( !$path || $status ) {
|
||||
Fatal( "Unable to determine systemctl executable. Is systemd in use?" );
|
||||
}
|
||||
|
||||
Info( "Redirecting command through systemctl\n" );
|
||||
exec("$path $command zoneminder");
|
||||
|
|
@ -1014,7 +1014,7 @@ if ( $version )
|
|||
$dbh->{'AutoCommit'} = 0;
|
||||
foreach my $patch ( @files ) {
|
||||
my ( $v ) = $patch =~ /^zm_update\-([\d\.]+)\.sql$/;
|
||||
if ( $v gt $version ) {
|
||||
if ( $v ge $version ) {
|
||||
print( "Upgrading DB to $v from $version\n" );
|
||||
patchDB( $dbh, $v );
|
||||
if ( $dbh->errstr() ) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
AUTOMAKE_OPTIONS = gnu
|
||||
|
||||
AM_CPPFLAGS = @MYSQL_CFLAGS@ @FFMPEG_CFLAGS@ -Wall -finline-functions -fomit-frame-pointer
|
||||
AM_CPPFLAGS = @MYSQL_CFLAGS@ @MARIADB_CFLAGS@ @FFMPEG_CFLAGS@ -Wall -finline-functions -fomit-frame-pointer
|
||||
#AM_CXXFLAGS = -frepo
|
||||
|
||||
CLEANFILES = *.rpo
|
||||
|
|
|
@ -283,7 +283,7 @@ AVFrame **LocalCamera::capturePictures = 0;
|
|||
|
||||
LocalCamera *LocalCamera::last_camera = NULL;
|
||||
|
||||
LocalCamera::LocalCamera( int p_id, const std::string &p_device, int p_channel, int p_standard, const std::string &p_method, int p_width, int p_height, int p_colours, int p_palette, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture, unsigned int p_extras) :
|
||||
LocalCamera::LocalCamera( int p_id, const std::string &p_device, int p_channel, int p_standard, bool p_v4l_multi_buffer, unsigned int p_v4l_captures_per_frame, const std::string &p_method, int p_width, int p_height, int p_colours, int p_palette, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture, unsigned int p_extras) :
|
||||
Camera( p_id, LOCAL_SRC, p_width, p_height, p_colours, ZM_SUBPIX_ORDER_DEFAULT_FOR_COLOUR(p_colours), p_brightness, p_contrast, p_hue, p_colour, p_capture ),
|
||||
device( p_device ),
|
||||
channel( p_channel ),
|
||||
|
@ -296,6 +296,8 @@ LocalCamera::LocalCamera( int p_id, const std::string &p_device, int p_channel,
|
|||
// do the initial opening etc
|
||||
device_prime = (camera_count++ == 0);
|
||||
v4l_version = (p_method=="v4l2"?2:1);
|
||||
v4l_multi_buffer = p_v4l_multi_buffer;
|
||||
v4l_captures_per_frame = p_v4l_captures_per_frame;
|
||||
|
||||
if ( capture )
|
||||
{
|
||||
|
@ -363,15 +365,13 @@ LocalCamera::LocalCamera( int p_id, const std::string &p_device, int p_channel,
|
|||
if ( width != last_camera->width || height != last_camera->height )
|
||||
Warning( "Different capture sizes defined for monitors sharing same device, results may be unpredictable or completely wrong" );
|
||||
}
|
||||
}
|
||||
|
||||
#if HAVE_LIBSWSCALE
|
||||
if( capture ) {
|
||||
/* Get ffmpeg pixel format based on capture palette and endianness */
|
||||
capturePixFormat = getFfPixFormatFromV4lPalette( v4l_version, palette );
|
||||
imagePixFormat = PIX_FMT_NONE;
|
||||
}
|
||||
#endif // HAVE_LIBSWSCALE
|
||||
}
|
||||
|
||||
/* V4L2 format matching */
|
||||
#if ZM_HAS_V4L2
|
||||
|
@ -781,13 +781,18 @@ void LocalCamera::Initialise()
|
|||
Debug( 3, "Setting up request buffers" );
|
||||
|
||||
memset( &v4l2_data.reqbufs, 0, sizeof(v4l2_data.reqbufs) );
|
||||
if ( channel_count > 1 )
|
||||
if ( config.v4l_multi_buffer )
|
||||
if ( channel_count > 1 ) {
|
||||
Debug( 3, "Channel count is %d", channel_count );
|
||||
if ( v4l_multi_buffer ){
|
||||
v4l2_data.reqbufs.count = 2*channel_count;
|
||||
else
|
||||
} else {
|
||||
v4l2_data.reqbufs.count = 1;
|
||||
else
|
||||
}
|
||||
} else {
|
||||
v4l2_data.reqbufs.count = 8;
|
||||
}
|
||||
Debug( 3, "Request buffers count is %d", v4l2_data.reqbufs.count );
|
||||
|
||||
v4l2_data.reqbufs.type = v4l2_data.fmt.type;
|
||||
v4l2_data.reqbufs.memory = V4L2_MEMORY_MMAP;
|
||||
|
||||
|
@ -803,10 +808,10 @@ void LocalCamera::Initialise()
|
|||
}
|
||||
}
|
||||
|
||||
if ( v4l2_data.reqbufs.count < (config.v4l_multi_buffer?2:1) )
|
||||
if ( v4l2_data.reqbufs.count < (v4l_multi_buffer?2:1) )
|
||||
Fatal( "Insufficient buffer memory %d on video device", v4l2_data.reqbufs.count );
|
||||
|
||||
Debug( 3, "Setting up %d data buffers", v4l2_data.reqbufs.count );
|
||||
Debug( 3, "Setting up data buffers: Channels %d MultiBuffer %d Buffers: %d", channel_count, v4l_multi_buffer, v4l2_data.reqbufs.count );
|
||||
|
||||
v4l2_data.buffers = new V4L2MappedBuffer[v4l2_data.reqbufs.count];
|
||||
#if HAVE_LIBSWSCALE
|
||||
|
@ -967,7 +972,7 @@ void LocalCamera::Initialise()
|
|||
Debug( 3, "Setting up request buffers" );
|
||||
if ( ioctl( vid_fd, VIDIOCGMBUF, &v4l1_data.frames ) < 0 )
|
||||
Fatal( "Failed to setup memory: %s", strerror(errno) );
|
||||
if ( channel_count > 1 && !config.v4l_multi_buffer )
|
||||
if ( channel_count > 1 && !v4l_multi_buffer )
|
||||
v4l1_data.frames.frames = 1;
|
||||
v4l1_data.buffers = new video_mmap[v4l1_data.frames.frames];
|
||||
Debug( 4, "vmb.frames = %d", v4l1_data.frames.frames );
|
||||
|
@ -1974,7 +1979,11 @@ int LocalCamera::Capture( Image &image )
|
|||
|
||||
int captures_per_frame = 1;
|
||||
if ( channel_count > 1 )
|
||||
captures_per_frame = config.captures_per_frame;
|
||||
captures_per_frame = v4l_captures_per_frame;
|
||||
if ( captures_per_frame <= 0 ) {
|
||||
captures_per_frame = 1;
|
||||
Warning( "Invalid Captures Per Frame setting: %d", captures_per_frame );
|
||||
}
|
||||
|
||||
|
||||
// Do the capture, unless we are the second or subsequent camera on a channel, in which case just reuse the buffer
|
||||
|
@ -2126,12 +2135,16 @@ int LocalCamera::PostCapture()
|
|||
return( -1 );
|
||||
}
|
||||
}
|
||||
Debug( 3, "Requeueing buffer %d", v4l2_data.bufptr->index );
|
||||
if ( vidioctl( vid_fd, VIDIOC_QBUF, v4l2_data.bufptr ) < 0 )
|
||||
{
|
||||
Error( "Unable to requeue buffer %d: %s", v4l2_data.bufptr->index, strerror(errno) )
|
||||
return( -1 );
|
||||
}
|
||||
if ( v4l2_data.bufptr ) {
|
||||
Debug( 3, "Requeueing buffer %d", v4l2_data.bufptr->index );
|
||||
if ( vidioctl( vid_fd, VIDIOC_QBUF, v4l2_data.bufptr ) < 0 )
|
||||
{
|
||||
Error( "Unable to requeue buffer %d: %s", v4l2_data.bufptr->index, strerror(errno) )
|
||||
return( -1 );
|
||||
}
|
||||
} else {
|
||||
Error( "Unable to requeue buffer due to not v4l2_data" )
|
||||
}
|
||||
}
|
||||
#endif // ZM_HAS_V4L2
|
||||
#if ZM_HAS_V4L1
|
||||
|
|
|
@ -86,13 +86,14 @@ protected:
|
|||
|
||||
uint32_t AutoSelectFormat(int p_colours);
|
||||
|
||||
protected:
|
||||
static int camera_count;
|
||||
static int channel_count;
|
||||
static int channels[VIDEO_MAX_FRAME];
|
||||
static int standards[VIDEO_MAX_FRAME];
|
||||
static int vid_fd;
|
||||
static int v4l_version;
|
||||
bool v4l_multi_buffer;
|
||||
unsigned int v4l_captures_per_frame;
|
||||
|
||||
#if ZM_HAS_V4L2
|
||||
static V4L2Data v4l2_data;
|
||||
|
@ -112,7 +113,7 @@ protected:
|
|||
static LocalCamera *last_camera;
|
||||
|
||||
public:
|
||||
LocalCamera( int p_id, const std::string &device, int p_channel, int p_format, const std::string &p_method, int p_width, int p_height, int p_colours, int p_palette, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture, unsigned int p_extras = 0);
|
||||
LocalCamera( int p_id, const std::string &device, int p_channel, int p_format, bool v4lmultibuffer, unsigned int v4lcapturesperframe, const std::string &p_method, int p_width, int p_height, int p_colours, int p_palette, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture, unsigned int p_extras = 0);
|
||||
~LocalCamera();
|
||||
|
||||
void Initialise();
|
||||
|
|
|
@ -373,63 +373,11 @@ Monitor::Monitor(
|
|||
+ 64; /* Padding used to permit aligning the images buffer to 16 byte boundary */
|
||||
|
||||
Debug( 1, "mem.size=%d", mem_size );
|
||||
#if ZM_MEM_MAPPED
|
||||
snprintf( mem_file, sizeof(mem_file), "%s/zm.mmap.%d", config.path_map, id );
|
||||
map_fd = open( mem_file, O_RDWR|O_CREAT, (mode_t)0600 );
|
||||
if ( map_fd < 0 )
|
||||
Fatal( "Can't open memory map file %s, probably not enough space free: %s", mem_file, strerror(errno) );
|
||||
struct stat map_stat;
|
||||
if ( fstat( map_fd, &map_stat ) < 0 )
|
||||
Fatal( "Can't stat memory map file %s: %s", mem_file, strerror(errno) );
|
||||
if ( map_stat.st_size != mem_size && purpose == CAPTURE )
|
||||
{
|
||||
// Allocate the size
|
||||
if ( ftruncate( map_fd, mem_size ) < 0 )
|
||||
Fatal( "Can't extend memory map file %s to %d bytes: %s", mem_file, mem_size, strerror(errno) );
|
||||
}
|
||||
else if ( map_stat.st_size != mem_size )
|
||||
{
|
||||
Error( "Got unexpected memory map file size %ld, expected %d", map_stat.st_size, mem_size );
|
||||
}
|
||||
mem_ptr = NULL;
|
||||
|
||||
mem_ptr = (unsigned char *)mmap( NULL, mem_size, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_LOCKED, map_fd, 0 );
|
||||
if ( mem_ptr == MAP_FAILED )
|
||||
if ( errno == EAGAIN )
|
||||
{
|
||||
Debug( 1, "Unable to map file %s (%d bytes) to locked memory, trying unlocked", mem_file, mem_size );
|
||||
mem_ptr = (unsigned char *)mmap( NULL, mem_size, PROT_READ|PROT_WRITE, MAP_SHARED, map_fd, 0 );
|
||||
}
|
||||
if ( mem_ptr == MAP_FAILED )
|
||||
Fatal( "Can't map file %s (%d bytes) to memory: %s(%d)", mem_file, mem_size, strerror(errno), errno );
|
||||
#else // ZM_MEM_MAPPED
|
||||
shm_id = shmget( (config.shm_key&0xffff0000)|id, mem_size, IPC_CREAT|0700 );
|
||||
if ( shm_id < 0 )
|
||||
{
|
||||
Error( "Can't shmget, probably not enough shared memory space free: %s", strerror(errno));
|
||||
exit( -1 );
|
||||
}
|
||||
mem_ptr = (unsigned char *)shmat( shm_id, 0, 0 );
|
||||
if ( mem_ptr < 0 )
|
||||
{
|
||||
Error( "Can't shmat: %s", strerror(errno));
|
||||
exit( -1 );
|
||||
}
|
||||
#endif // ZM_MEM_MAPPED
|
||||
|
||||
shared_data = (SharedData *)mem_ptr;
|
||||
trigger_data = (TriggerData *)((char *)shared_data + sizeof(SharedData));
|
||||
struct timeval *shared_timestamps = (struct timeval *)((char *)trigger_data + sizeof(TriggerData));
|
||||
unsigned char *shared_images = (unsigned char *)((char *)shared_timestamps + (image_buffer_count*sizeof(struct timeval)));
|
||||
|
||||
if(((unsigned long)shared_images % 16) != 0) {
|
||||
/* Align images buffer to nearest 16 byte boundary */
|
||||
Debug(3,"Aligning shared memory images to the next 16 byte boundary");
|
||||
shared_images = (uint8_t*)((unsigned long)shared_images + (16 - ((unsigned long)shared_images % 16)));
|
||||
}
|
||||
|
||||
|
||||
if ( purpose == CAPTURE )
|
||||
{
|
||||
if ( purpose == CAPTURE ) {
|
||||
this->connect();
|
||||
if ( ! mem_ptr ) exit(-1);
|
||||
memset( mem_ptr, 0, mem_size );
|
||||
shared_data->size = sizeof(SharedData);
|
||||
shared_data->active = enabled;
|
||||
|
@ -455,17 +403,16 @@ Monitor::Monitor(
|
|||
trigger_data->trigger_text[0] = 0;
|
||||
trigger_data->trigger_showtext[0] = 0;
|
||||
shared_data->valid = true;
|
||||
}
|
||||
else if ( purpose == ANALYSIS )
|
||||
{
|
||||
} else if ( purpose == ANALYSIS ) {
|
||||
this->connect();
|
||||
if ( ! mem_ptr ) exit(-1);
|
||||
shared_data->state = IDLE;
|
||||
shared_data->last_read_time = 0;
|
||||
shared_data->alarm_x = -1;
|
||||
shared_data->alarm_y = -1;
|
||||
|
||||
}
|
||||
|
||||
if ( !shared_data->valid )
|
||||
if ( ( ! mem_ptr ) || ! shared_data->valid )
|
||||
{
|
||||
if ( purpose != QUERY )
|
||||
{
|
||||
|
@ -478,22 +425,9 @@ Monitor::Monitor(
|
|||
}
|
||||
}
|
||||
|
||||
image_buffer = new Snapshot[image_buffer_count];
|
||||
for ( int i = 0; i < image_buffer_count; i++ )
|
||||
{
|
||||
image_buffer[i].timestamp = &(shared_timestamps[i]);
|
||||
image_buffer[i].image = new Image( width, height, camera->Colours(), camera->SubpixelOrder(), &(shared_images[i*camera->ImageSize()]) );
|
||||
image_buffer[i].image->HoldBuffer(true); /* Don't release the internal buffer or replace it with another */
|
||||
}
|
||||
if ( (deinterlacing & 0xff) == 4)
|
||||
{
|
||||
/* Four field motion adaptive deinterlacing in use */
|
||||
/* Allocate a buffer for the next image */
|
||||
next_buffer.image = new Image( width, height, camera->Colours(), camera->SubpixelOrder());
|
||||
next_buffer.timestamp = new struct timeval;
|
||||
}
|
||||
if ( !n_zones )
|
||||
{
|
||||
// Will this not happen everytime a monitor is instantiated? Seems like all the calls to the Monitor constructor pass a zero for n_zones, then load zones after..
|
||||
if ( !n_zones ) {
|
||||
Debug( 1, "Monitor %s has no zones, adding one.", name );
|
||||
n_zones = 1;
|
||||
zones = new Zone *[1];
|
||||
Coord coords[4] = { Coord( 0, 0 ), Coord( width-1, 0 ), Coord( width-1, height-1 ), Coord( 0, height-1 ) };
|
||||
|
@ -558,22 +492,98 @@ Monitor::Monitor(
|
|||
}
|
||||
}
|
||||
|
||||
Monitor::~Monitor()
|
||||
{
|
||||
if ( event )
|
||||
Info( "%s: %03d - Closing event %d, shutting down", name, image_count, event->Id() );
|
||||
closeEvent();
|
||||
bool Monitor::connect() {
|
||||
#if ZM_MEM_MAPPED
|
||||
snprintf( mem_file, sizeof(mem_file), "%s/zm.mmap.%d", config.path_map, id );
|
||||
map_fd = open( mem_file, O_RDWR|O_CREAT, (mode_t)0600 );
|
||||
if ( map_fd < 0 )
|
||||
Fatal( "Can't open memory map file %s, probably not enough space free: %s", mem_file, strerror(errno) );
|
||||
|
||||
if ( (deinterlacing & 0xff) == 4)
|
||||
{
|
||||
delete next_buffer.image;
|
||||
delete next_buffer.timestamp;
|
||||
struct stat map_stat;
|
||||
if ( fstat( map_fd, &map_stat ) < 0 )
|
||||
Fatal( "Can't stat memory map file %s: %s, is the zmc process for this monitor running?", mem_file, strerror(errno) );
|
||||
if ( map_stat.st_size != mem_size && purpose == CAPTURE ) {
|
||||
// Allocate the size
|
||||
if ( ftruncate( map_fd, mem_size ) < 0 ) {
|
||||
Fatal( "Can't extend memory map file %s to %d bytes: %s", mem_file, mem_size, strerror(errno) );
|
||||
}
|
||||
} else if ( map_stat.st_size == 0 ) {
|
||||
Error( "Got empty memory map file size %ld, is the zmc process for this monitor running?", map_stat.st_size, mem_size );
|
||||
return false;
|
||||
} else if ( map_stat.st_size != mem_size ) {
|
||||
Error( "Got unexpected memory map file size %ld, expected %d", map_stat.st_size, mem_size );
|
||||
return false;
|
||||
} else {
|
||||
mem_ptr = (unsigned char *)mmap( NULL, mem_size, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_LOCKED, map_fd, 0 );
|
||||
if ( mem_ptr == MAP_FAILED ) {
|
||||
if ( errno == EAGAIN ) {
|
||||
Debug( 1, "Unable to map file %s (%d bytes) to locked memory, trying unlocked", mem_file, mem_size );
|
||||
mem_ptr = (unsigned char *)mmap( NULL, mem_size, PROT_READ|PROT_WRITE, MAP_SHARED, map_fd, 0 );
|
||||
Debug( 1, "Mapped file %s (%d bytes) to locked memory, unlocked", mem_file, mem_size );
|
||||
}
|
||||
}
|
||||
if ( mem_ptr == MAP_FAILED )
|
||||
Fatal( "Can't map file %s (%d bytes) to memory: %s(%d)", mem_file, mem_size, strerror(errno), errno );
|
||||
}
|
||||
#else // ZM_MEM_MAPPED
|
||||
shm_id = shmget( (config.shm_key&0xffff0000)|id, mem_size, IPC_CREAT|0700 );
|
||||
if ( shm_id < 0 ) {
|
||||
Error( "Can't shmget, probably not enough shared memory space free: %s", strerror(errno));
|
||||
exit( -1 );
|
||||
}
|
||||
mem_ptr = (unsigned char *)shmat( shm_id, 0, 0 );
|
||||
if ( mem_ptr < 0 )
|
||||
{
|
||||
Error( "Can't shmat: %s", strerror(errno));
|
||||
exit( -1 );
|
||||
}
|
||||
#endif // ZM_MEM_MAPPED
|
||||
shared_data = (SharedData *)mem_ptr;
|
||||
trigger_data = (TriggerData *)((char *)shared_data + sizeof(SharedData));
|
||||
struct timeval *shared_timestamps = (struct timeval *)((char *)trigger_data + sizeof(TriggerData));
|
||||
unsigned char *shared_images = (unsigned char *)((char *)shared_timestamps + (image_buffer_count*sizeof(struct timeval)));
|
||||
|
||||
if(((unsigned long)shared_images % 16) != 0) {
|
||||
/* Align images buffer to nearest 16 byte boundary */
|
||||
Debug(3,"Aligning shared memory images to the next 16 byte boundary");
|
||||
shared_images = (uint8_t*)((unsigned long)shared_images + (16 - ((unsigned long)shared_images % 16)));
|
||||
}
|
||||
image_buffer = new Snapshot[image_buffer_count];
|
||||
for ( int i = 0; i < image_buffer_count; i++ )
|
||||
{
|
||||
delete image_buffer[i].image;
|
||||
image_buffer[i].timestamp = &(shared_timestamps[i]);
|
||||
image_buffer[i].image = new Image( width, height, camera->Colours(), camera->SubpixelOrder(), &(shared_images[i*camera->ImageSize()]) );
|
||||
image_buffer[i].image->HoldBuffer(true); /* Don't release the internal buffer or replace it with another */
|
||||
}
|
||||
delete[] image_buffer;
|
||||
if ( (deinterlacing & 0xff) == 4)
|
||||
{
|
||||
/* Four field motion adaptive deinterlacing in use */
|
||||
/* Allocate a buffer for the next image */
|
||||
next_buffer.image = new Image( width, height, camera->Colours(), camera->SubpixelOrder());
|
||||
next_buffer.timestamp = new struct timeval;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Monitor::~Monitor()
|
||||
{
|
||||
if ( mem_ptr ) {
|
||||
if ( event )
|
||||
Info( "%s: %03d - Closing event %d, shutting down", name, image_count, event->Id() );
|
||||
closeEvent();
|
||||
|
||||
if ( (deinterlacing & 0xff) == 4)
|
||||
{
|
||||
delete next_buffer.image;
|
||||
delete next_buffer.timestamp;
|
||||
}
|
||||
for ( int i = 0; i < image_buffer_count; i++ )
|
||||
{
|
||||
delete image_buffer[i].image;
|
||||
}
|
||||
delete[] image_buffer;
|
||||
|
||||
} // end if mem_ptr
|
||||
|
||||
for ( int i = 0; i < n_zones; i++ )
|
||||
{
|
||||
|
@ -583,40 +593,39 @@ Monitor::~Monitor()
|
|||
|
||||
delete camera;
|
||||
|
||||
if ( purpose == ANALYSIS )
|
||||
{
|
||||
shared_data->state = state = IDLE;
|
||||
shared_data->last_read_index = image_buffer_count;
|
||||
shared_data->last_read_time = 0;
|
||||
}
|
||||
else if ( purpose == CAPTURE )
|
||||
{
|
||||
shared_data->valid = false;
|
||||
memset( mem_ptr, 0, mem_size );
|
||||
}
|
||||
if ( mem_ptr ) {
|
||||
if ( purpose == ANALYSIS )
|
||||
{
|
||||
shared_data->state = state = IDLE;
|
||||
shared_data->last_read_index = image_buffer_count;
|
||||
shared_data->last_read_time = 0;
|
||||
}
|
||||
else if ( purpose == CAPTURE )
|
||||
{
|
||||
shared_data->valid = false;
|
||||
memset( mem_ptr, 0, mem_size );
|
||||
}
|
||||
|
||||
#if ZM_MEM_MAPPED
|
||||
if ( msync( mem_ptr, mem_size, MS_SYNC ) < 0 )
|
||||
Error( "Can't msync: %s", strerror(errno) );
|
||||
if ( munmap( mem_ptr, mem_size ) < 0 )
|
||||
Fatal( "Can't munmap: %s", strerror(errno) );
|
||||
close( map_fd );
|
||||
if ( msync( mem_ptr, mem_size, MS_SYNC ) < 0 )
|
||||
Error( "Can't msync: %s", strerror(errno) );
|
||||
if ( munmap( mem_ptr, mem_size ) < 0 )
|
||||
Fatal( "Can't munmap: %s", strerror(errno) );
|
||||
close( map_fd );
|
||||
#else // ZM_MEM_MAPPED
|
||||
struct shmid_ds shm_data;
|
||||
if ( shmctl( shm_id, IPC_STAT, &shm_data ) < 0 )
|
||||
{
|
||||
Error( "Can't shmctl: %s", strerror(errno) );
|
||||
exit( -1 );
|
||||
}
|
||||
if ( shm_data.shm_nattch <= 1 )
|
||||
{
|
||||
if ( shmctl( shm_id, IPC_RMID, 0 ) < 0 )
|
||||
{
|
||||
Error( "Can't shmctl: %s", strerror(errno) );
|
||||
exit( -1 );
|
||||
}
|
||||
}
|
||||
struct shmid_ds shm_data;
|
||||
if ( shmctl( shm_id, IPC_STAT, &shm_data ) < 0 ) {
|
||||
Error( "Can't shmctl: %s", strerror(errno) );
|
||||
exit( -1 );
|
||||
}
|
||||
if ( shm_data.shm_nattch <= 1 ) {
|
||||
if ( shmctl( shm_id, IPC_RMID, 0 ) < 0 ) {
|
||||
Error( "Can't shmctl: %s", strerror(errno) );
|
||||
exit( -1 );
|
||||
}
|
||||
}
|
||||
#endif // ZM_MEM_MAPPED
|
||||
} // end if mem_ptr
|
||||
}
|
||||
|
||||
void Monitor::AddZones( int p_n_zones, Zone *p_zones[] )
|
||||
|
@ -1827,11 +1836,11 @@ int Monitor::LoadLocalMonitors( const char *device, Monitor **&monitors, Purpose
|
|||
static char sql[ZM_SQL_MED_BUFSIZ];
|
||||
if ( !device[0] )
|
||||
{
|
||||
strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, Method, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Function != 'None' and Type = 'Local' order by Device, Channel", sizeof(sql) );
|
||||
strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, Method, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Function != 'None' and Type = 'Local' order by Device, Channel", sizeof(sql) );
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, Method, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Function != 'None' and Type = 'Local' and Device = '%s' order by Channel", device );
|
||||
snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, Method, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Function != 'None' and Type = 'Local' and Device = '%s' order by Channel", device );
|
||||
}
|
||||
if ( mysql_query( &dbconn, sql ) )
|
||||
{
|
||||
|
@ -1862,6 +1871,26 @@ int Monitor::LoadLocalMonitors( const char *device, Monitor **&monitors, Purpose
|
|||
const char *device = dbrow[col]; col++;
|
||||
int channel = atoi(dbrow[col]); col++;
|
||||
int format = atoi(dbrow[col]); col++;
|
||||
bool v4l_multi_buffer;
|
||||
if ( dbrow[col] ) {
|
||||
if (*dbrow[col] == '0' ) {
|
||||
v4l_multi_buffer = false;
|
||||
} else if ( *dbrow[col] == '1' ) {
|
||||
v4l_multi_buffer = true;
|
||||
}
|
||||
} else {
|
||||
v4l_multi_buffer = config.v4l_multi_buffer;
|
||||
}
|
||||
col++;
|
||||
|
||||
int v4l_captures_per_frame = 0;
|
||||
if ( dbrow[col] ) {
|
||||
v4l_captures_per_frame = atoi(dbrow[col]);
|
||||
} else {
|
||||
v4l_captures_per_frame = config.captures_per_frame;
|
||||
}
|
||||
Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame );
|
||||
col++;
|
||||
const char *method = dbrow[col]; col++;
|
||||
|
||||
int width = atoi(dbrow[col]); col++;
|
||||
|
@ -1914,6 +1943,8 @@ int Monitor::LoadLocalMonitors( const char *device, Monitor **&monitors, Purpose
|
|||
device,
|
||||
channel,
|
||||
format,
|
||||
v4l_multi_buffer,
|
||||
v4l_captures_per_frame,
|
||||
method,
|
||||
cam_width,
|
||||
cam_height,
|
||||
|
@ -2430,7 +2461,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose
|
|||
Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose )
|
||||
{
|
||||
static char sql[ZM_SQL_MED_BUFSIZ];
|
||||
snprintf( sql, sizeof(sql), "select Id, Name, Type, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, Protocol, Method, Host, Port, Path, Options, User, Pass, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Id = %d", id );
|
||||
snprintf( sql, sizeof(sql), "select Id, Name, Type, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, Protocol, Method, Host, Port, Path, Options, User, Pass, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Id = %d", id );
|
||||
if ( mysql_query( &dbconn, sql ) )
|
||||
{
|
||||
Error( "Can't run query: %s", mysql_error( &dbconn ) );
|
||||
|
@ -2461,6 +2492,27 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose )
|
|||
int channel = atoi(dbrow[col]); col++;
|
||||
int format = atoi(dbrow[col]); col++;
|
||||
|
||||
bool v4l_multi_buffer;
|
||||
if ( dbrow[col] ) {
|
||||
if (*dbrow[col] == '0' ) {
|
||||
v4l_multi_buffer = false;
|
||||
} else if ( *dbrow[col] == '1' ) {
|
||||
v4l_multi_buffer = true;
|
||||
}
|
||||
} else {
|
||||
v4l_multi_buffer = config.v4l_multi_buffer;
|
||||
}
|
||||
col++;
|
||||
|
||||
int v4l_captures_per_frame = 0;
|
||||
if ( dbrow[col] ) {
|
||||
v4l_captures_per_frame = atoi(dbrow[col]);
|
||||
} else {
|
||||
v4l_captures_per_frame = config.captures_per_frame;
|
||||
}
|
||||
Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame );
|
||||
col++;
|
||||
|
||||
std::string protocol = dbrow[col]; col++;
|
||||
std::string method = dbrow[col]; col++;
|
||||
std::string host = dbrow[col]; col++;
|
||||
|
@ -2523,6 +2575,8 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose )
|
|||
device.c_str(),
|
||||
channel,
|
||||
format,
|
||||
v4l_multi_buffer,
|
||||
v4l_captures_per_frame,
|
||||
method,
|
||||
cam_width,
|
||||
cam_height,
|
||||
|
|
|
@ -168,7 +168,7 @@ protected:
|
|||
#else // ZM_MEM_MAPPED
|
||||
int shm_id;
|
||||
#endif // ZM_MEM_MAPPED
|
||||
unsigned long mem_size;
|
||||
unsigned long mem_size;
|
||||
unsigned char *mem_ptr;
|
||||
|
||||
volatile SharedData *shared_data;
|
||||
|
@ -215,6 +215,8 @@ protected:
|
|||
bool enabled; // Whether the monitor is enabled or asleep
|
||||
unsigned int width; // Normally the same as the camera, but not if partly rotated
|
||||
unsigned int height; // Normally the same as the camera, but not if partly rotated
|
||||
bool v4l_multi_buffer;
|
||||
unsigned int v4l_captures_per_frame;
|
||||
Orientation orientation; // Whether the image has to be rotated at all
|
||||
unsigned int deinterlacing;
|
||||
int brightness; // The statically saved brightness of the camera
|
||||
|
@ -296,6 +298,7 @@ public:
|
|||
|
||||
void AddZones( int p_n_zones, Zone *p_zones[] );
|
||||
|
||||
bool connect();
|
||||
inline int ShmValid() const
|
||||
{
|
||||
return( shared_data->valid );
|
||||
|
|
|
@ -56,7 +56,7 @@ void RemoteCamera::Initialise()
|
|||
//Fatal( "No path specified for remote camera" );
|
||||
|
||||
// Cache as much as we can to speed things up
|
||||
std::string::size_type authIndex = host.find( '@' );
|
||||
std::string::size_type authIndex = host.rfind( '@' );
|
||||
|
||||
if ( authIndex != std::string::npos )
|
||||
{
|
||||
|
|
|
@ -44,6 +44,7 @@ bool StreamBase::loadMonitor( int monitor_id )
|
|||
Fatal( "Unable to load monitor id %d for streaming", monitor_id );
|
||||
return( false );
|
||||
}
|
||||
monitor->connect();
|
||||
return( true );
|
||||
}
|
||||
|
||||
|
|
|
@ -939,7 +939,7 @@ bool Zone::ParseZoneString( const char *zone_string, int &zone_id, int &colour,
|
|||
|
||||
int Zone::Load( Monitor *monitor, Zone **&zones )
|
||||
{
|
||||
static char sql[ZM_SQL_MED_BUFSIZ];
|
||||
static char sql[ZM_SQL_MED_BUFSIZ];
|
||||
snprintf( sql, sizeof(sql), "select Id,Name,Type+0,Units,Coords,AlarmRGB,CheckMethod+0,MinPixelThreshold,MaxPixelThreshold,MinAlarmPixels,MaxAlarmPixels,FilterX,FilterY,MinFilterPixels,MaxFilterPixels,MinBlobPixels,MaxBlobPixels,MinBlobs,MaxBlobs,OverloadFrames,ExtendAlarmFrames from Zones where MonitorId = %d order by Type, Id", monitor->Id() );
|
||||
if ( mysql_query( &dbconn, sql ) )
|
||||
{
|
||||
|
|
|
@ -416,6 +416,11 @@ int main( int argc, char *argv[] )
|
|||
{
|
||||
printf( "Monitor %d(%s)\n", monitor->Id(), monitor->Name() );
|
||||
}
|
||||
if ( ! monitor->connect() ) {
|
||||
Error( "Can't connect to capture daemon: %d %s", monitor->Id(), monitor->Name() );
|
||||
exit( -1 );
|
||||
}
|
||||
|
||||
char separator = ' ';
|
||||
bool have_output = false;
|
||||
if ( function & ZMU_STATE )
|
||||
|
|
|
@ -66,11 +66,11 @@ if ( $numSockets === false )
|
|||
}
|
||||
else if ( $numSockets < 0 )
|
||||
{
|
||||
ajaxError( "Socket closed $remSocketFile" );
|
||||
ajaxError( "Socket closed $remSockFile" );
|
||||
}
|
||||
else if ( $numSockets == 0 )
|
||||
{
|
||||
ajaxError( "Timed out waiting for msg $remSocketFile" );
|
||||
ajaxError( "Timed out waiting for msg $remSockFile" );
|
||||
}
|
||||
else if ( $numSockets > 0 )
|
||||
{
|
||||
|
|
|
@ -706,6 +706,9 @@ $SLANG = array(
|
|||
'ViewEvent' => 'View Event',
|
||||
'ViewPaged' => 'View Paged',
|
||||
'View' => 'View',
|
||||
'V4L' => 'V4L',
|
||||
'V4LCapturesPerFrame' => 'Captures Per Frame',
|
||||
'V4LMultiBuffer' => 'Multi Buffering',
|
||||
'Wake' => 'Wake',
|
||||
'WarmupFrames' => 'Warmup Frames',
|
||||
'Watch' => 'Watch',
|
||||
|
|
|
@ -48,7 +48,7 @@ var popupSizes = {
|
|||
'log': { 'width': 1080, 'height': 720 },
|
||||
'login': { 'width': 720, 'height': 480 },
|
||||
'logout': { 'width': 260, 'height': 100 },
|
||||
'monitor': { 'width': 450, 'height': 400 },
|
||||
'monitor': { 'width': 450, 'height': 440 },
|
||||
'monitorpreset':{ 'width': 440, 'height': 200 },
|
||||
'monitorprobe': { 'width': 500, 'height': 240 },
|
||||
'monitorselect':{ 'width': 160, 'height': 200 },
|
||||
|
|
|
@ -302,7 +302,7 @@ foreach( $displayMonitors as $monitor )
|
|||
$scale = max( reScale( SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
|
||||
?>
|
||||
<td class="colName"><?= makePopupLink( '?view=watch&mid='.$monitor['Id'], 'zmWatch'.$monitor['Id'], array( 'watch', reScale( $monitor['Width'], $scale ), reScale( $monitor['Height'], $scale ) ), $monitor['Name'], $running && ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td>
|
||||
<td class="colFunction"><?= makePopupLink( '?view=function&mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$fclass.'">'.$SLANG['Fn'.$monitor['Function']].'</span>', canEdit( 'Monitors' ) ) ?></td>
|
||||
<td class="colFunction"><?= makePopupLink( '?view=function&mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$fclass.'">'.$SLANG['Fn'.$monitor['Function']].( empty($monitor['Enabled']) ? ', disabled' : '' ) .'</span>', canEdit( 'Monitors' ) ) ?></td>
|
||||
<?php if ( $monitor['Type'] == "Local" ) { ?>
|
||||
<td class="colSource"><?= 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" ) { ?>
|
||||
|
|
|
@ -75,8 +75,8 @@ function frameDataResponse( respObj, respText )
|
|||
loadEventImage( frame.Image.imagePath, event.Id, frame.FrameId, event.Width, event.Height );
|
||||
}
|
||||
|
||||
var eventQuery = new Request.JSON( { url: thisUrl, method: 'post', timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: eventDataResponse } );
|
||||
var frameQuery = new Request.JSON( { url: thisUrl, method: 'post', timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: frameDataResponse } );
|
||||
var eventQuery = new Request.JSON( { url: thisUrl, method: 'get', timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: eventDataResponse } );
|
||||
var frameQuery = new Request.JSON( { url: thisUrl, method: 'get', timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: frameDataResponse } );
|
||||
|
||||
function requestFrameData( eventId, frameId )
|
||||
{
|
||||
|
|
|
@ -40,14 +40,11 @@ if ( isset($_REQUEST['tab']) )
|
|||
else
|
||||
$tab = "general";
|
||||
|
||||
if ( !empty($_REQUEST['mid']) )
|
||||
{
|
||||
if ( ! empty($_REQUEST['mid']) ) {
|
||||
$monitor = dbFetchMonitor( $_REQUEST['mid'] );
|
||||
if ( ZM_OPT_X10 )
|
||||
$x10Monitor = dbFetchOne( 'SELECT * FROM TriggersX10 WHERE MonitorId = ?', NULL, array( $_REQUEST['mid']) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$x10Monitor = dbFetchOne( 'SELECT * FROM TriggersX10 WHERE MonitorId = ?', NULL, array($_REQUEST['mid']) );
|
||||
} else {
|
||||
$nextId = getTableAutoInc( 'Monitors' );
|
||||
$monitor = array(
|
||||
'Id' => 0,
|
||||
|
@ -107,6 +104,8 @@ else
|
|||
'SignalCheckColour' => '#0000c0',
|
||||
'WebColour' => 'red',
|
||||
'Triggers' => "",
|
||||
'V4LMultiBuffer' => '',
|
||||
'V4LCapturesPerFrame' => 1,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -143,7 +142,8 @@ if ( $newMonitor['MaxFPS'] == '0.00' )
|
|||
if ( $newMonitor['AlarmMaxFPS'] == '0.00' )
|
||||
$newMonitor['AlarmMaxFPS'] = '';
|
||||
|
||||
if ( !empty($_REQUEST['preset']) ) {
|
||||
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 )
|
||||
{
|
||||
|
@ -492,6 +492,8 @@ if ( ZM_HAS_V4L && ($tab != 'source' || $newMonitor['Type'] != 'Local') )
|
|||
<input type="hidden" name="newMonitor[Channel]" value="<?= validHtmlStr($newMonitor['Channel']) ?>"/>
|
||||
<input type="hidden" name="newMonitor[Format]" value="<?= validHtmlStr($newMonitor['Format']) ?>"/>
|
||||
<input type="hidden" name="newMonitor[Palette]" value="<?= validHtmlStr($newMonitor['Palette']) ?>"/>
|
||||
<input type="hidden" name="newMonitor[V4LMultiBuffer]" value="<?= validHtmlStr($newMonitor['V4LMultiBuffer']) ?>"/>
|
||||
<input type="hidden" name="newMonitor[V4LCapturesPerFrame]" value="<?= validHtmlStr($newMonitor['V4LCapturesPerFrame']) ?>"/>
|
||||
<?php
|
||||
}
|
||||
if ( $tab != 'source' || $newMonitor['Type'] != 'Remote' )
|
||||
|
@ -609,7 +611,7 @@ switch ( $tab )
|
|||
foreach ( getEnumValues( 'Monitors', 'Function' ) as $optFunction )
|
||||
{
|
||||
?>
|
||||
<option value="<?= $optFunction ?>"<?php if ( $optFunction == $newMonitor['Function'] ) { ?> selected="selected"<?php } ?>><?= $SLANG['Fn'.$optFunction] ?></option>
|
||||
<option value="<?= $optFunction ?>"<?php if ( $optFunction == $newMonitor['Function'] ) { ?> selected="selected"<?php } ?>><?= $optFunction ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -706,6 +708,17 @@ switch ( $tab )
|
|||
<tr><td><?= $SLANG['CapturePalette'] ?></td><td><select name="newMonitor[Palette]"><?php foreach ( $v4l2LocalPalettes as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Palette'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr><td><?= $SLANG['V4LMultiBuffer'] ?></td><td>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]1" value="1" <?php echo ( $newMonitor['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 ( $newMonitor['V4LMultiBuffer'] == 0 ? 'checked="checked"' : '' ) ?>/>
|
||||
<label for="newMonitor[V4LMultiBuffer]0">No</label>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]" value="" <?php echo ( empty($newMonitor['V4LMultiBuffer']) ? 'checked="checked"' : '' ) ?>/>
|
||||
<label for="newMonitor[V4LMultiBuffer]">Use Config Value</label>
|
||||
</td></tr>
|
||||
<tr><td><?= $SLANG['V4LCapturesPerFrame'] ?></td><td><input type="number" name="newMonitor[V4LCapturesPerFrame]" value="<?php echo $newMonitor['V4LCapturesPerFrame'] ?>"/></td></tr>
|
||||
<?php
|
||||
}
|
||||
elseif ( $newMonitor['Type'] == "Remote" )
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ var popupSizes = {
|
|||
'log': { 'width': 980, 'height': 720 },
|
||||
'login': { 'width': 720, 'height': 480 },
|
||||
'logout': { 'width': 240, 'height': 100 },
|
||||
'monitor': { 'width': 500, 'height': 620 },
|
||||
'monitor': { 'width': 500, 'height': 660 },
|
||||
'monitorpreset':{ 'width': 400, 'height': 250 },
|
||||
'monitorprobe': { 'width': 500, 'height': 240 },
|
||||
'monitorselect':{ 'width': 160, 'height': 200 },
|
||||
|
|
|
@ -302,7 +302,7 @@ foreach( $displayMonitors as $monitor )
|
|||
$scale = max( reScale( SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
|
||||
?>
|
||||
<td class="colName"><?= makePopupLink( '?view=watch&mid='.$monitor['Id'], 'zmWatch'.$monitor['Id'], array( 'watch', reScale( $monitor['Width'], $scale ), reScale( $monitor['Height'], $scale ) ), $monitor['Name'], $running && ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td>
|
||||
<td class="colFunction"><?= makePopupLink( '?view=function&mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$fclass.'">'.$monitor['Function'].'</span>', canEdit( 'Monitors' ) ) ?></td>
|
||||
<td class="colFunction"><?= makePopupLink( '?view=function&mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$fclass.'">'.$monitor['Function'].( empty($monitor['Enabled']) ? ', disabled' : '' ).'</span>', canEdit( 'Monitors' ) ) ?></td>
|
||||
<?php if ( $monitor['Type'] == "Local" ) { ?>
|
||||
<td class="colSource"><?= 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" ) { ?>
|
||||
|
|
|
@ -75,8 +75,8 @@ function frameDataResponse( respObj, respText )
|
|||
loadEventImage( frame.Image.imagePath, event.Id, frame.FrameId, event.Width, event.Height );
|
||||
}
|
||||
|
||||
var eventQuery = new Request.JSON( { url: thisUrl, method: 'post', timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: eventDataResponse } );
|
||||
var frameQuery = new Request.JSON( { url: thisUrl, method: 'post', timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: frameDataResponse } );
|
||||
var eventQuery = new Request.JSON( { url: thisUrl, method: 'get', timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: eventDataResponse } );
|
||||
var frameQuery = new Request.JSON( { url: thisUrl, method: 'get', timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: frameDataResponse } );
|
||||
|
||||
function requestFrameData( eventId, frameId )
|
||||
{
|
||||
|
|
|
@ -40,14 +40,11 @@ if ( isset($_REQUEST['tab']) )
|
|||
else
|
||||
$tab = "general";
|
||||
|
||||
if ( !empty($_REQUEST['mid']) )
|
||||
{
|
||||
if ( ! empty($_REQUEST['mid']) ) {
|
||||
$monitor = dbFetchMonitor( $_REQUEST['mid'] );
|
||||
if ( ZM_OPT_X10 )
|
||||
$x10Monitor = dbFetchOne( 'SELECT * FROM TriggersX10 WHERE MonitorId = ?', NULL, array($_REQUEST['mid']) );
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$nextId = getTableAutoInc( 'Monitors' );
|
||||
$monitor = array(
|
||||
'Id' => 0,
|
||||
|
@ -107,6 +104,8 @@ else
|
|||
'SignalCheckColour' => '#0000c0',
|
||||
'WebColour' => 'red',
|
||||
'Triggers' => "",
|
||||
'V4LMultiBuffer' => '',
|
||||
'V4LCapturesPerFrame' => 1,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -492,6 +491,9 @@ if ( ZM_HAS_V4L && ($tab != 'source' || $newMonitor['Type'] != 'Local') )
|
|||
<input type="hidden" name="newMonitor[Channel]" value="<?= validHtmlStr($newMonitor['Channel']) ?>"/>
|
||||
<input type="hidden" name="newMonitor[Format]" value="<?= validHtmlStr($newMonitor['Format']) ?>"/>
|
||||
<input type="hidden" name="newMonitor[Palette]" value="<?= validHtmlStr($newMonitor['Palette']) ?>"/>
|
||||
<input type="hidden" name="newMonitor[V4LMultiBuffer]" value="<?= validHtmlStr($newMonitor['V4LMultiBuffer']) ?>"/>
|
||||
<input type="hidden" name="newMonitor[V4LCapturesPerFrame]" value="<?= validHtmlStr($newMonitor['V4LCapturesPerFrame']) ?>"/>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ( $tab != 'source' || $newMonitor['Type'] != 'Remote' )
|
||||
|
@ -706,6 +708,17 @@ switch ( $tab )
|
|||
<tr><td><?= $SLANG['CapturePalette'] ?></td><td><select name="newMonitor[Palette]"><?php foreach ( $v4l2LocalPalettes as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Palette'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr><td><?= $SLANG['V4LMultiBuffer'] ?></td><td>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]1" value="1" <?php echo ( $newMonitor['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 ( $newMonitor['V4LMultiBuffer'] == 0 ? 'checked="checked"' : '' ) ?>/>
|
||||
<label for="newMonitor[V4LMultiBuffer]0">No</label>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]" value="" <?php echo ( empty($newMonitor['V4LMultiBuffer']) ? 'checked="checked"' : '' ) ?>/>
|
||||
<label for="newMonitor[V4LMultiBuffer]">Use Config Value</label>
|
||||
</td></tr>
|
||||
<tr><td><?= $SLANG['V4LCapturesPerFrame'] ?></td><td><input type="number" name="newMonitor[V4LCapturesPerFrame]" value="<?php echo $newMonitor['V4LCapturesPerFrame'] ?>"/></td></tr>
|
||||
<?php
|
||||
}
|
||||
elseif ( $newMonitor['Type'] == "Remote" )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue