From 2f3ebd80da0cca29efc0dddf671184af005c6b64 Mon Sep 17 00:00:00 2001 From: SteveGilvarry Date: Mon, 16 Jan 2017 09:56:09 -0800 Subject: [PATCH 01/32] Remove zmf, die..die..die --- docs/faq.rst | 2 +- docs/userguide/options/options_system.rst | 4 - .../lib/ZoneMinder/ConfigData.pm.in | 41 -- scripts/zmdc.pl.in | 1 - scripts/zmpkg.pl.in | 4 - src/CMakeLists.txt | 8 +- src/zm_event.cpp | 139 +------ src/zma.cpp | 5 - src/zmf.cpp | 350 ------------------ src/zmf.h | 32 -- web/includes/functions.php | 9 - web/lang/ro_ro.php | 8 - 12 files changed, 7 insertions(+), 596 deletions(-) delete mode 100644 src/zmf.cpp delete mode 100644 src/zmf.h diff --git a/docs/faq.rst b/docs/faq.rst index 1460e034d..9228274d7 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -309,7 +309,7 @@ The main causes are. * Capture frame rates. Unless there's a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected. * Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase. * Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don't want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events. - * Optimise your settings. After you've got some settings you're happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS, ZM_OPT_FRAME_SERVER and the JPEG_xxx_QUALITY ones. + * Optimise your settings. After you've got some settings you're happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS and the JPEG_xxx_QUALITY ones. I'm sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there's no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also. diff --git a/docs/userguide/options/options_system.rst b/docs/userguide/options/options_system.rst index 7df3d259a..53e560fe5 100644 --- a/docs/userguide/options/options_system.rst +++ b/docs/userguide/options/options_system.rst @@ -33,10 +33,6 @@ RUN_AUDIT - The zmaudit daemon exists to check that the saved information in the AUDIT_CHECK_INTERVAL - The zmaudit daemon exists to check that the saved information in the database and on the filesystem match and are consistent with each other. If an error occurs or if you are using 'fast deletes' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronise the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and filesystem may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed. -OPT_FRAME_SERVER - In some circumstances it is possible for a slow disk to take so long writing images to disk that it causes the analysis daemon to fall behind especially during high frame rate events. Setting this option to yes enables a frame server daemon (zmf) which will be sent the images from the analysis daemon and will do the actual writing of images itself freeing up the analysis daemon to get on with other things. Should this transmission fail or other permanent or transient error occur, this function will fall back to the analysis daemon. - -FRAME_SOCKET_SIZE - For large captured images it is possible for the writes from the analysis daemon to the frame server to fail as the amount to be written exceeds the default buffer size. While the images are then written by the analysis daemon so no data is lost, it defeats the object of the frame server daemon in the first place. You can use this option to indicate that a larger buffer size should be used. Note that you may have to change the existing maximum socket buffer size on your system via sysctl (or in /proc/sys/net/core/wmem_max) to allow this new size to be set. Alternatively you can change the default buffer size on your system in the same way in which case that will be used with no change necessary in this option - OPT_CONTROL - ZoneMinder includes limited support for controllable cameras. A number of sample protocols are included and others can easily be added. If you wish to control your cameras via ZoneMinder then select this option otherwise if you only have static cameras or use other control methods then leave this option off. OPT_TRIGGERS - ZoneMinder can interact with external systems which prompt or cancel alarms. This is done via the zmtrigger.pl script. This option indicates whether you want to use these external triggers. Most people will say no here. diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in index 3f80748db..8e016a986 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in @@ -2696,47 +2696,6 @@ our @options = ( type => $types{boolean}, category => "config", }, - { - name => "ZM_OPT_FRAME_SERVER", - default => "no", - description => "Should analysis farm out the writing of images to disk", - #requires => [ { name => "ZM_OPT_ADAPTIVE_SKIP", value => "yes" } ], - help => qqq(" - In some circumstances it is possible for a slow disk to take so - long writing images to disk that it causes the analysis daemon - to fall behind especially during high frame rate events. - Setting this option to yes enables a frame server daemon (zmf) - which will be sent the images from the analysis daemon and will - do the actual writing of images itself freeing up the analysis - daemon to get on with other things. Should this transmission - fail or other permanent or transient error occur, this function - will fall back to the analysis daemon. - "), - type => $types{boolean}, - category => "system", - }, - { - name => "ZM_FRAME_SOCKET_SIZE", - default => "0", - description => "Specify the frame server socket buffer size if non-standard", - requires => [ { name => "ZM_OPT_FRAME_SERVER", value => "yes" } ], - help => qqq(" - For large captured images it is possible for the writes from - the analysis daemon to the frame server to fail as the amount - to be written exceeds the default buffer size. While the images - are then written by the analysis daemon so no data is lost, it - defeats the object of the frame server daemon in the first - place. You can use this option to indicate that a larger buffer - size should be used. Note that you may have to change the - existing maximum socket buffer size on your system via sysctl - (or in /proc/sys/net/core/wmem_max) to allow this new size to - be set. Alternatively you can change the default buffer size on - your system in the same way in which case that will be used - with no change necessary in this option - "), - type => $types{integer}, - category => "system", - }, { name => "ZM_OPT_CONTROL", default => "no", diff --git a/scripts/zmdc.pl.in b/scripts/zmdc.pl.in index 918df8574..33cfde9f7 100644 --- a/scripts/zmdc.pl.in +++ b/scripts/zmdc.pl.in @@ -89,7 +89,6 @@ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; my @daemons = ( 'zmc', 'zma', - 'zmf', 'zmfilter.pl', 'zmaudit.pl', 'zmtrigger.pl', diff --git a/scripts/zmpkg.pl.in b/scripts/zmpkg.pl.in index cd9910aa6..597d7ac1a 100644 --- a/scripts/zmpkg.pl.in +++ b/scripts/zmpkg.pl.in @@ -251,10 +251,6 @@ if ( $command =~ /^(?:start|restart)$/ ) } if ( $monitor->{Function} ne 'Monitor' ) { - if ( $Config{ZM_OPT_FRAME_SERVER} ) - { - runCommand( "zmdc.pl start zmf -m $monitor->{Id}" ); - } runCommand( "zmdc.pl start zma -m $monitor->{Id}" ); } if ( $Config{ZM_OPT_CONTROL} ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9876e2a87..44e827ba5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,21 +12,19 @@ add_library(zm STATIC ${ZM_BIN_SRC_FILES}) add_executable(zmc zmc.cpp) add_executable(zma zma.cpp) add_executable(zmu zmu.cpp) -add_executable(zmf zmf.cpp) add_executable(zms zms.cpp) target_link_libraries(zmc zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) target_link_libraries(zma zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) target_link_libraries(zmu zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) -target_link_libraries(zmf zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) target_link_libraries(zms zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) # Generate man files for the binaries destined for the bin folder -FOREACH(CBINARY zma zmc zmf zmu) +FOREACH(CBINARY zma zmc zmu) POD2MAN(${CMAKE_CURRENT_SOURCE_DIR}/${CBINARY}.cpp zoneminder-${CBINARY} 8) -ENDFOREACH(CBINARY zma zmc zmf zmu) +ENDFOREACH(CBINARY zma zmc zmu) -install(TARGETS zmc zma zmu zmf RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +install(TARGETS zmc zma zmu RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(TARGETS zms RUNTIME DESTINATION "${ZM_CGIDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(CODE "execute_process(COMMAND ln -sf zms nph-zms WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})" ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/nph-zms DESTINATION "${ZM_CGIDIR}") diff --git a/src/zm_event.cpp b/src/zm_event.cpp index 9b6202966..08f0a54eb 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -42,8 +42,6 @@ extern "C" #include "zm_sendfile.h" } -#include "zmf.h" - #if HAVE_SYS_SENDFILE_H #include #endif @@ -221,135 +219,6 @@ void Event::createNotes( std::string ¬es ) int Event::sd = -1; -bool Event::OpenFrameSocket( int monitor_id ) -{ - if ( sd > 0 ) - { - close( sd ); - } - - sd = socket( AF_UNIX, SOCK_STREAM, 0); - if ( sd < 0 ) - { - Error( "Can't create socket: %s", strerror(errno) ); - return( false ); - } - - int socket_buffer_size = config.frame_socket_size; - if ( socket_buffer_size > 0 ) - { - if ( setsockopt( sd, SOL_SOCKET, SO_SNDBUF, &socket_buffer_size, sizeof(socket_buffer_size) ) < 0 ) - { - Error( "Can't get socket buffer size to %d, error = %s", socket_buffer_size, strerror(errno) ); - close( sd ); - sd = -1; - return( false ); - } - } - - int flags; - if ( (flags = fcntl( sd, F_GETFL )) < 0 ) - { - Error( "Can't get socket flags, error = %s", strerror(errno) ); - close( sd ); - sd = -1; - return( false ); - } - flags |= O_NONBLOCK; - if ( fcntl( sd, F_SETFL, flags ) < 0 ) - { - Error( "Can't set socket flags, error = %s", strerror(errno) ); - close( sd ); - sd = -1; - return( false ); - } - - char sock_path[PATH_MAX] = ""; - snprintf( sock_path, sizeof(sock_path), "%s/zmf-%d.sock", config.path_socks, monitor_id ); - - struct sockaddr_un addr; - - strncpy( addr.sun_path, sock_path, sizeof(addr.sun_path) ); - addr.sun_family = AF_UNIX; - - if ( connect( sd, (struct sockaddr *)&addr, strlen(addr.sun_path)+sizeof(addr.sun_family)+1) < 0 ) - { - Warning( "Can't connect to frame server: %s", strerror(errno) ); - close( sd ); - sd = -1; - return( false ); - } - - Debug( 1, "Opened connection to frame server" ); - return( true ); -} - -bool Event::ValidateFrameSocket( int monitor_id ) -{ - if ( sd < 0 ) - { - return( OpenFrameSocket( monitor_id ) ); - } - return( true ); -} - -bool Event::SendFrameImage( const Image *image, bool alarm_frame ) -{ - if ( !ValidateFrameSocket( monitor->Id() ) ) - { - return( false ); - } - - static int jpg_buffer_size = 0; - static unsigned char jpg_buffer[ZM_MAX_IMAGE_SIZE]; - - image->EncodeJpeg( jpg_buffer, &jpg_buffer_size, (alarm_frame&&(config.jpeg_alarm_file_quality>config.jpeg_file_quality))?config.jpeg_alarm_file_quality:config.jpeg_file_quality ); - - static FrameHeader frame_header; - - frame_header.event_id = id; - if ( config.use_deep_storage ) - frame_header.event_time = start_time.tv_sec; - frame_header.frame_id = frames; - frame_header.alarm_frame = alarm_frame; - frame_header.image_length = jpg_buffer_size; - - struct iovec iovecs[2]; - iovecs[0].iov_base = &frame_header; - iovecs[0].iov_len = sizeof(frame_header); - iovecs[1].iov_base = jpg_buffer; - iovecs[1].iov_len = jpg_buffer_size; - - ssize_t writev_size = sizeof(frame_header)+jpg_buffer_size; - ssize_t writev_result = writev( sd, iovecs, sizeof(iovecs)/sizeof(*iovecs)); - if ( writev_result != writev_size ) - { - if ( writev_result < 0 ) - { - if ( errno == EAGAIN ) - { - Warning( "Blocking write detected" ); - } - else - { - Error( "Can't write frame: %s", strerror(errno) ); - close( sd ); - sd = -1; - } - } - else - { - Error( "Incomplete frame write: %zd of %zd bytes written", writev_result, writev_size ); - close( sd ); - sd = -1; - } - return( false ); - } - Debug( 1, "Wrote frame image, %d bytes", jpg_buffer_size ); - - return( true ); -} - bool Event::WriteFrameImage( Image *image, struct timeval timestamp, const char *event_file, bool alarm_frame ) { Image* ImgToWrite; @@ -364,11 +233,9 @@ bool Event::WriteFrameImage( Image *image, struct timeval timestamp, const char else ImgToWrite=image; - if ( !config.opt_frame_server || !SendFrameImage(ImgToWrite, alarm_frame) ) - { - int thisquality = ( alarm_frame && (config.jpeg_alarm_file_quality > config.jpeg_file_quality) ) ? config.jpeg_alarm_file_quality : 0 ; // quality to use, zero is default - ImgToWrite->WriteJpeg( event_file, thisquality, (monitor->Exif() ? timestamp : (timeval){0,0}) ); // exif is only timestamp at present this switches on or off for write - } + int thisquality = ( alarm_frame && (config.jpeg_alarm_file_quality > config.jpeg_file_quality) ) ? config.jpeg_alarm_file_quality : 0 ; // quality to use, zero is default + ImgToWrite->WriteJpeg( event_file, thisquality, (monitor->Exif() ? timestamp : (timeval){0,0}) ); // exif is only timestamp at present this switches on or off for write + if(ts_image) delete(ts_image); // clean up if used. return( true ); } diff --git a/src/zma.cpp b/src/zma.cpp index f9557ba59..74303ccde 100644 --- a/src/zma.cpp +++ b/src/zma.cpp @@ -141,11 +141,6 @@ int main( int argc, char *argv[] ) { Info( "In mode %d/%d, warming up", monitor->GetFunction(), monitor->Enabled() ); - if ( config.opt_frame_server ) - { - Event::OpenFrameSocket( monitor->Id() ); - } - zmSetDefaultHupHandler(); zmSetDefaultTermHandler(); zmSetDefaultDieHandler(); diff --git a/src/zmf.cpp b/src/zmf.cpp deleted file mode 100644 index 2245d9ba3..000000000 --- a/src/zmf.cpp +++ /dev/null @@ -1,350 +0,0 @@ -// -// ZoneMinder Image File Writer Implementation, $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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// - -/* - -=head1 NAME - -zmf - The ZoneMinder Frame daemon - -=head1 SYNOPSIS - - zmf -m - zmf --monitor - zmf -h - zmf --help - zmf -v - zmf --version - -=head1 DESCRIPTION - -This is an optional daemon that can run in concert with the Analysis daemon and -whose function it is to actually write captured frames to disk. This frees up -the Analysis daemon to do more analysis (!) and so keep up with the Capture -daemon better. If it isn't running or dies then the Analysis daemon just writes -them itself. - -=head1 OPTIONS - - -m, --monitor_id - ID of the monitor to use - -h, --help - Display usage information - -v, --version - Print the installed version of ZoneMinder - -=cut - -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "zm.h" -#include "zm_db.h" -#include "zm_signal.h" -#include "zm_monitor.h" - -#include "zmf.h" - -int OpenSocket( int monitor_id ) -{ - int sd = socket( AF_UNIX, SOCK_STREAM, 0); - if ( sd < 0 ) - { - Error( "Can't create socket: %s", strerror(errno) ); - return( -1 ); - } - - char sock_path[PATH_MAX] = ""; - snprintf( sock_path, sizeof(sock_path), "%s/zmf-%d.sock", config.path_socks, monitor_id ); - if ( unlink( sock_path ) < 0 ) - { - Warning( "Can't unlink '%s': %s", sock_path, strerror(errno) ); - } - - struct sockaddr_un addr; - - strncpy( addr.sun_path, sock_path, sizeof(addr.sun_path) ); - addr.sun_family = AF_UNIX; - - if ( bind( sd, (struct sockaddr *)&addr, strlen(addr.sun_path)+sizeof(addr.sun_family)) < 0 ) - { - Error( "Can't bind: %s", strerror(errno) ); - exit( -1 ); - } - - if ( listen( sd, SOMAXCONN ) < 0 ) - { - Error( "Can't listen: %s", strerror(errno) ); - return( -1 ); - } - - struct sockaddr_un rem_addr; - socklen_t rem_addr_len = sizeof(rem_addr); - int new_sd = -1; - if ( (new_sd = accept( sd, (struct sockaddr *)&rem_addr, &rem_addr_len )) < 0 ) - { - Error( "Can't accept: %s", strerror(errno) ); - exit( -1 ); - } - close( sd ); - - sd = new_sd; - - Info( "Frame server socket open, awaiting images" ); - return( sd ); -} - -int ReopenSocket( int &sd, int monitor_id ) -{ - close( sd ); - return( sd = OpenSocket( monitor_id ) ); -} - -void Usage() -{ - fprintf( stderr, "zmf -m \n" ); - fprintf( stderr, "Options:\n" ); - fprintf( stderr, " -m, --monitor : Specify which monitor to use\n" ); - fprintf( stderr, " -h, --help : This screen\n" ); - fprintf( stderr, " -v, --version : Report the installed version of ZoneMinder\n" ); - exit( 0 ); -} - -int main( int argc, char *argv[] ) -{ - self = argv[0]; - - srand( getpid() * time( 0 ) ); - - int id = -1; - - static struct option long_options[] = { - {"monitor", 1, 0, 'm'}, - {"help", 0, 0, 'h'}, - {"version", 0, 0, 'v'}, - {0, 0, 0, 0} - }; - - while (1) - { - int option_index = 0; - - int c = getopt_long (argc, argv, "m:h:v", long_options, &option_index); - if (c == -1) - { - break; - } - - switch (c) - { - case 'm': - id = atoi(optarg); - break; - case 'h': - case '?': - Usage(); - break; - case 'v': - std::cout << ZM_VERSION << "\n"; - exit(0); - default: - //fprintf( stderr, "?? getopt returned character code 0%o ??\n", c ); - break; - } - } - - if (optind < argc) - { - fprintf( stderr, "Extraneous options, " ); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - Usage(); - } - - if ( id < 0 ) - { - fprintf( stderr, "Bogus monitor %d\n", id ); - Usage(); - exit( 0 ); - } - - char log_id_string[16]; - snprintf( log_id_string, sizeof(log_id_string), "m%d", id ); - - zmLoadConfig(); - - logInit( "zmf" ); - - ssedetect(); - - Monitor *monitor = Monitor::Load( id, false, Monitor::QUERY ); - - if ( !monitor ) - { - fprintf( stderr, "Can't find monitor with id of %d\n", id ); - exit( -1 ); - } - - char capt_path[PATH_MAX]; - char anal_path[PATH_MAX]; - snprintf( capt_path, sizeof(capt_path), "%s/%d/%%s/%%0%dd-capture.jpg", config.dir_events, monitor->Id(), config.event_image_digits ); - snprintf( anal_path, sizeof(anal_path), "%s/%d/%%s/%%0%dd-analyse.jpg", config.dir_events, monitor->Id(), config.event_image_digits ); - zmSetDefaultTermHandler(); - zmSetDefaultDieHandler(); - - sigset_t block_set; - sigemptyset( &block_set ); - - int sd = OpenSocket( monitor->Id() ); - - FrameHeader frame_header = { 0, 0, false, 0 }; - //unsigned char *image_data = 0; - - fd_set rfds; - - struct timeval timeout; - timeout.tv_sec = 1; - timeout.tv_usec = 0; - while( 1 ) - { - struct timeval temp_timeout = timeout; - - FD_ZERO(&rfds); - FD_SET(sd, &rfds); - int n_found = select( sd+1, &rfds, NULL, NULL, &temp_timeout ); - if( n_found == 0 ) - { - Debug( 1, "Select timed out" ); - continue; - } - else if ( n_found < 0) - { - Error( "Select error: %s", strerror(errno) ); - ReopenSocket( sd, monitor->Id() ); - continue; - } - - sigprocmask( SIG_BLOCK, &block_set, 0 ); - - int n_bytes = read( sd, &frame_header, sizeof(frame_header) ); - if ( n_bytes != sizeof(frame_header) ) - { - if ( n_bytes < 0 ) - { - Error( "Can't read frame header: %s", strerror(errno) ); - } - else if ( n_bytes > 0 ) - { - Error( "Incomplete read of frame header, %d bytes only", n_bytes ); - } - else - { - Warning( "Socket closed at remote end" ); - } - ReopenSocket( sd, monitor->Id() ); - continue; - } - Debug( 1, "Read frame header, expecting %ld bytes of image", frame_header.image_length ); - static unsigned char image_data[ZM_MAX_IMAGE_SIZE]; - - // Read for pipe and loop until bytes expected have been read or an error occurs - int bytes_read = 0; - do - { - n_bytes = read( sd, image_data+bytes_read, frame_header.image_length-bytes_read ); - if (n_bytes < 0) break; // break on error - if (n_bytes < (int)frame_header.image_length) - { - // print some informational messages - if (bytes_read == 0) - { - Debug(4,"Image read : Short read %d bytes of %d expected bytes",n_bytes,frame_header.image_length); - } - else if (bytes_read+n_bytes == (int)frame_header.image_length) - { - Debug(5,"Image read : Read rest of short read: %d bytes read total of %d bytes",n_bytes,frame_header.image_length); - } - else - { - Debug(6,"Image read : continuing, read %d bytes (%d so far)", n_bytes, bytes_read+n_bytes); - } - } - bytes_read+= n_bytes; - } while (n_bytes>0 && (bytes_read < (ssize_t)frame_header.image_length) ); - - // Print errors if there was a problem - if ( n_bytes < 1 ) - { - Error( "Only read %d bytes of %d\n", bytes_read, frame_header.image_length); - if ( n_bytes < 0 ) - { - Error( "Can't read frame image data: %s", strerror(errno) ); - } - else - { - Warning( "Socket closed at remote end" ); - } - ReopenSocket( sd, monitor->Id() ); - continue; - } - - static char subpath[PATH_MAX] = ""; - if ( config.use_deep_storage ) - { - struct tm *time = localtime( &frame_header.event_time ); - snprintf( subpath, sizeof(subpath), "%02d/%02d/%02d/%02d/%02d/%02d", time->tm_year-100, time->tm_mon+1, time->tm_mday, time->tm_hour, time->tm_min, time->tm_sec ); - } - else - { - snprintf( subpath, sizeof(subpath), "%ld", frame_header.event_id ); - } - - static char path[PATH_MAX] = ""; - snprintf( path, sizeof(path), frame_header.alarm_frame?anal_path:capt_path, subpath, frame_header.frame_id ); - Debug( 1, "Got image, writing to %s", path ); - - FILE *fd = 0; - if ( (fd = fopen( path, "w" )) < 0 ) - { - Error( "Can't fopen '%s': %s", path, strerror(errno) ); - exit( -1 ); - } - if ( 0 == fwrite( image_data, frame_header.image_length, 1, fd ) ) - { - Error( "Can't fwrite image data: %s", strerror(errno) ); - exit( -1 ); - } - fclose( fd ); - - sigprocmask( SIG_UNBLOCK, &block_set, 0 ); - } - logTerm(); - zmDbClose(); -} diff --git a/src/zmf.h b/src/zmf.h deleted file mode 100644 index 9d5bab127..000000000 --- a/src/zmf.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// ZoneMinder Image File Write Class Interface, $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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// - -#ifndef ZMFILE_H -#define ZMFILE_H - -struct FrameHeader -{ - unsigned long event_id; - time_t event_time; - unsigned long frame_id; - bool alarm_frame; - unsigned long image_length; -}; - -#endif // ZMFILE_H diff --git a/web/includes/functions.php b/web/includes/functions.php index 36a80cf2e..61d4f73fe 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -873,21 +873,12 @@ function zmaControl( $monitor, $mode=false ) { daemonControl( "stop", "zmtrack.pl", "-m ".$monitor['Id'] ); } daemonControl( "stop", "zma", "-m ".$monitor['Id'] ); - if ( ZM_OPT_FRAME_SERVER ) { - daemonControl( "stop", "zmf", "-m ".$monitor['Id'] ); - } } else { if ( $mode == "restart" ) { if ( ZM_OPT_CONTROL ) { daemonControl( "stop", "zmtrack.pl", "-m ".$monitor['Id'] ); } daemonControl( "stop", "zma", "-m ".$monitor['Id'] ); - if ( ZM_OPT_FRAME_SERVER ) { - daemonControl( "stop", "zmf", "-m ".$monitor['Id'] ); - } - } - if ( ZM_OPT_FRAME_SERVER ) { - daemonControl( "start", "zmf", "-m ".$monitor['Id'] ); } daemonControl( "start", "zma", "-m ".$monitor['Id'] ); if ( ZM_OPT_CONTROL && $monitor['Controllable'] && $monitor['TrackMotion'] && ( $monitor['Function'] == 'Modect' || $monitor['Function'] == 'Mocord' ) ) { diff --git a/web/lang/ro_ro.php b/web/lang/ro_ro.php index f0c440a9a..a36c4de6c 100644 --- a/web/lang/ro_ro.php +++ b/web/lang/ro_ro.php @@ -822,14 +822,6 @@ $OLANG = array( 'Prompt' => "Crează imagini analizate cu marcaje ale mişcării", 'Help' => "Implicit, în cazul unei alarme, ZoneMinder înregistrează atât imaginile neprelucrate cât şi cele ce au fost analizate şi au zone marcate unde a fost detectată mişcare. Acest lucru poate fi foarte folositor la configurarea zonelor sau în analiza evenimentelor. Acest parametru permite oprirea înregistrării imaginilor cu zone de mişcare marcate." ), - 'OPT_FRAME_SERVER' => array( - 'Prompt' => "Daemon-ul de analiză va scrie imaginile pe disc", - 'Help' => "În unele cazuri este posibil ca viteza de scriere a unui HDD sa fie atât de mică încat să cauzeze încetinirea daemon-ului de analiză în special în timpul evenimentelor cu multe cadre. Activarea acestei opţiuni porneşte daemon-ul de cadre (zmf) care va 'primi' imaginile de la daemon-ul de analiză şi le va scrie pe disc. Dacă această transmisie eşuează sau apar alte erori, funcţia de scriere va reveni daemon-ului de analiză." - ), - 'FRAME_SOCKET_SIZE' => array( - 'Prompt' => "Specificaţi dimensiunea memoriei tampon", - 'Help' => "Pentru imaginile de dimensiuni mari capturate este posibil ca scrierea lor pe disc să eşueze deoarece cantitatea de informaţie scrisă este mai mare decât memoria tampon alocată. Deşi imaginile sunt scrise apoi de către daemon-ul de analiză, se distruge obiectul daemon-ului de cadre. Puteţi folosi această opţiune pentru a specifica o memorie tampon de dimensiuni mai mari. Va trebui sa modificaţi dimensiunea socket-ului tampon maxim folosind 'sysctl' (sau in /proc/sys/net/core/wmem_max) pentru a permite setarea acestei noi valori. Alternativa este să schimbaţi mărimea implicită a memorie tampon a sistemului, caz în care modificarea acestei valori nu mai este necesară." - ), 'OPT_CONTROL' => array( 'Prompt' => "Suport camere controlabile (rotire/înclinare/zoom)", 'Help' => "ZoneMinder include suport limitat pentru camere controlabile. Sunt incluse câteva protocoale mostră şi pot fi adăugate cu uşurinţă şi altele. Dacă vreţi să controlaţi camerele prin intermediul ZoneMinder selectaţi această opţiune." From 97380f009b0e6a8bb6ee4ecbf0436045342cdf1e Mon Sep 17 00:00:00 2001 From: abishai Date: Tue, 31 Jan 2017 10:42:57 +0300 Subject: [PATCH 02/32] implement platform-agnostic comparison without abs() --- src/zm_image.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/zm_image.cpp b/src/zm_image.cpp index 9c8c12fda..80a821376 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -1658,11 +1658,9 @@ Image *Image::Highlight( unsigned int n_images, Image *images[], const Rgb thres { uint8_t *psrc = images[j]->buffer+c; -#ifndef SOLARIS - if ( (unsigned)abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) ) -#else - if ( (unsigned)std::abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) ) -#endif + unsigned int diff = ((*psrc)-RGB_VAL(ref_colour,c)) > 0 ? (*psrc)-RGB_VAL(ref_colour,c) : RGB_VAL(ref_colour,c) - (*psrc); + + if (diff >= RGB_VAL(threshold,c)) { count++; } From 0f23809b35793ac3ffd3210d64c0b32840c2a991 Mon Sep 17 00:00:00 2001 From: abishai Date: Tue, 31 Jan 2017 10:59:22 +0300 Subject: [PATCH 03/32] rc.d is not require polkit provide alternate path for mysql headers --- CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index baba4218d..508aea2e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -386,13 +386,13 @@ find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql) if(MYSQLCLIENT_LIBRARIES) set(HAVE_LIBMYSQLCLIENT 1) list(APPEND ZM_BIN_LIBS "${MYSQLCLIENT_LIBRARIES}") - find_path(MYSQLCLIENT_INCLUDE_DIR mysql/mysql.h) + find_path(MYSQLCLIENT_INCLUDE_DIR mysql.h /usr/local/include/mysql /usr/include/mysql) if(MYSQLCLIENT_INCLUDE_DIR) include_directories("${MYSQLCLIENT_INCLUDE_DIR}") set(CMAKE_REQUIRED_INCLUDES "${MYSQLCLIENT_INCLUDE_DIR}") endif(MYSQLCLIENT_INCLUDE_DIR) mark_as_advanced(FORCE MYSQLCLIENT_LIBRARIES MYSQLCLIENT_INCLUDE_DIR) - check_include_file("mysql/mysql.h" HAVE_MYSQL_H) + check_include_file("mysql.h" HAVE_MYSQL_H) if(NOT HAVE_MYSQL_H) message(FATAL_ERROR "ZoneMinder requires MySQL headers - check that MySQL development packages are installed") @@ -660,11 +660,13 @@ 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) +if(NOT BSD) + 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) +endif(NOT BSD) # Some variables that zm expects set(ZM_PID "${ZM_RUNDIR}/zm.pid") From 1687217d1899870d8ffd05d7b375766aaba550ab Mon Sep 17 00:00:00 2001 From: abishai Date: Tue, 31 Jan 2017 11:10:25 +0300 Subject: [PATCH 04/32] switch to POSIX basename() --- src/zm_logger.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/zm_logger.cpp b/src/zm_logger.cpp index dee423503..06d61a0cb 100644 --- a/src/zm_logger.cpp +++ b/src/zm_logger.cpp @@ -31,9 +31,9 @@ #include #include #include +#include #ifdef __FreeBSD__ #include -#include #endif bool Logger::smInitialised = false; @@ -515,8 +515,9 @@ void Logger::logPrint( bool hex, const char * const filepath, const int line, co va_list argPtr; struct timeval timeVal; - const char * const file = basename(filepath); - + char *filecopy = strdup(filepath); + const char * const file = basename(filecopy); + if ( level < PANIC || level > DEBUG9 ) Panic( "Invalid logger level %d", level ); @@ -631,6 +632,8 @@ void Logger::logPrint( bool hex, const char * const filepath, const int line, co syslog( priority, "%s [%s]", classString, syslogStart ); } + free(filecopy); + if ( level <= FATAL ) { if ( level <= PANIC ) From 568160e5aa5eb230411213ae4515854dd688dce3 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 26 Oct 2016 13:34:28 -0400 Subject: [PATCH 05/32] add a scale element to the frame view. Include some bits from StorageAreas to make it work --- web/includes/Storage.php | 114 +++++++++++++++--------- web/skins/classic/views/js/frame.js | 15 ++++ web/skins/classic/views/js/frame.js.php | 2 + 3 files changed, 89 insertions(+), 42 deletions(-) create mode 100644 web/skins/classic/views/js/frame.js create mode 100644 web/skins/classic/views/js/frame.js.php diff --git a/web/includes/Storage.php b/web/includes/Storage.php index 546cb9cbe..81b9ad48c 100644 --- a/web/includes/Storage.php +++ b/web/includes/Storage.php @@ -1,51 +1,81 @@ $v) { - $this->{$k} = $v; - } - } else { - $this->{'Name'} = ''; - $this->{'Path'} = ''; - } + public function __construct( $IdOrRow = NULL ) { + $row = NULL; + if ( $IdOrRow ) { + if ( is_integer( $IdOrRow ) or is_numeric( $IdOrRow ) ) { + $row = dbFetchOne( 'SELECT * FROM Storage WHERE Id=?', NULL, array( $IdOrRow ) ); + if ( ! $row ) { + Error("Unable to load Storage record for Id=" . $IdOrRow ); + } + } elseif ( is_array( $IdOrRow ) ) { + $row = $IdOrRow; + } } + if ( $row ) { + foreach ($row as $k => $v) { + $this->{$k} = $v; + } + } else { + $this->{'Name'} = ''; + $this->{'Path'} = ''; + } + } - public function Path() { - if ( isset( $this->{'Path'} ) and ( $this->{'Path'} != '' ) ) { - return $this->{'Path'}; - } else if ( ! isset($this->{'Id'}) ) { - return ZM_DIR_EVENTS; - } - return $this->{'Name'}; - } - public function __call( $fn, array $args= NULL){ - if(isset($this->{$fn})){ - return $this->{$fn}; - #array_unshift($args, $this); - #call_user_func_array( $this->{$fn}, $args); - } + public function Path() { + if ( isset( $this->{'Path'} ) and ( $this->{'Path'} != '' ) ) { + return $this->{'Path'}; + } else if ( ! isset($this->{'Id'}) ) { + $path = ZM_DIR_EVENTS; + if ( $path[0] != '/' ) { + $this->{'Path'} = ZM_PATH_WEB.'/'.ZM_DIR_EVENTS; + } else { + $this->{'Path'} = ZM_DIR_EVENTS; + } + return $this->{'Path'}; + } - public static function find_all() { - $storage_areas = array(); - $result = dbQuery( 'SELECT * FROM Storage ORDER BY Name'); - $results = $result->fetchALL(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Storage' ); - foreach ( $results as $row => $obj ) { - $storage_areas[] = $obj; - } - return $storage_areas; + return $this->{'Name'}; + } + public function Name() { + if ( isset( $this->{'Name'} ) and ( $this->{'Name'} != '' ) ) { + return $this->{'Name'}; + } else if ( ! isset($this->{'Id'}) ) { + return 'Default'; } + return $this->{'Name'}; + } + + public function __call( $fn, array $args= NULL){ + if(isset($this->{$fn})){ + return $this->{$fn}; +#array_unshift($args, $this); +#call_user_func_array( $this->{$fn}, $args); + } + } + public static function find_all() { + $storage_areas = array(); + $result = dbQuery( 'SELECT * FROM Storage ORDER BY Name'); + $results = $result->fetchALL(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Storage' ); + foreach ( $results as $row => $obj ) { + $storage_areas[] = $obj; + } + return $storage_areas; + } + public function disk_usage_percent() { + $path = $this->Path(); + $total = disk_total_space( $path ); + if ( ! $total ) { + Error("disk_total_space returned false for " . $path ); + return 0; + } + $free = disk_free_space( $path ); + if ( ! $free ) { + Error("disk_free_space returned false for " . $path ); + } + $usage = round(($total - $free) / $total * 100); + return $usage; + } } ?> diff --git a/web/skins/classic/views/js/frame.js b/web/skins/classic/views/js/frame.js new file mode 100644 index 000000000..0705032bc --- /dev/null +++ b/web/skins/classic/views/js/frame.js @@ -0,0 +1,15 @@ +function changeScale() { + var scale = $('scale').get('value'); + var img = $('frameImg'); + if ( img ) { + var baseWidth = $('base_width').value; + var baseHeight = $('base_height').value; + var newWidth = ( baseWidth * scale ) / SCALE_BASE; + var newHeight = ( baseHeight * scale ) / SCALE_BASE; + + img.style.width = newWidth + "px"; + img.style.height = newHeight + "px"; + } + Cookie.write( 'zmWatchScale', scale, { duration: 10*365 } ); +} + diff --git a/web/skins/classic/views/js/frame.js.php b/web/skins/classic/views/js/frame.js.php new file mode 100644 index 000000000..dff39cdab --- /dev/null +++ b/web/skins/classic/views/js/frame.js.php @@ -0,0 +1,2 @@ + +var SCALE_BASE = ; From 4a4f62f0a7277d166ab02b176db1a3050b57bffa Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 26 Oct 2016 13:34:30 -0400 Subject: [PATCH 06/32] add a scale element to the frame view. Include some bits from StorageAreas to make it work --- web/skins/classic/css/flat/views/frame.css | 16 ++++++ web/skins/classic/views/frame.php | 61 +++++++++++++--------- 2 files changed, 51 insertions(+), 26 deletions(-) diff --git a/web/skins/classic/css/flat/views/frame.css b/web/skins/classic/css/flat/views/frame.css index 2c7789349..fb48e9923 100644 --- a/web/skins/classic/css/flat/views/frame.css +++ b/web/skins/classic/css/flat/views/frame.css @@ -1,3 +1,19 @@ +#header h2 { + float: left; + margin-right: 10px; +} +#header:after { + content: "."; + display: block; + height: 0; + font-size: 0; + clear: both; + visibility: hidden; +} +#scaleControl { + float: left; +} + #controls { width: 80%; text-align: center; diff --git a/web/skins/classic/views/frame.php b/web/skins/classic/views/frame.php index 96289f7bc..d6c8ac8b3 100644 --- a/web/skins/classic/views/frame.php +++ b/web/skins/classic/views/frame.php @@ -18,8 +18,7 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. // -if ( !canView( 'Events' ) ) -{ +if ( !canView( 'Events' ) ) { $view = "error"; return; } @@ -30,19 +29,19 @@ $eid = validInt($_REQUEST['eid']); if ( !empty($_REQUEST['fid']) ) $fid = validInt($_REQUEST['fid']); -$sql = 'SELECT E.*,M.Name AS MonitorName,M.DefaultScale FROM Events AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE E.Id = ?'; -$event = dbFetchOne( $sql, NULL, array($eid) ); +$Event = new Event( $eid ); +$Monitor = $Event->Monitor(); if ( !empty($fid) ) { - $sql = 'SELECT * FROM Frames WHERE EventId = ? AND FrameId = ?'; - if ( !($frame = dbFetchOne( $sql, NULL, array($eid, $fid) )) ) - $frame = array( 'FrameId'=>$fid, 'Type'=>'Normal', 'Score'=>0 ); + $sql = 'SELECT * FROM Frames WHERE EventId = ? AND FrameId = ?'; + if ( !($frame = dbFetchOne( $sql, NULL, array($eid, $fid) )) ) + $frame = array( 'FrameId'=>$fid, 'Type'=>'Normal', 'Score'=>0 ); } else { - $frame = dbFetchOne( 'SELECT * FROM Frames WHERE EventId = ? AND Score = ?', NULL, array( $eid, $event['MaxScore'] ) ); + $frame = dbFetchOne( 'SELECT * FROM Frames WHERE EventId = ? AND Score = ?', NULL, array( $eid, $Event->MaxScore() ) ); } $Frame = new Frame( $frame ); -$maxFid = $event['Frames']; +$maxFid = $Event->Frames(); $firstFid = 1; $prevFid = $Frame->FrameId()-1; @@ -51,12 +50,17 @@ $lastFid = $maxFid; $alarmFrame = $Frame->Type()=='Alarm'; -if ( isset( $_REQUEST['scale'] ) ) - $scale = validInt($_REQUEST['scale']); -else - $scale = max( reScale( SCALE_BASE, $event['DefaultScale'], ZM_WEB_DEFAULT_SCALE ), SCALE_BASE ); +if ( isset( $_REQUEST['scale'] ) ) { + $scale = validInt($_REQUEST['scale']); +} else if ( isset( $_COOKIE['zmWatchScale'.$Monitor->Id()] ) ) { + $scale = $_COOKIE['zmWatchScale'.$Monitor->Id()]; +} else if ( isset( $_COOKIE['zmWatchScale'] ) ) { + $scale = $_COOKIE['zmWatchScale']; +} else { + $scale = max( reScale( SCALE_BASE, $Monitor->DefaultScale(), ZM_WEB_DEFAULT_SCALE ), SCALE_BASE ); +} -$imageData = getImageSrc( $event, $frame, $scale, (isset($_REQUEST['show']) && $_REQUEST['show']=="capt") ); +$imageData = $Event->getImageSrc( $frame, $scale, (isset($_REQUEST['show']) && $_REQUEST['show']=="capt") ); $imagePath = $imageData['thumbPath']; $eventPath = $imageData['eventPath']; @@ -65,43 +69,48 @@ $rImagePath = sprintf( "%s/%0".ZM_EVENT_IMAGE_DIGITS."d-diag-r.jpg", $eventPath, $focusWindow = true; -xhtmlHeaders(__FILE__, translate('Frame')." - ".$event['Id']." - ".$Frame->FrameId() ); +xhtmlHeaders(__FILE__, translate('Frame')." - ".$Event->Id()." - ".$Frame->FrameId() ); ?>

-"> +"> -<?php echo $Frame->EventId().FrameId() ?>" class=""/> +<?php echo $Frame->EventId().FrameId() ?>" class=""/>

FrameId() > 1 ) { ?> - + FrameId() > 1 ) { ?> - + FrameId() < $maxFid ) { ?> - + FrameId() < $maxFid ) { ?> - +

-

" width="" height="" class=""/>

+

" width="Width(), $Event->DefaultScale(), $scale ) ?>" height="Height(), $Event->DefaultScale(), $scale ) ?>" class=""/>

-

+

From 7d451e1e417b44014b2661542eca634f4061ff97 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 26 Oct 2016 14:43:23 -0400 Subject: [PATCH 07/32] float the scale control right, add css for other skins --- web/skins/classic/css/classic/views/frame.css | 3 +++ web/skins/classic/css/dark/views/frame.css | 3 +++ web/skins/classic/css/flat/views/frame.css | 14 +------------- web/skins/classic/views/frame.php | 2 +- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/web/skins/classic/css/classic/views/frame.css b/web/skins/classic/css/classic/views/frame.css index 2c7789349..85c8cd11c 100644 --- a/web/skins/classic/css/classic/views/frame.css +++ b/web/skins/classic/css/classic/views/frame.css @@ -1,3 +1,6 @@ +#scaleControl { + float: right; +} #controls { width: 80%; text-align: center; diff --git a/web/skins/classic/css/dark/views/frame.css b/web/skins/classic/css/dark/views/frame.css index 2c7789349..85c8cd11c 100644 --- a/web/skins/classic/css/dark/views/frame.css +++ b/web/skins/classic/css/dark/views/frame.css @@ -1,3 +1,6 @@ +#scaleControl { + float: right; +} #controls { width: 80%; text-align: center; diff --git a/web/skins/classic/css/flat/views/frame.css b/web/skins/classic/css/flat/views/frame.css index fb48e9923..9e3e94da1 100644 --- a/web/skins/classic/css/flat/views/frame.css +++ b/web/skins/classic/css/flat/views/frame.css @@ -1,17 +1,5 @@ -#header h2 { - float: left; - margin-right: 10px; -} -#header:after { - content: "."; - display: block; - height: 0; - font-size: 0; - clear: both; - visibility: hidden; -} #scaleControl { - float: left; + float: right; } #controls { diff --git a/web/skins/classic/views/frame.php b/web/skins/classic/views/frame.php index d6c8ac8b3..fbf52e87a 100644 --- a/web/skins/classic/views/frame.php +++ b/web/skins/classic/views/frame.php @@ -80,8 +80,8 @@ xhtmlHeaders(__FILE__, translate('Frame')." - ".$Event->Id()." - ".$Frame->Frame -

Id()."-".$Frame->FrameId()." (".$Frame->Score().")" ?>

+

Id()."-".$Frame->FrameId()." (".$Frame->Score().")" ?>

From dc778058f58f5382503b2c64bd4cf4133171f46d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 6 Dec 2016 09:38:06 -0500 Subject: [PATCH 08/32] fix detection of LIBSWRESAMPLE --- zoneminder-config.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zoneminder-config.cmake b/zoneminder-config.cmake index 6dd6fc48a..29d30e002 100644 --- a/zoneminder-config.cmake +++ b/zoneminder-config.cmake @@ -42,6 +42,12 @@ #cmakedefine HAVE_GNUTLS_GNUTLS_H 1 #cmakedefine HAVE_LIBMYSQLCLIENT 1 #cmakedefine HAVE_MYSQL_H 1 +#cmakedefine HAVE_LIBX264 1 +#cmakedefine HAVE_X264_H 1 +#cmakedefine HAVE_LIBMP4V2 1 +#cmakedefine HAVE_MP4V2_MP4V2_H 1 +#cmakedefine HAVE_MP4V2_H 1 +#cmakedefine HAVE_MP4_H 1 #cmakedefine HAVE_LIBAVFORMAT 1 #cmakedefine HAVE_LIBAVFORMAT_AVFORMAT_H 1 #cmakedefine HAVE_LIBAVCODEC 1 @@ -53,6 +59,8 @@ #cmakedefine HAVE_LIBAVUTIL_MATHEMATICS_H 1 #cmakedefine HAVE_LIBSWSCALE 1 #cmakedefine HAVE_LIBSWSCALE_SWSCALE_H 1 +#cmakedefine HAVE_LIBSWRESAMPLE 1 +#cmakedefine HAVE_LIBSWRESAMPLE_SWRESAMPLE_H 1 #cmakedefine HAVE_LIBVLC 1 #cmakedefine HAVE_VLC_VLC_H 1 From acd1d96a06c8cacb9bed28c52006727ce1d3395d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 20 Dec 2016 11:37:21 -0500 Subject: [PATCH 09/32] revert change to zoneminder-config.cmake --- zoneminder-config.cmake | 8 -------- 1 file changed, 8 deletions(-) diff --git a/zoneminder-config.cmake b/zoneminder-config.cmake index 29d30e002..6dd6fc48a 100644 --- a/zoneminder-config.cmake +++ b/zoneminder-config.cmake @@ -42,12 +42,6 @@ #cmakedefine HAVE_GNUTLS_GNUTLS_H 1 #cmakedefine HAVE_LIBMYSQLCLIENT 1 #cmakedefine HAVE_MYSQL_H 1 -#cmakedefine HAVE_LIBX264 1 -#cmakedefine HAVE_X264_H 1 -#cmakedefine HAVE_LIBMP4V2 1 -#cmakedefine HAVE_MP4V2_MP4V2_H 1 -#cmakedefine HAVE_MP4V2_H 1 -#cmakedefine HAVE_MP4_H 1 #cmakedefine HAVE_LIBAVFORMAT 1 #cmakedefine HAVE_LIBAVFORMAT_AVFORMAT_H 1 #cmakedefine HAVE_LIBAVCODEC 1 @@ -59,8 +53,6 @@ #cmakedefine HAVE_LIBAVUTIL_MATHEMATICS_H 1 #cmakedefine HAVE_LIBSWSCALE 1 #cmakedefine HAVE_LIBSWSCALE_SWSCALE_H 1 -#cmakedefine HAVE_LIBSWRESAMPLE 1 -#cmakedefine HAVE_LIBSWRESAMPLE_SWRESAMPLE_H 1 #cmakedefine HAVE_LIBVLC 1 #cmakedefine HAVE_VLC_VLC_H 1 From 8d5a8f5512c3002c33cfe66993c110608c171de5 Mon Sep 17 00:00:00 2001 From: abishai Date: Fri, 3 Feb 2017 14:53:53 +0300 Subject: [PATCH 10/32] make clang happy --- src/zm_monitor.cpp | 8 ++++---- src/zmf.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index b7920c166..dd76e7845 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -160,7 +160,7 @@ bool Monitor::MonitorLink::connect() return( false ); } mem_ptr = (unsigned char *)shmat( shm_id, 0, 0 ); - if ( mem_ptr < 0 ) + if ( mem_ptr < (void *)0 ) { Debug( 3, "Can't shmat link memory: %s", strerror(errno) ); connected = false; @@ -194,7 +194,7 @@ bool Monitor::MonitorLink::disconnect() connected = false; #if ZM_MEM_MAPPED - if ( mem_ptr > 0 ) + if ( mem_ptr > (void *)0 ) { msync( mem_ptr, mem_size, MS_ASYNC ); munmap( mem_ptr, mem_size ); @@ -222,7 +222,7 @@ bool Monitor::MonitorLink::disconnect() } } - if ( shmdt( mem_ptr ) < 0 ) + if ( shmdt( mem_ptr ) < (void *)0 ) { Debug( 3, "Can't shmdt: %s", strerror(errno) ); return( false ); @@ -558,7 +558,7 @@ bool Monitor::connect() { exit( -1 ); } mem_ptr = (unsigned char *)shmat( shm_id, 0, 0 ); - if ( mem_ptr < 0 ) + if ( mem_ptr < (void *)0 ) { Error( "Can't shmat: %s", strerror(errno)); exit( -1 ); diff --git a/src/zmf.cpp b/src/zmf.cpp index 2245d9ba3..cf1810076 100644 --- a/src/zmf.cpp +++ b/src/zmf.cpp @@ -331,7 +331,7 @@ int main( int argc, char *argv[] ) Debug( 1, "Got image, writing to %s", path ); FILE *fd = 0; - if ( (fd = fopen( path, "w" )) < 0 ) + if ( (fd = fopen( path, "w" )) < (void *)0 ) { Error( "Can't fopen '%s': %s", path, strerror(errno) ); exit( -1 ); From 160aa1cac4f4fb30acb167dcfa26cb080e6f5a2d Mon Sep 17 00:00:00 2001 From: Andy Bauer Date: Sat, 4 Feb 2017 15:34:57 -0600 Subject: [PATCH 11/32] check for polkit only if systemd is present --- CMakeLists.txt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 508aea2e3..2f75c5838 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,8 @@ mark_as_advanced( ZM_PERL_MM_PARMS ZM_PERL_SEARCH_PATH ZM_TARGET_DISTRO - ZM_CONFIG_DIR) + ZM_CONFIG_DIR + ZM_SYSTEMD) set(ZM_RUNDIR "/var/run/zm" CACHE PATH "Location of transient process files, default: /var/run/zm") @@ -148,6 +149,8 @@ set(ZM_PERL_SEARCH_PATH "" CACHE PATH installed outside Perl's default search path.") set(ZM_TARGET_DISTRO "" CACHE STRING "Build ZoneMinder for a specific distribution. Currently, valid names are: fc24, fc25, el6, el7, OS13, FreeBSD") +set(ZM_SYSTEMD "OFF" CACHE BOOL + "Set to ON to force building ZM with systemd support. default: OFF") # Reassign some variables if a target distro has been specified if((ZM_TARGET_DISTRO STREQUAL "fc24") OR (ZM_TARGET_DISTRO STREQUAL "fc25")) @@ -205,6 +208,11 @@ include_directories("${CMAKE_BINARY_DIR}") # This is required to enable searching in lib64 (if exists), do not change set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON) +# Set the systemd flag if systemd is autodetected or ZM_SYSTEMD has been set +if(ZM_SYSTEMD OR (IS_DIRECTORY /usr/lib/systemd/system) OR (IS_DIRECTORY /lib/systemd/system)) + set(WITH_SYSTEMD 1) +endif(ZM_SYSTEMD OR (IS_DIRECTORY /usr/lib/systemd/system) OR (IS_DIRECTORY /lib/systemd/system)) + # System checks check_include_file("libv4l1-videodev.h" HAVE_LIBV4L1_VIDEODEV_H) if(NOT HAVE_LIBV4L1_VIDEODEV_H) @@ -659,14 +667,14 @@ endif(NOT ZM_WEB_GROUP) message(STATUS "Using web user: ${ZM_WEB_USER}") message(STATUS "Using web group: ${ZM_WEB_GROUP}") -# Check for polkit -if(NOT BSD) +if(WITH_SYSTEMD) + # Check for polkit find_package(Polkit) if(NOT POLKIT_FOUND) - message(FATAL_ERROR + message(FATAL_ERROR "Running ZoneMinder requires polkit. Building ZoneMinder requires the polkit development package.") endif(NOT POLKIT_FOUND) -endif(NOT BSD) +endif(WITH_SYSTEMD) # Some variables that zm expects set(ZM_PID "${ZM_RUNDIR}/zm.pid") From 74dd8ab0279a45ac3537b3d23e5a55f05e03e51a Mon Sep 17 00:00:00 2001 From: abishai Date: Mon, 6 Feb 2017 09:57:22 +0300 Subject: [PATCH 12/32] make clang happy take two --- src/zm_monitor.cpp | 2 +- src/zmf.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index dd76e7845..e25649cff 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -222,7 +222,7 @@ bool Monitor::MonitorLink::disconnect() } } - if ( shmdt( mem_ptr ) < (void *)0 ) + if ( shmdt( mem_ptr ) < 0 ) { Debug( 3, "Can't shmdt: %s", strerror(errno) ); return( false ); diff --git a/src/zmf.cpp b/src/zmf.cpp index cf1810076..addf2f053 100644 --- a/src/zmf.cpp +++ b/src/zmf.cpp @@ -331,7 +331,7 @@ int main( int argc, char *argv[] ) Debug( 1, "Got image, writing to %s", path ); FILE *fd = 0; - if ( (fd = fopen( path, "w" )) < (void *)0 ) + if ( (fd = fopen( path, "w" )) == NULL ) { Error( "Can't fopen '%s': %s", path, strerror(errno) ); exit( -1 ); From 7c765b5516d3d5357372a1a191586ffc9751d050 Mon Sep 17 00:00:00 2001 From: Manojav Sridhar Date: Wed, 15 Feb 2017 09:37:45 -0500 Subject: [PATCH 13/32] added feature to allow %tags% in arguments of exec command --- scripts/zmfilter.pl.in | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/zmfilter.pl.in b/scripts/zmfilter.pl.in index e51993bec..16af86578 100644 --- a/scripts/zmfilter.pl.in +++ b/scripts/zmfilter.pl.in @@ -982,6 +982,7 @@ sub executeCommand my $command = $filter->{AutoExecuteCmd}; $command .= " $event_path"; + $command = substituteTags( $command, $filter, $event ); Info( "Executing '$command'\n" ); my $output = qx($command); From ca303da03077d9d19b96e496fb356c65388b600e Mon Sep 17 00:00:00 2001 From: Manojav Sridhar Date: Wed, 15 Feb 2017 09:38:19 -0500 Subject: [PATCH 14/32] added documentation for feature that allows %tags% to passed as command line args to the exec command in addtion to the event path --- docs/userguide/filterevents.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/filterevents.rst b/docs/userguide/filterevents.rst index bc0dcffe2..8477ef157 100644 --- a/docs/userguide/filterevents.rst +++ b/docs/userguide/filterevents.rst @@ -29,7 +29,7 @@ Here is what the filter window looks like events later and also make sure archived events don't get deleted, for example * Email details of all matches: Sends an email to the configured address with details about the event. The email can be customized as per TBD - * Execute command on all matches: Allows you to execute any arbitrary command on the matched events + * Execute command on all matches: Allows you to execute any arbitrary command on the matched events. You can use replacement tokens as subsequent arguents to the command, the last argument will be the absolute path to the event, preceeded by replacement arguents. eg: /usr/bin/script.sh %MN% will excecute as /usr/bin/script.sh MonitorName /path/to/event. * Delete all matches: Deletes all the matched events * *E*: Use 'Submit' to 'test' your matching conditions. This will just match and show you what filters match. Use 'Execute' to actually execute the action after matching your conditions. Use 'Save' to save the filter for future use and 'Reset' to clear your settings From 2bfb28c0792688b536e44c18fbad553e959b385a Mon Sep 17 00:00:00 2001 From: Markos Vakondios Date: Fri, 17 Feb 2017 23:34:17 +0200 Subject: [PATCH 15/32] Merged Dockerfile from feature-h264-videostorage to master --- Dockerfile | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2c72f0f38..d0c078571 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # ZoneMinder -FROM ubuntu:trusty -MAINTAINER Kyle Johnson +FROM ubuntu:xenial +MAINTAINER Markos Vakondios # Resynchronize the package index files RUN apt-get update && \ @@ -10,8 +10,8 @@ RUN apt-get update && \ libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 \ libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm cmake libjpeg-turbo8-dev \ libjpeg-turbo8 libtheora-dev libvorbis-dev libvpx-dev libx264-dev libmp4v2-dev libav-tools mysql-client \ - apache2 php5 php5-mysql apache2-mpm-prefork libapache2-mod-php5 php5-cli \ - mysql-server libvlc-dev libvlc5 libvlccore-dev libvlccore7 vlc-data libcurl4-openssl-dev \ + apache2 php php-mysql libapache2-mod-php php-cli openssh-server \ + mysql-server libvlc-dev libvlc5 libvlccore-dev libvlccore8 vlc-data libcurl4-openssl-dev \ libavformat-dev libswscale-dev libavutil-dev libavcodec-dev libavfilter-dev \ libavresample-dev libavdevice-dev libpostproc-dev libv4l-dev libtool libnetpbm10-dev \ libmime-lite-perl dh-autoreconf dpatch \ @@ -42,12 +42,22 @@ ADD utils/docker/start.sh /tmp/start.sh # give files in /usr/local/share/zoneminder/ RUN chown -R www-data:www-data /usr/local/share/zoneminder/ +# Creating SSH privilege escalation dir +RUN mkdir /var/run/sshd + # Adding apache virtual hosts file ADD utils/docker/apache-vhost /etc/apache2/sites-available/000-default.conf -ADD utils/docker/phpdate.ini /etc/php5/apache2/conf.d/25-phpdate.ini +ADD utils/docker/phpdate.ini /etc/php/7.0/apache2/conf.d/25-phpdate.ini -# Expose http ports -EXPOSE 80 +# Set the root passwd +RUN echo 'root:root' | chpasswd + +# Add a user we can actually login with +RUN useradd -m -s /bin/bash -G sudo zoneminder +RUN echo 'zoneminder:zoneminder' | chpasswd + +# Expose ssh and http ports +EXPOSE 22 80 # Initial database and apache setup: RUN "/ZoneMinder/utils/docker/setup.sh" From ef8f5ceb23bbc9e617111f7640d85455bc66ed54 Mon Sep 17 00:00:00 2001 From: Markos Vakondios Date: Sat, 18 Feb 2017 00:17:18 +0200 Subject: [PATCH 16/32] Dockerfile Xenial & php 7 support --- Dockerfile | 16 +++------------- utils/docker/setup.sh | 2 +- utils/docker/start.sh | 2 +- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index d0c078571..fb2202460 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN apt-get update && \ libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 \ libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm cmake libjpeg-turbo8-dev \ libjpeg-turbo8 libtheora-dev libvorbis-dev libvpx-dev libx264-dev libmp4v2-dev libav-tools mysql-client \ - apache2 php php-mysql libapache2-mod-php php-cli openssh-server \ + apache2 php php-mysql libapache2-mod-php php-cli \ mysql-server libvlc-dev libvlc5 libvlccore-dev libvlccore8 vlc-data libcurl4-openssl-dev \ libavformat-dev libswscale-dev libavutil-dev libavcodec-dev libavfilter-dev \ libavresample-dev libavdevice-dev libpostproc-dev libv4l-dev libtool libnetpbm10-dev \ @@ -42,22 +42,12 @@ ADD utils/docker/start.sh /tmp/start.sh # give files in /usr/local/share/zoneminder/ RUN chown -R www-data:www-data /usr/local/share/zoneminder/ -# Creating SSH privilege escalation dir -RUN mkdir /var/run/sshd - # Adding apache virtual hosts file ADD utils/docker/apache-vhost /etc/apache2/sites-available/000-default.conf ADD utils/docker/phpdate.ini /etc/php/7.0/apache2/conf.d/25-phpdate.ini -# Set the root passwd -RUN echo 'root:root' | chpasswd - -# Add a user we can actually login with -RUN useradd -m -s /bin/bash -G sudo zoneminder -RUN echo 'zoneminder:zoneminder' | chpasswd - -# Expose ssh and http ports -EXPOSE 22 80 +# Expose http port +EXPOSE 80 # Initial database and apache setup: RUN "/ZoneMinder/utils/docker/setup.sh" diff --git a/utils/docker/setup.sh b/utils/docker/setup.sh index fbd3592f0..7f4e9f19d 100755 --- a/utils/docker/setup.sh +++ b/utils/docker/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash # Start MySQL -/usr/bin/mysqld_safe & +service mysql start # Give MySQL time to wake up SECONDS_LEFT=120 diff --git a/utils/docker/start.sh b/utils/docker/start.sh index 29cb2f567..00b97dfda 100755 --- a/utils/docker/start.sh +++ b/utils/docker/start.sh @@ -7,7 +7,7 @@ umount /dev/shm mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime,size=512M tmpfs /dev/shm # Start MySQL -/usr/bin/mysqld_safe & +service mysql start # Ensure we shut down mysql cleanly later: trap close_mysql SIGTERM From ed9601360516866bd02b9da8e2776cea4ec27333 Mon Sep 17 00:00:00 2001 From: Markos Vakondios Date: Sun, 12 Mar 2017 21:28:49 +0200 Subject: [PATCH 17/32] Mysql starts without upstart/systemd --- utils/docker/setup.sh | 4 +++- utils/docker/start.sh | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/utils/docker/setup.sh b/utils/docker/setup.sh index 7f4e9f19d..202cf45e4 100755 --- a/utils/docker/setup.sh +++ b/utils/docker/setup.sh @@ -1,7 +1,9 @@ #!/bin/bash # Start MySQL -service mysql start +test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld +su - mysql -s /bin/sh -c "/usr/bin/mysqld_safe > /dev/null 2>&1 &" + # Give MySQL time to wake up SECONDS_LEFT=120 diff --git a/utils/docker/start.sh b/utils/docker/start.sh index 00b97dfda..86247e734 100755 --- a/utils/docker/start.sh +++ b/utils/docker/start.sh @@ -7,7 +7,8 @@ umount /dev/shm mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime,size=512M tmpfs /dev/shm # Start MySQL -service mysql start +test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld +su - mysql -s /bin/sh -c "/usr/bin/mysqld_safe > /dev/null 2>&1 &" # Ensure we shut down mysql cleanly later: trap close_mysql SIGTERM From c7955cd1b6abea504d793b5f6d2acc4c5e703b6e Mon Sep 17 00:00:00 2001 From: Matthew Noorenberghe Date: Sat, 18 Mar 2017 00:00:51 -0700 Subject: [PATCH 18/32] Add eslint configuration files extending Google's rules --- .eslintignore | 4 +++ .eslintrc.js | 29 ++++++++++++++++ web/js/logger.js | 4 +-- web/js/overlay.js | 4 +-- web/skins/classic/js/classic.js | 2 +- web/skins/classic/js/dark.js | 2 +- web/skins/classic/js/flat.js | 2 +- web/skins/classic/js/skin.js | 8 ++--- web/skins/classic/views/js/console.js | 27 +++++++-------- web/skins/classic/views/js/control.js | 4 +-- web/skins/classic/views/js/controlcap.js | 1 - web/skins/classic/views/js/event.js | 20 +++++------ web/skins/classic/views/js/group.js | 1 - web/skins/classic/views/js/log.js | 30 ++++++++-------- web/skins/classic/views/js/montage.js | 15 ++++---- web/skins/classic/views/js/onvifprobe.js | 2 +- web/skins/classic/views/js/state.js | 4 +-- web/skins/classic/views/js/timeline.js | 4 +-- web/skins/classic/views/js/watch.js | 44 ++++++++++++------------ web/skins/classic/views/js/zone.js | 23 ++++++------- 20 files changed, 128 insertions(+), 102 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.js diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..682db9004 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,4 @@ +web/api/lib +web/skins/classic/js/jquery-1.11.3.js +web/skins/classic/js/jquery.js +web/tools/mootools diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..fa4d6b6e5 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,29 @@ +"use strict"; + +module.exports = { + "env": { + "browser": true, + }, + "extends": ["google"], + "rules": { + "brace-style": "off", + "camelcase": "off", + "comma-dangle": "off", + "key-spacing": "off", + "max-len": "off", + "new-cap": ["error", { + capIsNewExceptions: ["Error", "Warning", "Debug", "Polygon_calcArea", "Play", "Stop"], + newIsCapExceptionPattern: "^Asset\.." + }], + "no-array-constructor": "off", + "no-caller": "off", + "no-new-object": "off", + "no-unused-vars": "off", + "no-var": "off", + "object-curly-spacing": "off", + "prefer-rest-params": "off", + "quotes": "off", + "require-jsdoc": "off", + "spaced-comment": "off", + }, +}; diff --git a/web/js/logger.js b/web/js/logger.js index c4e072541..9cbe50268 100644 --- a/web/js/logger.js +++ b/web/js/logger.js @@ -46,7 +46,7 @@ function logReport( level, message, file, line ) return; if ( arguments && arguments.callee && arguments.callee.caller && arguments.callee.caller.name ) - message += ' - '+arguments.callee.caller.caller.name+'()'; + message += ' - '+arguments.callee.caller.caller.name+'()'; if ( !debugReq ) { @@ -115,4 +115,4 @@ window.onerror = function( message, url, line ) { logReport( "ERR", message, url, line ); - } + }; diff --git a/web/js/overlay.js b/web/js/overlay.js index 74423e7ef..9738487b0 100644 --- a/web/js/overlay.js +++ b/web/js/overlay.js @@ -84,7 +84,7 @@ var Overlay = new Class({ showAnimation:function() { showOverlay(); - + //console.log( "Showing overlay loading" ); if ( !this.loading ) { @@ -116,7 +116,7 @@ function setupOverlays() overlay.getElements('.overlayCloser').each( function( closer ) { - closer.addEvent( 'click', function() { overlay.element.hide(); } ) + closer.addEvent( 'click', function() { overlay.element.hide(); } ); } ); overlay.overlayShow = function() { overlay.element.show(); }; diff --git a/web/skins/classic/js/classic.js b/web/skins/classic/js/classic.js index 33061eee5..938b05224 100644 --- a/web/skins/classic/js/classic.js +++ b/web/skins/classic/js/classic.js @@ -33,7 +33,7 @@ var popupSizes = { 'device': { 'width': 260, 'height': 150 }, 'devices': { 'width': 400, 'height': 240 }, 'donate': { 'width': 500, 'height': 280 }, - 'event': { 'addWidth': 108, 'minWidth': 496, 'addHeight': 230, minHeight: 540 }, + 'event': { 'addWidth': 108, 'minWidth': 496, 'addHeight': 230, 'minHeight': 540 }, 'eventdetail': { 'width': 600, 'height': 220 }, 'events': { 'width': 960, 'height': 780 }, 'export': { 'width': 400, 'height': 340 }, diff --git a/web/skins/classic/js/dark.js b/web/skins/classic/js/dark.js index 4331ddddd..37e3889c0 100644 --- a/web/skins/classic/js/dark.js +++ b/web/skins/classic/js/dark.js @@ -33,7 +33,7 @@ var popupSizes = { 'device': { 'width': 260, 'height': 150 }, 'devices': { 'width': 400, 'height': 240 }, 'donate': { 'width': 500, 'height': 280 }, - 'event': { 'addWidth': 108, 'minWidth': 496, 'addHeight': 230, minHeight: 540 }, + 'event': { 'addWidth': 108, 'minWidth': 496, 'addHeight': 230, 'minHeight': 540 }, 'eventdetail': { 'width': 600, 'height': 220 }, 'events': { 'width': 960, 'height': 780 }, 'export': { 'width': 400, 'height': 340 }, diff --git a/web/skins/classic/js/flat.js b/web/skins/classic/js/flat.js index 5e878a8b5..ab6cdda83 100644 --- a/web/skins/classic/js/flat.js +++ b/web/skins/classic/js/flat.js @@ -33,7 +33,7 @@ var popupSizes = { 'device': { 'width': 260, 'height': 150 }, 'devices': { 'width': 400, 'height': 240 }, 'donate': { 'width': 500, 'height': 280 }, - 'event': { 'addWidth': 108, 'minWidth': 496, 'addHeight': 230, minHeight: 540 }, + 'event': { 'addWidth': 108, 'minWidth': 496, 'addHeight': 230, 'minHeight': 540 }, 'eventdetail': { 'width': 600, 'height': 220 }, 'events': { 'width': 1080, 'height': 780 }, 'export': { 'width': 400, 'height': 340 }, diff --git a/web/skins/classic/js/skin.js b/web/skins/classic/js/skin.js index 859b34fcd..545f309af 100644 --- a/web/skins/classic/js/skin.js +++ b/web/skins/classic/js/skin.js @@ -31,11 +31,11 @@ function checkSize() { var h = window.outerHeight; var prevH = h; if (h > screen.availHeight) - h = screen.availHeight; + h = screen.availHeight; if (w > screen.availWidth) - w = screen.availWidth; + w = screen.availWidth; if (w != prevW || h != prevH) - window.resizeTo(w,h); + window.resizeTo(w, h); } } @@ -56,7 +56,7 @@ function getPopupSize( tag, width, height ) if ( popupSize.width && popupSize.height ) { if ( width || height ) - Warning( "Ignoring passed dimensions "+width+"x"+height+" when getting popup size for tag '"+tag+"'" ); + Warning( "Ignoring passed dimensions "+width+"x"+height+" when getting popup size for tag '"+tag+"'" ); return( popupSize ); } if ( popupSize.addWidth ) diff --git a/web/skins/classic/views/js/console.js b/web/skins/classic/views/js/console.js index 99f175c23..5321fdded 100644 --- a/web/skins/classic/views/js/console.js +++ b/web/skins/classic/views/js/console.js @@ -25,15 +25,14 @@ function setButtonStates( element ) function addMonitor( element) { - - var form = element.form; - var dupParam; - var monitorId=-1; - if (form.addBtn.value == jsTranslatedCloneText) + var form = element.form; + var dupParam; + var monitorId=-1; + if (form.addBtn.value == jsTranslatedCloneText) { - // get the value of the first checkbox - for ( var i = 0; i < form.elements.length; i++ ) - { + // get the value of the first checkbox + for ( var i = 0; i < form.elements.length; i++ ) + { if ( form.elements[i].type == "checkbox" ) { if ( form.elements[i].checked ) @@ -42,10 +41,10 @@ function addMonitor( element) break; } } - } - } - dupParam = (monitorId == -1 ) ? '': '&dupId='+monitorId; - createPopup( '?view=monitor'+dupParam, 'zmMonitor0','monitor' ); + } + } + dupParam = (monitorId == -1 ) ? '': '&dupId='+monitorId; + createPopup( '?view=monitor'+dupParam, 'zmMonitor0', 'monitor' ); } function editMonitor( element ) @@ -85,8 +84,8 @@ function reloadWindow() function initPage() { - jsTranslatedAddText = translatedAddText; - jsTranslatedCloneText = translatedCloneText; + jsTranslatedAddText = translatedAddText; + jsTranslatedCloneText = translatedCloneText; reloadWindow.periodical( consoleRefreshTimeout ); if ( showVersionPopup ) createPopup( '?view=version', 'zmVersion', 'version' ); diff --git a/web/skins/classic/views/js/control.js b/web/skins/classic/views/js/control.js index 819f088d8..3b095c624 100644 --- a/web/skins/classic/views/js/control.js +++ b/web/skins/classic/views/js/control.js @@ -26,7 +26,7 @@ function controlCmd( control, event, xtell, ytell ) var x = xEvent.page.x - l; var y = xEvent.page.y - t; - if ( xtell ) + if ( xtell ) { var xge = parseInt( (x*100)/coords.width ); if ( xtell == -1 ) @@ -35,7 +35,7 @@ function controlCmd( control, event, xtell, ytell ) xge = 2*(50 - xge); locParms += "&xge="+xge; } - if ( ytell ) + if ( ytell ) { var yge = parseInt( (y*100)/coords.height ); if ( ytell == -1 ) diff --git a/web/skins/classic/views/js/controlcap.js b/web/skins/classic/views/js/controlcap.js index 44e266943..81bbacca0 100644 --- a/web/skins/classic/views/js/controlcap.js +++ b/web/skins/classic/views/js/controlcap.js @@ -19,6 +19,5 @@ function validateForm( form ) { return( false ); } return( true ); - } diff --git a/web/skins/classic/views/js/event.js b/web/skins/classic/views/js/event.js index e1553e6e5..fd480fe1d 100644 --- a/web/skins/classic/views/js/event.js +++ b/web/skins/classic/views/js/event.js @@ -15,7 +15,7 @@ function changeScale() streamScale( scale ); Cookie.write( 'zmEventScale'+eventData.MonitorId, scale, { duration: 10*365 } ); - /*Stream could be an applet so can't use moo tools*/ + /*Stream could be an applet so can't use moo tools*/ var streamImg = document.getElementById('evtStream'); streamImg.style.width = newWidth + "px"; streamImg.style.height = newHeight + "px"; @@ -25,7 +25,7 @@ function changeReplayMode() { var replayMode = $('replayMode').get('value'); - Cookie.write( 'replayMode', replayMode, { duration: 10*365 }) + Cookie.write( 'replayMode', replayMode, { duration: 10*365 }); refreshWindow(); } @@ -38,7 +38,7 @@ var lastEventId = 0; function getCmdResponse( respObj, respText ) { - if ( checkStreamForErrors( "getCmdResponse" ,respObj ) ) + if ( checkStreamForErrors( "getCmdResponse", respObj ) ) return; if ( streamCmdTimer ) @@ -58,7 +58,7 @@ function getCmdResponse( respObj, respText ) $('rate').addClass( 'hidden' ); streamPause( false ); } - else + else { $('modeValue').set( 'text', "Replay" ); $('rateValue').set( 'text', streamStatus.rate ); @@ -198,9 +198,9 @@ function streamSeek( offset ) } function streamQuery() -{ +{ streamReq.send( streamParms+"&command="+CMD_QUERY ); -} +} var slider = null; var scroll = null; @@ -438,7 +438,7 @@ function getFrameResponse( respObj, respText ) eventData['frames'] = new Object(); eventData['frames'][frame.FrameId] = frame; - + loadEventThumb( eventData, frame, respObj.loopback=="true" ); } @@ -477,7 +477,7 @@ function checkFrames( eventId, frameId, loadImage ) if ( !$('eventThumb'+fid) ) { var img = new Element( 'img', { 'id': 'eventThumb'+fid, 'src': 'graphics/transparent.gif', 'alt': fid, 'class': 'placeholder' } ); - img.addEvent( 'click', function () { eventData['frames'][fid] = null; checkFrames( eventId, fid ) } ); + img.addEvent( 'click', function() { eventData['frames'][fid] = null; checkFrames( eventId, fid ); } ); frameQuery( eventId, fid, loadImage && (fid == frameId) ); var imgs = $('eventThumbs').getElements( 'img' ); var injected = false; @@ -689,7 +689,7 @@ function drawProgressBar() var offset = parseInt((index*eventData.Length)/$$(cells).length); $(cell).setProperty( 'title', '+'+secsToTime(offset)+'s' ); $(cell).removeEvent( 'click' ); - $(cell).addEvent( 'click', function(){ streamSeek( offset ); } ); + $(cell).addEvent( 'click', function() { streamSeek( offset ); } ); barWidth += $(cell).getCoordinates().width; } ); @@ -730,7 +730,7 @@ function handleClick( event ) var target = event.target; var x = event.page.x - $(target).getLeft(); var y = event.page.y - $(target).getTop(); - + if ( event.shift ) streamPan( x, y ); else diff --git a/web/skins/classic/views/js/group.js b/web/skins/classic/views/js/group.js index c1ab79581..ee3d1a27d 100644 --- a/web/skins/classic/views/js/group.js +++ b/web/skins/classic/views/js/group.js @@ -9,7 +9,6 @@ if ( refreshParent ) } function configureButtons( element ) { - if ( canEditGroups ) { var form = element.form; form.saveBtn.disabled = (element.value == 0); diff --git a/web/skins/classic/views/js/log.js b/web/skins/classic/views/js/log.js index e6f7fa30e..e27db6517 100644 --- a/web/skins/classic/views/js/log.js +++ b/web/skins/classic/views/js/log.js @@ -22,7 +22,7 @@ var logTimeout = maxSampleTime; var firstLoad = true; var initialDisplayLimit = 200; var sortReversed = false; -var filterFields = [ 'Component', 'ServerId', 'Pid', 'Level', 'File', 'Line']; +var filterFields = ['Component', 'ServerId', 'Pid', 'Level', 'File', 'Line']; var options = {}; function buildFetchParms( parms ) @@ -68,7 +68,7 @@ function logResponse( respObj ) maxLogTime = log.TimeKey; if ( !minLogTime || log.TimeKey < minLogTime ) minLogTime = log.TimeKey; - var row = logTable.push( [ { content: log.DateTime, properties: { style: 'white-space: nowrap' }}, log.Component, log.Server, log.Pid, log.Code, log.Message, log.File, log.Line ] ); + var row = logTable.push( [{ content: log.DateTime, properties: { style: 'white-space: nowrap' }}, log.Component, log.Server, log.Pid, log.Code, log.Message, log.File, log.Line] ); delete log.Message; row.tr.store( 'log', log ); if ( log.Level <= -3 ) @@ -81,7 +81,7 @@ function logResponse( respObj ) row.tr.addClass( 'log-dbg' ); if ( !firstLoad ) { - var color = document.defaultView.getComputedStyle(row.tr,null).getPropertyValue('color'); + var color = document.defaultView.getComputedStyle(row.tr, null).getPropertyValue('color'); var colorParts = color.match(/^rgb.*\((\d+),\s*(\d+),\s*(\d+)/); rowOrigColor = '#' + parseInt(colorParts[1]).toString(16) + parseInt(colorParts[2]).toString(16) + parseInt(colorParts[3]).toString(16); new Fx.Tween( row.tr, { duration: 10000, transition: Fx.Transitions.Sine } ).start( 'color', '#6495ED', rowOrigColor ); @@ -90,15 +90,15 @@ function logResponse( respObj ) ); options = respObj.options; updateFilterSelectors(); - $('lastUpdate').set('text',respObj.updated); - $('logState').set('text',respObj.state); + $('lastUpdate').set('text', respObj.updated); + $('logState').set('text', respObj.state); $('logState').removeClass('ok'); $('logState').removeClass('alert'); $('logState').removeClass('alarm'); $('logState').addClass(respObj.state); - $('totalLogs').set('text',respObj.total); - $('availLogs').set('text',respObj.available); - $('displayLogs').set('text',logCount); + $('totalLogs').set('text', respObj.total); + $('availLogs').set('text', respObj.available); + $('displayLogs').set('text', logCount); if ( firstLoad ) { if ( logCount < displayLimit ) @@ -123,7 +123,7 @@ function logResponse( respObj ) } } logTimer = fetchNextLogs.delay( logTimeout ); -} +} function refreshLog() { @@ -151,7 +151,7 @@ function clearLog() logCount = 0; logTimeout = maxSampleTime; displayLimit = initialDisplayLimit; - $('displayLogs').set('text',logCount); + $('displayLogs').set('text', logCount); options = {}; logTable.empty(); } @@ -265,12 +265,12 @@ function updateFilterSelectors() selector.options[selector.options.length] = new Option( value, label ); } ); - } + } else if ( key == 'ServerId' ) { Object.each(values, function( value, label ) - { + { selector.options[selector.options.length] = new Option( value, label ); } ); @@ -285,7 +285,7 @@ function updateFilterSelectors() ); } if ( filter[key] ) - selector.set('value',filter[key]); + selector.set('value', filter[key]); } ); } @@ -315,13 +315,13 @@ function initPage() if ( sortReversed ) startIndex = displayLimit; else - startIndex = 0;; + startIndex = 0; for ( var i = startIndex; logCount > displayLimit; i++ ) { rows[i].destroy(); logCount--; } - $('displayLogs').set('text',logCount); + $('displayLogs').set('text', logCount); } } ); diff --git a/web/skins/classic/views/js/montage.js b/web/skins/classic/views/js/montage.js index a6c459760..dd6c5b5a9 100644 --- a/web/skins/classic/views/js/montage.js +++ b/web/skins/classic/views/js/montage.js @@ -15,7 +15,7 @@ function Monitor( index, monitorData ) this.start = function( delay ) { this.streamCmdTimer = this.streamCmdQuery.delay( delay, this ); - } + }; this.setStateClass = function( element, stateClass ) { @@ -29,7 +29,7 @@ function Monitor( index, monitorData ) element.removeClass( 'idle' ); element.addClass( stateClass ); } - } + }; this.getStreamCmdResponse = function( respObj, respText ) { @@ -58,7 +58,7 @@ function Monitor( index, monitorData ) } this.setStateClass( $('monitor'+this.index), stateClass ); - /*Stream could be an applet so can't use moo tools*/ + /*Stream could be an applet so can't use moo tools*/ stream.className = stateClass; var isAlarmed = ( this.alarmState == STATE_ALARM || this.alarmState == STATE_ALERT ); @@ -93,15 +93,14 @@ function Monitor( index, monitorData ) console.error( respObj.message ); // Try to reload the image stream. if ( stream ) - stream.src = stream.src.replace(/rand=\d+/i,'rand='+Math.floor((Math.random() * 1000000) )); - + stream.src = stream.src.replace(/rand=\d+/i, 'rand='+Math.floor((Math.random() * 1000000) )); } var streamCmdTimeout = statusRefreshTimeout; if ( this.alarmState == STATE_ALARM || this.alarmState == STATE_ALERT ) streamCmdTimeout = streamCmdTimeout/5; this.streamCmdTimer = this.streamCmdQuery.delay( streamCmdTimeout, this ); this.lastAlarmState = this.alarmState; - } + }; this.streamCmdQuery = function( resent ) { @@ -109,7 +108,7 @@ function Monitor( index, monitorData ) //console.log( this.connKey+": Resending" ); //this.streamCmdReq.cancel(); this.streamCmdReq.send( this.streamCmdParms+"&command="+CMD_QUERY ); - } + }; this.streamCmdReq = new Request.JSON( { url: this.server_url, method: 'get', timeout: AJAX_TIMEOUT, onSuccess: this.getStreamCmdResponse.bind( this ), onTimeout: this.streamCmdQuery.bind( this, true ), link: 'cancel' } ); @@ -134,7 +133,7 @@ function changeScale() var monitor = monitors[x]; var newWidth = ( monitorData[x].width * scale ) / SCALE_BASE; var newHeight = ( monitorData[x].height * scale ) / SCALE_BASE; - /*Stream could be an applet so can't use moo tools*/ + /*Stream could be an applet so can't use moo tools*/ var streamImg = document.getElementById( 'liveStream'+monitor.id ); streamImg.style.width = newWidth + "px"; streamImg.style.height = newHeight + "px"; diff --git a/web/skins/classic/views/js/onvifprobe.js b/web/skins/classic/views/js/onvifprobe.js index f70765dda..93b2c53e9 100644 --- a/web/skins/classic/views/js/onvifprobe.js +++ b/web/skins/classic/views/js/onvifprobe.js @@ -31,7 +31,7 @@ function configureButtons( element ) if(form.elements.namedItem("nextBtn")) { form.nextBtn.disabled = (form.probe.selectedIndex==0) || (form.username == "") || (form.username == null) || - (form.password == "") || (form.password == null); + (form.password == "") || (form.password == null); } if(form.elements.namedItem("saveBtn")) { form.saveBtn.disabled = (form.probe.selectedIndex==0); diff --git a/web/skins/classic/views/js/state.js b/web/skins/classic/views/js/state.js index 9935eb0db..d5d94a03d 100644 --- a/web/skins/classic/views/js/state.js +++ b/web/skins/classic/views/js/state.js @@ -1,6 +1,5 @@ function checkState( element ) { - var form = element.form; var minIndex = running?2:1; @@ -23,9 +22,8 @@ function checkState( element ) if (element.value.toLowerCase() == 'default' ) { form.saveBtn.disabled = false; - form.deleteBtn.disabled = true; + form.deleteBtn.disabled = true; } - } function saveState( element ) diff --git a/web/skins/classic/views/js/timeline.js b/web/skins/classic/views/js/timeline.js index 89d2ecd34..7400d952c 100644 --- a/web/skins/classic/views/js/timeline.js +++ b/web/skins/classic/views/js/timeline.js @@ -114,10 +114,10 @@ function loadEventImage( imagePath, eid, fid, width, height ) var imageSrc = $('imageSrc'); imageSrc.setProperty( 'src', imagePrefix+imagePath ); imageSrc.removeEvent( 'click' ); - imageSrc.addEvent( 'click', showEvent.pass( [ eid, fid, width, height ] ) ); + imageSrc.addEvent( 'click', showEvent.pass( [eid, fid, width, height] ) ); var eventData = $('eventData'); eventData.removeEvent( 'click' ); - eventData.addEvent( 'click', showEvent.pass( [ eid, fid, width, height ] ) ); + eventData.addEvent( 'click', showEvent.pass( [eid, fid, width, height] ) ); } function tlZoomBounds( minTime, maxTime ) diff --git a/web/skins/classic/views/js/watch.js b/web/skins/classic/views/js/watch.js index 9b3b7ea21..d7fd496cb 100644 --- a/web/skins/classic/views/js/watch.js +++ b/web/skins/classic/views/js/watch.js @@ -34,13 +34,13 @@ function changeScale() Cookie.write( 'zmWatchScale'+monitorId, scale, { duration: 10*365 } ); - /*Stream could be an applet so can't use moo tools*/ + /*Stream could be an applet so can't use moo tools*/ var streamImg = document.getElementById('liveStream'); if ( streamImg ) { streamImg.style.width = newWidth + "px"; streamImg.style.height = newHeight + "px"; - streamImg.src = streamImg.src.replace(/scale=\d+/i,'scale='+scale); + streamImg.src = streamImg.src.replace(/scale=\d+/i, 'scale='+scale); } else { console.error("No element found for liveStream."); } @@ -168,7 +168,7 @@ function getStreamCmdResponse( respObj, respText ) streamCmdFastRev( false ); } } - else + else { $('modeValue').set( 'text', "Live" ); $('rate').addClass( 'hidden' ); @@ -210,18 +210,18 @@ function getStreamCmdResponse( respObj, respText ) } } else { - checkStreamForErrors("getStreamCmdResponse",respObj);//log them + checkStreamForErrors("getStreamCmdResponse", respObj);//log them // Try to reload the image stream. var streamImg = document.getElementById('liveStream'); if ( streamImg ) - streamImg.src = streamImg.src.replace(/rand=\d+/i,'rand='+Math.floor((Math.random() * 1000000) )); + streamImg.src = streamImg.src.replace(/rand=\d+/i, 'rand='+Math.floor((Math.random() * 1000000) )); } var streamCmdTimeout = statusRefreshTimeout; if ( alarmState == STATE_ALARM || alarmState == STATE_ALERT ) streamCmdTimeout = streamCmdTimeout/5; streamCmdTimer = streamCmdQuery.delay( streamCmdTimeout ); -} +} function streamCmdPause( action ) { @@ -354,7 +354,7 @@ function streamCmdPan( x, y ) function streamCmdQuery() { streamCmdReq.send( streamCmdParms+"&command="+CMD_QUERY ); -} +} var statusCmdParms = "view=request&request=status&entity=monitor&id="+monitorId+"&element[]=Status&element[]=FrameRate"; var statusCmdReq = new Request.JSON( { url: monitorUrl+thisUrl, method: 'post', data: statusCmdParms, timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: getStatusCmdResponse } ); @@ -372,18 +372,18 @@ function getStatusCmdResponse( respObj, respText ) setAlarmState( respObj.monitor.Status ); } else - checkStreamForErrors("getStatusCmdResponse",respObj); + checkStreamForErrors("getStatusCmdResponse", respObj); var statusCmdTimeout = statusRefreshTimeout; if ( alarmState == STATE_ALARM || alarmState == STATE_ALERT ) statusCmdTimeout = statusCmdTimeout/5; statusCmdTimer = statusCmdQuery.delay( statusCmdTimeout ); -} +} function statusCmdQuery() { statusCmdReq.send(); -} +} var alarmCmdParms = "view=request&request=alarm&id="+monitorId; var alarmCmdReq = new Request.JSON( { url: monitorUrl+thisUrl, method: 'post', timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: getAlarmCmdResponse, onTimeout: streamCmdQuery } ); @@ -391,7 +391,7 @@ var alarmCmdFirst = true; function getAlarmCmdResponse( respObj, respText ) { - checkStreamForErrors("getAlarmCmdResponse",respObj); + checkStreamForErrors("getAlarmCmdResponse", respObj); } function cmdDisableAlarms() @@ -477,26 +477,26 @@ function getEventCmdResponse( respObj, respText ) var cells = row.getElements( 'td' ); - var link = new Element( 'a', { 'href': '#', 'events': { 'click': createEventPopup.pass( [ event.Id, '&trms=1&attr1=MonitorId&op1=%3d&val1='+monitorId+'&page=1', event.Width, event.Height ] ) } }); + var link = new Element( 'a', { 'href': '#', 'events': { 'click': createEventPopup.pass( [event.Id, '&trms=1&attr1=MonitorId&op1=%3d&val1='+monitorId+'&page=1', event.Width, event.Height] ) } }); link.set( 'text', event.Id ); link.inject( row.getElement( 'td.colId' ) ); - link = new Element( 'a', { 'href': '#', 'events': { 'click': createEventPopup.pass( [ event.Id, '&trms=1&attr1=MonitorId&op1=%3d&val1='+monitorId+'&page=1', event.Width, event.Height ] ) } }); + link = new Element( 'a', { 'href': '#', 'events': { 'click': createEventPopup.pass( [event.Id, '&trms=1&attr1=MonitorId&op1=%3d&val1='+monitorId+'&page=1', event.Width, event.Height] ) } }); link.set( 'text', event.Name ); link.inject( row.getElement( 'td.colName' ) ); row.getElement( 'td.colTime' ).set( 'text', event.StartTime ); row.getElement( 'td.colSecs' ).set( 'text', event.Length ); - link = new Element( 'a', { 'href': '#', 'events': { 'click': createFramesPopup.pass( [ event.Id, event.Width, event.Height ] ) } }); + link = new Element( 'a', { 'href': '#', 'events': { 'click': createFramesPopup.pass( [event.Id, event.Width, event.Height] ) } }); link.set( 'text', event.Frames+'/'+event.AlarmFrames ); link.inject( row.getElement( 'td.colFrames' ) ); - link = new Element( 'a', { 'href': '#', 'events': { 'click': createFramePopup.pass( [ event.Id, '0', event.Width, event.Height ] ) } }); + link = new Element( 'a', { 'href': '#', 'events': { 'click': createFramePopup.pass( [event.Id, '0', event.Width, event.Height] ) } }); link.set( 'text', event.AvgScore+'/'+event.MaxScore ); link.inject( row.getElement( 'td.colScore' ) ); - link = new Element( 'a', { 'href': '#', 'title': deleteString, 'events': { 'click': function( e ) { deleteEvent( e, event.Id ); }.bind( link ), 'mouseover': highlightRow.pass( row ), 'mouseout': highlightRow.pass( row ) } }); + link = new Element( 'a', { 'href': '#', 'title': deleteString, 'events': { 'click': function( e ) { deleteEvent( e, event.Id ); }, 'mouseover': highlightRow.pass( row ), 'mouseout': highlightRow.pass( row ) } }); link.set( 'text', 'X' ); link.inject( row.getElement( 'td.colDelete' ) ); @@ -537,7 +537,7 @@ function getEventCmdResponse( respObj, respText ) } } else - checkStreamForErrors("getEventCmdResponse",respObj); + checkStreamForErrors("getEventCmdResponse", respObj); var eventCmdTimeout = eventsRefreshTimeout; if ( alarmState == STATE_ALARM || alarmState == STATE_ALERT ) @@ -581,7 +581,7 @@ function controlCmd( control, event, xtell, ytell ) var x = xEvent.page.x - l; var y = xEvent.page.y - t; - if ( xtell ) + if ( xtell ) { var xge = parseInt( (x*100)/coords.width ); if ( xtell == -1 ) @@ -590,7 +590,7 @@ function controlCmd( control, event, xtell, ytell ) xge = 2*(50 - xge); locParms += "&xge="+xge; } - if ( ytell ) + if ( ytell ) { var yge = parseInt( (y*100)/coords.height ); if ( ytell == -1 ) @@ -614,7 +614,7 @@ function controlCmdImage( x, y ) controlReq.send( imageControlParms+"&x="+x+"&y="+y ); if ( streamMode == "single" ) fetchImage.pass( $('imageFeed').getElement('img') ).delay( 1000 ); -} +} var tempImage = null; function fetchImage( streamImage ) @@ -631,7 +631,7 @@ function handleClick( event ) var target = event.target; var x = event.page.x - $(target).getLeft(); var y = event.page.y - $(target).getTop(); - + if ( showMode == "events" || !imageControlMode ) { if ( event.shift ) @@ -706,7 +706,7 @@ function initPage() streamCmdTimer = streamCmdQuery.delay( (Math.random()+0.1)*statusRefreshTimeout ); watchdogCheck.pass('stream').periodical(statusRefreshTimeout*2); } - + eventCmdTimer = eventCmdQuery.delay( (Math.random()+0.1)*statusRefreshTimeout ); watchdogCheck.pass('event').periodical(eventsRefreshTimeout*2); diff --git a/web/skins/classic/views/js/zone.js b/web/skins/classic/views/js/zone.js index a8e456778..21bad6128 100644 --- a/web/skins/classic/views/js/zone.js +++ b/web/skins/classic/views/js/zone.js @@ -145,7 +145,7 @@ function applyZoneType() form.elements['newZone[MaxAlarmPixels]'].disabled = false; form.elements['newZone[OverloadFrames]'].disabled = false; form.elements['newZone[ExtendAlarmFrames]'].disabled = true; - applyCheckMethod(); + applyCheckMethod(); } } @@ -353,7 +353,7 @@ function updateActivePoint( index ) $('newZone[Points]['+index+'][y]').value = y; zone['Points'][index].x = x; zone['Points'][index].y = y; - var Point = $('zonePoly').points.getItem(index); + var Point = $('zonePoly').points.getItem(index); Point.x =x; Point.y =y; updateArea(); @@ -384,7 +384,7 @@ function delPoint( index ) function limitPointValue( point, loVal, hiVal ) { - point.value = constrainValue(point.value, loVal, hiVal) + point.value = constrainValue(point.value, loVal, hiVal); } function updateArea( ) { @@ -393,7 +393,6 @@ function updateArea( ) { var form = $('zoneForm'); form.elements['newZone[Area]'].value = area; if ( form.elements['newZone[Units]'].value == 'Percent' ) { - form.elements['newZone[TempArea]'].value = Math.round( area/monitorArea*100 ); } else if ( form.elements['newZone[Units]'].value == 'Pixels' ) { form.elements['newZone[TempArea]'].value = area; @@ -411,7 +410,7 @@ function updateX( index ) point.setStyle( 'left', x+'px' ); zone['Points'][index].x = x; - var Point = $('zonePoly').points.getItem(index); + var Point = $('zonePoly').points.getItem(index); Point.x = x; } @@ -424,7 +423,7 @@ function updateY( index ) point.setStyle( 'top', y+'px' ); zone['Points'][index].y = y; - var Point = $('zonePoly').points.getItem(index); + var Point = $('zonePoly').points.getItem(index); Point.y = y; } @@ -568,18 +567,18 @@ function getStreamCmdResponse( respObj, respText ) { streamCmdPlay( false ); } } else { - checkStreamForErrors("getStreamCmdResponse",respObj);//log them + checkStreamForErrors("getStreamCmdResponse", respObj);//log them // Try to reload the image stream. var streamImg = document.getElementById('liveStream'); if ( streamImg ) - streamImg.src = streamImg.src.replace(/rand=\d+/i,'rand='+Math.floor((Math.random() * 1000000) )); + streamImg.src = streamImg.src.replace(/rand=\d+/i, 'rand='+Math.floor((Math.random() * 1000000) )); } var streamCmdTimeout = statusRefreshTimeout; if ( alarmState == STATE_ALARM || alarmState == STATE_ALERT ) streamCmdTimeout = streamCmdTimeout/5; streamCmdTimer = streamCmdQuery.delay( streamCmdTimeout ); -} +} var streamPause = false; @@ -613,7 +612,7 @@ function streamCmdStop( action ) { function streamCmdQuery() { streamCmdReq.send( streamCmdParms+"&command="+CMD_QUERY ); -} +} var statusCmdParms = "view=request&request=status&entity=monitor&id="+monitorId+"&element[]=Status&element[]=FrameRate"; var statusCmdReq = new Request.JSON( { url: monitorUrl+thisUrl, method: 'post', data: statusCmdParms, timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: getStatusCmdResponse } ); @@ -630,13 +629,13 @@ function getStatusCmdResponse( respObj, respText ) { setAlarmState( respObj.monitor.Status ); } else - checkStreamForErrors("getStatusCmdResponse",respObj); + checkStreamForErrors("getStatusCmdResponse", respObj); var statusCmdTimeout = statusRefreshTimeout; if ( alarmState == STATE_ALARM || alarmState == STATE_ALERT ) statusCmdTimeout = statusCmdTimeout/5; statusCmdTimer = statusCmdQuery.delay( statusCmdTimeout ); -} +} function statusCmdQuery() { statusCmdReq.send(); From a16ea554a3a1789b660475cc95143fcfbb6c2af3 Mon Sep 17 00:00:00 2001 From: SteveGilvarry Date: Sat, 18 Mar 2017 22:31:06 +1100 Subject: [PATCH 19/32] Swap to PNG --- web/graphics/spinner.gif | Bin 2545 -> 0 bytes web/graphics/spinner.png | Bin 0 -> 384 bytes web/graphics/transparent.gif | Bin 61 -> 0 bytes web/graphics/transparent.png | Bin 0 -> 137 bytes web/skins/classic/graphics/arrow-d.gif | Bin 293 -> 0 bytes web/skins/classic/graphics/arrow-d.png | Bin 0 -> 313 bytes web/skins/classic/graphics/arrow-dl.gif | Bin 232 -> 0 bytes web/skins/classic/graphics/arrow-dl.png | Bin 0 -> 321 bytes web/skins/classic/graphics/arrow-dr.gif | Bin 263 -> 0 bytes web/skins/classic/graphics/arrow-dr.png | Bin 0 -> 324 bytes web/skins/classic/graphics/arrow-l-d.gif | Bin 538 -> 0 bytes web/skins/classic/graphics/arrow-l-d.png | Bin 0 -> 520 bytes web/skins/classic/graphics/arrow-l-u.gif | Bin 524 -> 0 bytes web/skins/classic/graphics/arrow-l-u.png | Bin 0 -> 479 bytes web/skins/classic/graphics/arrow-l.gif | Bin 284 -> 0 bytes web/skins/classic/graphics/arrow-l.png | Bin 0 -> 304 bytes web/skins/classic/graphics/arrow-r.gif | Bin 265 -> 0 bytes web/skins/classic/graphics/arrow-r.png | Bin 0 -> 299 bytes web/skins/classic/graphics/arrow-s-d.gif | Bin 206 -> 0 bytes web/skins/classic/graphics/arrow-s-d.png | Bin 0 -> 237 bytes web/skins/classic/graphics/arrow-s-u.gif | Bin 203 -> 0 bytes web/skins/classic/graphics/arrow-s-u.png | Bin 0 -> 234 bytes web/skins/classic/graphics/arrow-u.gif | Bin 278 -> 0 bytes web/skins/classic/graphics/arrow-u.png | Bin 0 -> 297 bytes web/skins/classic/graphics/arrow-ul.gif | Bin 286 -> 0 bytes web/skins/classic/graphics/arrow-ul.png | Bin 0 -> 332 bytes web/skins/classic/graphics/arrow-ur.gif | Bin 282 -> 0 bytes web/skins/classic/graphics/arrow-ur.png | Bin 0 -> 337 bytes web/skins/classic/graphics/center.gif | Bin 621 -> 0 bytes web/skins/classic/graphics/center.png | Bin 0 -> 641 bytes web/skins/classic/graphics/point-g.gif | Bin 76 -> 0 bytes web/skins/classic/graphics/point-g.png | Bin 0 -> 156 bytes web/skins/classic/graphics/point-o.gif | Bin 76 -> 0 bytes web/skins/classic/graphics/point-o.png | Bin 0 -> 156 bytes web/skins/classic/graphics/point-r.gif | Bin 76 -> 0 bytes web/skins/classic/graphics/point-r.png | Bin 0 -> 156 bytes web/skins/classic/graphics/seq-d.gif | Bin 68 -> 0 bytes web/skins/classic/graphics/seq-d.png | Bin 0 -> 165 bytes web/skins/classic/graphics/seq-u.gif | Bin 68 -> 0 bytes web/skins/classic/graphics/seq-u.png | Bin 0 -> 162 bytes 40 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 web/graphics/spinner.gif create mode 100644 web/graphics/spinner.png delete mode 100644 web/graphics/transparent.gif create mode 100644 web/graphics/transparent.png delete mode 100644 web/skins/classic/graphics/arrow-d.gif create mode 100644 web/skins/classic/graphics/arrow-d.png delete mode 100644 web/skins/classic/graphics/arrow-dl.gif create mode 100644 web/skins/classic/graphics/arrow-dl.png delete mode 100644 web/skins/classic/graphics/arrow-dr.gif create mode 100644 web/skins/classic/graphics/arrow-dr.png delete mode 100644 web/skins/classic/graphics/arrow-l-d.gif create mode 100644 web/skins/classic/graphics/arrow-l-d.png delete mode 100644 web/skins/classic/graphics/arrow-l-u.gif create mode 100644 web/skins/classic/graphics/arrow-l-u.png delete mode 100644 web/skins/classic/graphics/arrow-l.gif create mode 100644 web/skins/classic/graphics/arrow-l.png delete mode 100644 web/skins/classic/graphics/arrow-r.gif create mode 100644 web/skins/classic/graphics/arrow-r.png delete mode 100644 web/skins/classic/graphics/arrow-s-d.gif create mode 100644 web/skins/classic/graphics/arrow-s-d.png delete mode 100644 web/skins/classic/graphics/arrow-s-u.gif create mode 100644 web/skins/classic/graphics/arrow-s-u.png delete mode 100644 web/skins/classic/graphics/arrow-u.gif create mode 100644 web/skins/classic/graphics/arrow-u.png delete mode 100644 web/skins/classic/graphics/arrow-ul.gif create mode 100644 web/skins/classic/graphics/arrow-ul.png delete mode 100644 web/skins/classic/graphics/arrow-ur.gif create mode 100644 web/skins/classic/graphics/arrow-ur.png delete mode 100644 web/skins/classic/graphics/center.gif create mode 100644 web/skins/classic/graphics/center.png delete mode 100644 web/skins/classic/graphics/point-g.gif create mode 100644 web/skins/classic/graphics/point-g.png delete mode 100644 web/skins/classic/graphics/point-o.gif create mode 100644 web/skins/classic/graphics/point-o.png delete mode 100644 web/skins/classic/graphics/point-r.gif create mode 100644 web/skins/classic/graphics/point-r.png delete mode 100644 web/skins/classic/graphics/seq-d.gif create mode 100644 web/skins/classic/graphics/seq-d.png delete mode 100644 web/skins/classic/graphics/seq-u.gif create mode 100644 web/skins/classic/graphics/seq-u.png diff --git a/web/graphics/spinner.gif b/web/graphics/spinner.gif deleted file mode 100644 index 53dd589fa194f5db985e4301c7a73ed4f1b9ad99..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2545 zcma*pX;2hr8VB%~zPqQp=@B)`y1PS96NXtx1_oS2g;AJ+5se@Q;|&UOs2qwM!p4Ca zhJiUal?ExBdstaT~?f3m?cZgNh{frmzMrfcJ8)3 z;P)BJevgQNtw(cfF&90SnBnnr_M&xm@O%6 zzG;!w8(-4o!w_SKEsx_t8i2dHA{$xug+5j_t}~5!rEMsQGpY^uf8#e!ez!6*c<$`# z%2he_t-h<5RT`BLN|GpKWC}6HY^k+5Dom~L=dCyXf!71bXd=Do;)LbM zv+gGZ*&l+=TYuPh^HJ+{Um3v9W8Dqi zZsIDi!j*rKg;1w`oCOc;={#&)!ZF-E-<0u^i2Q3W!xltD%v-T4#;x)CfF(1Ouv)`p z>uUosDu9aCbKX*^H)pSF(Clw+wK}`3LC8Vd5wn~@j##n&8u(Or9|$_$-*q^|8tR^Ze!v`8XRU12fiFxN&Z^HeB_6{>ZFruBWn5U6U_WQI--B zG~o}Ys+mlEb+PC3o7FVVvN+9%m7%O}Y_c3WoYls|wT3|PzzV{wM+0F|$H`%9CT0Y^ za*mZIUl3}$c$+|-?~lU1Lc0B}sn(uvcimZ5#)MR#za@NWsrn^X=yb^$k3_>|w9gkR z>#sW<_Ea0KR$g0dg}fy7K69z6?%wR47d!o@ zGKEctobW(W=VY|Az1{V$NH$hYU5!_r3z~t<1_3#$IhT`+-0m8Lu3WANjbGvNg1vn1 z=E&h$lM^*FtCrg64J+q9{~$Yc&oK@)FJ9|wdu`CBEMKgD->DcQRuxrUW36azX6kqE z(WAIz&9a^4uqfQXZ?4*+k}M^TI=80q9GA}G8+>bb(fyeR`Q-S93>Q-=OX7E#U^f4~jWk3u>uE&r}55)J9D8+*U}{&~xy z+xheT3lqZ$_0RMat&nbp<_ki!f?+E=jik2kBu@#UnX z0AcCVU-1x`*#iFAGPG4?H)8U+YtUJCS?At3FP6 zWjMo76`C~5oga!z%d+xx$x-ljIYP1$9YjNGd0H&jsWL7XsM^)8O;wB>PVnYYXxtSh|$ifidD)RGQ}R zwHJrNIdVjTqdEklY&;>>dZRxDK`F>#B8Ki@pp8f7rwM2mppszvcw{I`Q1%>g09l6Ekr2-S;;<|g2awum zsj!Q?)Pbyi5x+M!F@WFk6jsdhHiry`x0GIzjy;Yj%rtk*Y|Rg9EEqf3wBpTM<@>(0 zk0}s;bd@I0{9$O~|I{qUIC4vLX&EGrCS`%OyAe_n3}9mSiO7}(QE&#Jdx176W`mkS qJBjK|(6Aas*VCO0)PD%QJkkj;=v4CXc=>?~L(zUkDAILm+?%c0mzaBhz zuwlc77cXA)_4S=NabnJ#IX7R#_Jj;nUyiZ@S*m zy}R-p|8a|x$B*vxR(cmN_scWo`^^(?F9>h6KYVnhF8|@#)h{y&mnhjd-mAMgTS7+P zZ(a38?S2l)v;wcSg=|9qE-7Bm?VDVm{Wh{Q`H6|Ui=xW;W4q-ZloagL7N2oAw)w>D zyu<32?B8WOdyk9OE)o7d;d<)R1yh!UrY~rfZ>keFWldPA{e|al0ZZ}A=E*q>=DNDC a|1sEXWEHP{C8_{)I)kUHpUXO@geCyWQ=rHI literal 0 HcmV?d00001 diff --git a/web/graphics/transparent.gif b/web/graphics/transparent.gif deleted file mode 100644 index edab8f2b50288ff247f738546d2d2d5036ce90eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 61 zcmZ?wbhEHb{KCk{@PWbb|Ns9C3=E1tSr~y7gARxQ$uKa9wDhk${g!|6oGrJyH{aXy Mo4@T*hX{i;07`omg#Z8m diff --git a/web/graphics/transparent.png b/web/graphics/transparent.png new file mode 100644 index 0000000000000000000000000000000000000000..1748734dc336a910f8b332af0d1651992c7faf39 GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0y~yVEh7PGcqy*Ng;!C*MSssfKQ0)|NsA&ACW!*k}C=F z3ubV5b|VeQ;VkfoEM{Qf76xHPhFNnYfP(BLp1!W^51ECy#bj1&XtV+f@p!s8hHzX@ cPFTPL?^c|_ntDeA=WfhXp^kOyS JvqO==8UQJ0XgL4? diff --git a/web/skins/classic/graphics/arrow-d.png b/web/skins/classic/graphics/arrow-d.png new file mode 100644 index 0000000000000000000000000000000000000000..b79def0859a565c2914025e62725dc393d39f73c GIT binary patch literal 313 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dy#sNMdt_*22FFbkc*uO1t(V_qU z{|go`?%#Li!Q0OpEepT;R+-2W~w#Y+L`~+t0$)C*~i&WqL}z$3Dl zfq`2Xgc%uT&5-~KvX^-Jy0SlH7UJgTI-W8YD9A z@PB_ThVC={Btw3)k2d z*fB=33V1m*@jW9s%3%gHYWmaS35z7 zv1G~MJWWg3RLlX+b4#9dll`9mR=9L~6M$?99cFMz8;FTP847&^IT(E=I2cEj01S>4 icwGYs0t*HNlU6MX2nY)c1O%NQ1f{1Vwzs$=5db^J*j?cO diff --git a/web/skins/classic/graphics/arrow-dl.png b/web/skins/classic/graphics/arrow-dl.png new file mode 100644 index 0000000000000000000000000000000000000000..933220d8a22b22025c259f9f1b516964d8d2ec62 GIT binary patch literal 321 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfv^#Gp`SBA8i7oNOLTy)5=ZT*2; z&;S4bKmYix_uqax_HXOocSW#xal_Vgfiw5y*l+m))WTWd5n0T@z%2~Ij105pNB{-d zOFVsD*&i|saSO1{YV4~43a#~YaSYKoKlP$EACsX->%++=nM{s7D~~4^G|LDz$uaUU zy0FGN*$SN$OJlDvbFa>qzpS<5_4NJgMUH1ZD7To&wZ+FEfMEuQ`BP>Gw-@eQPLCWT zscT<_LT2;1K6nto!rHPrzB_?y^M^mh zEZ<)UT`-Cf;&8q2JlVZT?eL+h7ZsZ#?~1-(XjorYX7>M1-S6k=^^Dzx>30u^p1A~c OID@CFpUXO@geCw2mwCwm literal 0 HcmV?d00001 diff --git a/web/skins/classic/graphics/arrow-dr.gif b/web/skins/classic/graphics/arrow-dr.gif deleted file mode 100644 index d497bdbc1ee2e8727dddbfe4dbfb68c65d3c6ed6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 263 zcmV+i0r>t$Nk%w1VITk?0J8u90A`uch;44?o&!;mN~syr~jB14!lWfq{xF@VOLITO_6 zNFX6jpg>g?Jc=~uf`d$(#uNZms#OFCqgu5%!01+_KflKO=vA!9qG8PfK$}+VQ-%rD zzE#N6ELOTh?J5kA*Q|nsEY*rccz}Umkv{hlFt9)Xg1$)EPCP(>z=8z`5VYi|G~>Yl NizRy=O}bz}06U_WZBzgN diff --git a/web/skins/classic/graphics/arrow-dr.png b/web/skins/classic/graphics/arrow-dr.png new file mode 100644 index 0000000000000000000000000000000000000000..3e3caef922910e1749aaba8a7a5a8a64d96ddef1 GIT binary patch literal 324 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfv^#Gp`SBA8i7oNOLTy)5=ZT*2; z&;S4bKmYix_uqax_HXOocSW#xal_Vgfiw5y*l+m))WTWd5n0T@z%2~Ij105pNB{-d zOFVsD*&i|sar5gYwhIN!D;Ode13V3xm0c7Vl@4ScIKU*#kjG=_CJ7&5PNP>5kX z9JHZ9dK|X>Q P(CrMKu6{1-oD!M<%@}Rq literal 0 HcmV?d00001 diff --git a/web/skins/classic/graphics/arrow-l-d.gif b/web/skins/classic/graphics/arrow-l-d.gif deleted file mode 100644 index d7b405b1f1873df7ffacddeb3d1c3fcd73465173..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 538 zcmV+#0_FWjNk%w1VITl70M!5h0A`uh*x6NtnyR+DfSRWraG3x9|G&)Bfwj(ZlA`MC z>>+)rLy)(>+2%2Zubiy3`R?eF&a zj-#z{tH_?l+Trc=&eqzm(BPrS+tu6NDs-2##?L{IwvM>W9B`OZn!Ul>=bpXHf3(i= z@$ss`&G`8E$I;f3zt!B};6>4Mw^QgHMZH{K%xUTlXfDXJFX cY3--hA|HlE`0&+818OSD9ue_Wt=b>}JKdrQUjP6A diff --git a/web/skins/classic/graphics/arrow-l-d.png b/web/skins/classic/graphics/arrow-l-d.png new file mode 100644 index 0000000000000000000000000000000000000000..4919f405a9cde8e4b9820e9532316171e8a5b8bf GIT binary patch literal 520 zcmV+j0{8uiP)>+)rLy)(>+2%2Zubiy3`R?eF&aj-#z{tH_?l+Trc=&eqzm(BPrS+tu6N zDs-2##?L{IwvM>W9B`OZn!Ul>=bpXHf3(i=@$ss`&G`8E$I;f3zt!B};s%ZT46S{n^?HiV5 z^Y-5(P0KxRnQV(e=$eOv|1~2Qi1K&X^L&qo(vAfHm=4Z6rg&-t4-F0d7qE(5paAkW zkHrOKl+8!t2C}yEwUhz7%4GotGC4mqoJctkU#X2$0f}R&2Gj{S94yhg$N{tf0000< KMNUMnLSTZnu>Ony literal 0 HcmV?d00001 diff --git a/web/skins/classic/graphics/arrow-l-u.gif b/web/skins/classic/graphics/arrow-l-u.gif deleted file mode 100644 index 9422c0f4752d91b3c32056de0dcfb5a73be78ba2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 524 zcmZ?wbhEHbRA4Y*xXQr5kT&z`jhlvT>sM{t?byFfwqVBp|Nk3iEuXVy%Yn0(U%h_Q zu=QL@_dLbgmHTf!>)&za@w4adbu$Hv7bh+{6xuRt=fR_A&YUTlw8*k@#{A>A-hcbq zw|MRO$8VSHKePVAgZpnj2hQAc?%J)Zx9=6MKA~MQecG-ws}G%>yZ6k;j~{>h__68e z`QsO_-Ffh6!oDj&w~zr8f3mQMF#KoG0qF(#iGl6ELvw+Lj#U4NB?glNttRp@9Qe3~ z%U)>ZljPDYmY|gmmwlTKB?kPoa9Zr1opkJN-Z9I_s)$38*`KPaQ^MjKOOnHc+p2^^ zb-NpN{p2RJ$$3^xZLD#Z;+@sT+w8)!pqs_DYgu=%_v)!-e494&t(q#lWwR&u0`Am3 zv-ZUvn0hGe$b@5|C%RAhpJ_YiccJl;*OjVkyZ7$DbNF5uKkMTsPoMIqs;azx^Y*Q3 zs=CDIFJHf^r^*Wc{`2>*Y^qOygvW*iN8!{EgNPFw5}id;g<@uSY)m@JBFLX{=fp(i zV|vVIeD0$$J+1q`HrKl&*SZ+zs#@D;NR@?QJK8X*4owE-f^qQ zD|DBZy3DJ>&7Hl>@$vEa`1rEL&&Sc$+~DGnzSLV-ES~@X010qNS#tmY3ljhU3ljkV znw%H_000McNliru;R6y24HOSu!jb?00O(0XK~y-)?bKOQ!Y~+x;UnS#NU4ciV%Y`C z_W%E$#a7DcN$L%kzIREV$;_9`6!(9G#@e}dkN`;=m>R%LzpMM6jW+Ko^m^ zC9sHQPr#uiSAe9fagMFF>#H6x7|2`vgKL4&9W@fL`l40>HXqbR!1$RO3s}EUYXQ3_ zYA2xgPW2Q#Pzv^+)Ly{+k(vuw+)@hxhga$#Abq1!0sR}QFCb5;T);M`wz0px^bKP+ VE3H;SN3#F`002ovPDHLkV1i=l;g&_JWXB?NBndI8ml%4j{U6Zik;Zly-Qy-^& zt?`?z@W$dmY{SXNdADWtoz{F$%ZzWx$+Kx`RPpObQuXKwC{bpa;59l^HS_ptiyKfud!V67s9H2{_%X|MnQ diff --git a/web/skins/classic/graphics/arrow-l.png b/web/skins/classic/graphics/arrow-l.png new file mode 100644 index 0000000000000000000000000000000000000000..f4f70136f0c0c42b543da57830242a6c0b28b953 GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dy#sNMdt_*22FFbi0ICGC-+xiLn zuKfT1zhUb+!Q#dHZ#{eP_OoOEw!+mX)?aw={@c&QMTZn?SI$3vOF};D6i_>7fk$L9 z0|U1(2s1Lwnj--eWH0gbb!C6ZEX2*ny|QA?5}?ooPZ!4!i_@)_y@eVSc$hCJcnPj4 z`hWSC``n3Jylc2Kl-QC#6pLA2unaV)3NYZ*;9y|B)yVYR(Q)Eu>uCY%`y7s)Z{ad& zWKv(SfPv=)50@K1*P@1I9%h-JAH1#d8?05ft+>aucDv1jjlCcGcE1Y_n)^xf%v_J% zMd8bqY)RM7c)OYPTUyZu-Fpnp->%*NJ5w~zm-n!J0Ox6-+Za4u{an^LB{Ts5>PdJL literal 0 HcmV?d00001 diff --git a/web/skins/classic/graphics/arrow-r.gif b/web/skins/classic/graphics/arrow-r.gif deleted file mode 100644 index e36acc8d86ea14850a22aef9dd396ea56601cf12..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 265 zcmZ?wbhEHbRA5kGIKsfdkT&zeled90_bAq`?B93g|Ns9DTh2Xr`&qDf@%jr79Q(Hw zu0FB<*0cBDekLwDH2?T5!?yKP_Fe<(BN8b7WML6u_|KpNQV+6|fwe6`u`eZao`%$t zoM?r9?dc2~&Q$Pf@VRLy_hHVM53nlot z=WHpGFj850y2Is{?7rR?S@Ssfml23J&} hXTL+v+~J}gSVdrix;oI@W8QuTjA;x`)@sa|LteuqC@kK-!g1l&o}>XK2SSnfk$L9 z0|U1(2s1Lwnj--eWH0gbb!C6ZEW|A!CEnTG2^8w~ba4!^INf^rAz!nC0P}-+$&(NA zRs3IGdMtGw=eED;pH#CnE4mcyW-#sKW(Z*oh+#+(W_ZE1;3w;zbAK3)NinLOlxJ*M z!XPHjaG1rRj=Mm_|6rUA`~7>G66fMC9&s=GH=F;l>)-Zb<}8afMbB!5SXan4>+|fZSD(&JWj6Nb^|8HGx&-Jf22WQ%mvv4FO#rTrcbNbH literal 0 HcmV?d00001 diff --git a/web/skins/classic/graphics/arrow-s-d.gif b/web/skins/classic/graphics/arrow-s-d.gif deleted file mode 100644 index bb45dd0848408d32464f30c6301e3dc82217c4a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 206 zcmZ?wbhEHbgoB9?I{u4}7M4G{S>hd9p%oaX(-GlTc={JKyHdkhTk3 fq#j$rnp7#bbP1D(=XZrz0KA5;8mu50Z|sGV}9%sF>)$$j0PR<#Ry6p<#-gB8$a`2`WdMxpS1xy!`m= Q01Hc#P{V?a4h{^~04mHuEdT%j diff --git a/web/skins/classic/graphics/arrow-s-u.png b/web/skins/classic/graphics/arrow-s-u.png new file mode 100644 index 0000000000000000000000000000000000000000..9ef25b9bcd6d7bca9ce795193af944d4c8f1769d GIT binary patch literal 234 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$3?vg*uel1Oj01c^Tp7}4o`3u{aONJx+LaUb zUHSk2f5X;u_uqULEMC0-)-%WcZHbExz5n)e{e=gHZR-nHpO}CA*7IDhw?OTj1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPtvknfD z>&O4~qDyX-iW{UeXH2{i*RfE29l!a7p9da@-c8_7U|XWFnz!mfuEWVCffJ6~Jlp!S eJJ9yCJ@@{nOdi?My{CYtGI+ZBxvX@Ju z#zlL+oUmX>xUyx!bKZHUKAcu$IuyLgK6}FT6d9}ma6V|0 diff --git a/web/skins/classic/graphics/arrow-u.png b/web/skins/classic/graphics/arrow-u.png new file mode 100644 index 0000000000000000000000000000000000000000..668373053bc876e2aa1cdfb6e001cf08fd89522c GIT binary patch literal 297 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dy#sNMdt_*22&p&<}ICGC;?aB%J zuKfT1zhUdS`)@uA7BAj^>zQN!w!}q;-hcbK{=x&pw)KUpPs~4l>v=BMTcCE%0*}aI z1_o|n5N2eUHAey{$X?><>&pI+S%{lYe`<9_DNv}>)5S5w;`G~#j$+LUJgyh{qj+X0 z{f^IlxVR98850jYj1z0{WLQ%^;X-KC2FH`N4i}%z_`%c{(on)QFJX)9fx~M; r1m0Bsz42Y`sI&9-SN1#%S z^+axAsmEuDi=qer_AQ_AMK(tC#P!g+dX2^=wd59t>b4Fa{T@!nzLp6ZR<>~|Q#2~9 z+4*?lXK4gSE6tBw6v2?T+oo-yZ?@j*ro49dp1nN#5A27K#;0=v({^mS}ehP=)D_YsDf5Ig(Ej?d8 zvy}1P3#JnmdKI;Vst01FR^82|tP literal 0 HcmV?d00001 diff --git a/web/skins/classic/graphics/arrow-ur.gif b/web/skins/classic/graphics/arrow-ur.gif deleted file mode 100644 index 8de5ffdae1c5a9428d5780bf856bf7e4636d1aad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 282 zcmZ?wbhEHbRA5kGIKsfdkT&zeleYmgcF#Y4OR;w4|Ns9Rww~L6>zQEj;>1OV9Q(KR z@4NEg?dSCu9u%%V5jb?WPj~x v!OTi=_47j(DM!TUE^u6-647iVW5OCXHvH diff --git a/web/skins/classic/graphics/arrow-ur.png b/web/skins/classic/graphics/arrow-ur.png new file mode 100644 index 0000000000000000000000000000000000000000..b5cc8ce58fe0570dfdf41d015888ceeff59aaa59 GIT binary patch literal 337 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfvg8-ipSBA8i7oNNgn6Z2Q@mq?u zEC2uh->~)E{#(xkix(#@I^@{Dt$*K@2X8;Gzwn@N^@+flduG)={Rq^{S>O>_%)r1c z48n{Iv*t(u1=&kHeO=ifG7E7FGwGl3kO2y9@pN$v(Kw&X;mXXT!Z{`XaukIICV@74TZ{jw8)M*r4I#P6Z|o z)&RyGOl)==7@QcHr6U*?GAv^CWMsDXSis=fz^)?Dsd9kJESbsafT#{b@F7Mn`3=?! zym+J=9x{tHXe6>#S&6<9-yjscVEJ|@R;7bn4G)93y4yGvSPv8kwsN{Oi7L2XVF@;A dED%zXW?+rT*&MmiT@&bj22WQ%mvv4FO#r9_ZUg`T literal 0 HcmV?d00001 diff --git a/web/skins/classic/graphics/center.gif b/web/skins/classic/graphics/center.gif deleted file mode 100644 index 4924105159c3281cb399b8d8cc737a73556c1f0a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 621 zcmZ?wbhEHbRA5kGxXQr5kT&zeledv`_sdnU=-G4m`>#LT1q+v+y5rElwQ|Gh2X8;` zzx7O`am}nFH{O5ynX=@tMENq$DLZpl9cRy*Z`!%>*2|Co|Nj>#Ui|FC*C_|Coq71W zdHeY}NAI~!+7U2gw`9e#tIysWw60gKTlMVw_o6i?oF{IZe&~AL=CdKQ_kREWebLF= zNAJG8_vX|33lD61wg8<&Dp35%!Xm=(pFszt5#%QZw*L;@1s*z5{l}**j=0&P*Vg&P zNim^k)gmr|sHm{HD@uIKDjW{8KQIhoxVNzDiBfAt2xB{QO4kK-0d>Bt{79$h{CY(# zRu5J+r6A_~?5HUWLg60H68yqba$Na%ro_&6X<=ZFb5RLey2fK=kh-f>iAqPzM%R`6 z^8_-S1%-LMcP(?zJ(jxALUCMk*RAMyrWL!GM7O_lFEx0b& zEd0!O#xkA|)7plXfEf=KJ~`kl)~?W@uF||M;+@VMk)XUL#V(#ekEj!zljlyT7*(DmJMRT&(u2uDfchD!raB>YYJB0>+C4sunT?6~%A f0h8%j*8^e)CoFWi-^^?!6X9`j?OR1h1_o;Y7Qgmy diff --git a/web/skins/classic/graphics/center.png b/web/skins/classic/graphics/center.png new file mode 100644 index 0000000000000000000000000000000000000000..8a263c7f7fb8e41c0dca60a6024b9cac987edc07 GIT binary patch literal 641 zcmV-{0)G98P)^S|2WD1oe+#Mtll`DCQS7>GA*n{}6Md=J55Dz}C#+>w~w?oWt<832;bRa{vGf6951U z69E94oEQKA00(qQO+^Rc0}=}o8&bH@od5sLKtq3Qk&qzg!*)(=q5oNeo^NSi%epri0CP+$Ck_r6L{G%{!J=PT z(~+ixVjven^yR?-MKeTFcK1EMKcpgIa1n%{t$tWdc~|!fkkGbrH83F#Rajc3;B*Vf z9cPh?;yHdIJ#YnH3D$v!1I`B5VM(yA6pGFQd+elM5LVaK1u+99@a`-1g!1*JFp_{R zj6L5>OuCjC*oU421;ngt{ev3;25TJ<@l)3|5(0ou2SlLj5t#*^$FoE{e@fs5;QWCf z4#*HK^ne&GV5|-E`9sHQ6a*a6g#Lw&ZR{~m>{sZ|On9TJ%;pIEnTVR}r^{;4SD`); zUoBimoeLZmx+gx7>$j<3?z5j>~{cCoB=)|t_%$6KqkX~hPbe_n?MF* zNswPKgTu2MX&@B^9+AZi4BWyX%*Zfnjs#GUy~NYkmHi>J5Vs(oh)3F1ppc}ei(?4K t_2h(qhw;SG2uuPBO`+~0AvLZ;s5{u diff --git a/web/skins/classic/graphics/point-o.png b/web/skins/classic/graphics/point-o.png new file mode 100644 index 0000000000000000000000000000000000000000..493b9a9ecff02decd5bc68ebbb49d0531bf3bfbc GIT binary patch literal 156 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j<3?z5j>~{cCoB=)|t_%$6K<59M#yLCxgX9=X zg8YIR9G=}s1F0zRh%9Dc;1&j9Muu5)B!GhKC7!;n><^iRxP_&?7eBZI6q59GaSY+O so}7@9kWid3Vb*~OJ6T+qZuamn$cZt1cs*}MAy5&6r>mdKI;Vst01fvi0ssI2 literal 0 HcmV?d00001 diff --git a/web/skins/classic/graphics/point-r.gif b/web/skins/classic/graphics/point-r.gif deleted file mode 100644 index 5d06dd6e002c6c5916ed2d781fe3242f3abe7791..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 76 zcmZ?wbhEHbWM^P!n8*ME|AFW~kYG^!$->FNz{H>f5(UXKaL6*Sa>$j<3?z5j>~{cCoB=)|t_%$6K<0l2hT>Q2-GD5{ zk|4ie28U-i(m*N-JR*x37`TN&n2}-D90{Nxdx@v7EBixcA#Oq03E$MSfkKj=E{-7_ t*OL=c5)z6NCd@i8VJC|V)6E_p201aN53lFVCl= literal 0 HcmV?d00001 diff --git a/web/skins/classic/graphics/seq-d.gif b/web/skins/classic/graphics/seq-d.gif deleted file mode 100644 index b58de09481fb381fad6e17bb663413b18cc5b996..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 68 zcmZ?wbhEHbpEk&)p+7>DPZ{VUvosu?_8{an^LB{Ts5 D)p;!X literal 0 HcmV?d00001 diff --git a/web/skins/classic/graphics/seq-u.gif b/web/skins/classic/graphics/seq-u.gif deleted file mode 100644 index f090de352b92c9d2fdcb9529fdd6406024410db3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 68 zcmZ?wbhEHbUtxVop&ik Q@tk#hzUKo`Nmd4H0NREX3jhEB diff --git a/web/skins/classic/graphics/seq-u.png b/web/skins/classic/graphics/seq-u.png new file mode 100644 index 0000000000000000000000000000000000000000..20192e9df0202036178ce8e1d127e516ebdf65e0 GIT binary patch literal 162 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CN#0(_O1?0ba4#f zxSpKAz{sl+$9m9bwbX$b*;kp^)`n^ykl_$GS Date: Tue, 21 Mar 2017 17:39:22 +0300 Subject: [PATCH 20/32] Updated Russian translation --- web/lang/ru_ru.php | 732 +++++++++++++++++++++++---------------------- 1 file changed, 374 insertions(+), 358 deletions(-) diff --git a/web/lang/ru_ru.php b/web/lang/ru_ru.php index 25ddc62a5..edeb2b917 100644 --- a/web/lang/ru_ru.php +++ b/web/lang/ru_ru.php @@ -19,6 +19,7 @@ // // ZoneMinder Russian Translation by Borodin A.S. +// ZoneMinder Russian Translation updated by IDDQDesnik, 2017 // Notes for Translators // 0. Get some credit, put your name in the line above (optional) @@ -74,91 +75,94 @@ $SLANG = array( '24BitColour' => '24 битный цвет', '32BitColour' => '32 битный цвет', // Added - 2011-06-15 '8BitGrey' => '256 оттенков серого', - 'Action' => 'Action', - 'Actual' => 'Действительный', - 'AddNewControl' => 'Add New Control', + 'Action' => 'Действие', + 'Actual' => '1х', + 'AddNewControl' => 'Добавить новый', 'AddNewMonitor' => 'Добавить монитор', 'AddNewUser' => 'Добавить пользователя', 'AddNewZone' => 'Добавить зону', 'Alarm' => 'Тревога', 'AlarmBrFrames' => 'Кадры
тревоги', 'AlarmFrame' => 'Кадр тревоги', - 'AlarmFrameCount' => 'Alarm Frame Count', + 'AlarmFrameCount' => 'Число кадров тревоги', 'AlarmLimits' => 'Гран. зоны трев.', - 'AlarmMaximumFPS' => 'Alarm Maximum FPS', + 'AlarmMaximumFPS' => 'Макс. к/с при тревоге', 'AlarmPx' => 'Пкс трев.', 'AlarmRGBUnset' => 'You must set an alarm RGB colour', - 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 + 'AlarmRefImageBlendPct'=> 'Смешение опорного кадра тревоги, %', // Added - 2015-04-18 + 'AlmRefImageBlendPct' => 'Смешение опорного кадра тревоги, %', 'Alert' => 'Настороже', 'All' => 'Все', - 'AnalysisFPS' => 'Analysis FPS', // Added - 2015-07-22 - 'AnalysisUpdateDelay' => 'Analysis Update Delay', // Added - 2015-07-23 + 'AnalysisFPS' => 'Частота анализа (к/с)', // Added - 2015-07-22 + 'AnalysisUpdateDelay' => 'Задержка обновления анализа', // Added - 2015-07-23 'Apply' => 'Применить', 'ApplyingStateChange' => 'Состояние сервиса изменяется', 'ArchArchived' => 'Только в архиве', 'ArchUnarchived' => 'Только не в архиве', 'Archive' => 'Архив', - 'Archived' => 'Archived', - 'Area' => 'Area', - 'AreaUnits' => 'Area (px/%)', + 'Archived' => 'Архив', + 'Area' => 'Зона', + 'AreaUnits' => 'Размер (пикс./%)', 'AttrAlarmFrames' => 'Кол-во кадров тревоги', 'AttrArchiveStatus' => 'Статус архивации', 'AttrAvgScore' => 'Сред. оценка', - 'AttrCause' => 'Cause', + 'AttrCause' => 'Причина', 'AttrDate' => 'Дата', 'AttrDateTime' => 'Дата/Время', - 'AttrDiskBlocks' => 'Disk Blocks', - 'AttrDiskPercent' => 'Disk Percent', + 'AttrDiskBlocks' => 'Диск, блоки', + 'AttrDiskPercent' => 'Диск, проценты', 'AttrDuration' => 'Длительность', 'AttrFrames' => 'Кол-во кадров', - 'AttrId' => 'Id', + 'AttrId' => 'ИД', 'AttrMaxScore' => 'Макс. оценка', - 'AttrMonitorId' => 'Id Монитора', + 'AttrMonitorId' => 'ИД Монитора', 'AttrMonitorName' => 'Название Монитора', - 'AttrName' => 'Name', - 'AttrNotes' => 'Notes', - 'AttrSystemLoad' => 'System Load', + 'AttrName' => 'Имя', + 'AttrNotes' => 'Примечание', + 'AttrServerId' => 'ИД сервера', + 'AttrServerName' => 'Имя сервера', + 'AttrSystemLoad' => 'Нагрузка проц.', 'AttrTime' => 'Время', 'AttrTotalScore' => 'Сумм. оценка', 'AttrWeekday' => 'День недели', 'Auto' => 'Auto', - 'AutoStopTimeout' => 'Auto Stop Timeout', - 'Available' => 'Available', // Added - 2009-03-31 + 'AutoStopTimeout' => 'Тайм-аут автоостановки', + 'Available' => 'Доступно', // Added - 2009-03-31 'AvgBrScore' => 'Сред.
оценка', - 'Background' => 'Background', - 'BackgroundFilter' => 'Run filter in background', - 'BadAlarmFrameCount' => 'Alarm frame count must be an integer of one or more', - 'BadAlarmMaxFPS' => 'Alarm Maximum FPS must be a positive integer or floating point value', - 'BadAnalysisFPS' => 'Analysis FPS must be a positive integer or floating point value', // Added - 2015-07-22 - 'BadAnalysisUpdateDelay'=> 'Analysis update delay must be set to an integer of zero or more', // Added - 2015-07-23 - 'BadChannel' => 'Channel must be set to an integer of zero or more', - 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 - 'BadDevice' => 'Device must be set to a valid value', - 'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more', - 'BadFormat' => 'Format must be set to an integer of zero or more', - 'BadFrameSkip' => 'Frame skip count must be an integer of zero or more', - 'BadHeight' => 'Height must be set to a valid value', - 'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://', + 'Background' => 'Фоновый', + 'BackgroundFilter' => 'Выполнить фильтр в фоновом режиме', + 'BadAlarmFrameCount' => 'Число кадров тревоги должно быть целочисенным и больше нуля', + 'BadAlarmMaxFPS' => 'Макс. к/с при тревоге должно быть положительным', + 'BadAnalysisFPS' => 'Частота анализа должна быть положительной', // Added - 2015-07-22 + 'BadAnalysisUpdateDelay'=> 'Задержка обновления анализа должна быть целочисленной и большей либо равной нулю', // Added - 2015-07-23 + 'BadChannel' => 'Канал должен быть целочисленным и большим либо равным нулю', + 'BadColours' => 'Неправильное цветовое пространство', // Added - 2011-06-15 + 'BadDevice' => 'Неправильный путь к устройству', + 'BadFPSReportInterval' => 'Период обновления индикации скорости должен быть целочисленным и большим либо равным нулю', + 'BadFormat' => 'Неправильный формат', + 'BadFrameSkip' => 'Количество пропускаемых кадров должно быть целочисленным и большим либо равным нулю', + 'BadHeight' => 'Неправильная высота', + 'BadHost' => 'Неправильный IP или имя хоста; указывается без http://', 'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more', - 'BadLabelX' => 'Label X co-ordinate must be set to an integer of zero or more', - 'BadLabelY' => 'Label Y co-ordinate must be set to an integer of zero or more', - 'BadMaxFPS' => 'Maximum FPS must be a positive integer or floating point value', - 'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more', - 'BadNameChars' => 'Names may only contain alphanumeric characters, spaces plus hyphen and underscore', - 'BadPalette' => 'Palette must be set to a valid value', // Added - 2009-03-31 - 'BadPath' => 'Path must be set to a valid value', - 'BadPort' => 'Port must be set to a valid number', - 'BadPostEventCount' => 'Post event image count must be an integer of zero or more', - 'BadPreEventCount' => 'Pre event image count must be at least zero, and less than image buffer size', - 'BadRefBlendPerc' => 'Reference blend percentage must be a positive integer', - 'BadSectionLength' => 'Section length must be an integer of 30 or more', - 'BadSignalCheckColour' => 'Signal check colour must be a valid RGB colour string', - 'BadStreamReplayBuffer'=> 'Stream replay buffer must be an integer of zero or more', - 'BadWarmupCount' => 'Warmup frames must be an integer of zero or more', - 'BadWebColour' => 'Web colour must be a valid web colour string', - 'BadWidth' => 'Width must be set to a valid value', + 'BadLabelX' => 'X координата ярлыка должна быть целочисленной и большей либо равной нулю', + 'BadLabelY' => 'Y координата ярлыка должна быть целочисленной и большей либо равной нулю', + 'BadMaxFPS' => 'Ограничение скорости записи должно быть положительным', + 'BadMotionFrameSkip' => 'Количество пропускаемых кадров движения должно быть целочисленным и большим либо равным нулю', + 'BadNameChars' => 'Имя может содержать только латинские буквы, цифры и символы пробела, плюса, минуса и подчеркивания', + 'BadPalette' => 'Неправильная палитра', // Added - 2009-03-31 + 'BadPath' => 'Неправильный путь', + 'BadPort' => 'Неправильный порт', + 'BadPostEventCount' => 'Буфер после события должен быть целочисленным и большим либо равным нулю', + 'BadPreEventCount' => 'Буфер до события должен быть целочисленным и большим либо равным нулю и меньше буфера изображений', + 'BadRefBlendPerc' => 'Смешение опорного кадра должно быть положительным и целочисленным', + 'BadSectionLength' => 'Длина секции должна быть целочисленной и большей либо равной тридцати', + 'BadSignalCheckColour' => 'Цвет проверки сигнала должен быть правильной строкой формата RGB', + 'BadStreamReplayBuffer'=> 'Буфер потока повторного воспроизведения должен быть целочисленным и большим либо равным нулю', + 'BadWarmupCount' => 'Кол-во кадров разогрева должно быть целочисленным и большим либо равным нулю', + 'BadWebColour' => 'Цвет отметки должен быть правильным Web-цветом', + 'BadWidth' => 'Неправильная ширина', 'Bandwidth' => 'канал', - 'BandwidthHead' => 'Bandwidth', // This is the end of the bandwidth status on the top of the console, different in many language due to phrasing + 'BandwidthHead' => 'канал', // This is the end of the bandwidth status on the top of the console, different in many language due to phrasing; 'BlobPx' => 'Пкс объекта', 'BlobSizes' => 'Размер объектов', 'Blobs' => 'Кол-во объектов', @@ -166,66 +170,66 @@ $SLANG = array( 'Buffer' => 'Buffer', // Added - 2015-04-18 'Buffers' => 'Буферы', 'CSSDescription' => 'Change the default css for this computer', // Added - 2015-04-18 - 'CanAutoFocus' => 'Can Auto Focus', - 'CanAutoGain' => 'Can Auto Gain', - 'CanAutoIris' => 'Can Auto Iris', - 'CanAutoWhite' => 'Can Auto White Bal.', - 'CanAutoZoom' => 'Can Auto Zoom', - 'CanFocus' => 'Can Focus', - 'CanFocusAbs' => 'Can Focus Absolute', - 'CanFocusCon' => 'Can Focus Continuous', - 'CanFocusRel' => 'Can Focus Relative', - 'CanGain' => 'Can Gain ', - 'CanGainAbs' => 'Can Gain Absolute', - 'CanGainCon' => 'Can Gain Continuous', - 'CanGainRel' => 'Can Gain Relative', - 'CanIris' => 'Can Iris', - 'CanIrisAbs' => 'Can Iris Absolute', - 'CanIrisCon' => 'Can Iris Continuous', - 'CanIrisRel' => 'Can Iris Relative', - 'CanMove' => 'Can Move', - 'CanMoveAbs' => 'Can Move Absolute', - 'CanMoveCon' => 'Can Move Continuous', - 'CanMoveDiag' => 'Can Move Diagonally', - 'CanMoveMap' => 'Can Move Mapped', - 'CanMoveRel' => 'Can Move Relative', - 'CanPan' => 'Can Pan' , - 'CanReset' => 'Can Reset', - 'CanSetPresets' => 'Can Set Presets', - 'CanSleep' => 'Can Sleep', - 'CanTilt' => 'Can Tilt', - 'CanWake' => 'Can Wake', - 'CanWhite' => 'Can White Balance', - 'CanWhiteAbs' => 'Can White Bal. Absolute', - 'CanWhiteBal' => 'Can White Bal.', - 'CanWhiteCon' => 'Can White Bal. Continuous', - 'CanWhiteRel' => 'Can White Bal. Relative', - 'CanZoom' => 'Can Zoom', - 'CanZoomAbs' => 'Can Zoom Absolute', - 'CanZoomCon' => 'Can Zoom Continuous', - 'CanZoomRel' => 'Can Zoom Relative', + 'CanAutoFocus' => 'Автофокус', + 'CanAutoGain' => 'Автоусиление', + 'CanAutoIris' => 'Автодиафрагма', + 'CanAutoWhite' => 'Автобаланс белого', + 'CanAutoZoom' => 'Автоприближение', + 'CanFocus' => 'Фокусировка', + 'CanFocusAbs' => 'Абсолютный фокус', + 'CanFocusCon' => 'Непрерывный фокус', + 'CanFocusRel' => 'Относительный фокус', + 'CanGain' => 'Усиление', + 'CanGainAbs' => 'Абсолютное усиление', + 'CanGainCon' => 'Непрерывное усиление', + 'CanGainRel' => 'Относительное усиление', + 'CanIris' => 'Диафрагма', + 'CanIrisAbs' => 'Абсолютная диафрагма', + 'CanIrisCon' => 'Непрерывная диафрагма', + 'CanIrisRel' => 'Относительная диафрагма', + 'CanMove' => 'Перемещение', + 'CanMoveAbs' => 'Абсолютное перемещение', + 'CanMoveCon' => 'Непрерывное перемещение', + 'CanMoveDiag' => 'Диагональное перемещение', + 'CanMoveMap' => 'Перемещение по точкам', + 'CanMoveRel' => 'Относительное перемещение', + 'CanPan' => 'Панорама' , + 'CanReset' => 'Сброс', + 'CanSetPresets' => 'Создание предустановок', + 'CanSleep' => 'Сон', + 'CanTilt' => 'Наклон', + 'CanWake' => 'Пробуждение', + 'CanWhite' => 'Баланс белого', + 'CanWhiteAbs' => 'Абсолютный баланс белого', + 'CanWhiteBal' => 'Баланс белого', + 'CanWhiteCon' => 'Непрерывный баланс белого', + 'CanWhiteRel' => 'Относительный баланс белого', + 'CanZoom' => 'Увеличение', + 'CanZoomAbs' => 'Абсолютное увеличение', + 'CanZoomCon' => 'Непрерывное увеличение', + 'CanZoomRel' => 'Относительное увеличение', 'Cancel' => 'Отменить', 'CancelForcedAlarm' => 'Отменить форсированную тревогу', 'CaptureHeight' => 'Размер по Y', - 'CaptureMethod' => 'Capture Method', // Added - 2009-02-08 + 'CaptureMethod' => 'Метод захвата', // Added - 2009-02-08 'CapturePalette' => 'Режим захвата', 'CaptureResolution' => 'Capture Resolution', // Added - 2015-04-18 'CaptureWidth' => 'Размер по X', - 'Cause' => 'Cause', + 'Cause' => 'Причина', 'CheckMethod' => 'Метод проверки тревоги', - 'ChooseDetectedCamera' => 'Choose Detected Camera', // Added - 2009-03-31 + 'ChooseDetectedCamera' => 'Выберите камеру', // Added - 2009-03-31 'ChooseFilter' => 'Выбрать фильтр', 'ChooseLogFormat' => 'Choose a log format', // Added - 2011-06-17 'ChooseLogSelection' => 'Choose a log selection', // Added - 2011-06-17 - 'ChoosePreset' => 'Choose Preset', - 'Clear' => 'Clear', // Added - 2011-06-16 + 'ChoosePreset' => 'Выберите предустановку', + 'Clear' => 'Очистить', // Added - 2011-06-16 'Close' => 'Закрыть', 'Colour' => 'Цвет', 'Command' => 'Command', - 'Component' => 'Component', // Added - 2011-06-16 + 'Component' => 'Компонент', // Added - 2011-06-16 'Config' => 'Config', - 'ConfiguredFor' => 'Настроен на', - 'ConfirmDeleteEvents' => 'Are you sure you wish to delete the selected events?', + 'ConfiguredFor' => 'настроен на', + 'ConfirmDeleteEvents' => 'Вы действительно хотите удалить выбранные события?', 'ConfirmPassword' => 'Подтвердите пароль', 'ConjAnd' => 'и', 'ConjOr' => 'или', @@ -233,59 +237,59 @@ $SLANG = array( 'ContactAdmin' => 'Пожалуйста обратитесь к вашему администратору.', 'Continue' => 'Continue', 'Contrast' => 'Контраст', - 'Control' => 'Control', - 'ControlAddress' => 'Control Address', - 'ControlCap' => 'Control Capability', - 'ControlCaps' => 'Control Capabilities', - 'ControlDevice' => 'Control Device', - 'ControlType' => 'Control Type', - 'Controllable' => 'Controllable', - 'Current' => 'Current', // Added - 2015-04-18 - 'Cycle' => 'Cycle', + 'Control' => 'Управление', + 'ControlAddress' => 'Адрес устройства', + 'ControlCap' => 'Тип управления', + 'ControlCaps' => 'Типы управления', + 'ControlDevice' => 'Управляемое устройство', + 'ControlType' => 'Тип управления', + 'Controllable' => 'Управляемая', + 'Current' => 'Текущий', // Added - 2015-04-18 + 'Cycle' => 'Циклически', 'CycleWatch' => 'Циклический просмотр', - 'DateTime' => 'Date/Time', // Added - 2011-06-16 + 'DateTime' => 'Дата/Время', // Added - 2011-06-16 'Day' => 'День', 'Debug' => 'Debug', - 'DefaultRate' => 'Default Rate', - 'DefaultScale' => 'Default Scale', - 'DefaultView' => 'Default View', - 'Deinterlacing' => 'Deinterlacing', // Added - 2015-04-18 + 'DefaultRate' => 'Скорость по умолчанию', + 'DefaultScale' => 'Масштаб по умолчанию', + 'DefaultView' => 'Вид по умолчанию', + 'Deinterlacing' => 'Устранение чересстрочности', // Added - 2015-04-18 'Delay' => 'Delay', // Added - 2015-04-18 'Delete' => 'Удалить', 'DeleteAndNext' => 'Удалить & след.', 'DeleteAndPrev' => 'Удалить & пред.', 'DeleteSavedFilter' => 'Удалить сохраненный фильтр', 'Description' => 'Описание', - 'DetectedCameras' => 'Detected Cameras', // Added - 2009-03-31 - 'DetectedProfiles' => 'Detected Profiles', // Added - 2015-04-18 + 'DetectedCameras' => 'Найденные камеры', // Added - 2009-03-31 + 'DetectedProfiles' => 'Найденные профили', // Added - 2015-04-18 'Device' => 'Device', // Added - 2009-02-08 'DeviceChannel' => 'Канал', 'DeviceFormat' => 'Формат', 'DeviceNumber' => 'Номер устройства', - 'DevicePath' => 'Device Path', + 'DevicePath' => 'Путь к устройству', 'Devices' => 'Devices', 'Dimensions' => 'Размеры', - 'DisableAlarms' => 'Disable Alarms', - 'Disk' => 'Disk', + 'DisableAlarms' => 'Запретить тревогу', + 'Disk' => 'Диск', 'Display' => 'Display', // Added - 2011-01-30 - 'Displaying' => 'Displaying', // Added - 2011-06-16 + 'Displaying' => 'Отображено', // Added - 2011-06-16 'DoNativeMotionDetection'=> 'Do Native Motion Detection', - 'Donate' => 'Please Donate', - 'DonateAlready' => 'No, I\'ve already donated', - 'DonateEnticement' => 'You\'ve been running ZoneMinder for a while now and hopefully are finding it a useful addition to your home or workplace security. Although ZoneMinder is, and will remain, free and open source, it costs money to develop and support. If you would like to help support future development and new features then please consider donating. Donating is, of course, optional but very much appreciated and you can donate as much or as little as you like.

If you would like to donate please select the option below or go to http://www.zoneminder.com/donate.html in your browser.

Thank you for using ZoneMinder and don\'t forget to visit the forums on ZoneMinder.com for support or suggestions about how to make your ZoneMinder experience even better.', - 'DonateRemindDay' => 'Not yet, remind again in 1 day', - 'DonateRemindHour' => 'Not yet, remind again in 1 hour', - 'DonateRemindMonth' => 'Not yet, remind again in 1 month', - 'DonateRemindNever' => 'No, I don\'t want to donate, never remind', - 'DonateRemindWeek' => 'Not yet, remind again in 1 week', - 'DonateYes' => 'Yes, I\'d like to donate now', - 'Download' => 'Download', + 'Donate' => 'Поддержите проект', + 'DonateAlready' => 'Нет, я уже сделал пожертвование', + 'DonateEnticement' => 'Вы какое-то время используете ZoneMinder и, надеемся, находите его полезным дополнением к вашей домашней или рабочей безопасности. Хотя ZoneMinder есть и будет оставаться свободным и бесплатным, он требует денег на разработку и поддержку. Если Вы хотите поддержать его будущее развитие и новые функции, пожалуйста сделайте пожертвование. Это, конечно, необязательно, но очень высоко ценится. Вы можете пожертвовать любую сумму.

Если Вы хотите сделать пожертвование, то выберите соответствующий вариант ниже или перейдите по адресу https://www.bountysource.com/teams/zoneminder в вашем браузере.

Спасибо за использование ZoneMinder, и не забывайте посетить форум на ZoneMinder.com для поддержки и пожеланий как сделать ZoneMinder еще лучше.', + 'DonateRemindDay' => 'Нет, не сейчас, напомнить через день', + 'DonateRemindHour' => 'Нет, не сейчас, напомнить через час', + 'DonateRemindMonth' => 'Нет, не сейчас, напомнить через месяц', + 'DonateRemindNever' => 'Нет, и не напоминать, я не хочу жертвовать', + 'DonateRemindWeek' => 'Нет, не сейчас, напомнить через неделю', + 'DonateYes' => 'Да, я хотел бы сделать пожертвование', + 'Download' => 'Скачать', 'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31 'Duration' => 'Длительность', 'Edit' => 'Редактирование', 'Email' => 'Email', - 'EnableAlarms' => 'Enable Alarms', - 'Enabled' => 'разрешен', + 'EnableAlarms' => 'Разрешить тревогу', + 'Enabled' => 'Включен', 'EnterNewFilterName' => 'Введите новое название фильтра', 'Error' => 'Ошибка', 'ErrorBrackets' => 'Ошибка: количество открывающих и закрывающих скобок должно быть одинаковым', @@ -295,112 +299,112 @@ $SLANG = array( 'EventFilter' => 'Фильтр событий', 'EventId' => 'Event Id', 'EventName' => 'Event Name', - 'EventPrefix' => 'Event Prefix', + 'EventPrefix' => 'Префикс события', 'Events' => 'События', 'Exclude' => 'Исключить', - 'Execute' => 'Execute', - 'Export' => 'Export', - 'ExportDetails' => 'Export Event Details', - 'ExportFailed' => 'Export Failed', - 'ExportFormat' => 'Export File Format', + 'Execute' => 'Выполнить', + 'Export' => 'Экспорт', + 'ExportDetails' => 'Экспортировать описание события', + 'ExportFailed' => 'Ошибка экспорта', + 'ExportFormat' => 'Формат экспорта', 'ExportFormatTar' => 'Tar', 'ExportFormatZip' => 'Zip', - 'ExportFrames' => 'Export Frame Details', - 'ExportImageFiles' => 'Export Image Files', - 'ExportLog' => 'Export Log', // Added - 2011-06-17 - 'ExportMiscFiles' => 'Export Other Files (if present)', - 'ExportOptions' => 'Export Options', - 'ExportSucceeded' => 'Export Succeeded', // Added - 2009-02-08 - 'ExportVideoFiles' => 'Export Video Files (if present)', - 'Exporting' => 'Exporting', + 'ExportFrames' => 'Экспортировать описание кадров', + 'ExportImageFiles' => 'Экспортировать изображения', + 'ExportLog' => 'Сохранить лог', // Added - 2011-06-17 + 'ExportMiscFiles' => 'Экспортировать прочие файлы (если есть)', + 'ExportOptions' => 'Настройки экспорта', + 'ExportSucceeded' => 'Экспорт успешен', // Added - 2009-02-08 + 'ExportVideoFiles' => 'Экспортировать видео файлы (если есть)', + 'Exporting' => 'Экспортирую', 'FPS' => 'к/c', 'FPSReportInterval' => 'Период обновления индикации скорости', 'FTP' => 'FTP', 'Far' => 'Far', - 'FastForward' => 'Fast Forward', + 'FastForward' => 'Перемотать', 'Feed' => 'Feed', 'Ffmpeg' => 'Ffmpeg', // Added - 2009-02-08 - 'File' => 'File', - 'Filter' => 'Filter', // Added - 2015-04-18 - 'FilterArchiveEvents' => 'Archive all matches', - 'FilterDeleteEvents' => 'Delete all matches', - 'FilterEmailEvents' => 'Email details of all matches', - 'FilterExecuteEvents' => 'Execute command on all matches', - 'FilterLog' => 'Filter log', // Added - 2015-04-18 + 'File' => 'Файл', + 'Filter' => 'Фильтр', // Added - 2015-04-18 + 'FilterArchiveEvents' => 'Архивировать выбранное', + 'FilterDeleteEvents' => 'Удалить выбранное', + 'FilterEmailEvents' => 'Отправить выбранное по Email', + 'FilterExecuteEvents' => 'Выполнить команду над выбранным', + 'FilterLog' => 'Фильтр лога', // Added - 2015-04-18 'FilterMessageEvents' => 'Message details of all matches', 'FilterPx' => 'Пкс фильтра', 'FilterUnset' => 'You must specify a filter width and height', 'FilterUploadEvents' => 'Upload all matches', 'FilterVideoEvents' => 'Create video for all matches', - 'Filters' => 'Filters', + 'Filters' => 'Фильтры', 'First' => 'Первый', 'FlippedHori' => 'Flipped Horizontally', 'FlippedVert' => 'Flipped Vertically', - 'FnMocord' => 'Mocord', // Added 2013.08.16. - 'FnModect' => 'Modect', // Added 2013.08.16. - 'FnMonitor' => 'Monitor', // Added 2013.08.16. - 'FnNodect' => 'Nodect', // Added 2013.08.16. - 'FnNone' => 'None', // Added 2013.08.16. - 'FnRecord' => 'Record', // Added 2013.08.16. - 'Focus' => 'Focus', - 'ForceAlarm' => 'Включить тревогу', - 'Format' => 'Format', + 'FnMocord' => 'Mocord', // Added 2013.08.16. + 'FnModect' => 'Modect', // Added 2013.08.16. + 'FnMonitor' => 'Monitor', // Added 2013.08.16. + 'FnNodect' => 'Nodect', // Added 2013.08.16. + 'FnNone' => 'None', // Added 2013.08.16. + 'FnRecord' => 'Record', // Added 2013.08.16. + 'Focus' => 'Фокус', + 'ForceAlarm' => 'Поднять тревогу', + 'Format' => 'Формат', 'Frame' => 'Кадр', - 'FrameId' => 'Id кадра', - 'FrameRate' => 'Скорость', - 'FrameSkip' => 'Пропускать кадры', + 'FrameId' => 'ИД кадра', + 'FrameRate' => 'Частота кадров', + 'FrameSkip' => 'Кол-во пропуск. кадров', 'Frames' => 'кадры', 'Func' => 'Функ.', 'Function' => 'Функция', 'Gain' => 'Gain', - 'General' => 'General', + 'General' => 'Основные', 'GenerateVideo' => 'Генерировать видео', 'GeneratingVideo' => 'Генерируется видео', 'GoToZoneMinder' => 'Перейти на ZoneMinder.com', 'Grey' => 'ч/б', - 'Group' => 'Group', - 'Groups' => 'Groups', - 'HasFocusSpeed' => 'Has Focus Speed', - 'HasGainSpeed' => 'Has Gain Speed', - 'HasHomePreset' => 'Has Home Preset', - 'HasIrisSpeed' => 'Has Iris Speed', - 'HasPanSpeed' => 'Has Pan Speed', - 'HasPresets' => 'Has Presets', - 'HasTiltSpeed' => 'Has Tilt Speed', - 'HasTurboPan' => 'Has Turbo Pan', - 'HasTurboTilt' => 'Has Turbo Tilt', - 'HasWhiteSpeed' => 'Has White Bal. Speed', - 'HasZoomSpeed' => 'Has Zoom Speed', + 'Group' => 'Группа', + 'Groups' => 'Группы', + 'HasFocusSpeed' => 'Скорость фокуса', + 'HasGainSpeed' => 'Скорость усиления', + 'HasHomePreset' => 'Домашняя предустановка', + 'HasIrisSpeed' => 'Скорость диафрагмы', + 'HasPanSpeed' => 'Скорость панорамир.', + 'HasPresets' => 'Предустановки', + 'HasTiltSpeed' => 'Скорость наклона', + 'HasTurboPan' => 'Укоренное панорамир.', + 'HasTurboTilt' => 'Укоренный наклон', + 'HasWhiteSpeed' => 'Скорость баланса белого', + 'HasZoomSpeed' => 'Скорость увеличения', 'High' => 'широкий', 'HighBW' => 'Широкий канал', - 'Home' => 'Home', + 'Home' => 'Домой', 'Hour' => 'Час', 'Hue' => 'Оттенок', - 'Id' => 'Id', - 'Idle' => 'Idle', + 'Id' => 'ИД', + 'Idle' => 'Покой', 'Ignore' => 'Игнорировать', 'Image' => 'Изображение', - 'ImageBufferSize' => 'Размер буфера изображения', + 'ImageBufferSize' => 'Буфер изображений', 'Images' => 'Images', 'In' => 'In', 'Include' => 'Включить', 'Inverted' => 'Инвертировать', - 'Iris' => 'Iris', + 'Iris' => 'Наклон', 'KeyString' => 'Key String', 'Label' => 'Label', 'Language' => 'Язык', 'Last' => 'Последний', - 'Layout' => 'Layout', // Added - 2009-02-08 - 'Level' => 'Level', // Added - 2011-06-16 + 'Layout' => 'Раскладка', // Added - 2009-02-08 + 'Level' => 'Уровень', // Added - 2011-06-16 'Libvlc' => 'Libvlc', - 'LimitResultsPost' => 'results only;', // This is used at the end of the phrase 'Limit to first N results only' - 'LimitResultsPre' => 'Limit to first', // This is used at the beginning of the phrase 'Limit to first N results only' - 'Line' => 'Line', // Added - 2011-06-16 - 'LinkedMonitors' => 'Linked Monitors', - 'List' => 'List', - 'Load' => 'Load', + 'LimitResultsPost' => 'результатами;', // This is used at the end of the phrase 'Limit to first N results only'; + 'LimitResultsPre' => 'Ограничить первыми', // This is used at the beginning of the phrase 'Limit to first N results only'; + 'Line' => 'Строка', // Added - 2011-06-16 + 'LinkedMonitors' => 'Привязанные мониторы', + 'List' => 'Список', + 'Load' => 'Нагрузка', 'Local' => 'Локальный', - 'Log' => 'Log', // Added - 2011-06-16 + 'Log' => 'Лог', // Added - 2011-06-16; 'LoggedInAs' => 'Пользователь', 'Logging' => 'Logging', // Added - 2011-06-16 'LoggingIn' => 'Вход в систему', @@ -409,90 +413,90 @@ $SLANG = array( 'Logs' => 'Logs', // Added - 2011-06-17 'Low' => 'узкий', 'LowBW' => 'Узкий канал', - 'Main' => 'Main', + 'Main' => 'Основные', 'Man' => 'Man', 'Manual' => 'Manual', 'Mark' => 'Метка', 'Max' => 'Макс.', 'MaxBandwidth' => 'Max Bandwidth', 'MaxBrScore' => 'Макс.
оценка', - 'MaxFocusRange' => 'Max Focus Range', - 'MaxFocusSpeed' => 'Max Focus Speed', - 'MaxFocusStep' => 'Max Focus Step', - 'MaxGainRange' => 'Max Gain Range', - 'MaxGainSpeed' => 'Max Gain Speed', - 'MaxGainStep' => 'Max Gain Step', - 'MaxIrisRange' => 'Max Iris Range', - 'MaxIrisSpeed' => 'Max Iris Speed', - 'MaxIrisStep' => 'Max Iris Step', - 'MaxPanRange' => 'Max Pan Range', - 'MaxPanSpeed' => 'Max Pan Speed', - 'MaxPanStep' => 'Max Pan Step', - 'MaxTiltRange' => 'Max Tilt Range', - 'MaxTiltSpeed' => 'Max Tilt Speed', - 'MaxTiltStep' => 'Max Tilt Step', - 'MaxWhiteRange' => 'Max White Bal. Range', - 'MaxWhiteSpeed' => 'Max White Bal. Speed', - 'MaxWhiteStep' => 'Max White Bal. Step', - 'MaxZoomRange' => 'Max Zoom Range', - 'MaxZoomSpeed' => 'Max Zoom Speed', - 'MaxZoomStep' => 'Max Zoom Step', + 'MaxFocusRange' => 'Макс. диап. фокуса', + 'MaxFocusSpeed' => 'Макс. скор. фокуса', + 'MaxFocusStep' => 'Макс. шаг фокуса', + 'MaxGainRange' => 'Макс. диап. усиления', + 'MaxGainSpeed' => 'Макс. скор. усиления', + 'MaxGainStep' => 'Макс. шаг усиления', + 'MaxIrisRange' => 'Макс. диап. диафрагмы', + 'MaxIrisSpeed' => 'Макс. скор. диафрагмы', + 'MaxIrisStep' => 'Макс. шаг диафрагмы', + 'MaxPanRange' => 'Макс. диап. панорамы', + 'MaxPanSpeed' => 'Макс. скор. панорамы', + 'MaxPanStep' => 'Макс. шаг панорамы', + 'MaxTiltRange' => 'Макс. диап. наклона', + 'MaxTiltSpeed' => 'Макс. скор. наклона', + 'MaxTiltStep' => 'Макс. шаг наклона', + 'MaxWhiteRange' => 'Макс. диап. баланса белого', + 'MaxWhiteSpeed' => 'Макс. скор. баланса белого', + 'MaxWhiteStep' => 'Макс. шаг. баланса белого', + 'MaxZoomRange' => 'Макс. диап. увеличения', + 'MaxZoomSpeed' => 'Макс. скор. увеличения', + 'MaxZoomStep' => 'Макс. шаг увеличения', 'MaximumFPS' => 'Ограничение скорости записи (к/с)', 'Medium' => 'средний', 'MediumBW' => 'Обычный канал', - 'Message' => 'Message', // Added - 2011-06-16 - 'MinAlarmAreaLtMax' => 'Minimum alarm area should be less than maximum', - 'MinAlarmAreaUnset' => 'You must specify the minimum alarm pixel count', + 'Message' => 'Сообщение', // Added - 2011-06-16 + 'MinAlarmAreaLtMax' => 'Минимум зоны тревоги должен быть меньше максимума', + 'MinAlarmAreaUnset' => 'Укажите минимальное число пикселей зоны тревоги', 'MinBlobAreaLtMax' => 'Минимальная площадь объекта должна быть меньше чем максимальная площадь объекта', - 'MinBlobAreaUnset' => 'You must specify the minimum blob pixel count', - 'MinBlobLtMinFilter' => 'Minimum blob area should be less than or equal to minimum filter area', + 'MinBlobAreaUnset' => 'Укажите минимальное число пикселей объекта', + 'MinBlobLtMinFilter' => 'Минимум пикселей объекта должен быть меньше или равен минимуму фильтр. зоны', 'MinBlobsLtMax' => 'Минимальное число объектов должно быть меньше чем максимальное число объектов', - 'MinBlobsUnset' => 'You must specify the minimum blob count', - 'MinFilterAreaLtMax' => 'Minimum filter area should be less than maximum', - 'MinFilterAreaUnset' => 'You must specify the minimum filter pixel count', - 'MinFilterLtMinAlarm' => 'Minimum filter area should be less than or equal to minimum alarm area', - 'MinFocusRange' => 'Min Focus Range', - 'MinFocusSpeed' => 'Min Focus Speed', - 'MinFocusStep' => 'Min Focus Step', - 'MinGainRange' => 'Min Gain Range', - 'MinGainSpeed' => 'Min Gain Speed', - 'MinGainStep' => 'Min Gain Step', - 'MinIrisRange' => 'Min Iris Range', - 'MinIrisSpeed' => 'Min Iris Speed', - 'MinIrisStep' => 'Min Iris Step', - 'MinPanRange' => 'Min Pan Range', - 'MinPanSpeed' => 'Min Pan Speed', - 'MinPanStep' => 'Min Pan Step', - 'MinPixelThresLtMax' => 'Нижний порог кол-ва пикселей должен быть ниже верхнего порога кол-ва пикселей', - 'MinPixelThresUnset' => 'You must specify a minimum pixel threshold', - 'MinTiltRange' => 'Min Tilt Range', - 'MinTiltSpeed' => 'Min Tilt Speed', - 'MinTiltStep' => 'Min Tilt Step', - 'MinWhiteRange' => 'Min White Bal. Range', - 'MinWhiteSpeed' => 'Min White Bal. Speed', - 'MinWhiteStep' => 'Min White Bal. Step', - 'MinZoomRange' => 'Min Zoom Range', - 'MinZoomSpeed' => 'Min Zoom Speed', - 'MinZoomStep' => 'Min Zoom Step', + 'MinBlobsUnset' => 'Укажите минимальное число объектов', + 'MinFilterAreaLtMax' => 'Минимум фильтр. зоны должен быть меньше максимума', + 'MinFilterAreaUnset' => 'Укажите минимальное число пикселей фильтр. зоны', + 'MinFilterLtMinAlarm' => 'Минимум фильтр. зоны должен быть меньше или равен минимуму зоны тревоги', + 'MinFocusRange' => 'Мин. диап. фокуса', + 'MinFocusSpeed' => 'Мин. скор фокуса', + 'MinFocusStep' => 'Мин. шаг фокуса', + 'MinGainRange' => 'Мин. диап. усиления', + 'MinGainSpeed' => 'Мин. скор. усиления', + 'MinGainStep' => 'Мин. шаг усиления', + 'MinIrisRange' => 'Мин. диап. диафрагмы', + 'MinIrisSpeed' => 'Мин. скор. диафрагмы', + 'MinIrisStep' => 'Мин. шаг диафрагмы', + 'MinPanRange' => 'Мин. диап. панорамы', + 'MinPanSpeed' => 'Мин. скор. панорамы', + 'MinPanStep' => 'Мин. шаг панорамы', + 'MinPixelThresLtMax' => 'Нижний порог изменения пикселя должен быть ниже верхнего порога изменения пикселя', + 'MinPixelThresUnset' => 'Укажите минимальный порог изменения пикселя', + 'MinTiltRange' => 'Мин. диап. наклона', + 'MinTiltSpeed' => 'Мин. скор. наклона', + 'MinTiltStep' => 'Мин. шаг наклона', + 'MinWhiteRange' => 'Мин. диап. баланса белого', + 'MinWhiteSpeed' => 'Мин. скор. баланса белого', + 'MinWhiteStep' => 'Мин. шаг баланса белого', + 'MinZoomRange' => 'Мин. диап. увеличения', + 'MinZoomSpeed' => 'Мин. скор. увеличения', + 'MinZoomStep' => 'Мин. шаг увеличения', 'Misc' => 'Разное', - 'Mode' => 'Mode', // Added - 2015-04-18 + 'Mode' => 'Режим', // Added - 2015-04-18 'Monitor' => 'Монитор', - 'MonitorIds' => 'Id Мониторов', - 'MonitorPreset' => 'Monitor Preset', - 'MonitorPresetIntro' => 'Select an appropriate preset from the list below.

Please note that this may overwrite any values you already have configured for this monitor.

', - 'MonitorProbe' => 'Monitor Probe', // Added - 2009-03-31 - 'MonitorProbeIntro' => 'The list below shows detected analog and network cameras and whether they are already being used or available for selection.

Select the desired entry from the list below.

Please note that not all cameras may be detected and that choosing a camera here may overwrite any values you already have configured for the current monitor.

', // Added - 2009-03-31 + 'MonitorIds' => 'ИД Мониторов', + 'MonitorPreset' => 'Предустановки монитора',//The list below shows detected analog and network cameras and whether they are already being used or available for selection. + 'MonitorPresetIntro' => 'Выберите подходящий вариант из списка ниже.

Обратите внимание, что это может переписать настройки определенные для этого монитора.

', + 'MonitorProbe' => 'Поиск камеры', // Added - 2009-03-31 + 'MonitorProbeIntro' => 'В этом списке показаны найденные аналоговые и сетевые камеры, как уже заведенные, так и доступные для выбора.

Выберите нужную из списка ниже.

Обратите внимание, что не все камеры могут быть найдены, и что выбор камеры может переписать настройки определенные для этого монитора.

', // Added - 2009-03-31 'Monitors' => 'Мониторы', - 'Montage' => 'Montage', + 'Montage' => 'Монтаж', 'Month' => 'Месяц', - 'More' => 'More', // Added - 2011-06-16 - 'MotionFrameSkip' => 'Motion Frame Skip', - 'Move' => 'Move', - 'Mtg2widgrd' => '2-wide grid', // Added 2013.08.15. - 'Mtg3widgrd' => '3-wide grid', // Added 2013.08.15. - 'Mtg3widgrx' => '3-wide grid, scaled, enlarge on alarm', // Added 2013.08.15. - 'Mtg4widgrd' => '4-wide grid', // Added 2013.08.15. - 'MtgDefault' => 'Default', // Added 2013.08.15. + 'More' => 'Еще', // Added - 2011-06-16 + 'MotionFrameSkip' => 'Кол-во пропуск. кадров движения', + 'Move' => 'Перемещение', + 'Mtg2widgrd' => '2 в ряд', // Added 2013.08.15. + 'Mtg3widgrd' => '3 в ряд', // Added 2013.08.15. + 'Mtg3widgrx' => '3 в ряд, увеличиваются при тревоге', // Added 2013.08.15. + 'Mtg4widgrd' => '4 в ряд', // Added 2013.08.15. + 'MtgDefault' => 'По умолчанию', // Added 2013.08.15. 'MustBeGe' => 'должно быть больше или равно', 'MustBeLe' => 'должно быть меньше или равно', 'MustConfirmPassword' => 'Вы должны подтвердить пароль', @@ -502,7 +506,7 @@ $SLANG = array( 'Near' => 'Near', 'Network' => 'Сеть', 'New' => 'Нов.', - 'NewGroup' => 'New Group', + 'NewGroup' => 'Новая группа', 'NewLabel' => 'New Label', 'NewPassword' => 'Новый пароль', 'NewState' => 'Новое состояние', @@ -510,20 +514,20 @@ $SLANG = array( 'Next' => 'След.', 'No' => 'Нет', 'NoDetectedCameras' => 'No Detected Cameras', // Added - 2009-03-31 - 'NoFramesRecorded' => 'Это событие не содежит кадров', + 'NoFramesRecorded' => 'Это событие не содержит кадров', 'NoGroup' => 'No Group', 'NoSavedFilters' => 'нет сохраненных фильтров', 'NoStatisticsRecorded' => 'Статистика по этому событию/кадру не записана', 'None' => 'отсутствует', 'NoneAvailable' => 'не доступны', 'Normal' => 'Нормальная', - 'Notes' => 'Notes', - 'NumPresets' => 'Num Presets', + 'Notes' => 'Примечание', + 'NumPresets' => 'Кол-во предустановок', 'Off' => 'Off', 'On' => 'On', - 'OnvifCredentialsIntro'=> 'Please supply user name and password for the selected camera.
If no user has been created for the camera then the user given here will be created with the given password.

', // Added - 2015-04-18 + 'OnvifCredentialsIntro'=> 'Пожалуйста укажите имя пользователя и пароль для выбранной камеры.

Если пользователь для камеры не был создан, тогда будет создан новый с указанными данными.

', // Added - 2015-04-18 'OnvifProbe' => 'ONVIF', // Added - 2015-04-18 - 'OnvifProbeIntro' => 'The list below shows detected ONVIF cameras and whether they are already being used or available for selection.

Select the desired entry from the list below.

Please note that not all cameras may be detected and that choosing a camera here may overwrite any values you already have configured for the current monitor.

', // Added - 2015-04-18 + 'OnvifProbeIntro' => 'В этом списке показаны найденные ONVIF камеры, как уже заведенные, так и доступные для выбора.

Выберите нужную из списка ниже.

Обратите внимание, что не все камеры могут быть найдены, и что выбор камеры может переписать настройки определенные для этого монитора.

', // Added - 2015-04-18 'OpEq' => 'равно', 'OpGt' => 'больше', 'OpGtEq' => 'больше либо равно', @@ -534,50 +538,51 @@ $SLANG = array( 'OpNe' => 'не равно', 'OpNotIn' => 'не в списке', 'OpNotMatches' => 'не совпадает', - 'Open' => 'Open', - 'OptionHelp' => 'OptionHelp', + 'Open' => 'Открыть', + 'OptionHelp' => 'Справка', 'OptionRestartWarning' => 'Эти изменения подействуют только после перезапуска программы.', 'Options' => 'Опции', 'OrEnterNewName' => 'или введите новое имя', - 'Order' => 'Order', + 'Order' => 'Сортировка', 'Orientation' => 'Ориентация', 'Out' => 'Out', 'OverwriteExisting' => 'Перезаписать существующее', 'Paged' => 'По страницам', - 'Pan' => 'Pan', - 'PanLeft' => 'Pan Left', - 'PanRight' => 'Pan Right', - 'PanTilt' => 'Pan/Tilt', - 'Parameter' => 'Парамер', + 'Pan' => 'Панорама', + 'PanLeft' => 'Панорама влево', + 'PanRight' => 'Панорама вправо', + 'PanTilt' => 'Панорама/Наклон', + 'Parameter' => 'Параметр', 'Password' => 'Пароль', 'PasswordsDifferent' => 'Пароли не совпадают', 'Paths' => 'Пути', - 'Pause' => 'Pause', + 'Pause' => 'Пауза', + 'Paused' => 'Пауза', 'Phone' => 'Phone', 'PhoneBW' => 'Телефонная линия', 'Pid' => 'PID', // Added - 2011-06-16 'PixelDiff' => 'Pixel Diff', 'Pixels' => 'в пикселях', - 'Play' => 'Play', - 'PlayAll' => 'Play All', + 'Play' => 'Играть', + 'PlayAll' => 'Воспр. все', 'PleaseWait' => 'Пожалуйста подождите', 'Plugins' => 'Plugins', - 'Point' => 'Point', + 'Point' => 'Точка', 'PostEventImageBuffer' => 'Буфер после события', 'PreEventImageBuffer' => 'Буфер до события', - 'PreserveAspect' => 'Preserve Aspect Ratio', - 'Preset' => 'Preset', - 'Presets' => 'Presets', + 'PreserveAspect' => 'Сохранять соотношение сторон', + 'Preset' => 'Предустановка', + 'Presets' => 'Предустановки', 'Prev' => 'Пред.', - 'Probe' => 'Probe', // Added - 2009-03-31 - 'ProfileProbe' => 'Stream Probe', // Added - 2015-04-18 - 'ProfileProbeIntro' => 'The list below shows the existing stream profiles of the selected camera .

Select the desired entry from the list below.

Please note that ZoneMinder cannot configure additional profiles and that choosing a camera here may overwrite any values you already have configured for the current monitor.

', // Added - 2015-04-18 - 'Progress' => 'Progress', // Added - 2015-04-18 - 'Protocol' => 'Protocol', + 'Probe' => 'Поиск', // Added - 2009-03-31 + 'ProfileProbe' => 'Поиск потока', // Added - 2015-04-18 + 'ProfileProbeIntro' => 'В этом списке показаны существующие профили потока выбранной камеры.

Выберите нужный из списка ниже.

Обратите внимание, что ZoneMinder не может добавить дополнительный профиль, и что выбор профиля может переписать настройки определенные для этого монитора.

', // Added - 2015-04-18 + 'Progress' => 'Прогресс', // Added - 2015-04-18 + 'Protocol' => 'Протокол', 'Rate' => 'Скорость', 'Real' => 'Реальная', 'Record' => 'Record', - 'RefImageBlendPct' => 'Прозрачность опорного кадра, %', + 'RefImageBlendPct' => 'Смешение опорного кадра, %', 'Refresh' => 'Обновить', 'Remote' => 'Удаленный', 'RemoteHostName' => 'Имя удаленного хоста', @@ -585,22 +590,22 @@ $SLANG = array( 'RemoteHostPort' => 'удаленный порт', 'RemoteHostSubPath' => 'Remote Host SubPath', // Added - 2009-02-08 'RemoteImageColours' => 'Цветность на удаленном хосте', - 'RemoteMethod' => 'Remote Method', // Added - 2009-02-08 + 'RemoteMethod' => 'Метод доступа', // Added - 2009-02-08 'RemoteProtocol' => 'Remote Protocol', // Added - 2009-02-08 'Rename' => 'Переименовать', - 'Replay' => 'Replay', - 'ReplayAll' => 'All Events', - 'ReplayGapless' => 'Gapless Events', - 'ReplaySingle' => 'Single Event', - 'Reset' => 'Reset', + 'Replay' => 'Повтор', + 'ReplayAll' => 'Все события', + 'ReplayGapless' => 'События подряд', + 'ReplaySingle' => 'Одно событие', + 'Reset' => 'Сбросить', 'ResetEventCounts' => 'Обнулить счетчик событий', 'Restart' => 'Перезапустить', 'Restarting' => 'Перезапускается', 'RestrictedCameraIds' => 'Id запрещенных камер', 'RestrictedMonitors' => 'Restricted Monitors', - 'ReturnDelay' => 'Return Delay', - 'ReturnLocation' => 'Return Location', - 'Rewind' => 'Rewind', + 'ReturnDelay' => 'Задержка возврата', + 'ReturnLocation' => 'Положение возврата', + 'Rewind' => 'Назад', 'RotateLeft' => 'Повернуть влево', 'RotateRight' => 'Повернуть вправо', 'RunLocalUpdate' => 'Please run zmupdate.pl to update', // Added - 2011-05-25 @@ -614,27 +619,28 @@ $SLANG = array( 'Score' => 'Оценка', 'Secs' => 'Сек.', 'Sectionlength' => 'Длина секции (в кадрах)', - 'Select' => 'Select', - 'SelectFormat' => 'Select Format', // Added - 2011-06-17 - 'SelectLog' => 'Select Log', // Added - 2011-06-17 + 'Select' => 'Выбор', + 'SelectFormat' => 'Выберите формат', // Added - 2011-06-17 + 'SelectLog' => 'Выберите лог', // Added - 2011-06-17 'SelectMonitors' => 'Select Monitors', 'SelfIntersecting' => 'Polygon edges must not intersect', + 'Server' => 'Сервер', 'Set' => 'Set', 'SetNewBandwidth' => 'Установка новой ширина канала', 'SetPreset' => 'Set Preset', 'Settings' => 'Настройки', 'ShowFilterWindow' => 'Показать окно фильтра', - 'ShowTimeline' => 'Show Timeline', - 'SignalCheckColour' => 'Signal Check Colour', + 'ShowTimeline' => 'Показать график', + 'SignalCheckColour' => 'Цвет проверки сигнала', 'Size' => 'Size', 'SkinDescription' => 'Change the default skin for this computer', // Added - 2011-01-30 'Sleep' => 'Sleep', - 'SortAsc' => 'Asc', - 'SortBy' => 'Sort by', - 'SortDesc' => 'Desc', + 'SortAsc' => 'По возр.', + 'SortBy' => 'Сортировать', + 'SortDesc' => 'По убыв.', 'Source' => 'Источник', 'SourceColours' => 'Source Colours', // Added - 2009-02-08 - 'SourcePath' => 'Source Path', // Added - 2009-02-08 + 'SourcePath' => 'Путь к источнику', // Added - 2009-02-08 'SourceType' => 'Тип источника', 'Speed' => 'Speed', 'SpeedHigh' => 'High Speed', @@ -645,9 +651,9 @@ $SLANG = array( 'State' => 'Состояние', 'Stats' => 'Статистика', 'Status' => 'Статус', - 'Step' => 'Step', - 'StepBack' => 'Step Back', - 'StepForward' => 'Step Forward', + 'Step' => 'Шаг', + 'StepBack' => 'Кадр назад', + 'StepForward' => 'Кадр вперед', 'StepLarge' => 'Large Step', 'StepMedium' => 'Medium Step', 'StepNone' => 'No Step', @@ -656,49 +662,50 @@ $SLANG = array( 'Stop' => 'Остановить', 'Stopped' => 'Остановлен', 'Stream' => 'Поток', - 'StreamReplayBuffer' => 'Stream Replay Image Buffer', - 'Submit' => 'Submit', + 'StreamReplayBuffer' => 'Буфер потока повторного воспр.', + 'Submit' => 'Применить', 'System' => 'Система', - 'SystemLog' => 'System Log', // Added - 2011-06-16 - 'TargetColorspace' => 'Target colorspace', // Added - 2015-04-18 + 'SystemLog' => 'Лог системы', // Added - 2011-06-16 + 'TargetColorspace' => 'Цветовое пространство', // Added - 2015-04-18 'Tele' => 'Tele', 'Thumbnail' => 'Thumbnail', - 'Tilt' => 'Tilt', + 'Tilt' => 'Наклон', 'Time' => 'Время', 'TimeDelta' => 'Относительное время', 'TimeStamp' => 'Метка времени', - 'Timeline' => 'Timeline', - 'TimelineTip1' => 'Pass your mouse over the graph to view a snapshot image and event details.', // Added 2013.08.15. - 'TimelineTip2' => 'Click on the coloured sections of the graph, or the image, to view the event.', // Added 2013.08.15. - 'TimelineTip3' => 'Click on the background to zoom in to a smaller time period based around your click.', // Added 2013.08.15. - 'TimelineTip4' => 'Use the controls below to zoom out or navigate back and forward through the time range.', // Added 2013.08.15. + 'Timeline' => 'График', + 'TimelineTip1' => 'Наведите мышку на график чтобы увидеть снимок и описание события.', // Added 2013.08.15. + 'TimelineTip2' => 'Нажмите на окрашенный участок графика или на снимок чтобы просмотреть событие.', // Added 2013.08.15. + 'TimelineTip3' => 'Нажмите на фоновый графика чтобы приблизит его.', // Added 2013.08.15. + 'TimelineTip4' => 'Используйте кнопки снизу для отдаления и перемещения по временной шкале.', // Added 2013.08.15. 'Timestamp' => 'Метка времени', 'TimestampLabelFormat' => 'Формат метки', 'TimestampLabelX' => 'X-координата метки', 'TimestampLabelY' => 'Y-координата метки', - 'Today' => 'Today', + 'TimestampLabelSize' => 'Размер метки', + 'Today' => 'Сегодня', 'Tools' => 'Инструменты', - 'Total' => 'Total', // Added - 2011-06-16 + 'Total' => 'Всего', // Added - 2011-06-16 'TotalBrScore' => 'Сумм.
оценка', - 'TrackDelay' => 'Track Delay', - 'TrackMotion' => 'Track Motion', + 'TrackDelay' => 'Задержка обнаружения', + 'TrackMotion' => 'Отслеживать движение', 'Triggers' => 'Триггеры', - 'TurboPanSpeed' => 'Turbo Pan Speed', - 'TurboTiltSpeed' => 'Turbo Tilt Speed', + 'TurboPanSpeed' => 'Скорость ускор. панорам.', + 'TurboTiltSpeed' => 'Скорость ускор. наклона', 'Type' => 'Тип', 'Unarchive' => 'Уд. из архива', - 'Undefined' => 'Undefined', // Added - 2009-02-08 + 'Undefined' => 'Не определено', // Added - 2009-02-08 'Units' => 'Ед. измерения', - 'Unknown' => 'Unknown', - 'Update' => 'Update', + 'Unknown' => 'Неизвестно', + 'Update' => 'Обновить', 'UpdateAvailable' => 'Доступно обновление ZoneMinder', 'UpdateNotNecessary' => 'Обновление не требуется', - 'Updated' => 'Updated', // Added - 2011-06-16 - 'Upload' => 'Upload', // Added - 2011-08-23 + 'Updated' => 'Обновлено', // Added - 2011-06-16 + 'Upload' => 'Загрузить', // Added - 2011-08-23 'UseFilter' => 'Использовать фильтр', 'UseFilterExprsPost' => ' выражений для фильтра', // This is used at the end of the phrase 'use N filter expressions' 'UseFilterExprsPre' => 'Испол. ', // This is used at the beginning of the phrase 'use N filter expressions' - 'UsedPlugins' => 'Used Plugins', + 'UsedPlugins' => 'Использующиеся плагины', 'User' => 'Пользователь', 'Username' => 'Имя пользователя', 'Users' => 'Пользователи', @@ -728,9 +735,9 @@ $SLANG = array( 'WarmupFrames' => 'Кадры разогрева', 'Watch' => 'Watch', 'Web' => 'Интерфейс', - 'WebColour' => 'Web Colour', + 'WebColour' => 'Цвет отметки', 'Week' => 'Неделя', - 'White' => 'White', + 'White' => 'Бал. белого', 'WhiteBalance' => 'White Balance', 'Wide' => 'Wide', 'X' => 'X', @@ -742,21 +749,21 @@ $SLANG = array( 'Yes' => 'Да', 'YouNoPerms' => 'У вас не достаточно прав для доступа к этому ресурсу.', 'Zone' => 'Зона', - 'ZoneAlarmColour' => 'Цвет тревоги (Red/Green/Blue)', - 'ZoneArea' => 'Zone Area', - 'ZoneExtendAlarmFrames' => 'Extend Alarm Frame Count', - 'ZoneFilterSize' => 'Filter Width/Height (pixels)', - 'ZoneMinMaxAlarmArea' => 'Min/Max Alarmed Area', - 'ZoneMinMaxBlobArea' => 'Min/Max Blob Area', - 'ZoneMinMaxBlobs' => 'Min/Max Blobs', - 'ZoneMinMaxFiltArea' => 'Min/Max Filtered Area', - 'ZoneMinMaxPixelThres' => 'Min/Max Pixel Threshold (0-255)', + 'ZoneAlarmColour' => 'Цвет тревоги (Кр./Зел./Синий)', + 'ZoneArea' => 'Размер зоны', + 'ZoneExtendAlarmFrames' => 'Кол-во кадров продления тревоги', + 'ZoneFilterSize' => 'Ширина/Высота фильтра (пикс.)', + 'ZoneMinMaxAlarmArea' => 'Мин/Макс разм. зоны тревоги', + 'ZoneMinMaxBlobArea' => 'Мин/Макс разм. объекта', + 'ZoneMinMaxBlobs' => 'Мин/Макс кол-во объектов', + 'ZoneMinMaxFiltArea' => 'Мин/Макс разм. фильтр. зоны ', + 'ZoneMinMaxPixelThres' => 'Мин/Макс порог изм. пикс. (0-255)', 'ZoneMinderLog' => 'ZoneMinder Log', // Added - 2011-06-17 - 'ZoneOverloadFrames' => 'Overload Frame Ignore Count', + 'ZoneOverloadFrames' => 'Кол-во игнор. кадров перегрузки', 'Zones' => 'Зоны', - 'Zoom' => 'Zoom', - 'ZoomIn' => 'Zoom In', - 'ZoomOut' => 'Zoom Out', + 'Zoom' => 'Увеличение', + 'ZoomIn' => 'Приблизить', + 'ZoomOut' => 'Отдалить', ); // Complex replacements with formatting and/or placements, must be passed through sprintf @@ -768,7 +775,7 @@ $CLANG = array( 'MonitorCount' => '%1$s %2$s', // For example '4 Monitors' (from Vlang below) 'MonitorFunction' => 'Функция монитора %1$s', 'RunningRecentVer' => 'У вас установлена новейшая версия ZoneMinder, v%s.', - 'VersionMismatch' => 'Version mismatch, system is version %1$s, database is %2$s.', // Added - 2011-05-25 + 'VersionMismatch' => 'Несоответствие версий, версия системы - %1$s, версия БД - %2$s.', // Added - 2011-05-25 ); // The next section allows you to describe a series of word ending and counts used to @@ -885,18 +892,27 @@ function zmVlang( $langVarArray, $count ) // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( 'OPTIONS_FFMPEG' => array( - 'Help' => "Parameters in this field are passed on to FFmpeg. Multiple parameters can be separated by ,~~ ". - "Examples (do not enter quotes)~~~~". - "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". - "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". - "\"loglevel=debug\" Set verbosity of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + 'Help' => "Параметры заданные в этом поле передаются в FFmpeg. Множественные параметры разделяются запятой.~~ ". + "Примеры (вводятся без кавычек)~~~~". + "\"allowed_media_types=video\" Задает тип данных, запрашиваемый от камеры (аудио, видео, данные)~~~~". + "\"reorder_queue_size=nnn\" Задает количество пакетов в очереди обработки переупорядочивания пакетов~~~~". + "\"loglevel=debug\" Задает уровень вывода сообщений от FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( - 'Help' => "Parameters in this field are passed on to libVLC. Multiple parameters can be separated by ,~~ ". - "Examples (do not enter quotes)~~~~". - "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". - "\"--verbose=2\" Set verbosity of libVLC" + 'Help' => "Параметры заданные в этом поле передаются в libVLC. Множественные параметры разделяются запятой.~~ ". + "Примеры (вводятся без кавычек)~~~~". + "\"--rtp-client-port=nnn\" Задает локальный порт используемый для RTP данных~~~~". + "\"--verbose=2\" Задает уровень вывода сообщений от libVLC" ), + 'SKIN_DEFAULT' => array( + 'Prompt' => "Тема оформления по умолчанию", + 'Help' => "ZoneMinder позволяет использовать много разных веб-интерфейсов. Эта настройка позволяет вам выбрать тему оформления используемую сайтом по умолчанию. Пользователи могут изменить свою подзнее." + ), + 'CSS_DEFAULT' => array( + 'Prompt' => "Набор стилей оформления CSS по умолчанию", + 'Help' => "ZoneMinder позволяет использовать много разных веб-интерфейсов, некоторые из них позволяют использовать разные наборы стилей оформления. Эта настройка позволяет вам выбрать набор стилей для темы оформления используемый сайтом по умолчанию. Пользователи могут изменить свой подзнее." + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", From 71e6735b60cfacc0aa2c944d3ed7f3d8479c1c29 Mon Sep 17 00:00:00 2001 From: Kfir Itzhak Date: Sun, 16 Apr 2017 10:57:37 +0300 Subject: [PATCH 21/32] Neon32 functions now work on 64 bytes at a time. This results in 4-6x performance increase over standard functions Memory allocations and image size requirements changed to be as needed for 64 byte alignment. Self-test code for Blend modified accordingly and added Self-test for the delta functions. --- src/zm_camera.cpp | 8 +- src/zm_image.cpp | 203 ++++++++++++++++++++++++++++++--------- src/zm_image.h | 2 +- src/zm_libvlc_camera.cpp | 4 +- src/zm_monitor.cpp | 10 +- 5 files changed, 172 insertions(+), 55 deletions(-) diff --git a/src/zm_camera.cpp b/src/zm_camera.cpp index 899d7822a..9db33e198 100644 --- a/src/zm_camera.cpp +++ b/src/zm_camera.cpp @@ -39,10 +39,10 @@ Camera::Camera( int p_id, SourceType p_type, int p_width, int p_height, int p_co Debug(2,"New camera id: %d width: %d height: %d colours: %d subpixelorder: %d capture: %d",id,width,height,colours,subpixelorder,capture); /* Because many loops are unrolled and work on 16 colours/time or 4 pixels/time, we have to meet requirements */ - if((colours == ZM_COLOUR_GRAY8 || colours == ZM_COLOUR_RGB32) && (imagesize % 16) != 0) { - Fatal("Image size is not multiples of 16"); - } else if(colours == ZM_COLOUR_RGB24 && ((imagesize % 16) != 0 || (imagesize % 12) != 0)) { - Fatal("Image size is not multiples of 12 and 16"); + if((colours == ZM_COLOUR_GRAY8 || colours == ZM_COLOUR_RGB32) && (imagesize % 64) != 0) { + Fatal("Image size is not multiples of 64"); + } else if(colours == ZM_COLOUR_RGB24 && ((imagesize % 64) != 0 || (imagesize % 12) != 0)) { + Fatal("Image size is not multiples of 12 and 64"); } } diff --git a/src/zm_image.cpp b/src/zm_image.cpp index 63ee58310..1437a859a 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -208,15 +208,31 @@ void Image::Initialise() Debug(4,"Blend: Using standard blend function"); } - __attribute__((aligned(16))) uint8_t blend1[16] = {142,255,159,91,88,227,0,52,37,80,152,97,104,252,90,82}; - __attribute__((aligned(16))) uint8_t blend2[16] = {129,56,136,96,119,149,94,29,96,176,1,144,230,203,111,172}; - __attribute__((aligned(16))) uint8_t blendres[16]; - __attribute__((aligned(16))) uint8_t blendexp[16] = {141,231,157,92,91,217,11,49,45,92,133,103,119,246,92,93}; /* Expected results for 12.5% blend */ - - (*fptr_blend)(blend1,blend2,blendres,16,12.5); - + __attribute__((aligned(64))) uint8_t blend1[128] = { + 86,58,54,63,149,62,209,34,148,46,186,176,9,236,193,254,113,146,228,220,123,164,92,98,9,72,67,156,63,118,96,167, + 48,224,106,176,201,245,223,219,198,50,100,31,68,77,33,76,166,90,254,128,191,82,84,32,3,171,147,248,14,196,141,179, + 79,237,121,11,132,37,194,225,45,171,169,167,56,64,193,85,147,33,97,221,94,97,90,44,191,248,65,8,17,240,167,207, + 224,23,71,74,81,1,46,110,227,94,163,170,55,155,52,147,224,154,237,35,255,26,229,11,223,242,118,155,82,37,189,2 + }; + __attribute__((aligned(64))) uint8_t blend2[128] = { + 92,188,203,118,121,231,252,218,126,88,80,72,123,16,91,131,109,0,57,56,95,204,74,8,137,94,6,69,18,146,229,194, + 146,230,13,146,95,48,185,65,162,47,152,172,184,111,245,143,247,105,49,42,89,37,145,255,221,200,103,80,98,39,14,227, + 227,46,46,59,248,7,83,20,157,79,36,161,237,55,77,175,232,200,38,170,198,239,89,19,82,88,130,120,203,184,141,117, + 228,140,150,107,103,195,74,130,42,11,150,70,176,204,198,188,38,252,174,104,128,106,31,17,141,231,62,104,179,29,143,130 + }; + __attribute__((aligned(64))) uint8_t blendexp[128] = { + 86,73,71,69,145,82,214,56,145,51,173,163,22,209,180,239,112,128,207,200,119,168,89,87,24,74,59,145,57,121,111,170, + 59,224,94,172,188,221,218,200,193,49,106,47,81,81,58,84,175,91,229,117,178,76,91,58,29,174,141,227,24,177,125,184, + 96,214,112,16,145,33,180,200,58,159,153,166,77,62,179,95,157,53,89,214,106,114,89,41,177,228,72,21,39,233,163,196, + 224,37,80,77,83,24,49,112,204,84,161,158,69,160,69,151,201,165,229,43,239,35,205,11,213,240,111,148,93,36,183,17 + }; + __attribute__((aligned(64))) uint8_t blendres[128]; + + /* Run the blend function */ + (*fptr_blend)(blend1,blend2,blendres,128,12.0); + /* Compare results with expected results */ - for(int i=0;i<16;i++) { + for(int i=0;i<128;i++) { if(abs(blendexp[i] - blendres[i]) > 3) { Panic("Blend function failed self-test: Results differ from the expected results"); } @@ -278,6 +294,50 @@ void Image::Initialise() fptr_delta8_gray8 = &std_delta8_gray8; Debug(4,"Delta: CPU extensions disabled, using standard delta functions"); } + + __attribute__((aligned(64))) uint8_t delta8_1[128] = { + 221,22,234,254,8,140,15,28,166,13,203,56,92,250,79,225,19,59,241,145,253,33,87,204,97,168,229,180,3,108,205,177, + 41,108,65,149,4,87,16,240,56,50,135,64,153,3,219,214,239,55,169,180,167,45,243,56,191,119,145,250,102,145,73,32, + 207,213,189,167,147,83,217,30,113,51,142,125,219,97,60,5,135,195,95,133,21,197,150,82,134,93,198,97,97,49,117,24, + 242,253,242,5,190,71,182,1,0,69,25,181,139,84,242,79,150,158,29,215,98,100,245,16,86,165,18,98,46,100,139,19 + }; + __attribute__((aligned(64))) uint8_t delta8_2[128] = { + 236,22,153,161,50,141,15,130,89,251,33,5,140,201,225,194,138,76,248,89,25,26,29,93,250,251,48,157,41,126,140,152, + 170,177,134,14,234,99,3,105,217,76,38,233,89,30,93,48,234,40,202,80,184,4,250,71,183,249,76,78,184,148,185,120, + 137,214,238,57,50,93,29,60,99,207,40,15,43,28,177,118,60,231,90,47,198,251,250,241,212,114,249,17,95,161,216,218, + 51,178,137,161,213,108,35,72,65,24,5,176,110,15,0,2,137,58,0,133,197,1,122,169,175,33,223,138,37,114,52,186 + }; + __attribute__((aligned(64))) uint8_t delta8_gray8_exp[128] = { + 15,0,81,93,42,1,0,102,77,238,170,51,48,49,146,31,119,17,7,56,228,7,58,111,153,83,181,23,38,18,65,25, + 129,69,69,135,230,12,13,135,161,26,97,169,64,27,126,166,5,15,33,100,17,41,7,15,8,130,69,172,82,3,112,88, + 70,1,49,110,97,10,188,30,14,156,102,110,176,69,117,113,75,36,5,86,177,54,100,159,78,21,51,80,2,112,99,194, + 191,75,105,156,23,37,147,71,65,45,20,5,29,69,242,77,13,100,29,82,99,99,123,153,89,132,205,40,9,14,87,167 + }; + __attribute__((aligned(64))) uint8_t delta8_rgba_exp[32] = { + 73,25,148,105,20,64,129,49,85,43,106,123,47,13,102,92,58,126,110,110,29,109,54,124,114,114,19,179,51,127,154,97 + }; + __attribute__((aligned(64))) uint8_t delta8_gray8_res[128]; + __attribute__((aligned(64))) uint8_t delta8_rgba_res[128]; + + /* Run the delta8 grayscale function */ + (*fptr_delta8_gray8)(delta8_1,delta8_2,delta8_gray8_exp,128); + + /* Compare results with expected results */ + for(int i=0;i<128;i++) { + if(abs(delta8_gray8_exp[i] - delta8_gray8_res[i]) > 7) { + Panic("Delta grayscale function failed self-test: Results differ from the expected results"); + } + } + + /* Run the delta8 RGBA function */ + (*fptr_delta8_rgba)(delta8_1,delta8_2,delta8_rgba_exp,32); + + /* Compare results with expected results */ + for(int i=0;i<32;i++) { + if(abs(delta8_rgba_exp[i] - delta8_rgba_res[i]) > 7) { + Panic("Delta RGBA function failed self-test: Results differ from the expected results"); + } + } /* Use SSSE3 deinterlace functions? */ if(config.cpu_extensions && sseversion >= 35) { @@ -3325,27 +3385,50 @@ void neon32_armv7_fastblend(const uint8_t* col1, const uint8_t* col2, uint8_t* r current_blendpercent = blendpercent; } - /* Q0(D0,D1) = col1 */ - /* Q1(D2,D3) = col2 */ - /* Q2(D4,D5) = col1 backup */ - /* Q3(D6,D7) = divider */ + /* Q0(D0,D1) = col1+0 */ + /* Q1(D2,D3) = col1+16 */ + /* Q2(D4,D5) = col1+32 */ + /* Q3(D6,D7) = col1+48 */ + /* Q4(D8,D9) = col2+0 */ + /* Q5(D10,D11) = col2+16 */ + /* Q6(D12,D13) = col2+32 */ + /* Q7(D14,D15) = col2+48 */ + /* Q8(D16,D17) = col1tmp+0 */ + /* Q9(D18,D19) = col1tmp+16 */ + /* Q10(D20,D21) = col1tmp+32 */ + /* Q11(D22,D23) = col1tmp+48 */ + /* Q12(D24,D25) = divider */ __asm__ __volatile__ ( "mov r12, %4\n\t" - "vdup.8 q3, r12\n\t" + "vdup.8 q12, r12\n\t" "neon32_armv7_fastblend_iter:\n\t" - "vldm %0!, {q0}\n\t" - "vldm %1!, {q1}\n\t" - "vrshl.u8 q2, q0, q3\n\t" - "vrshl.u8 q1, q1, q3\n\t" - "vsub.i8 q1, q1, q2\n\t" - "vadd.i8 q1, q1, q0\n\t" - "vstm %2!, {q1}\n\t" - "subs %3, %3, #16\n\t" + "pld [%0,#256]\n\t" + "pld [%1,#256]\n\t" + "vldm %0!, {q0,q1,q2,q3}\n\t" + "vldm %1!, {q4,q5,q6,q7}\n\t" + "vrshl.u8 q8, q0, q12\n\t" + "vrshl.u8 q9, q1, q12\n\t" + "vrshl.u8 q10, q2, q12\n\t" + "vrshl.u8 q11, q3, q12\n\t" + "vrshl.u8 q4, q4, q12\n\t" + "vrshl.u8 q5, q5, q12\n\t" + "vrshl.u8 q6, q6, q12\n\t" + "vrshl.u8 q7, q7, q12\n\t" + "vsub.i8 q4, q4, q8\n\t" + "vsub.i8 q5, q5, q9\n\t" + "vsub.i8 q6, q6, q10\n\t" + "vsub.i8 q7, q7, q11\n\t" + "vadd.i8 q4, q4, q0\n\t" + "vadd.i8 q5, q5, q1\n\t" + "vadd.i8 q6, q6, q2\n\t" + "vadd.i8 q7, q7, q3\n\t" + "vstm %2!, {q4,q5,q6,q7}\n\t" + "subs %3, %3, #64\n\t" "bne neon32_armv7_fastblend_iter\n\t" : - : "r" (col1), "r" (col2), "r" (result), "r" (count), "g" (divider) - : "%r12", "%q0", "%q1", "%q2", "%q3", "cc", "memory" + : "r" (col1), "r" (col2), "r" (result), "r" (count), "r" (divider) + : "%r12", "%q0", "%q1", "%q2", "%q3", "%q4", "%q5", "%q6", "%q7", "%q8", "%q9", "%q10", "%q11", "%q12", "cc", "memory" ); #else Panic("Neon function called on a non-ARM platform or Neon code is absent"); @@ -3581,20 +3664,31 @@ __attribute__((noinline,__target__("fpu=neon"))) void neon32_armv7_delta8_gray8(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) { #if (defined(__arm__) && !defined(ZM_STRIP_NEON)) - /* Q0(D0,D1) = col1 */ - /* Q1(D2,D3) = col2 */ + /* Q0(D0,D1) = col1+0 */ + /* Q1(D2,D3) = col1+16 */ + /* Q2(D4,D5) = col1+32 */ + /* Q3(D6,D7) = col1+48 */ + /* Q4(D8,D9) = col2+0 */ + /* Q5(D10,D11) = col2+16 */ + /* Q6(D12,D13) = col2+32 */ + /* Q7(D14,D15) = col2+48 */ __asm__ __volatile__ ( "neon32_armv7_delta8_gray8_iter:\n\t" - "vldm %0!, {q0}\n\t" - "vldm %1!, {q1}\n\t" - "vabd.u8 q0, q0, q1\n\t" - "vstm %2!, {q0}\n\t" - "subs %3, %3, #16\n\t" + "pld [%0,#256]\n\t" + "pld [%1,#256]\n\t" + "vldm %0!, {q0,q1,q2,q3}\n\t" + "vldm %1!, {q4,q5,q6,q7}\n\t" + "vabd.u8 q0, q0, q4\n\t" + "vabd.u8 q1, q1, q5\n\t" + "vabd.u8 q2, q2, q6\n\t" + "vabd.u8 q3, q3, q7\n\t" + "vstm %2!, {q0,q1,q2,q3}\n\t" + "subs %3, %3, #64\n\t" "bne neon32_armv7_delta8_gray8_iter\n\t" : : "r" (col1), "r" (col2), "r" (result), "r" (count) - : "%q0", "%q1", "cc", "memory" + : "%q0", "%q1", "%q2", "%q3", "%q4", "%q5", "%q6", "%q7", "cc", "memory" ); #else Panic("Neon function called on a non-ARM platform or Neon code is absent"); @@ -3608,29 +3702,52 @@ __attribute__((noinline,__target__("fpu=neon"))) void neon32_armv7_delta8_rgb32(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count, uint32_t multiplier) { #if (defined(__arm__) && !defined(ZM_STRIP_NEON)) - /* Q0(D0,D1) = col1 */ - /* Q1(D2,D3) = col2 */ - /* Q2(D4,D5) = multiplier */ + /* Q0(D0,D1) = col1+0 */ + /* Q1(D2,D3) = col1+16 */ + /* Q2(D4,D5) = col1+32 */ + /* Q3(D6,D7) = col1+48 */ + /* Q4(D8,D9) = col2+0 */ + /* Q5(D10,D11) = col2+16 */ + /* Q6(D12,D13) = col2+32 */ + /* Q7(D14,D15) = col2+48 */ + /* Q8(D16,D17) = multiplier */ __asm__ __volatile__ ( "mov r12, %4\n\t" - "vdup.32 q2, r12\n\t" + "vdup.32 q8, r12\n\t" "neon32_armv7_delta8_rgb32_iter:\n\t" - "vldm %0!, {q0}\n\t" - "vldm %1!, {q1}\n\t" - "vabd.u8 q0, q0, q1\n\t" + "pld [%0,#256]\n\t" + "pld [%1,#256]\n\t" + "vldm %0!, {q0,q1,q2,q3}\n\t" + "vldm %1!, {q4,q5,q6,q7}\n\t" + "vabd.u8 q0, q0, q4\n\t" + "vabd.u8 q1, q1, q5\n\t" + "vabd.u8 q2, q2, q6\n\t" + "vabd.u8 q3, q3, q7\n\t" "vrshr.u8 q0, q0, #3\n\t" - "vmul.i8 q0, q0, q2\n\t" + "vrshr.u8 q1, q1, #3\n\t" + "vrshr.u8 q2, q2, #3\n\t" + "vrshr.u8 q3, q3, #3\n\t" + "vmul.i8 q0, q0, q8\n\t" + "vmul.i8 q1, q1, q8\n\t" + "vmul.i8 q2, q2, q8\n\t" + "vmul.i8 q3, q3, q8\n\t" "vpadd.i8 d0, d0, d1\n\t" "vpadd.i8 d2, d2, d3\n\t" - "vpadd.i8 d0, d0, d2\n\t" - "vst1.32 {d0[0]}, [%2]!\n\t" - "subs %3, %3, #4\n\t" + "vpadd.i8 d4, d4, d5\n\t" + "vpadd.i8 d6, d6, d7\n\t" + "vpadd.i8 d0, d0, d0\n\t" + "vpadd.i8 d1, d2, d2\n\t" + "vpadd.i8 d2, d4, d4\n\t" + "vpadd.i8 d3, d6, d6\n\t" + "vst4.32 {d0[0],d1[0],d2[0],d3[0]}, [%2]!\n\t" + "subs %3, %3, #16\n\t" "bne neon32_armv7_delta8_rgb32_iter\n\t" : : "r" (col1), "r" (col2), "r" (result), "r" (count), "r" (multiplier) - : "%r12", "%q0", "%q1", "%q2", "cc", "memory" + : "%r12", "%q0", "%q1", "%q2", "%q3", "%q4", "%q5", "%q6", "%q7", "%q8", "cc", "memory" ); +} #else Panic("Neon function called on a non-ARM platform or Neon code is absent"); #endif diff --git a/src/zm_image.h b/src/zm_image.h index 62d221201..fbfcf75da 100644 --- a/src/zm_image.h +++ b/src/zm_image.h @@ -54,7 +54,7 @@ extern imgbufcpy_fptr_t fptr_imgbufcpy; /* Should be called from Image class functions */ inline static uint8_t* AllocBuffer(size_t p_bufsize) { - uint8_t* buffer = (uint8_t*)zm_mallocaligned(16,p_bufsize); + uint8_t* buffer = (uint8_t*)zm_mallocaligned(64,p_bufsize); if(buffer == NULL) Fatal("Memory allocation failed: %s",strerror(errno)); diff --git a/src/zm_libvlc_camera.cpp b/src/zm_libvlc_camera.cpp index 186af1144..dee62d297 100644 --- a/src/zm_libvlc_camera.cpp +++ b/src/zm_libvlc_camera.cpp @@ -182,8 +182,8 @@ int LibvlcCamera::PrimeCapture() mLibvlcData.bufferSize = width * height * mBpp; // Libvlc wants 32 byte alignment for images (should in theory do this for all image lines) - mLibvlcData.buffer = (uint8_t*)zm_mallocaligned(32, mLibvlcData.bufferSize); - mLibvlcData.prevBuffer = (uint8_t*)zm_mallocaligned(32, mLibvlcData.bufferSize); + mLibvlcData.buffer = (uint8_t*)zm_mallocaligned(64, mLibvlcData.bufferSize); + mLibvlcData.prevBuffer = (uint8_t*)zm_mallocaligned(64, mLibvlcData.bufferSize); mLibvlcData.newImage.setValueImmediate(false); diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index b7920c166..5ef421d9b 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -393,7 +393,7 @@ Monitor::Monitor( + sizeof(TriggerData) + (image_buffer_count*sizeof(struct timeval)) + (image_buffer_count*camera->ImageSize()) - + 64; /* Padding used to permit aligning the images buffer to 16 byte boundary */ + + 64; /* Padding used to permit aligning the images buffer to 64 byte boundary */ Debug( 1, "mem.size=%d", mem_size ); mem_ptr = NULL; @@ -569,10 +569,10 @@ bool Monitor::connect() { 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(((unsigned long)shared_images % 64) != 0) { + /* Align images buffer to nearest 64 byte boundary */ + Debug(3,"Aligning shared memory images to the next 64 byte boundary"); + shared_images = (uint8_t*)((unsigned long)shared_images + (64 - ((unsigned long)shared_images % 64))); } image_buffer = new Snapshot[image_buffer_count]; for ( int i = 0; i < image_buffer_count; i++ ) From f42004b4a14d86bbf233549ff38f5aef5851df26 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 26 Apr 2017 15:18:32 -0400 Subject: [PATCH 22/32] don't overwrite zm.conf --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index baba4218d..4a89d9f2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -733,7 +733,12 @@ else(zmconfgen_result EQUAL 0) endif(zmconfgen_result EQUAL 0) # Install zm.conf -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" DESTINATION "${ZM_CONFIG_DIR}") +install(CODE " + if (NOT EXISTS \"${ZM_CONFIG_DIR}/zm.conf\") + file(INSTALL \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf\" DESTINATION \"${ZM_CONFIG_DIR}\") + endif() + ") + # Uninstall target configure_file( @@ -749,3 +754,4 @@ if(CCACHE_FOUND) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) endif(CCACHE_FOUND) + From 12fc011a290abbc3eb45e4957855197d4df4f6ce Mon Sep 17 00:00:00 2001 From: Andy Bauer Date: Tue, 9 May 2017 09:54:48 -0500 Subject: [PATCH 23/32] 1.30.4 release --- db/zm_update-1.30.4.sql | 5 +++++ distros/redhat/zoneminder.spec | 7 ++++++- version | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 db/zm_update-1.30.4.sql diff --git a/db/zm_update-1.30.4.sql b/db/zm_update-1.30.4.sql new file mode 100644 index 000000000..267562291 --- /dev/null +++ b/db/zm_update-1.30.4.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.30.3 database to 1.30.4 +-- +-- No changes required +-- diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index a6c1bc805..babc826f1 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -33,7 +33,7 @@ %global _hardened_build 1 Name: zoneminder -Version: 1.30.3 +Version: 1.30.4 Release: 1%{?dist} Summary: A camera monitoring and analysis tool Group: System Environment/Daemons @@ -342,6 +342,11 @@ rm -rf %{_docdir}/%{name}-%{version} %dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/run/zoneminder %changelog +* Tue May 09 2017 Andrew Bauer - 1.30.4-1 +- modify autosetup macro parameters +- modify requirements for php-pecl-acpu-bc package +- 1.30.4 release + * Tue May 02 2017 Andrew Bauer - 1.30.3-1 - 1.30.3 release diff --git a/version b/version index b0f33908d..593d72103 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.30.3 +1.30.4 From 3215f2e702b6beaa2d225b9e281bcabf830fecf7 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 9 May 2017 16:57:28 -0400 Subject: [PATCH 24/32] merge latest updates --- utils/do_debian_package.sh | 42 ++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index acc412550..554dd9c38 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -52,7 +52,9 @@ case $i in shift # past argument with no value ;; *) - # unknown option + # unknown option + read -p "Unknown option $i, continue? (Y|n)" + [[ $REPLY == [yY] ]] && { echo "continuing..."; } || exit 1; ;; esac done @@ -66,6 +68,8 @@ fi; if [ "$DISTRO" == "" ]; then DISTRO=`lsb_release -a 2>/dev/null | grep Codename | awk '{print $2}'`; echo "Defaulting to $DISTRO for distribution"; +else + echo "Building for $DISTRO"; fi; # Release is a special mode... it uploads to the release ppa and cannot have a snapshot @@ -141,7 +145,7 @@ if [ "$SNAPSHOT" != "stable" ] && [ "$SNAPSHOT" != "" ]; then VERSION="$VERSION~$SNAPSHOT"; fi; -DIRECTORY="zoneminder_$VERSION-$DISTRO${PACKAGE_VERSION}"; +DIRECTORY="zoneminder_$VERSION"; echo "Doing $TYPE release $DIRECTORY"; mv "${GITHUB_FORK}_zoneminder_release" "$DIRECTORY.orig"; cd "$DIRECTORY.orig"; @@ -149,12 +153,12 @@ cd "$DIRECTORY.orig"; git submodule init git submodule update --init --recursive if [ "$DISTRO" == "trusty" ] || [ "$DISTRO" == "precise" ]; then - ln -sf distros/ubuntu1204 debian + mv distros/ubuntu1204 debian else if [ "$DISTRO" == "wheezy" ]; then - ln -sf distros/debian debian + mv distros/debian debian else - ln -sf distros/ubuntu1604 debian + mv distros/ubuntu1604 debian fi; fi; @@ -192,20 +196,24 @@ zoneminder ($VERSION-$DISTRO${PACKAGE_VERSION}) $DISTRO; urgency=$URGENCY EOF fi; -# Auto-install all ZoneMinder's depedencies using the Debian control file -sudo apt-get install devscripts equivs -sudo mk-build-deps -ir ./debian/control -echo "Status: $?" +rm -rf .git +rm .gitignore +cd ../ +tar zcf $DIRECTORY.orig.tar.gz $DIRECTORY.orig +cd $DIRECTORY.orig -#rm -rf .git -#rm .gitignore -#cd ../ -#tar zcf zoneminder_$VERSION-$DISTRO.orig.tar.gz zoneminder_$VERSION-$DISTRO-$SNAPSHOT.orig -#cd zoneminder_$VERSION-$DISTRO-$SNAPSHOT.orig if [ $TYPE == "binary" ]; then + # Auto-install all ZoneMinder's depedencies using the Debian control file + sudo apt-get install devscripts equivs + sudo mk-build-deps -ir ./debian/control + echo "Status: $?" DEBUILD=debuild else if [ $TYPE == "local" ]; then + # Auto-install all ZoneMinder's depedencies using the Debian control file + sudo apt-get install devscripts equivs + sudo mk-build-deps -ir ./debian/control + echo "Status: $?" DEBUILD="debuild -i -us -uc -b" else DEBUILD="debuild -S -sa" @@ -215,7 +223,11 @@ if [ "$DEBSIGN_KEYID" != "" ]; then DEBUILD="$DEBUILD -k$DEBSIGN_KEYID" fi $DEBUILD -echo "Status: $?" +if [ $? -ne 0 ]; then +echo "Error status code is: $?" + echo "Build failed."; + exit $?; +fi; cd ../ if [ "$INTERACTIVE" != "no" ]; then From 7e430e29b23202a0c5e207bad6a0758ce780c4f5 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Tue, 9 May 2017 18:46:59 -0500 Subject: [PATCH 25/32] Delete version.enc extraneous file --- version.enc | Bin 16 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 version.enc diff --git a/version.enc b/version.enc deleted file mode 100644 index 46cec4186b183eee89aaceba621b873eca89ba90..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16 XcmXR_Tk-fXXYw`PDZcV)b_^x}Jf8*; From ec85d9a6a7a6ae695d142fba8afd289e6923acb8 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 10 May 2017 08:57:47 -0400 Subject: [PATCH 26/32] if zm.conf exists, rename to zm.conf.new --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a89d9f2f..06840686b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -736,6 +736,9 @@ endif(zmconfgen_result EQUAL 0) install(CODE " if (NOT EXISTS \"${ZM_CONFIG_DIR}/zm.conf\") file(INSTALL \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf\" DESTINATION \"${ZM_CONFIG_DIR}\") + else (NOT EXISTS \"${ZM_CONFIG_DIR}/zm.conf\") + file(RENAME \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf\" \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf.new\") + file(INSTALL \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf.new\" DESTINATION \"${ZM_CONFIG_DIR}\") endif() ") From 3e550e14614d1a3f6e8488437b9572624b736360 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 10 May 2017 07:59:04 -0500 Subject: [PATCH 27/32] remove "Actual" key from ru lang file since that word is too common. --- web/lang/ru_ru.php | 1 - 1 file changed, 1 deletion(-) diff --git a/web/lang/ru_ru.php b/web/lang/ru_ru.php index edeb2b917..8d0d24a7d 100644 --- a/web/lang/ru_ru.php +++ b/web/lang/ru_ru.php @@ -76,7 +76,6 @@ $SLANG = array( '32BitColour' => '32 битный цвет', // Added - 2011-06-15 '8BitGrey' => '256 оттенков серого', 'Action' => 'Действие', - 'Actual' => '1х', 'AddNewControl' => 'Добавить новый', 'AddNewMonitor' => 'Добавить монитор', 'AddNewUser' => 'Добавить пользователя', From 2c0d3229249bfbae169f2fc1a50aad7d368d1edd Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 10 May 2017 08:07:08 -0500 Subject: [PATCH 28/32] remove zmf.cpp to fix merge conflict --- src/zmf.cpp | 350 ---------------------------------------------------- 1 file changed, 350 deletions(-) delete mode 100644 src/zmf.cpp diff --git a/src/zmf.cpp b/src/zmf.cpp deleted file mode 100644 index addf2f053..000000000 --- a/src/zmf.cpp +++ /dev/null @@ -1,350 +0,0 @@ -// -// ZoneMinder Image File Writer Implementation, $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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// - -/* - -=head1 NAME - -zmf - The ZoneMinder Frame daemon - -=head1 SYNOPSIS - - zmf -m - zmf --monitor - zmf -h - zmf --help - zmf -v - zmf --version - -=head1 DESCRIPTION - -This is an optional daemon that can run in concert with the Analysis daemon and -whose function it is to actually write captured frames to disk. This frees up -the Analysis daemon to do more analysis (!) and so keep up with the Capture -daemon better. If it isn't running or dies then the Analysis daemon just writes -them itself. - -=head1 OPTIONS - - -m, --monitor_id - ID of the monitor to use - -h, --help - Display usage information - -v, --version - Print the installed version of ZoneMinder - -=cut - -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "zm.h" -#include "zm_db.h" -#include "zm_signal.h" -#include "zm_monitor.h" - -#include "zmf.h" - -int OpenSocket( int monitor_id ) -{ - int sd = socket( AF_UNIX, SOCK_STREAM, 0); - if ( sd < 0 ) - { - Error( "Can't create socket: %s", strerror(errno) ); - return( -1 ); - } - - char sock_path[PATH_MAX] = ""; - snprintf( sock_path, sizeof(sock_path), "%s/zmf-%d.sock", config.path_socks, monitor_id ); - if ( unlink( sock_path ) < 0 ) - { - Warning( "Can't unlink '%s': %s", sock_path, strerror(errno) ); - } - - struct sockaddr_un addr; - - strncpy( addr.sun_path, sock_path, sizeof(addr.sun_path) ); - addr.sun_family = AF_UNIX; - - if ( bind( sd, (struct sockaddr *)&addr, strlen(addr.sun_path)+sizeof(addr.sun_family)) < 0 ) - { - Error( "Can't bind: %s", strerror(errno) ); - exit( -1 ); - } - - if ( listen( sd, SOMAXCONN ) < 0 ) - { - Error( "Can't listen: %s", strerror(errno) ); - return( -1 ); - } - - struct sockaddr_un rem_addr; - socklen_t rem_addr_len = sizeof(rem_addr); - int new_sd = -1; - if ( (new_sd = accept( sd, (struct sockaddr *)&rem_addr, &rem_addr_len )) < 0 ) - { - Error( "Can't accept: %s", strerror(errno) ); - exit( -1 ); - } - close( sd ); - - sd = new_sd; - - Info( "Frame server socket open, awaiting images" ); - return( sd ); -} - -int ReopenSocket( int &sd, int monitor_id ) -{ - close( sd ); - return( sd = OpenSocket( monitor_id ) ); -} - -void Usage() -{ - fprintf( stderr, "zmf -m \n" ); - fprintf( stderr, "Options:\n" ); - fprintf( stderr, " -m, --monitor : Specify which monitor to use\n" ); - fprintf( stderr, " -h, --help : This screen\n" ); - fprintf( stderr, " -v, --version : Report the installed version of ZoneMinder\n" ); - exit( 0 ); -} - -int main( int argc, char *argv[] ) -{ - self = argv[0]; - - srand( getpid() * time( 0 ) ); - - int id = -1; - - static struct option long_options[] = { - {"monitor", 1, 0, 'm'}, - {"help", 0, 0, 'h'}, - {"version", 0, 0, 'v'}, - {0, 0, 0, 0} - }; - - while (1) - { - int option_index = 0; - - int c = getopt_long (argc, argv, "m:h:v", long_options, &option_index); - if (c == -1) - { - break; - } - - switch (c) - { - case 'm': - id = atoi(optarg); - break; - case 'h': - case '?': - Usage(); - break; - case 'v': - std::cout << ZM_VERSION << "\n"; - exit(0); - default: - //fprintf( stderr, "?? getopt returned character code 0%o ??\n", c ); - break; - } - } - - if (optind < argc) - { - fprintf( stderr, "Extraneous options, " ); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - Usage(); - } - - if ( id < 0 ) - { - fprintf( stderr, "Bogus monitor %d\n", id ); - Usage(); - exit( 0 ); - } - - char log_id_string[16]; - snprintf( log_id_string, sizeof(log_id_string), "m%d", id ); - - zmLoadConfig(); - - logInit( "zmf" ); - - ssedetect(); - - Monitor *monitor = Monitor::Load( id, false, Monitor::QUERY ); - - if ( !monitor ) - { - fprintf( stderr, "Can't find monitor with id of %d\n", id ); - exit( -1 ); - } - - char capt_path[PATH_MAX]; - char anal_path[PATH_MAX]; - snprintf( capt_path, sizeof(capt_path), "%s/%d/%%s/%%0%dd-capture.jpg", config.dir_events, monitor->Id(), config.event_image_digits ); - snprintf( anal_path, sizeof(anal_path), "%s/%d/%%s/%%0%dd-analyse.jpg", config.dir_events, monitor->Id(), config.event_image_digits ); - zmSetDefaultTermHandler(); - zmSetDefaultDieHandler(); - - sigset_t block_set; - sigemptyset( &block_set ); - - int sd = OpenSocket( monitor->Id() ); - - FrameHeader frame_header = { 0, 0, false, 0 }; - //unsigned char *image_data = 0; - - fd_set rfds; - - struct timeval timeout; - timeout.tv_sec = 1; - timeout.tv_usec = 0; - while( 1 ) - { - struct timeval temp_timeout = timeout; - - FD_ZERO(&rfds); - FD_SET(sd, &rfds); - int n_found = select( sd+1, &rfds, NULL, NULL, &temp_timeout ); - if( n_found == 0 ) - { - Debug( 1, "Select timed out" ); - continue; - } - else if ( n_found < 0) - { - Error( "Select error: %s", strerror(errno) ); - ReopenSocket( sd, monitor->Id() ); - continue; - } - - sigprocmask( SIG_BLOCK, &block_set, 0 ); - - int n_bytes = read( sd, &frame_header, sizeof(frame_header) ); - if ( n_bytes != sizeof(frame_header) ) - { - if ( n_bytes < 0 ) - { - Error( "Can't read frame header: %s", strerror(errno) ); - } - else if ( n_bytes > 0 ) - { - Error( "Incomplete read of frame header, %d bytes only", n_bytes ); - } - else - { - Warning( "Socket closed at remote end" ); - } - ReopenSocket( sd, monitor->Id() ); - continue; - } - Debug( 1, "Read frame header, expecting %ld bytes of image", frame_header.image_length ); - static unsigned char image_data[ZM_MAX_IMAGE_SIZE]; - - // Read for pipe and loop until bytes expected have been read or an error occurs - int bytes_read = 0; - do - { - n_bytes = read( sd, image_data+bytes_read, frame_header.image_length-bytes_read ); - if (n_bytes < 0) break; // break on error - if (n_bytes < (int)frame_header.image_length) - { - // print some informational messages - if (bytes_read == 0) - { - Debug(4,"Image read : Short read %d bytes of %d expected bytes",n_bytes,frame_header.image_length); - } - else if (bytes_read+n_bytes == (int)frame_header.image_length) - { - Debug(5,"Image read : Read rest of short read: %d bytes read total of %d bytes",n_bytes,frame_header.image_length); - } - else - { - Debug(6,"Image read : continuing, read %d bytes (%d so far)", n_bytes, bytes_read+n_bytes); - } - } - bytes_read+= n_bytes; - } while (n_bytes>0 && (bytes_read < (ssize_t)frame_header.image_length) ); - - // Print errors if there was a problem - if ( n_bytes < 1 ) - { - Error( "Only read %d bytes of %d\n", bytes_read, frame_header.image_length); - if ( n_bytes < 0 ) - { - Error( "Can't read frame image data: %s", strerror(errno) ); - } - else - { - Warning( "Socket closed at remote end" ); - } - ReopenSocket( sd, monitor->Id() ); - continue; - } - - static char subpath[PATH_MAX] = ""; - if ( config.use_deep_storage ) - { - struct tm *time = localtime( &frame_header.event_time ); - snprintf( subpath, sizeof(subpath), "%02d/%02d/%02d/%02d/%02d/%02d", time->tm_year-100, time->tm_mon+1, time->tm_mday, time->tm_hour, time->tm_min, time->tm_sec ); - } - else - { - snprintf( subpath, sizeof(subpath), "%ld", frame_header.event_id ); - } - - static char path[PATH_MAX] = ""; - snprintf( path, sizeof(path), frame_header.alarm_frame?anal_path:capt_path, subpath, frame_header.frame_id ); - Debug( 1, "Got image, writing to %s", path ); - - FILE *fd = 0; - if ( (fd = fopen( path, "w" )) == NULL ) - { - Error( "Can't fopen '%s': %s", path, strerror(errno) ); - exit( -1 ); - } - if ( 0 == fwrite( image_data, frame_header.image_length, 1, fd ) ) - { - Error( "Can't fwrite image data: %s", strerror(errno) ); - exit( -1 ); - } - fclose( fd ); - - sigprocmask( SIG_UNBLOCK, &block_set, 0 ); - } - logTerm(); - zmDbClose(); -} From 0584454aa8e0d9c2c88855b7ac23b129a39a07b3 Mon Sep 17 00:00:00 2001 From: Kfir Itzhak Date: Wed, 10 May 2017 17:37:25 +0300 Subject: [PATCH 29/32] Fix conflicts in Image::Initialise() caused by merging #1810 and #1823 --- src/zm_image.cpp | 57 +++++++++++++----------------------------------- 1 file changed, 15 insertions(+), 42 deletions(-) diff --git a/src/zm_image.cpp b/src/zm_image.cpp index 26aa6b0ce..d7a79621e 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -256,15 +256,6 @@ void Image::Initialise() fptr_delta8_bgra = &sse2_delta8_bgra; fptr_delta8_argb = &sse2_delta8_argb; fptr_delta8_abgr = &sse2_delta8_abgr; - /* - ** On some systems, the 4 SSE2 algorithms above might be a little slower than - ** the standard algorithms, especially on early Pentium 4 processors. - ** In that case, comment out the 4 lines above and uncomment the 4 lines below - */ - // fptr_delta8_rgba = &std_delta8_rgba; - // fptr_delta8_bgra = &std_delta8_bgra; - // fptr_delta8_argb = &std_delta8_argb; - // fptr_delta8_abgr = &std_delta8_abgr; fptr_delta8_gray8 = &sse2_delta8_gray8; Debug(4,"Delta: Using SSE2 delta functions"); } else if(neonversion >= 1) { @@ -293,20 +284,6 @@ void Image::Initialise() fptr_delta8_gray8 = &std_delta8_gray8; Debug(4,"Delta: CPU extensions disabled, using standard delta functions"); } - - /* - SSSE3 deinterlacing functions were removed because they were usually equal - or slower than the standard code (compiled with -O2 or better) - The function is too complicated to be vectorized efficiently - */ - fptr_deinterlace_4field_rgba = &std_deinterlace_4field_rgba; - fptr_deinterlace_4field_bgra = &std_deinterlace_4field_bgra; - fptr_deinterlace_4field_argb = &std_deinterlace_4field_argb; - fptr_deinterlace_4field_abgr = &std_deinterlace_4field_abgr; - fptr_deinterlace_4field_gray8 = &std_deinterlace_4field_gray8; - Debug(4,"Deinterlace: Using standard functions"); - -#if defined(__i386__) && !defined(__x86_64__) __attribute__((aligned(64))) uint8_t delta8_1[128] = { 221,22,234,254,8,140,15,28,166,13,203,56,92,250,79,225,19,59,241,145,253,33,87,204,97,168,229,180,3,108,205,177, @@ -330,7 +307,7 @@ void Image::Initialise() 73,25,148,105,20,64,129,49,85,43,106,123,47,13,102,92,58,126,110,110,29,109,54,124,114,114,19,179,51,127,154,97 }; __attribute__((aligned(64))) uint8_t delta8_gray8_res[128]; - __attribute__((aligned(64))) uint8_t delta8_rgba_res[128]; + __attribute__((aligned(64))) uint8_t delta8_rgba_res[32]; /* Run the delta8 grayscale function */ (*fptr_delta8_gray8)(delta8_1,delta8_2,delta8_gray8_exp,128); @@ -351,24 +328,20 @@ void Image::Initialise() Panic("Delta RGBA function failed self-test: Results differ from the expected results"); } } - - /* Use SSSE3 deinterlace functions? */ - if(config.cpu_extensions && sseversion >= 35) { - fptr_deinterlace_4field_rgba = &ssse3_deinterlace_4field_rgba; - fptr_deinterlace_4field_bgra = &ssse3_deinterlace_4field_bgra; - fptr_deinterlace_4field_argb = &ssse3_deinterlace_4field_argb; - fptr_deinterlace_4field_abgr = &ssse3_deinterlace_4field_abgr; - fptr_deinterlace_4field_gray8 = &ssse3_deinterlace_4field_gray8; - Debug(4,"Deinterlace: Using SSSE3 delta functions"); - } else { - fptr_deinterlace_4field_rgba = &std_deinterlace_4field_rgba; - fptr_deinterlace_4field_bgra = &std_deinterlace_4field_bgra; - fptr_deinterlace_4field_argb = &std_deinterlace_4field_argb; - fptr_deinterlace_4field_abgr = &std_deinterlace_4field_abgr; - fptr_deinterlace_4field_gray8 = &std_deinterlace_4field_gray8; - Debug(4,"Deinterlace: Using standard delta functions"); - } - + + /* + SSSE3 deinterlacing functions were removed because they were usually equal + or slower than the standard code (compiled with -O2 or better) + The function is too complicated to be vectorized efficiently on SSSE3 + */ + fptr_deinterlace_4field_rgba = &std_deinterlace_4field_rgba; + fptr_deinterlace_4field_bgra = &std_deinterlace_4field_bgra; + fptr_deinterlace_4field_argb = &std_deinterlace_4field_argb; + fptr_deinterlace_4field_abgr = &std_deinterlace_4field_abgr; + fptr_deinterlace_4field_gray8 = &std_deinterlace_4field_gray8; + Debug(4,"Deinterlace: Using standard functions"); + +#if defined(__i386__) && !defined(__x86_64__) /* Use SSE2 aligned memory copy? */ if(config.cpu_extensions && sseversion >= 20) { fptr_imgbufcpy = &sse2_aligned_memcpy; From 3ec90f1d0e7a413c3ed8d6759bc7cd0fe4dc202f Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 10 May 2017 10:05:52 -0500 Subject: [PATCH 30/32] Update zoneminder.spec zmf was removed from the project. update rpm specfile accordingly --- distros/redhat/zoneminder.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index babc826f1..2f261353b 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -303,7 +303,6 @@ rm -rf %{_docdir}/%{name}-%{version} %{_bindir}/zmc %{_bindir}/zmcontrol.pl %{_bindir}/zmdc.pl -%{_bindir}/zmf %{_bindir}/zmfilter.pl %{_bindir}/zmpkg.pl %{_bindir}/zmtrack.pl From 088bafd8e9da8816a2d68fdfaf0b1d67177ca48c Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 10 May 2017 10:47:05 -0500 Subject: [PATCH 31/32] Update zoneminder.spec rpm specfile change. Don't look for polkit rules on legacy sys v systems --- distros/redhat/zoneminder.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index 2f261353b..dad18d307 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -50,6 +50,7 @@ Source1: https://github.com/FriendsOfCake/crud/archive/v%{crud_version}.tar.gz#/ %{?with_init_systemd:BuildRequires: systemd-devel} %{?with_init_systemd:BuildRequires: mariadb-devel} %{?with_init_systemd:BuildRequires: perl-podlators} +%{?with_init_systemd:BuildRequires: polkit-devel} %{?with_init_sysv:BuildRequires: mysql-devel} %{?el6:BuildRequires: epel-rpm-macros} BuildRequires: cmake >= 2.8.7 @@ -81,7 +82,6 @@ BuildRequires: vlc-devel BuildRequires: libcurl-devel BuildRequires: libv4l-devel BuildRequires: ffmpeg-devel -BuildRequires: polkit-devel %{?with_nginx:Requires: nginx} %{?with_nginx:Requires: fcgiwrap} @@ -291,6 +291,8 @@ rm -rf %{_docdir}/%{name}-%{version} %if 0%{?with_init_systemd} %{_tmpfilesdir}/zoneminder.conf %{_unitdir}/zoneminder.service +%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy +%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules %endif %if 0%{?with_init_sysv} @@ -327,9 +329,6 @@ rm -rf %{_docdir}/%{name}-%{version} %{_libexecdir}/zoneminder/ %{_datadir}/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}) %{_sharedstatedir}/zoneminder %dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/events %dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/images From 0d6a20fa9b9f7c12a7624161fdd17a5bb96c10ca Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 10 May 2017 10:54:56 -0500 Subject: [PATCH 32/32] only install polkit rules on systems with systemd --- misc/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt index 1b3bd7c5a..016f19881 100644 --- a/misc/CMakeLists.txt +++ b/misc/CMakeLists.txt @@ -12,7 +12,8 @@ configure_file(zoneminder-tmpfiles.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zonemind # 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") - +# Install Policykit rules and actions into the proper folders only on systems with systemd +if(WITH_SYSTEMD) + 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") +endif(WITH_SYSTEMD)