Merge branch 'master' of github.com:ZoneMinder/ZoneMinder

This commit is contained in:
Isaac Connor 2019-09-25 10:36:52 -04:00
commit 61a7c008eb
43 changed files with 927 additions and 1081 deletions

View File

@ -39,8 +39,8 @@ env:
- SMPFLAGS=-j4 OS=ubuntu DIST=xenial
- SMPFLAGS=-j4 OS=ubuntu DIST=bionic
- SMPFLAGS=-j4 OS=ubuntu DIST=disco
- SMPFLAGS=-j4 OS=debian DIST=buster DOCKER_REPO=zmicon/packpack
- SMPFLAGS=-j4 OS=debian DIST=stretch
- SMPFLAGS=-j4 OS=debian DIST=buster DOCKER_REPO=iconzm/packpack
- SMPFLAGS=-j4 OS=debian DIST=stretch DOCKER_REPO=iconzm/packpack
- SMPFLAGS=-j4 OS=ubuntu DIST=trusty ARCH=i386
- SMPFLAGS=-j4 OS=ubuntu DIST=xenial ARCH=i386
- SMPFLAGS=-j4 OS=ubuntu DIST=bionic ARCH=i386

View File

@ -1,8 +1,8 @@
Source: zoneminder
Section: net
Priority: optional
Maintainer: Dmitry Smirnov <onlyjob@debian.org>
Uploaders: Vagrant Cascadian <vagrant@debian.org>
Maintainer: Isaac Connor <isaac@zoneminder.com>
Uploaders: Isaac Connor <isaac@zoneminder.com>
Build-Depends: debhelper (>= 9), dh-systemd, python-sphinx | python3-sphinx, apache2-dev, dh-linktree, dh-systemd, dh-apache2
,cmake
,libx264-dev, libmp4v2-dev

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -wT
#!@PERL_EXECUTABLE@ -wT
#
# ==========================================================================
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!@PERL_EXECUTABLE@ -wT
#
# ==========================================================================
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -wT
#!@PERL_EXECUTABLE@ -wT
#
# ==========================================================================
#
@ -41,8 +41,6 @@ $ENV{PATH} = '/bin:/usr/bin:/usr/local/bin';
$ENV{SHELL} = '/bin/sh' if exists $ENV{SHELL};
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
logInit();
my $arg_string = join(' ', @ARGV);
my $id;
@ -69,6 +67,7 @@ if ( !$id ) {
}
( $id ) = $id =~ /^(\w+)$/;
logInit($id?(id=>'zmcontrol_'.$id):());
my $sock_file = $Config{ZM_PATH_SOCKS}.'/zmcontrol-'.$id.'.sock';
Debug("zmcontrol: arg string: $arg_string sock file $sock_file");

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -wT
#!@PERL_EXECUTABLE@ -wT
#
# ==========================================================================
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -wT
#!@PERL_EXECUTABLE@ -wT
#
# ==========================================================================
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!@PERL_EXECUTABLE@ -wT
use strict;
#
# ==========================================================================

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -wT
#!@PERL_EXECUTABLE@ -wT
#
# ==========================================================================
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -wT
#!@PERL_EXECUTABLE@ -wT
use strict;
use bytes;

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -wT
#!@PERL_EXECUTABLE@ -wT
use strict;
use bytes;

View File

@ -1,4 +1,4 @@
#!/usr/bin/pkexec /usr/bin/perl
#!/usr/bin/pkexec @PERL_EXECUTABLE@
#
# ==========================================================================
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!@PERL_EXECUTABLE@ -wT
#
# ==========================================================================
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -wT
#!@PERL_EXECUTABLE@ -wT
#
# ==========================================================================
#
@ -77,12 +77,12 @@ my $mid = 0;
GetOptions( 'monitor=s'=>\$mid )
or pod2usage(-exitstatus => -1);
logInit();
logSetSignal();
my ( $detaint_mid ) = $mid =~ /^(\d+)$/;
$mid = $detaint_mid;
logInit($mid?(id=>'zmtrack_m'.$mid):());
logSetSignal();
print( "Tracker daemon $mid (experimental) starting at "
.strftime( '%y/%m/%d %H:%M:%S', localtime() )
."\n"
@ -90,146 +90,122 @@ print( "Tracker daemon $mid (experimental) starting at "
my $dbh = zmDbConnect();
my $sql = "SELECT C.*,M.* FROM Monitors as M
my $sql = 'SELECT C.*,M.* FROM Monitors as M
LEFT JOIN Controls as C on M.ControlId = C.Id
WHERE M.Id = ?"
WHERE M.Id = ?'
;
my $sth = $dbh->prepare_cached( $sql )
or Fatal( "Can't prepare '$sql': ".$dbh->errstr() );
or Fatal("Can't prepare '$sql': ".$dbh->errstr());
my $res = $sth->execute( $mid )
or Fatal( "Can't execute '$sql': ".$sth->errstr() );
or Fatal("Can't execute '$sql': ".$sth->errstr());
my $monitor = $sth->fetchrow_hashref();
if ( !$monitor )
{
print( "Can't find monitor '$mid'\n" );
exit( -1 );
if ( !$monitor ) {
Fatal("Can't find monitor '$mid'");
}
if ( !$monitor->{Controllable} )
{
print( "Monitor '$mid' is not controllable\n" );
exit( -1 );
if ( !$monitor->{Controllable} ) {
Fatal("Monitor '$mid' is not controllable");
}
if ( !$monitor->{TrackMotion} )
{
print( "Monitor '$mid' is not configured to track motion\n" );
exit( -1 );
if ( !$monitor->{TrackMotion} ) {
Fatal("Monitor '$mid' is not configured to track motion");
}
if ( !$monitor->{CanMoveMap} )
{
print( "Monitor '$mid' cannot move in map mode" );
if ( $monitor->{CanMoveRel} )
{
print( ", falling back to pseudo map mode\n" );
}
else
{
print( "\n" );
exit( -1 );
}
if ( !$monitor->{CanMoveMap} ) {
if ( $monitor->{CanMoveRel} ) {
Warning("Monitor '$mid' cannot move in map mode, falling back to pseudo map mode");
} else {
Fatal("Monitor '$mid' cannot move in map mode");
}
}
Debug( "Found monitor for id '$monitor'\n" );
exit( -1 ) if ( !zmMemVerify( $monitor ) );
Debug("Found monitor for id '$monitor'");
exit(-1) if !zmMemVerify($monitor);
sub Suspend
{
my $monitor = shift;
zmMonitorSuspend( $monitor );
sub Suspend {
my $monitor = shift;
zmMonitorSuspend($monitor);
}
sub Resume
{
my $monitor = shift;
sleep( $monitor->{TrackDelay} );
zmMonitorResume( $monitor );
sub Resume {
my $monitor = shift;
sleep($monitor->{TrackDelay});
zmMonitorResume($monitor);
}
sub Track
{
my $monitor = shift;
my ( $x, $y ) = @_;
my ( $detaint_x ) = $x =~ /^(\d+)$/; $x = $detaint_x;
my ( $detaint_y ) = $y =~ /^(\d+)$/; $y = $detaint_y;
sub Track {
my $monitor = shift;
my ( $x, $y ) = @_;
my ( $detaint_x ) = $x =~ /^(\d+)$/; $x = $detaint_x;
my ( $detaint_y ) = $y =~ /^(\d+)$/; $y = $detaint_y;
my $ctrlCommand = $Config{ZM_PATH_BIN}
."/zmcontrol.pl -i "
.$monitor->{Id}
my $ctrlCommand = $Config{ZM_PATH_BIN}
.'/zmcontrol.pl -i '
.$monitor->{Id}
;
$ctrlCommand .= ' --command='
.( $monitor->{CanMoveMap} ? 'moveMap'
: 'movePseudoMap'
)
." --xcoord=$x --ycoord=$y"
;
executeShellCommand($ctrlCommand);
}
sub Return {
my $monitor = shift;
my $ctrlCommand = $Config{ZM_PATH_BIN}
.'/zmcontrol.pl -i '
.$monitor->{Id}
;
if ( $monitor->{ReturnLocation} > 0 ) {
$ctrlCommand .= ' --command=presetGoto --preset='
.$monitor->{ReturnLocation}
;
$ctrlCommand .= " --command="
.( $monitor->{CanMoveMap} ? "moveMap"
: "movePseudoMap"
)
." --xcoord=$x --ycoord=$y"
;
executeShellCommand( $ctrlCommand );
}
sub Return
{
my $monitor = shift;
my $ctrlCommand = $Config{ZM_PATH_BIN}
."/zmcontrol.pl -i "
.$monitor->{Id}
;
if ( $monitor->{ReturnLocation} > 0 )
{
$ctrlCommand .= " --command=presetGoto --preset="
.$monitor->{ReturnLocation}
;
}
else
{
$ctrlCommand .= " --command=presetHome";
}
executeShellCommand( $ctrlCommand );
} else {
$ctrlCommand .= ' --command=presetHome';
}
executeShellCommand($ctrlCommand);
}
my $last_alarm = 0;
if ( ($monitor->{ReturnLocation} >= 0) )
{
Suspend( $monitor );
Return( $monitor );
Resume( $monitor );
if ( ($monitor->{ReturnLocation} >= 0) ) {
Suspend($monitor);
Return($monitor);
Resume($monitor);
}
my $alarmed = undef;
while( 1 )
{
if ( zmIsAlarmed( $monitor ) )
{
my ( $alarm_x, $alarm_y ) = zmGetAlarmLocation( $monitor );
if ( $alarm_x >= 0 && $alarm_y >= 0 )
{
Debug( "Got alarm at $alarm_x, $alarm_y\n" );
Suspend( $monitor );
Track( $monitor, $alarm_x, $alarm_y );
Resume( $monitor );
$last_alarm = time();
$alarmed = !undef;
}
while( 1 ) {
if ( zmIsAlarmed($monitor) ) {
my ( $alarm_x, $alarm_y ) = zmGetAlarmLocation($monitor);
if ( $alarm_x >= 0 && $alarm_y >= 0 ) {
Debug("Got alarm at $alarm_x, $alarm_y");
Suspend($monitor);
Track($monitor, $alarm_x, $alarm_y);
Resume($monitor);
$last_alarm = time();
$alarmed = !undef;
}
else
{
if ( logDebugging() && $alarmed )
{
print( "Left alarm state\n" );
$alarmed = undef;
}
if ( ($monitor->{ReturnLocation} >= 0)
&& ($last_alarm > 0)
&& ((time()-$last_alarm) > $monitor->{ReturnDelay})
)
{
Debug( "Returning to location ".$monitor->{ReturnLocation}."\n" );
Suspend( $monitor );
Return( $monitor );
Resume( $monitor );
$last_alarm = 0;
}
} else {
if ( logDebugging() && $alarmed ) {
Info('Left alarm state');
$alarmed = undef;
}
usleep( SLEEP_TIME );
if ( ($monitor->{ReturnLocation} >= 0)
&& ($last_alarm > 0)
&& ((time()-$last_alarm) > $monitor->{ReturnDelay})
) {
Debug("Returning to location ".$monitor->{ReturnLocation});
Suspend($monitor);
Return($monitor);
Resume($monitor);
$last_alarm = 0;
}
}
usleep(SLEEP_TIME);
}
1;
__END__

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -wT
#!@PERL_EXECUTABLE@ -wT
#
# ==========================================================================
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!@PERL_EXECUTABLE@ -wT
#
# ==========================================================================
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -wT
#!@PERL_EXECUTABLE@ -wT
#
# ==========================================================================
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -wT
#!@PERL_EXECUTABLE@ -wT
#
# ==========================================================================
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -wT
#!@PERL_EXECUTABLE@ -wT
#
# ==========================================================================
#

View File

@ -58,7 +58,7 @@ RemoteCameraRtsp::RemoteCameraRtsp(
else if ( p_method == "rtpRtspHttp" )
method = RtspThread::RTP_RTSP_HTTP;
else
Fatal( "Unrecognised method '%s' when creating RTSP camera %d", p_method.c_str(), monitor_id );
Fatal("Unrecognised method '%s' when creating RTSP camera %d", p_method.c_str(), monitor_id);
if ( capture ) {
Initialise();
@ -88,23 +88,23 @@ RemoteCameraRtsp::RemoteCameraRtsp(
subpixelorder = ZM_SUBPIX_ORDER_NONE;
imagePixFormat = AV_PIX_FMT_GRAY8;
} else {
Panic("Unexpected colours: %d",colours);
Panic("Unexpected colours: %d", colours);
}
} // end RemoteCameraRtsp::RemoteCameraRtsp(...)
RemoteCameraRtsp::~RemoteCameraRtsp() {
av_frame_free( &mFrame );
av_frame_free( &mRawFrame );
av_frame_free(&mFrame);
av_frame_free(&mRawFrame);
#if HAVE_LIBSWSCALE
if ( mConvertContext ) {
sws_freeContext( mConvertContext );
sws_freeContext(mConvertContext);
mConvertContext = NULL;
}
#endif
if ( mCodecContext ) {
avcodec_close( mCodecContext );
avcodec_close(mCodecContext);
mCodecContext = NULL; // Freed by avformat_free_context in the destructor of RtspThread class
}
@ -120,14 +120,9 @@ void RemoteCameraRtsp::Initialise() {
// This allocates a buffer able to hold a raw fframe, which is a little artbitrary. Might be nice to get some
// decent data on how large a buffer is really needed. I think in ffmpeg there are now some functions to do that.
buffer.size( max_size );
buffer.size(max_size);
if ( logDebugging() )
av_log_set_level( AV_LOG_DEBUG );
else
av_log_set_level( AV_LOG_QUIET );
av_register_all();
FFMPEGInit();
Connect();
}
@ -137,11 +132,11 @@ void RemoteCameraRtsp::Terminate() {
}
int RemoteCameraRtsp::Connect() {
rtspThread = new RtspThread( monitor_id, method, protocol, host, port, path, auth, rtsp_describe );
rtspThread = new RtspThread(monitor_id, method, protocol, host, port, path, auth, rtsp_describe);
rtspThread->start();
return( 0 );
return 0;
}
int RemoteCameraRtsp::Disconnect() {
@ -151,18 +146,18 @@ int RemoteCameraRtsp::Disconnect() {
delete rtspThread;
rtspThread = 0;
}
return( 0 );
return 0;
}
int RemoteCameraRtsp::PrimeCapture() {
Debug( 2, "Waiting for sources" );
Debug(2, "Waiting for sources");
for ( int i = 0; i < 100 && !rtspThread->hasSources(); i++ ) {
usleep( 100000 );
usleep(100000);
}
if ( !rtspThread->hasSources() )
Fatal( "No RTSP sources" );
Fatal("No RTSP sources");
Debug( 2, "Got sources" );
Debug(2, "Got sources");
mFormatContext = rtspThread->getFormatContext();
@ -182,7 +177,7 @@ int RemoteCameraRtsp::PrimeCapture() {
mVideoStreamId = i;
continue;
} else {
Debug(2, "Have another video stream." );
Debug(2, "Have another video stream.");
}
} else
#if (LIBAVCODEC_VERSION_CHECK(52, 64, 0, 64, 0) || LIBAVUTIL_VERSION_CHECK(50, 14, 0, 14, 0))
@ -194,7 +189,7 @@ int RemoteCameraRtsp::PrimeCapture() {
if ( mAudioStreamId == -1 ) {
mAudioStreamId = i;
} else {
Debug(2, "Have another audio stream." );
Debug(2, "Have another audio stream.");
}
} else {
Debug(1, "Have unknown codec type in stream %d : %d", i, mFormatContext->streams[i]->codec->codec_type);
@ -202,25 +197,25 @@ int RemoteCameraRtsp::PrimeCapture() {
} // end foreach stream
if ( mVideoStreamId == -1 )
Fatal( "Unable to locate video stream" );
Fatal("Unable to locate video stream");
if ( mAudioStreamId == -1 )
Debug( 3, "Unable to locate audio stream" );
Debug(3, "Unable to locate audio stream");
// Get a pointer to the codec context for the video stream
mCodecContext = mFormatContext->streams[mVideoStreamId]->codec;
// Find the decoder for the video stream
mCodec = avcodec_find_decoder( mCodecContext->codec_id );
mCodec = avcodec_find_decoder(mCodecContext->codec_id);
if ( mCodec == NULL )
Panic( "Unable to locate codec %d decoder", mCodecContext->codec_id );
Panic("Unable to locate codec %d decoder", mCodecContext->codec_id);
// Open codec
#if !LIBAVFORMAT_VERSION_CHECK(53, 8, 0, 8, 0)
if ( avcodec_open( mCodecContext, mCodec ) < 0 )
if ( avcodec_open(mCodecContext, mCodec) < 0 )
#else
if ( avcodec_open2( mCodecContext, mCodec, 0 ) < 0 )
if ( avcodec_open2(mCodecContext, mCodec, 0) < 0 )
#endif
Panic( "Can't open codec" );
Panic("Can't open codec");
// Allocate space for the native video frame
#if LIBAVCODEC_VERSION_CHECK(55, 28, 1, 45, 101)
@ -236,17 +231,17 @@ int RemoteCameraRtsp::PrimeCapture() {
mFrame = avcodec_alloc_frame();
#endif
if(mRawFrame == NULL || mFrame == NULL)
Fatal( "Unable to allocate frame(s)");
if ( mRawFrame == NULL || mFrame == NULL )
Fatal("Unable to allocate frame(s)");
#if LIBAVUTIL_VERSION_CHECK(54, 6, 0, 6, 0)
int pSize = av_image_get_buffer_size( imagePixFormat, width, height, 1 );
int pSize = av_image_get_buffer_size(imagePixFormat, width, height, 1);
#else
int pSize = avpicture_get_size( imagePixFormat, width, height );
int pSize = avpicture_get_size(imagePixFormat, width, height);
#endif
if ( (unsigned int)pSize != imagesize ) {
Fatal("Image size mismatch. Required: %d Available: %d",pSize,imagesize);
Fatal("Image size mismatch. Required: %d Available: %d", pSize, imagesize);
}
/*
#if HAVE_LIBSWSCALE
@ -263,17 +258,17 @@ int RemoteCameraRtsp::PrimeCapture() {
#endif // HAVE_LIBSWSCALE
*/
return( 0 );
return 0;
}
int RemoteCameraRtsp::PreCapture() {
if ( !rtspThread->isRunning() )
return( -1 );
return -1;
if ( !rtspThread->hasSources() ) {
Error( "Cannot precapture, no RTP sources" );
return( -1 );
Error("Cannot precapture, no RTP sources");
return -1;
}
return( 0 );
return 0;
}
int RemoteCameraRtsp::Capture( Image &image ) {
@ -293,10 +288,10 @@ int RemoteCameraRtsp::Capture( Image &image ) {
if ( !rtspThread->isRunning() )
return -1;
if ( rtspThread->getFrame( buffer ) ) {
Debug( 3, "Read frame %d bytes", buffer.size() );
Debug( 4, "Address %p", buffer.head() );
Hexdump( 4, buffer.head(), 16 );
if ( rtspThread->getFrame(buffer) ) {
Debug(3, "Read frame %d bytes", buffer.size());
Debug(4, "Address %p", buffer.head());
Hexdump(4, buffer.head(), 16);
if ( !buffer.size() )
return -1;
@ -322,25 +317,25 @@ int RemoteCameraRtsp::Capture( Image &image ) {
Debug(3, "Not an h264 packet");
}
av_init_packet( &packet );
av_init_packet(&packet);
while ( !frameComplete && buffer.size() > 0 ) {
while ( !frameComplete && (buffer.size() > 0) ) {
packet.data = buffer.head();
packet.size = buffer.size();
// So I think this is the magic decode step. Result is a raw image?
#if LIBAVCODEC_VERSION_CHECK(52, 23, 0, 23, 0)
int len = avcodec_decode_video2( mCodecContext, mRawFrame, &frameComplete, &packet );
int len = avcodec_decode_video2(mCodecContext, mRawFrame, &frameComplete, &packet);
#else
int len = avcodec_decode_video( mCodecContext, mRawFrame, &frameComplete, packet.data, packet.size );
int len = avcodec_decode_video(mCodecContext, mRawFrame, &frameComplete, packet.data, packet.size);
#endif
if ( len < 0 ) {
Error( "Error while decoding frame %d", frameCount );
Hexdump( Logger::ERROR, buffer.head(), buffer.size()>256?256:buffer.size() );
Error("Error while decoding frame %d", frameCount);
Hexdump(Logger::ERROR, buffer.head(), buffer.size()>256?256:buffer.size());
buffer.clear();
continue;
}
Debug( 2, "Frame: %d - %d/%d", frameCount, len, buffer.size() );
Debug(2, "Frame: %d - %d/%d", frameCount, len, buffer.size());
//if ( buffer.size() < 400 )
//Hexdump( 0, buffer.head(), buffer.size() );
@ -349,29 +344,32 @@ int RemoteCameraRtsp::Capture( Image &image ) {
// At this point, we either have a frame or ran out of buffer. What happens if we run out of buffer?
if ( frameComplete ) {
Debug( 3, "Got frame %d", frameCount );
Debug(3, "Got frame %d", frameCount);
avpicture_fill( (AVPicture *)mFrame, directbuffer, imagePixFormat, width, height );
avpicture_fill((AVPicture *)mFrame, directbuffer, imagePixFormat, width, height);
#if HAVE_LIBSWSCALE
if(mConvertContext == NULL) {
mConvertContext = sws_getContext( mCodecContext->width, mCodecContext->height, mCodecContext->pix_fmt, width, height, imagePixFormat, SWS_BICUBIC, NULL, NULL, NULL );
if ( mConvertContext == NULL ) {
mConvertContext = sws_getContext(
mCodecContext->width, mCodecContext->height, mCodecContext->pix_fmt,
width, height, imagePixFormat, SWS_BICUBIC, NULL, NULL, NULL);
if(mConvertContext == NULL)
Fatal( "Unable to create conversion context");
if ( mConvertContext == NULL )
Fatal("Unable to create conversion context");
}
if ( sws_scale( mConvertContext, mRawFrame->data, mRawFrame->linesize, 0, mCodecContext->height, mFrame->data, mFrame->linesize ) < 0 )
Fatal( "Unable to convert raw format %u to target format %u at frame %d", mCodecContext->pix_fmt, imagePixFormat, frameCount );
if ( sws_scale(mConvertContext, mRawFrame->data, mRawFrame->linesize, 0, mCodecContext->height, mFrame->data, mFrame->linesize) < 0 )
Fatal("Unable to convert raw format %u to target format %u at frame %d",
mCodecContext->pix_fmt, imagePixFormat, frameCount );
#else // HAVE_LIBSWSCALE
Fatal( "You must compile ffmpeg with the --enable-swscale option to use RTSP cameras" );
Fatal("You must compile ffmpeg with the --enable-swscale option to use RTSP cameras");
#endif // HAVE_LIBSWSCALE
frameCount++;
} /* frame complete */
zm_av_packet_unref( &packet );
zm_av_packet_unref(&packet);
} /* getFrame() */
if ( frameComplete )
@ -385,180 +383,7 @@ int RemoteCameraRtsp::Capture( Image &image ) {
//Function to handle capture and store
int RemoteCameraRtsp::CaptureAndRecord(Image &image, timeval recording, char* event_file ) {
AVPacket packet;
uint8_t* directbuffer;
int frameComplete = false;
while ( true ) {
// WHY Are we clearing it? Might be something good in it.
buffer.clear();
if ( !rtspThread->isRunning() )
return (-1);
//Video recording
if ( recording.tv_sec ) {
// The directory we are recording to is no longer tied to the current event.
// Need to re-init the videostore with the correct directory and start recording again
// Not sure why we are only doing this on keyframe, al
if ( videoStore && (strcmp(oldDirectory, event_file)!=0) ) {
//don't open new videostore until we're on a key frame..would this require an offset adjustment for the event as a result?...if we store our key frame location with the event will that be enough?
Info("Re-starting video storage module");
if ( videoStore ) {
delete videoStore;
videoStore = NULL;
}
} // end if changed to new event
if ( ! videoStore ) {
//Instantiate the video storage module
videoStore = new VideoStore((const char *)event_file, "mp4",
mFormatContext->streams[mVideoStreamId],
mAudioStreamId==-1?NULL:mFormatContext->streams[mAudioStreamId],
this->getMonitor() );
strcpy(oldDirectory, event_file);
} // end if ! videoStore
} else {
if ( videoStore ) {
Info("Deleting videoStore instance");
delete videoStore;
videoStore = NULL;
}
} // end if recording or not
if ( rtspThread->getFrame( buffer ) ) {
Debug( 3, "Read frame %d bytes", buffer.size() );
Debug( 4, "Address %p", buffer.head() );
Hexdump( 4, buffer.head(), 16 );
if ( !buffer.size() )
return( -1 );
if ( mCodecContext->codec_id == AV_CODEC_ID_H264 ) {
// SPS and PPS frames should be saved and appended to IDR frames
int nalType = (buffer.head()[3] & 0x1f);
// SPS
if(nalType == 7) {
lastSps = buffer;
continue;
} else if(nalType == 8) {
// PPS
lastPps = buffer;
continue;
} else if(nalType == 5) {
// IDR
buffer += lastSps;
buffer += lastPps;
}
} // end if H264, what about other codecs?
av_init_packet( &packet );
// Keep decoding until a complete frame is had.
while ( !frameComplete && buffer.size() > 0 ) {
packet.data = buffer.head();
packet.size = buffer.size();
// Why are we checking for it being the video stream? Because it might be audio or something else.
// Um... we just initialized packet... we can't be testing for what it is yet....
if ( packet.stream_index == mVideoStreamId ) {
// So this does the decode
#if LIBAVCODEC_VERSION_CHECK(52, 23, 0, 23, 0)
int len = avcodec_decode_video2( mCodecContext, mRawFrame, &frameComplete, &packet );
#else
int len = avcodec_decode_video( mCodecContext, mRawFrame, &frameComplete, packet.data, packet.size );
#endif
if ( len < 0 ) {
Error( "Error while decoding frame %d", frameCount );
Hexdump( Logger::ERROR, buffer.head(), buffer.size()>256?256:buffer.size() );
buffer.clear();
continue;
}
Debug( 2, "Frame: %d - %d/%d", frameCount, len, buffer.size() );
//if ( buffer.size() < 400 )
//Hexdump( 0, buffer.head(), buffer.size() );
buffer -= len;
if ( frameComplete ) {
Debug( 3, "Got frame %d", frameCount );
/* Request a writeable buffer of the target image */
directbuffer = image.WriteBuffer(width, height, colours, subpixelorder);
if(directbuffer == NULL) {
Error("Failed requesting writeable buffer for the captured image.");
return (-1);
}
#if LIBAVUTIL_VERSION_CHECK(54, 6, 0, 6, 0)
av_image_fill_arrays(mFrame->data, mFrame->linesize,
directbuffer, imagePixFormat, width, height, 1);
#else
avpicture_fill( (AVPicture *)mFrame, directbuffer,
imagePixFormat, width, height);
#endif
} // endif frameComplete
if ( videoStore ) {
//Write the packet to our video store
int ret = videoStore->writeVideoFramePacket(&packet);//, &lastKeyframePkt);
if ( ret < 0 ) {//Less than zero and we skipped a frame
// Should not
zm_av_packet_unref( &packet );
return 0;
}
} // end if videoStore, so we are recording
#if HAVE_LIBSWSCALE
// Why are we re-scaling after writing out the packet?
if ( mConvertContext == NULL ) {
mConvertContext = sws_getContext( mCodecContext->width, mCodecContext->height, mCodecContext->pix_fmt, width, height, imagePixFormat, SWS_BICUBIC, NULL, NULL, NULL );
if ( mConvertContext == NULL )
Fatal( "Unable to create conversion context");
}
if ( sws_scale( mConvertContext, mRawFrame->data, mRawFrame->linesize, 0, mCodecContext->height, mFrame->data, mFrame->linesize ) < 0 )
Fatal( "Unable to convert raw format %u to target format %u at frame %d", mCodecContext->pix_fmt, imagePixFormat, frameCount );
#else // HAVE_LIBSWSCALE
Fatal( "You must compile ffmpeg with the --enable-swscale option to use RTSP cameras" );
#endif // HAVE_LIBSWSCALE
frameCount++;
} else if ( packet.stream_index == mAudioStreamId ) {
Debug( 4, "Got audio packet" );
if ( videoStore && record_audio ) {
Debug( 4, "Storing Audio packet" );
//Write the packet to our video store
int ret = videoStore->writeAudioFramePacket( &packet ); //FIXME no relevance of last key frame
if ( ret < 0 ) { //Less than zero and we skipped a frame
zm_av_packet_unref( &packet );
return 0;
}
}
} // end if video or audio packet
zm_av_packet_unref( &packet );
} // end while ! framecomplete and buffer.size()
if(frameComplete)
return (1);
} /* getFrame() */
} // end while true
// can never get here.
return (0) ;
} // int RemoteCameraRtsp::CaptureAndRecord( Image &image, bool recording, char* event_file )
int RemoteCameraRtsp::PostCapture() {
return( 0 );
return 0;
}
#endif // HAVE_LIBAVFORMAT

View File

@ -85,7 +85,7 @@ public:
int PreCapture();
int Capture( Image &image );
int PostCapture();
int CaptureAndRecord( Image &image, timeval recording, char* event_directory );
int CaptureAndRecord( Image &image, timeval recording, char* event_directory ) {return 0;};
int Close() { return 0; };
};

View File

@ -330,23 +330,23 @@ bool RtpSource::handlePacket( const unsigned char *packet, size_t packetLen ) {
} else
prevM = false;
updateJitter( rtpHeader );
updateJitter(rtpHeader);
return true;
}
bool RtpSource::getFrame( Buffer &buffer ) {
Debug( 3, "Getting frame" );
if ( !mFrameReady.getValueImmediate() ) {
Debug(3, "Getting frame but not ready");
// Allow for a couple of spurious returns
for ( int count = 0; !mFrameReady.getUpdatedValue( 1 ); count++ )
for ( int count = 0; !mFrameReady.getUpdatedValue(1); count++ )
if ( count > 1 )
return( false );
return false;
}
buffer = mFrame;
mFrameReady.setValueImmediate( false );
mFrameProcessed.updateValueSignal( true );
Debug( 4, "Copied %d bytes", buffer.size() );
mFrameReady.setValueImmediate(false);
mFrameProcessed.updateValueSignal(true);
Debug(4, "Copied %d bytes", buffer.size());
return true;
}

View File

@ -14,7 +14,7 @@ done
# We only want to deploy packages during cron events
# See https://docs.travis-ci.com/user/cron-jobs/
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ]; then
if [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ]; then
targetfolder="debian/master/mini-dinstall/incoming"

View File

@ -19,7 +19,7 @@ checksanity () {
exit 1
fi
done
# Verify OS & DIST environment variables have been set before calling this script
if [ -z "${OS}" ] || [ -z "${DIST}" ]; then
echo "ERROR: both OS and DIST environment variables must be set"
@ -120,7 +120,7 @@ commonprep () {
movecrud () {
if [ -e "web/api/app/Plugin/Crud/LICENSE.txt" ]; then
echo "Crud plugin already installed..."
else
else
echo "Unpacking Crud plugin..."
tar -xzf build/crud-${CRUDVER}.tar.gz
rmdir web/api/app/Plugin/Crud
@ -128,7 +128,7 @@ movecrud () {
fi
if [ -e "web/api/app/Plugin/CakePHP-Enum-Behavior/readme.md" ]; then
echo "CakePHP-Enum-Behavior plugin already installed..."
else
else
echo "Unpacking CakePHP-Enum-Behavior plugin..."
tar -xzf build/cakephp-enum-behavior-${CEBVER}.tar.gz
rmdir web/api/app/Plugin/CakePHP-Enum-Behavior
@ -182,7 +182,7 @@ setrpmpkgname () {
export RELEASE="1.${numcommits}.${thedate}git${shorthash}"
checkvars
echo
echo "Packpack VERSION has been set to: ${VERSION}"
echo "Packpack RELEASE has been set to: ${RELEASE}"
@ -201,7 +201,7 @@ setdebpkgname () {
export RELEASE="${DIST}"
checkvars
echo
echo "Packpack VERSION has been set to: ${VERSION}"
echo "Packpack RELEASE has been set to: ${RELEASE}"
@ -224,7 +224,7 @@ setdebchangelog () {
DATE=`date -R`
cat <<EOF > debian/changelog
zoneminder ($VERSION-${DIST}) ${DIST}; urgency=low
*
*
-- Isaac Connor <isaac@zoneminder.com> $DATE
EOF
}
@ -294,83 +294,67 @@ checksanity
# We don't want to build packages for all supported distros after every commit
# Only build all packages when executed via cron
# See https://docs.travis-ci.com/user/cron-jobs/
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS}" != "true" ] || [ "${DIST}" == "buster" ] ; then
# Steps common to Redhat distros
if [ "${OS}" == "el" ] || [ "${OS}" == "fedora" ]; then
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS}" != "true" ]; then
commonprep
echo "Begin Redhat build..."
# Steps common to Redhat distros
if [ "${OS}" == "el" ] || [ "${OS}" == "fedora" ]; then
echo "Begin Redhat build..."
setrpmpkgname
setrpmpkgname
ln -sfT distros/redhat rpm
ln -sfT distros/redhat rpm
# The rpm specfile requires the Crud submodule folder to be empty
rm -rf web/api/app/Plugin/Crud
mkdir web/api/app/Plugin/Crud
# The rpm specfile requires the Crud submodule folder to be empty
rm -rf web/api/app/Plugin/Crud
mkdir web/api/app/Plugin/Crud
reporpm="rpmfusion-free-release"
dlurl="https://download1.rpmfusion.org/free/${OS}/${reporpm}-${DIST}.noarch.rpm"
reporpm="rpmfusion-free-release"
dlurl="https://download1.rpmfusion.org/free/${OS}/${reporpm}-${DIST}.noarch.rpm"
# Give our downloaded repo rpm a common name so redhat_package.mk can find it
if [ -n "$dlurl" ] && [ $? -eq 0 ]; then
echo "Retrieving ${reporpm} repo rpm..."
curl $dlurl > build/external-repo.noarch.rpm
else
echo "ERROR: Failed to retrieve ${reporpm} repo rpm..."
echo "Download url was: $dlurl"
exit 1
fi
setrpmchangelog
echo "Starting packpack..."
execpackpack
# Steps common to Debian based distros
elif [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ] || [ "${OS}" == "raspbian" ]; then
echo "Begin ${OS} ${DIST} build..."
setdebpkgname
movecrud
if [ "${DIST}" == "trusty" ] || [ "${DIST}" == "precise" ]; then
ln -sfT distros/ubuntu1204 debian
elif [ "${DIST}" == "wheezy" ]; then
ln -sfT distros/debian debian
else
ln -sfT distros/ubuntu1604 debian
fi
setdebchangelog
echo "Starting packpack..."
execpackpack
if [ "${TRAVIS}" == "true" ]; then
install_deb
fi
# Give our downloaded repo rpm a common name so redhat_package.mk can find it
if [ -n "$dlurl" ] && [ $? -eq 0 ]; then
echo "Retrieving ${reporpm} repo rpm..."
curl $dlurl > build/external-repo.noarch.rpm
else
echo "ERROR: Failed to retrieve ${reporpm} repo rpm..."
echo "Download url was: $dlurl"
exit 1
fi
# We were not triggered via cron so just build and test trusty
elif [ "${OS}" == "ubuntu" ] && [ "${DIST}" == "trusty" ] && [ "${ARCH}" == "x86_64" ]; then
echo "Begin Ubuntu Trusty build..."
setrpmchangelog
commonprep
setdebpkgname
movecrud
ln -sfT distros/ubuntu1204 debian
setdebchangelog
echo "Starting packpack..."
execpackpack
fi;
# Steps common to Debian based distros
elif [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ] || [ "${OS}" == "raspbian" ]; then
commonprep
echo "Begin ${OS} ${DIST} build..."
setdebpkgname
movecrud
if [ "${DIST}" == "trusty" ] || [ "${DIST}" == "precise" ]; then
ln -sfT distros/ubuntu1204 debian
elif [ "${DIST}" == "wheezy" ]; then
ln -sfT distros/debian debian
else
ln -sfT distros/ubuntu1604 debian
fi
setdebchangelog
echo "Starting packpack..."
execpackpack
# We were not triggered via cron so just build and test trusty
if [ "${OS}" == "ubuntu" ] && [ "${DIST}" == "trusty" ] && [ "${ARCH}" == "x86_64" ]; then
# If we are running inside Travis then attempt to install the deb we just built
if [ "${TRAVIS}" == "true" ]; then
install_deb
install_deb
fi
fi
fi
exit 0

View File

@ -10,193 +10,193 @@ if ($_REQUEST['entity'] == 'navBar') {
}
$statusData = array(
'system' => array(
'permission' => 'System',
'table' => 'Monitors',
'limit' => 1,
'elements' => array(
'MonitorCount' => array( 'sql' => 'count(*)' ),
'ActiveMonitorCount' => array( 'sql' => "count(if(Function != 'None',1,NULL))" ),
'State' => array( 'func' => 'daemonCheck()?'.translate('Running').':'.translate('Stopped') ),
'Load' => array( 'func' => 'getLoad()' ),
'Disk' => array( 'func' => 'getDiskPercent()' ),
),
),
'monitor' => array(
'permission' => 'Monitors',
'table' => 'Monitors',
'limit' => 1,
'selector' => 'Monitors.Id',
'elements' => array(
'Id' => array( 'sql' => 'Monitors.Id' ),
'Name' => array( 'sql' => 'Monitors.Name' ),
'Type' => true,
'Function' => true,
'Enabled' => true,
'LinkedMonitors' => true,
'Triggers' => true,
'Device' => true,
'Channel' => true,
'Format' => true,
'Host' => true,
'Port' => true,
'Path' => true,
'Width' => array( 'sql' => 'Monitors.Width' ),
'Height' => array( 'sql' => 'Monitors.Height' ),
'Palette' => true,
'Orientation' => true,
'Brightness' => true,
'Contrast' => true,
'Hue' => true,
'Colour' => true,
'EventPrefix' => true,
'LabelFormat' => true,
'LabelX' => true,
'LabelY' => true,
'LabelSize' => true,
'ImageBufferCount' => true,
'WarmupCount' => true,
'PreEventCount' => true,
'PostEventCount' => true,
'AlarmFrameCount' => true,
'SectionLength' => true,
'FrameSkip' => true,
'MotionFrameSkip' => true,
'MaxFPS' => true,
'AlarmMaxFPS' => true,
'FPSReportInterval' => true,
'RefBlendPerc' => true,
'Controllable' => true,
'ControlId' => true,
'ControlDevice' => true,
'ControlAddress' => true,
'AutoStopTimeout' => true,
'TrackMotion' => true,
'TrackDelay' => true,
'ReturnLocation' => true,
'ReturnDelay' => true,
'DefaultView' => true,
'DefaultRate' => true,
'DefaultScale' => true,
'WebColour' => true,
'Sequence' => true,
'MinEventId' => array( 'sql' => '(SELECT min(Events.Id) FROM Events WHERE Events.MonitorId = Monitors.Id' ),
'MaxEventId' => array( 'sql' => '(SELECT max(Events.Id) FROM Events WHERE Events.MonitorId = Monitors.Id' ),
'TotalEvents' => array( 'sql' => '(SELECT count(Events.Id) FROM Events WHERE Events.MonitorId = Monitors.Id' ),
'Status' => array( 'zmu' => '-m '.escapeshellarg($_REQUEST['id'][0]).' -s' ),
'FrameRate' => array( 'zmu' => '-m '.escapeshellarg($_REQUEST['id'][0]).' -f' ),
),
),
'events' => array(
'permission' => 'Events',
'table' => 'Events',
'selector' => 'Events.MonitorId',
'elements' => array(
'Id' => true,
'Name' => true,
'Cause' => true,
'Notes' => true,
'StartTime' => true,
'StartTimeShort' => array( 'sql' => "date_format( StartTime, '".MYSQL_FMT_DATETIME_SHORT."' )" ),
'EndTime' => true,
'Width' => true,
'Height' => true,
'Length' => true,
'Frames' => true,
'AlarmFrames' => true,
'TotScore' => true,
'AvgScore' => true,
'MaxScore' => true,
),
),
'event' => array(
'permission' => 'Events',
'table' => 'Events',
'limit' => 1,
'selector' => 'Events.Id',
'elements' => array(
'Id' => array( 'sql' => 'Events.Id' ),
'MonitorId' => true,
'MonitorName' => array('sql' => '(SELECT Monitors.Name FROM Monitors WHERE Monitors.Id = Events.MonitorId)'),
'Name' => true,
'Cause' => true,
'StartTime' => true,
'StartTimeShort' => array( 'sql' => "date_format( StartTime, '".MYSQL_FMT_DATETIME_SHORT."' )" ),
'EndTime' => true,
'Width' => true,
'Height' => true,
'Length' => true,
'Frames' => true,
'DefaultVideo' => true,
'AlarmFrames' => true,
'TotScore' => true,
'AvgScore' => true,
'MaxScore' => true,
'Archived' => true,
'Videoed' => true,
'Uploaded' => true,
'Emailed' => true,
'Messaged' => true,
'Executed' => true,
'Notes' => true,
'MinFrameId' => array( 'sql' => '(SELECT min(Frames.FrameId) FROM Frames WHERE EventId=Events.Id)' ),
'MaxFrameId' => array( 'sql' => '(SELECT max(Frames.FrameId) FROM Frames WHERE Events.Id = Frames.EventId)' ),
'MinFrameDelta' => array( 'sql' => '(SELECT min(Frames.Delta) FROM Frames WHERE Events.Id = Frames.EventId)' ),
'MaxFrameDelta' => array( 'sql' => '(SELECT max(Frames.Delta) FROM Frames WHERE Events.Id = Frames.EventId)' ),
),
),
'frames' => array(
'permission' => 'Events',
'table' => 'Frames',
'selector' => 'EventId',
'elements' => array(
'EventId' => true,
'FrameId' => true,
'Type' => true,
'Delta' => true,
),
),
'frame' => array(
'permission' => 'Events',
'table' => 'Frames',
'limit' => 1,
'selector' => array( array( 'table' => 'Events', 'join' => 'Events.Id = Frames.EventId', 'selector'=>'Events.Id' ), 'Frames.FrameId' ),
'elements' => array(
//'Id' => array( 'sql' => 'Frames.FrameId' ),
'FrameId' => true,
'EventId' => true,
'Type' => true,
'TimeStamp' => true,
'TimeStampShort' => array( 'sql' => "date_format( StartTime, '".MYSQL_FMT_DATETIME_SHORT."' )" ),
'Delta' => true,
'Score' => true,
//'Image' => array( 'postFunc' => 'getFrameImage' ),
),
),
'frameimage' => array(
'permission' => 'Events',
'func' => 'getFrameImage()'
),
'nearframe' => array(
'permission' => 'Events',
'func' => 'getNearFrame()'
),
'nearevents' => array(
'permission' => 'Events',
'func' => 'getNearEvents()'
)
);
'system' => array(
'permission' => 'System',
'table' => 'Monitors',
'limit' => 1,
'elements' => array(
'MonitorCount' => array( 'sql' => 'count(*)' ),
'ActiveMonitorCount' => array( 'sql' => "count(if(Function != 'None',1,NULL))" ),
'State' => array( 'func' => 'daemonCheck()?'.translate('Running').':'.translate('Stopped') ),
'Load' => array( 'func' => 'getLoad()' ),
'Disk' => array( 'func' => 'getDiskPercent()' ),
),
),
'monitor' => array(
'permission' => 'Monitors',
'table' => 'Monitors',
'limit' => 1,
'selector' => 'Monitors.Id',
'elements' => array(
'Id' => array( 'sql' => 'Monitors.Id' ),
'Name' => array( 'sql' => 'Monitors.Name' ),
'Type' => true,
'Function' => true,
'Enabled' => true,
'LinkedMonitors' => true,
'Triggers' => true,
'Device' => true,
'Channel' => true,
'Format' => true,
'Host' => true,
'Port' => true,
'Path' => true,
'Width' => array( 'sql' => 'Monitors.Width' ),
'Height' => array( 'sql' => 'Monitors.Height' ),
'Palette' => true,
'Orientation' => true,
'Brightness' => true,
'Contrast' => true,
'Hue' => true,
'Colour' => true,
'EventPrefix' => true,
'LabelFormat' => true,
'LabelX' => true,
'LabelY' => true,
'LabelSize' => true,
'ImageBufferCount' => true,
'WarmupCount' => true,
'PreEventCount' => true,
'PostEventCount' => true,
'AlarmFrameCount' => true,
'SectionLength' => true,
'FrameSkip' => true,
'MotionFrameSkip' => true,
'MaxFPS' => true,
'AlarmMaxFPS' => true,
'FPSReportInterval' => true,
'RefBlendPerc' => true,
'Controllable' => true,
'ControlId' => true,
'ControlDevice' => true,
'ControlAddress' => true,
'AutoStopTimeout' => true,
'TrackMotion' => true,
'TrackDelay' => true,
'ReturnLocation' => true,
'ReturnDelay' => true,
'DefaultView' => true,
'DefaultRate' => true,
'DefaultScale' => true,
'WebColour' => true,
'Sequence' => true,
'MinEventId' => array( 'sql' => '(SELECT min(Events.Id) FROM Events WHERE Events.MonitorId = Monitors.Id' ),
'MaxEventId' => array( 'sql' => '(SELECT max(Events.Id) FROM Events WHERE Events.MonitorId = Monitors.Id' ),
'TotalEvents' => array( 'sql' => '(SELECT count(Events.Id) FROM Events WHERE Events.MonitorId = Monitors.Id' ),
'Status' => array( 'zmu' => '-m '.escapeshellarg($_REQUEST['id'][0]).' -s' ),
'FrameRate' => array( 'zmu' => '-m '.escapeshellarg($_REQUEST['id'][0]).' -f' ),
),
),
'events' => array(
'permission' => 'Events',
'table' => 'Events',
'selector' => 'Events.MonitorId',
'elements' => array(
'Id' => true,
'Name' => true,
'Cause' => true,
'Notes' => true,
'StartTime' => true,
'StartTimeShort' => array( 'sql' => "date_format( StartTime, '".MYSQL_FMT_DATETIME_SHORT."' )" ),
'EndTime' => true,
'Width' => true,
'Height' => true,
'Length' => true,
'Frames' => true,
'AlarmFrames' => true,
'TotScore' => true,
'AvgScore' => true,
'MaxScore' => true,
),
),
'event' => array(
'permission' => 'Events',
'table' => 'Events',
'limit' => 1,
'selector' => 'Events.Id',
'elements' => array(
'Id' => array( 'sql' => 'Events.Id' ),
'MonitorId' => true,
'MonitorName' => array('sql' => '(SELECT Monitors.Name FROM Monitors WHERE Monitors.Id = Events.MonitorId)'),
'Name' => true,
'Cause' => true,
'StartTime' => true,
'StartTimeShort' => array( 'sql' => "date_format( StartTime, '".MYSQL_FMT_DATETIME_SHORT."' )" ),
'EndTime' => true,
'Width' => true,
'Height' => true,
'Length' => true,
'Frames' => true,
'DefaultVideo' => true,
'AlarmFrames' => true,
'TotScore' => true,
'AvgScore' => true,
'MaxScore' => true,
'Archived' => true,
'Videoed' => true,
'Uploaded' => true,
'Emailed' => true,
'Messaged' => true,
'Executed' => true,
'Notes' => true,
'MinFrameId' => array( 'sql' => '(SELECT min(Frames.FrameId) FROM Frames WHERE EventId=Events.Id)' ),
'MaxFrameId' => array( 'sql' => '(SELECT max(Frames.FrameId) FROM Frames WHERE Events.Id = Frames.EventId)' ),
'MinFrameDelta' => array( 'sql' => '(SELECT min(Frames.Delta) FROM Frames WHERE Events.Id = Frames.EventId)' ),
'MaxFrameDelta' => array( 'sql' => '(SELECT max(Frames.Delta) FROM Frames WHERE Events.Id = Frames.EventId)' ),
),
),
'frames' => array(
'permission' => 'Events',
'table' => 'Frames',
'selector' => 'EventId',
'elements' => array(
'EventId' => true,
'FrameId' => true,
'Type' => true,
'Delta' => true,
),
),
'frame' => array(
'permission' => 'Events',
'table' => 'Frames',
'limit' => 1,
'selector' => array( array( 'table' => 'Events', 'join' => 'Events.Id = Frames.EventId', 'selector'=>'Events.Id' ), 'Frames.FrameId' ),
'elements' => array(
//'Id' => array( 'sql' => 'Frames.FrameId' ),
'FrameId' => true,
'EventId' => true,
'Type' => true,
'TimeStamp' => true,
'TimeStampShort' => array( 'sql' => "date_format( StartTime, '".MYSQL_FMT_DATETIME_SHORT."' )" ),
'Delta' => true,
'Score' => true,
//'Image' => array( 'postFunc' => 'getFrameImage' ),
),
),
'frameimage' => array(
'permission' => 'Events',
'func' => 'getFrameImage()'
),
'nearframe' => array(
'permission' => 'Events',
'func' => 'getNearFrame()'
),
'nearevents' => array(
'permission' => 'Events',
'func' => 'getNearEvents()'
)
);
function collectData() {
global $statusData;
$entitySpec = &$statusData[strtolower(validJsStr($_REQUEST['entity']))];
#print_r( $entitySpec );
if ( !canView( $entitySpec['permission'] ) )
if ( !canView($entitySpec['permission']) )
ajaxError('Unrecognised action or insufficient permissions');
if ( !empty($entitySpec['func']) ) {
$data = eval( 'return( '.$entitySpec['func']." );" );
$data = eval('return('.$entitySpec['func'].');');
} else {
$data = array();
$postFuncs = array();
@ -249,12 +249,12 @@ function collectData() {
$groupSql[] = $elementData['group'];
}
}
}
} # end foreach element
if ( count($fieldSql) ) {
$sql = 'select '.join( ', ', $fieldSql ).' from '.$entitySpec['table'];
$sql = 'SELECT '.join(', ', $fieldSql).' FROM '.$entitySpec['table'];
if ( $joinSql )
$sql .= ' '.join( ' ', array_unique( $joinSql ) );
$sql .= ' '.join(' ', array_unique($joinSql));
if ( $id && !empty($entitySpec['selector']) ) {
$index = 0;
$where = array();
@ -270,10 +270,10 @@ function collectData() {
}
$index++;
}
$sql .= ' WHERE '.join( ' AND ', $where );
$sql .= ' WHERE '.join(' AND ', $where);
}
if ( $groupSql )
$sql .= ' GROUP BY '.join( ',', array_unique( $groupSql ) );
$sql .= ' GROUP BY '.join(',', array_unique($groupSql));
if ( !empty($_REQUEST['sort']) ) {
$sql .= ' ORDER BY ';
$sort_fields = explode(',',$_REQUEST['sort']);
@ -335,31 +335,29 @@ if ( !isset($_REQUEST['layout']) ) {
switch( $_REQUEST['layout'] ) {
case 'xml NOT CURRENTLY SUPPORTED' :
{
header("Content-type: application/xml" );
echo( '<?xml version="1.0" encoding="iso-8859-1"?>'."\n" );
header('Content-type: application/xml');
echo('<?xml version="1.0" encoding="iso-8859-1"?>'."\n");
echo '<'.strtolower($_REQUEST['entity']).">\n";
foreach ( $data as $key=>$value ) {
$key = strtolower( $key );
$key = strtolower($key);
echo "<$key>".htmlentities($value)."</$key>\n";
}
echo '</'.strtolower($_REQUEST['entity']).">\n";
break;
}
case 'json' :
{
$response = array( strtolower(validJsStr($_REQUEST['entity'])) => $data );
if ( isset($_REQUEST['loopback']) )
$response['loopback'] = validJsStr($_REQUEST['loopback']);
ajaxResponse( $response );
ajaxResponse($response);
break;
}
case 'text' :
{
header('Content-type: text/plain' );
echo join( ' ', array_values( $data ) );
break;
}
default:
ZM\Error('Unsupported layout: '. $_REQUEST['layout']);
}
function getFrameImage() {

View File

@ -6,6 +6,15 @@ require_once('Object.php');
class Frame extends ZM_Object {
protected static $table = 'Frames';
protected $defaults = array(
'Id' => null,
'EventId' => 0,
'FrameId' => 0,
'Type' => 'Normal',
'TimeStamp' => 0,
'Delta' => 0.00,
'Score' => 0,
);
public static function find( $parameters = array(), $options = array() ) {
return ZM_Object::_find(get_class(), $parameters, $options);

View File

@ -119,9 +119,8 @@ private $status_fields = array(
if ( !array_key_exists('Control', $this) ) {
if ( $this->ControlId() )
$this->{'Control'} = Control::find_one(array('Id'=>$this->{'ControlId'}));
else
Error("No ControlId".print_r($this,true));
if ( !(array_key_exists('Control', $this) and $this->{'Control'} ) )
if ( !(array_key_exists('Control', $this) and $this->{'Control'}) )
$this->{'Control'} = new Control();
}
return $this->{'Control'};
@ -147,11 +146,14 @@ private $status_fields = array(
}
return $this->defaults[$fn];
} else if ( array_key_exists($fn, $this->status_fields) ) {
$sql = 'SELECT Status,CaptureFPS,AnalysisFPS,CaptureBandwidth
FROM Monitor_Status WHERE MonitorId=?';
$sql = 'SELECT `Status`,`CaptureFPS`,`AnalysisFPS`,`CaptureBandwidth`
FROM `Monitor_Status` WHERE `MonitorId`=?';
$row = dbFetchOne($sql, NULL, array($this->{'Id'}));
if ( !$row ) {
Error('Unable to load Monitor record for Id='.$this->{'Id'});
foreach ( $this->status_fields as $k => $v ) {
$this->{$k} = $v;
}
} else {
foreach ($row as $k => $v) {
$this->{$k} = $v;
@ -241,7 +243,7 @@ private $status_fields = array(
function zmcControl( $mode=false ) {
if ( ! $this->{'Id'} ) {
Warning("Attempt to control a monitor with no Id");
Warning('Attempt to control a monitor with no Id');
return;
}
if ( (!defined('ZM_SERVER_ID')) or ( array_key_exists('ServerId', $this) and (ZM_SERVER_ID==$this->{'ServerId'}) ) ) {
@ -287,13 +289,13 @@ private $status_fields = array(
Error("Except $e thrown trying to restart zmc");
}
} else {
Error("Server not assigned to Monitor in a multi-server setup. Please assign a server to the Monitor.");
Error('Server not assigned to Monitor in a multi-server setup. Please assign a server to the Monitor.');
}
} // end function zmcControl
function zmaControl($mode=false) {
if ( ! $this->{'Id'} ) {
Warning("Attempt to control a monitor with no Id");
Warning('Attempt to control a monitor with no Id');
return;
}
@ -360,7 +362,7 @@ private $status_fields = array(
if ( !array_key_exists('GroupIds', $this) ) {
if ( array_key_exists('Id', $this) and $this->{'Id'} ) {
$this->{'GroupIds'} = dbFetchAll('SELECT GroupId FROM Groups_Monitors WHERE MonitorId=?', 'GroupId', array($this->{'Id'}) );
$this->{'GroupIds'} = dbFetchAll('SELECT `GroupId` FROM `Groups_Monitors` WHERE `MonitorId`=?', 'GroupId', array($this->{'Id'}) );
if ( ! $this->{'GroupIds'} )
$this->{'GroupIds'} = array();
} else {
@ -432,7 +434,7 @@ private $status_fields = array(
} else {
$source = $this->{'Path'};
}
} elseif ( ZM_WEB_FILTER_SOURCE == "NoCredentials" ) {
} elseif ( ZM_WEB_FILTER_SOURCE == 'NoCredentials' ) {
# Filter out sensitive and common items
unset($url_parts['user']);
unset($url_parts['pass']);

View File

@ -39,7 +39,7 @@ class Server extends ZM_Object {
} else if ( $this->Id() ) {
return $this->{'Name'};
}
$result = explode(':',$_SERVER['HTTP_HOST']);
$result = explode(':', $_SERVER['HTTP_HOST']);
return $result[0];
}
@ -88,11 +88,6 @@ class Server extends ZM_Object {
}
public function Url( $port = null ) {
if ( !$this->Id() ) {
# Trying to guess and make up values tends to break proxies. So just return nothing
# so that the resulting url will be something like "?view="
return '';
}
$url = $this->Protocol().'://';
$url .= $this->Hostname();
if ( $port ) {

View File

@ -85,6 +85,11 @@ if ( $action == 'monitor' ) {
$monitor->zmaControl('stop');
$monitor->zmcControl('stop');
}
# These are used in updating zones
$oldW = $monitor->Width();
$oldH = $monitor->Height();
if ( $monitor->save($changes) ) {
// Groups will be added below
@ -92,7 +97,7 @@ if ( $action == 'monitor' ) {
// creating symlinks when symlink already exists reports errors, but is perfectly ok
error_reporting(0);
$OldStorage = $monitor->StorageId();
$OldStorage = $monitor->Storage();
$saferOldName = basename($monitor->Name());
if ( file_exists($OldStorage->Path().'/'.$saferOldName) )
unlink($OldStorage->Path().'/'.$saferOldName);
@ -115,36 +120,75 @@ if ( $action == 'monitor' ) {
if ( isset($changes['Width']) || isset($changes['Height']) ) {
$newW = $_REQUEST['newMonitor']['Width'];
$newH = $_REQUEST['newMonitor']['Height'];
$newA = $newW * $newH;
$oldW = $monitor['Width'];
$oldH = $monitor['Height'];
$oldA = $oldW * $oldH;
$zones = dbFetchAll('SELECT * FROM Zones WHERE MonitorId=?', NULL, array($mid));
foreach ( $zones as $zone ) {
$newZone = $zone;
$points = coordsToPoints($zone['Coords']);
for ( $i = 0; $i < count($points); $i++ ) {
$points[$i]['x'] = intval(($points[$i]['x']*($newW-1))/($oldW-1));
$points[$i]['y'] = intval(($points[$i]['y']*($newH-1))/($oldH-1));
}
$newZone['Coords'] = pointsToCoords($points);
$newZone['Area'] = intval(round(($zone['Area']*$newA)/$oldA));
$newZone['MinAlarmPixels'] = intval(round(($newZone['MinAlarmPixels']*$newA)/$oldA));
$newZone['MaxAlarmPixels'] = intval(round(($newZone['MaxAlarmPixels']*$newA)/$oldA));
$newZone['MinFilterPixels'] = intval(round(($newZone['MinFilterPixels']*$newA)/$oldA));
$newZone['MaxFilterPixels'] = intval(round(($newZone['MaxFilterPixels']*$newA)/$oldA));
$newZone['MinBlobPixels'] = intval(round(($newZone['MinBlobPixels']*$newA)/$oldA));
$newZone['MaxBlobPixels'] = intval(round(($newZone['MaxBlobPixels']*$newA)/$oldA));
$changes = getFormChanges($zone, $newZone, $types);
if ( ($newW == $oldH) and ($newH == $oldW) ) {
foreach ( $zones as $zone ) {
$newZone = $zone;
# Rotation, no change to area etc just swap the coords
$newZone = $zone;
$points = coordsToPoints($zone['Coords']);
for ( $i = 0; $i < count($points); $i++ ) {
$x = $points[$i]['x'];
$points[$i]['x'] = $points[$i]['y'];
$points[$i]['y'] = $x;
if ( count($changes) ) {
dbQuery('UPDATE Zones SET '.implode(', ', $changes).' WHERE MonitorId=? AND Id=?',
array($mid, $zone['Id']));
}
} // end foreach zone
} // end if width and height
if ( $points[$i]['x'] > ($newW-1) ) {
ZM\Warning("Correcting x {$points[$i]['x']} > $newW of zone {$newZone['Name']} as it extends outside the new dimensions");
$points[$i]['x'] = ($newW-1);
}
if ( $points[$i]['y'] > ($newH-1) ) {
ZM\Warning("Correcting y {$points[$i]['y']} $newH of zone {$newZone['Name']} as it extends outside the new dimensions");
$points[$i]['y'] = ($newH-1);
}
}
$newZone['Coords'] = pointsToCoords($points);
$changes = getFormChanges($zone, $newZone, $types);
if ( count($changes) ) {
dbQuery('UPDATE Zones SET '.implode(', ', $changes).' WHERE MonitorId=? AND Id=?',
array($mid, $zone['Id']));
}
} # end foreach zone
} else {
$newA = $newW * $newH;
$oldA = $oldW * $oldH;
foreach ( $zones as $zone ) {
$newZone = $zone;
$points = coordsToPoints($zone['Coords']);
for ( $i = 0; $i < count($points); $i++ ) {
$points[$i]['x'] = intval(($points[$i]['x']*($newW-1))/($oldW-1));
$points[$i]['y'] = intval(($points[$i]['y']*($newH-1))/($oldH-1));
if ( $points[$i]['x'] > ($newW-1) ) {
ZM\Warning("Correcting x of zone {$newZone['Name']} as it extends outside the new dimensions");
$points[$i]['x'] = ($newW-1);
}
if ( $points[$i]['y'] > ($newH-1) ) {
ZM\Warning("Correcting y of zone {$newZone['Name']} as it extends outside the new dimensions");
$points[$i]['y'] = ($newH-1);
}
}
$newZone['Coords'] = pointsToCoords($points);
$newZone['Area'] = intval(round(($zone['Area']*$newA)/$oldA));
$newZone['MinAlarmPixels'] = intval(round(($newZone['MinAlarmPixels']*$newA)/$oldA));
$newZone['MaxAlarmPixels'] = intval(round(($newZone['MaxAlarmPixels']*$newA)/$oldA));
$newZone['MinFilterPixels'] = intval(round(($newZone['MinFilterPixels']*$newA)/$oldA));
$newZone['MaxFilterPixels'] = intval(round(($newZone['MaxFilterPixels']*$newA)/$oldA));
$newZone['MinBlobPixels'] = intval(round(($newZone['MinBlobPixels']*$newA)/$oldA));
$newZone['MaxBlobPixels'] = intval(round(($newZone['MaxBlobPixels']*$newA)/$oldA));
$changes = getFormChanges($zone, $newZone, $types);
if ( count($changes) ) {
dbQuery('UPDATE Zones SET '.implode(', ', $changes).' WHERE MonitorId=? AND Id=?',
array($mid, $zone['Id']));
}
} // end foreach zone
} // end if rotation or just size change
} // end if changes in width or height
} // end if successful save
$restart = true;
} else { // new monitor
@ -170,6 +214,13 @@ if ( $action == 'monitor' ) {
}
}
if ( isset($changes['GroupIds']) ) {
dbQuery('DELETE FROM Groups_Monitors WHERE MonitorId=?', array($mid));
foreach ( $changes['GroupIds'] as $group_id ) {
dbQuery('INSERT INTO Groups_Monitors (GroupId, MonitorId) VALUES (?,?)', array($group_id, $mid));
}
} // end if there has been a change of groups
$restart = true;
} else {
ZM\Logger::Debug('No action due to no changes to Monitor');
@ -180,13 +231,6 @@ if ( $action == 'monitor' ) {
return;
}
if ( isset($changes['GroupIds']) ) {
dbQuery('DELETE FROM Groups_Monitors WHERE MonitorId=?', array($mid));
foreach ( $changes['GroupIds'] as $group_id ) {
dbQuery('INSERT INTO Groups_Monitors (GroupId, MonitorId) VALUES (?,?)', array($group_id, $mid));
}
} // end if there has been a change of groups
if ( ZM_OPT_X10 ) {
$x10Changes = getFormChanges($x10Monitor, $_REQUEST['newX10Monitor']);
@ -205,7 +249,6 @@ if ( $action == 'monitor' ) {
} # end if ZM_OPT_X10
if ( $restart ) {
if ( $monitor->Function() != 'None' and $monitor->Type() != 'WebSite' ) {
$monitor->zmcControl('start');
if ( ($monitor->Function() == 'Modect' or $monitor->Function() == 'Mocord') and $monitor->Enabled() )

View File

@ -79,7 +79,7 @@ function CSPHeaders($view, $nonce) {
}
default: {
// Use Report-Only mode on all other pages.
header("Content-Security-Policy-Report-Only: script-src 'unsafe-inline' 'self' 'nonce-$nonce' $additionalScriptSrc");
header("Content-Security-Policy-Report-Only: script-src 'unsafe-inline' 'self' 'nonce-$nonce' $additionalScriptSrc report-uri https://zmrepo.zoneminder.com");
break;
}
}
@ -1400,8 +1400,8 @@ function getPagination( $pages, $page, $maxShortcuts, $query, $querySep='&amp;'
foreach ( $newPages as $newPage ) {
$pageText .= '<a href="?view='.$view.$querySep.'page='.$newPage.$query.'">'.$newPage.'</a>&nbsp;';
}
} # end if page > 1
}
$pageText .= '-&nbsp;'.$page.'&nbsp;-';
if ( $page < $pages ) {
$newPages = array();
@ -1426,10 +1426,10 @@ function getPagination( $pages, $page, $maxShortcuts, $query, $querySep='&amp;'
if ( false && $page < ($pages-1) ) {
$pageText .= '<a href="?view='.$view.$querySep.'page='.$pages.$query.'">&gt;&gt;</a>';
}
}
} # end if $page < $pages
}
}
return( $pageText );
return $pageText;
}
function sortHeader( $field, $querySep='&amp;' ) {

View File

@ -177,6 +177,7 @@ $SLANG = array(
'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',
'BadNoSaveJPEGsOrVideoWriter' => 'SaveJPEGs and VideoWriter are both set to disabled. Nothing will be recorded!',
'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',

View File

@ -50,7 +50,7 @@
// do this by default, uncomment this if required.
//
// Example
header( "Content-Type: text/html; charset=iso-8859-8-i" );
header( "Content-Type: text/html; charset=UTF-8" );
// You may need to change your locale here if your default one is incorrect for the
// language described in this file, or if you have multiple languages supported.
@ -71,59 +71,59 @@ setlocale( LC_ALL, 'he_IL' ); //All locale settings 4.3.0 and after
// Simple String Replacements
$SLANG = array(
'24BitColour' => 'öáò 24 áéè',
'32BitColour' => 'öáò 32 áéè', // Added - 2011-06-15
'8BitGrey' => 'âååðé àôåø 8 áéè',
'Action' => 'ôòåìä',
'Actual' => 'î÷åøé',
'AddNewControl' => 'äåñó ÷åðèøåì çãù',
'AddNewMonitor' => 'äåñó îåðéèåø çãù',
'24BitColour' => 'צבע 24 ביט',
'32BitColour' => 'צבע 32 ביט', // Added - 2011-06-15
'8BitGrey' => 'גווני אפור 8 ביט',
'Action' => 'פעולה',
'Actual' => 'מקורי',
'AddNewControl' => 'הוסף קונטרול חדש',
'AddNewMonitor' => 'הוסף מוניטור חדש',
'AddNewServer' => 'Add New Server', // Added - 2018-08-30
'AddNewStorage' => 'Add New Storage', // Added - 2018-08-30
'AddNewUser' => 'äåñó îùúîù çãù',
'AddNewZone' => 'äåñó àéæåø çãù',
'Alarm' => 'àæò÷ä',
'AlarmBrFrames' => 'àæò÷ú<br/>ôøééîéí',
'AlarmFrame' => 'àæò÷ú ôøééîéí',
'AlarmFrameCount' => 'ñôéøú àæò÷åú ôøééîéí',
'AlarmLimits' => 'äâáìåú àæò÷ä',
'AddNewUser' => 'הוסף משתמש חדש',
'AddNewZone' => 'הוסף איזור חדש',
'Alarm' => 'אזעקה',
'AlarmBrFrames' => 'אזעקת<br/>פריימים',
'AlarmFrame' => 'אזעקת פריימים',
'AlarmFrameCount' => 'ספירת אזעקות פריימים',
'AlarmLimits' => 'הגבלות אזעקה',
'AlarmMaximumFPS' => 'Alarm Maximum FPS',
'AlarmPx' => 'àæò÷ú Px',
'AlarmRGBUnset' => 'äéðê çééá ìàúçì àæò÷ú öáò',
'AlarmPx' => 'אזעקת Px',
'AlarmRGBUnset' => 'הינך חייב לאתחל אזעקת צבע',
'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18
'Alert' => 'äúøàä',
'All' => 'äëì',
'Alert' => 'התראה',
'All' => 'הכל',
'AnalysisFPS' => 'Analysis FPS', // Added - 2015-07-22
'AnalysisUpdateDelay' => 'Analysis Update Delay', // Added - 2015-07-23
'Apply' => 'äçì',
'ApplyingStateChange' => 'äçì ùéðåé îöá',
'ArchArchived' => 'àøëéá áìáã',
'ArchUnarchived' => 'ìà ìàøëéá áìáã',
'Archive' => 'àøëéá',
'Archived' => 'àåøëá',
'Area' => 'àæåø',
'AreaUnits' => 'àæåø (px/%)',
'Apply' => 'החל',
'ApplyingStateChange' => 'החל שינוי מצב',
'ArchArchived' => 'ארכיב בלבד',
'ArchUnarchived' => 'לא לארכיב בלבד',
'Archive' => 'ארכיב',
'Archived' => 'אורכב',
'Area' => 'אזור',
'AreaUnits' => 'אזור (px/%)',
'AttrAlarmFrames' => 'Alarm Frames',
'AttrArchiveStatus' => 'Archive Status',
'AttrAvgScore' => 'ðé÷åã îîåöò',
'AttrCause' => 'ñéáä',
'AttrAvgScore' => 'ניקוד ממוצע',
'AttrCause' => 'סיבה',
'AttrDiskBlocks' => 'Disk Blocks',
'AttrDiskPercent' => 'Disk Percent',
'AttrDiskSpace' => 'Disk Space', // Added - 2018-08-30
'AttrDuration' => 'îùê æîï',
'AttrDuration' => 'משך זמן',
'AttrEndDate' => 'End Date', // Added - 2018-08-30
'AttrEndDateTime' => 'End Date/Time', // Added - 2018-08-30
'AttrEndTime' => 'End Time', // Added - 2018-08-30
'AttrEndWeekday' => 'End Weekday', // Added - 2018-08-30
'AttrFilterServer' => 'Server Filter is Running On', // Added - 2018-08-30
'AttrFrames' => 'ôøééîéí',
'AttrFrames' => 'פריימים',
'AttrId' => 'Id',
'AttrMaxScore' => 'ðé÷åã î÷ñéîìé',
'AttrMaxScore' => 'ניקוד מקסימלי',
'AttrMonitorId' => 'Monitor Id',
'AttrMonitorName' => 'ùí îåðéèåø',
'AttrMonitorName' => 'שם מוניטור',
'AttrMonitorServer' => 'Server Monitor is Running On', // Added - 2018-08-30
'AttrName' => 'ùí',
'AttrNotes' => 'äòøåú',
'AttrName' => 'שם',
'AttrNotes' => 'הערות',
'AttrStartDate' => 'Start Date', // Added - 2018-08-30
'AttrStartDateTime' => 'Start Date/Time', // Added - 2018-08-30
'AttrStartTime' => 'Start Time', // Added - 2018-08-30
@ -132,13 +132,13 @@ $SLANG = array(
'AttrStorageArea' => 'Storage Area', // Added - 2018-08-30
'AttrStorageServer' => 'Server Hosting Storage', // Added - 2018-08-30
'AttrSystemLoad' => 'System Load',
'AttrTotalScore' => 'ñê ñëåí',
'Auto' => 'àåèå',
'AutoStopTimeout' => 'ôñ÷ æîï òöéøä àåèå',
'AttrTotalScore' => 'סך סכום',
'Auto' => 'אוטו',
'AutoStopTimeout' => 'פסק זמן עצירה אוטו',
'Available' => 'Available', // Added - 2009-03-31
'AvgBrScore' => 'ðé÷åã<br/>îîåöò',
'Background' => 'ø÷ò',
'BackgroundFilter' => 'äøõ îñðï áø÷ò',
'AvgBrScore' => 'ניקוד<br/>ממוצע',
'Background' => 'רקע',
'BackgroundFilter' => 'הרץ מסנן ברקע',
'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
@ -165,30 +165,30 @@ $SLANG = array(
'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',
'BadSourceType' => 'Source Type \"Web Site\" requires the Function to be set to \"Monitor\"', // Added - 2018-08-30
'BadSourceType' => 'Source Type "Web Site" requires the Function to be set to "Monitor"', // Added - 2018-08-30
'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',
'BadWebSitePath' => 'Please enter a complete website url, including the http:// or https:// prefix.', // Added - 2018-08-30
'BadWidth' => 'Width must be set to a valid value',
'Bandwidth' => 'øåçá ôñ',
'Bandwidth' => 'רוחב פס',
'BandwidthHead' => 'Bandwidth', // This is the end of the bandwidth status on the top of the console, different in many language due to phrasing
'BlobPx' => 'Blob Px',
'BlobSizes' => 'Blob Sizes',
'Blobs' => 'Blobs',
'Brightness' => 'áäéøåú',
'Brightness' => 'בהירות',
'Buffer' => 'Buffer', // Added - 2015-04-18
'Buffers' => 'Buffers',
'CSSDescription' => 'Change the default css for this computer', // Added - 2015-04-18
'CanAutoFocus' => 'àôùø äúî÷ãåú àåèåîèé',
'CanAutoFocus' => 'אפשר התמקדות אוטומטי',
'CanAutoGain' => 'Can Auto Gain',
'CanAutoIris' => 'Can Auto Iris',
'CanAutoWhite' => 'Can Auto White Bal.',
'CanAutoZoom' => 'àôùø æåí àåèåîèé',
'CanFocus' => 'àôùø äúî÷ãåú',
'CanFocusAbs' => 'àôùø äúî÷ãåú àáñåìåèé',
'CanFocusCon' => 'àôùø äúî÷ãåú îúîùê',
'CanFocusRel' => 'àôùø äúî÷ãåú éçñé',
'CanAutoZoom' => 'אפשר זום אוטומטי',
'CanFocus' => 'אפשר התמקדות',
'CanFocusAbs' => 'אפשר התמקדות אבסולוטי',
'CanFocusCon' => 'אפשר התמקדות מתמשך',
'CanFocusRel' => 'אפשר התמקדות יחסי',
'CanGain' => 'Can Gain ',
'CanGainAbs' => 'Can Gain Absolute',
'CanGainCon' => 'Can Gain Continuous',
@ -197,142 +197,141 @@ $SLANG = array(
'CanIrisAbs' => 'Can Iris Absolute',
'CanIrisCon' => 'Can Iris Continuous',
'CanIrisRel' => 'Can Iris Relative',
'CanMove' => 'àôùø úðåòä',
'CanMoveAbs' => 'àôùø úðåòä àáñåìåèéú',
'CanMoveCon' => 'àôùø úæåæä îúîùëú',
'CanMove' => 'אפשר תנועה',
'CanMoveAbs' => 'אפשר תנועה אבסולוטית',
'CanMoveCon' => 'אפשר תזוזה מתמשכת',
'CanMoveDiag' => 'Can Move Diagonally',
'CanMoveMap' => 'Can Move Mapped',
'CanMoveRel' => 'àôùø úæåæä éçñéú',
'CanMoveRel' => 'אפשר תזוזה יחסית',
'CanPan' => 'Can Pan' ,
'CanReset' => 'àôùø àúçåì',
'CanReboot' => 'Can Reboot',
'CanReset' => 'אפשר אתחול',
'CanSetPresets' => 'Can Set Presets',
'CanSleep' => 'àôùø îöá ùéðä',
'CanTilt' => 'àôùø æòæåò',
'CanWake' => 'àôùø éöéàä îîöá ùéðä',
'CanSleep' => 'אפשר מצב שינה',
'CanTilt' => 'אפשר זעזוע',
'CanWake' => 'אפשר יציאה ממצב שינה',
'CanWhite' => 'Can White Balance',
'CanWhiteAbs' => 'Can White Bal. Absolute',
'CanWhiteBal' => 'Can White Bal.',
'CanWhiteCon' => 'Can White Bal. Continuous',
'CanWhiteRel' => 'Can White Bal. Relative',
'CanZoom' => 'àôùø æåí',
'CanZoomAbs' => 'àôùø æåí àáñåìåèé',
'CanZoomCon' => 'àôùø æåí îúîùê',
'CanZoomRel' => 'àôùø æåí éçñé',
'Cancel' => 'áèì',
'CanZoom' => 'אפשר זום',
'CanZoomAbs' => 'אפשר זום אבסולוטי',
'CanZoomCon' => 'אפשר זום מתמשך',
'CanZoomRel' => 'אפשר זום יחסי',
'Cancel' => 'בטל',
'CancelForcedAlarm' => 'Cancel Forced Alarm',
'CaptureHeight' => 'Capture Height',
'CaptureMethod' => 'Capture Method', // Added - 2009-02-08
'CapturePalette' => 'Capture Palette',
'CaptureResolution' => 'Capture Resolution', // Added - 2015-04-18
'CaptureWidth' => 'Capture Width',
'Cause' => 'ñéáä',
'Cause' => 'סיבה',
'CheckMethod' => 'Alarm Check Method',
'ChooseDetectedCamera' => 'Choose Detected Camera', // Added - 2009-03-31
'ChooseFilter' => 'áçø îñðï',
'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
'CloneMonitor' => 'Clone', // Added - 2018-08-30
'Close' => 'ñâåø',
'Colour' => 'öáò',
'Command' => 'ô÷åãä',
'Close' => 'סגור',
'Colour' => 'צבע',
'Command' => 'פקודה',
'Component' => 'Component', // Added - 2011-06-16
'ConcurrentFilter' => 'Run filter concurrently', // Added - 2018-08-30
'Config' => 'úöåøä',
'ConfiguredFor' => 'úöåøä òáåø',
'Config' => 'תצורה',
'ConfiguredFor' => 'תצורה עבור',
'ConfirmDeleteEvents' => 'Are you sure you wish to delete the selected events?',
'ConfirmPassword' => 'àùø ñéñîà',
'ConjAnd' => 'å',
'ConjOr' => 'àå',
'Console' => '÷åðñåì',
'ContactAdmin' => 'öåø ÷ùø òí îðäì äîòøëú áùáéì ôøèéí ðåñôéí.',
'Continue' => 'äîùê',
'Contrast' => 'ðéâåãéåú',
'Control' => '÷åðèøåì',
'ControlAddress' => 'ëúåáú ä÷åðèøåì',
'ControlCap' => 'éëåìú ä÷åðèøåì',
'ControlCaps' => 'éëåìåú ä÷åðèøåì',
'ControlDevice' => 'äú÷ï ä÷åðèøåì',
'ControlType' => 'ñåâ ä÷åðèøåì',
'ConfirmPassword' => 'אשר סיסמא',
'ConjAnd' => 'ו',
'ConjOr' => 'או',
'Console' => 'קונסול',
'ContactAdmin' => 'צור קשר עם מנהל המערכת בשביל פרטים נוספים.',
'Continue' => 'המשך',
'Contrast' => 'ניגודיות',
'Control' => 'קונטרול',
'ControlAddress' => 'כתובת הקונטרול',
'ControlCap' => 'יכולת הקונטרול',
'ControlCaps' => 'יכולות הקונטרול',
'ControlDevice' => 'התקן הקונטרול',
'ControlType' => 'סוג הקונטרול',
'Controllable' => 'Controllable',
'Current' => 'Current', // Added - 2015-04-18
'Cycle' => 'îçæåøé',
'CycleWatch' => 'öôééä îçæåøéú',
'Cycle' => 'מחזורי',
'CycleWatch' => 'צפייה מחזורית',
'DateTime' => 'Date/Time', // Added - 2011-06-16
'Day' => 'éåí',
'Day' => 'יום',
'Debug' => 'Debug',
'DefaultRate' => 'Default Rate',
'DefaultScale' => 'Default Scale',
'DefaultView' => 'Default View',
'Deinterlacing' => 'Deinterlacing', // Added - 2015-04-18
'Delay' => 'Delay', // Added - 2015-04-18
'Delete' => 'îç÷',
'DeleteAndNext' => 'îç÷ &amp; äáà',
'DeleteAndPrev' => 'îç÷ &amp; ä÷åãí',
'DeleteSavedFilter' => 'îç÷ îñðï ùîåø',
'Description' => 'úéàåø',
'Delete' => 'מחק',
'DeleteAndNext' => 'מחק & הבא',
'DeleteAndPrev' => 'מחק & הקודם',
'DeleteSavedFilter' => 'מחק מסנן שמור',
'Description' => 'תיאור',
'DetectedCameras' => 'Detected Cameras', // Added - 2009-03-31
'DetectedProfiles' => 'Detected Profiles', // Added - 2015-04-18
'Device' => 'Device', // Added - 2009-02-08
'DeviceChannel' => 'òøåõ ääú÷ï',
'DeviceFormat' => 'úáðéú ääú÷ï',
'DeviceNumber' => 'îñôø ääú÷ï',
'DevicePath' => 'ðúéá ääú÷ï',
'Devices' => 'äú÷ðéí',
'Dimensions' => 'îéîãéí',
'DisableAlarms' => 'ðèøì àæò÷åú',
'Disk' => 'ãéñ÷',
'DeviceChannel' => 'ערוץ ההתקן',
'DeviceFormat' => 'תבנית ההתקן',
'DeviceNumber' => 'מספר ההתקן',
'DevicePath' => 'נתיב ההתקן',
'Devices' => 'התקנים',
'Dimensions' => 'מימדים',
'DisableAlarms' => 'נטרל אזעקות',
'Disk' => 'דיסק',
'Display' => 'Display', // Added - 2011-01-30
'Displaying' => 'Displaying', // Added - 2011-06-16
'DoNativeMotionDetection'=> 'Do Native Motion Detection',
'Donate' => 'úøåí áá÷ùä',
'DonateAlready' => 'ìà, úøîúé ëáø',
'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.<br><br>If you would like to donate please select the option below or go to https://zoneminder.com/donate/ in your browser.<br><br>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' => 'òãééï ìà, äæëø ìà áòåã éåí àçã',
'DonateRemindHour' => 'òãééï ìà, äæëø ìé áòåã ùòä àçú',
'DonateRemindMonth' => 'òãééï ìà, äæëø ìé áòåã çåãù àçã',
'DonateRemindNever' => 'ìà, àðé ìà øåöä ìúøåí, àì úúæëø àåúé',
'DonateRemindWeek' => 'òãééï ìà, äæëø ìé áòåã ùáåò àçã',
'DonateYes' => 'ëï, àðé îòåðééï ìúøåí òëùéå',
'Download' => 'äåøã',
'Donate' => 'תרום בבקשה',
'DonateAlready' => 'לא, תרמתי כבר',
'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.<br><br>If you would like to donate please select the option below or go to http://www.zoneminder.com/donate.html in your browser.<br><br>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' => 'עדיין לא, הזכר לא בעוד יום אחד',
'DonateRemindHour' => 'עדיין לא, הזכר לי בעוד שעה אחת',
'DonateRemindMonth' => 'עדיין לא, הזכר לי בעוד חודש אחד',
'DonateRemindNever' => 'לא, אני לא רוצה לתרום, אל תתזכר אותי',
'DonateRemindWeek' => 'עדיין לא, הזכר לי בעוד שבוע אחד',
'DonateYes' => 'כן, אני מעוניין לתרום עכשיו',
'Download' => 'הורד',
'DownloadVideo' => 'Download Video', // Added - 2018-08-30
'DuplicateMonitorName' => 'Duplicate Monitor Name', // Added - 2009-03-31
'Duration' => 'îùê æîï',
'Edit' => 'òøåê',
'Duration' => 'משך זמן',
'Edit' => 'ערוך',
'EditLayout' => 'Edit Layout', // Added - 2018-08-30
'Email' => 'ãåà"ì',
'EnableAlarms' => 'àôùø àæò÷åú',
'Enabled' => 'àôùø',
'EnterNewFilterName' => 'äæï îñðï çãù',
'Error' => 'ùâéàä',
'Email' => 'דוא"ל',
'EnableAlarms' => 'אפשר אזעקות',
'Enabled' => 'אפשר',
'EnterNewFilterName' => 'הזן מסנן חדש',
'Error' => 'שגיאה',
'ErrorBrackets' => 'Error, please check you have an equal number of opening and closing brackets',
'ErrorValidValue' => 'Error, please check that all terms have a valid value',
'Etc' => 'åëå\'',
'Event' => 'àéøåò',
'EventFilter' => 'îñðï àéøåò',
'EventId' => 'æéäåé àéøåò',
'EventName' => 'ùí àéøåò',
'Etc' => 'וכו\'',
'Event' => 'אירוע',
'EventFilter' => 'מסנן אירוע',
'EventId' => 'זיהוי אירוע',
'EventName' => 'שם אירוע',
'EventPrefix' => 'Event Prefix',
'Events' => 'àéøåòéí',
'Exclude' => 'ììà',
'Execute' => 'áöò',
'Events' => 'אירועים',
'Exclude' => 'ללא',
'Execute' => 'בצע',
'Exif' => 'Embed EXIF data into image', // Added - 2018-08-30
'Export' => 'éöà',
'ExportDetails' => 'éöà ôøèé àéøåò',
'ExportFailed' => 'éöåà ðëùì',
'ExportFormat' => 'éöà úáðéú ÷åáõ',
'Export' => 'יצא',
'ExportDetails' => 'יצא פרטי אירוע',
'ExportFailed' => 'יצוא נכשל',
'ExportFormat' => 'יצא תבנית קובץ',
'ExportFormatTar' => 'Tar',
'ExportFormatZip' => 'Zip',
'ExportFrames' => 'Export Frame Details',
'ExportImageFiles' => 'éöà ÷áöé úîåðä',
'ExportImageFiles' => 'יצא קבצי תמונה',
'ExportLog' => 'Export Log', // Added - 2011-06-17
'ExportMiscFiles' => 'éöà ÷áöéí àçøéí (àí éùðí)',
'ExportOptions' => 'éöà àôùøåéåú',
'ExportMiscFiles' => 'יצא קבצים אחרים (אם ישנם)',
'ExportOptions' => 'יצא אפשרויות',
'ExportSucceeded' => 'Export Succeeded', // Added - 2009-02-08
'ExportVideoFiles' => 'Export Video Files (if present)',
'Exporting' => 'îééöà',
'Exporting' => 'מייצא',
'FPS' => 'fps',
'FPSReportInterval' => 'FPS Report Interval',
'FTP' => 'FTP',
@ -340,22 +339,22 @@ $SLANG = array(
'FastForward' => 'Fast Forward',
'Feed' => 'Feed',
'Ffmpeg' => 'Ffmpeg', // Added - 2009-02-08
'File' => '÷åáõ',
'File' => 'קובץ',
'Filter' => 'Filter', // Added - 2015-04-18
'FilterArchiveEvents' => 'àøëá úåàîéí',
'FilterDeleteEvents' => 'îç÷ úåàîéí',
'FilterEmailEvents' => 'ùìç ãåàø ùì ëì äúåàîéí',
'FilterArchiveEvents' => 'ארכב תואמים',
'FilterDeleteEvents' => 'מחק תואמים',
'FilterEmailEvents' => 'שלח דואר של כל התואמים',
'FilterExecuteEvents' => 'Execute command on all matches',
'FilterLog' => 'Filter log', // Added - 2015-04-18
'FilterMessageEvents' => 'Message details of all matches',
'FilterMoveEvents' => 'Move all matches', // Added - 2018-08-30
'FilterPx' => 'Filter Px',
'FilterUnset' => 'òìéê ìöééï øåçá åâåáä îñðï',
'FilterUnset' => 'עליך לציין רוחב וגובה מסנן',
'FilterUpdateDiskSpace'=> 'Update used disk space', // Added - 2018-08-30
'FilterUploadEvents' => 'òìä àú ëì äúåàîéí',
'FilterVideoEvents' => 'öåø åéãàå ìëì äúåàîéí',
'Filters' => 'îñððéí',
'First' => 'äøàùåï',
'FilterUploadEvents' => 'עלה את כל התואמים',
'FilterVideoEvents' => 'צור וידאו לכל התואמים',
'Filters' => 'מסננים',
'First' => 'הראשון',
'FlippedHori' => 'Flipped Horizontally',
'FlippedVert' => 'Flipped Vertically',
'FnMocord' => 'Mocord', // Added 2013.08.16.
@ -364,25 +363,25 @@ $SLANG = array(
'FnNodect' => 'Nodect', // Added 2013.08.16.
'FnNone' => 'None', // Added 2013.08.16.
'FnRecord' => 'Record', // Added 2013.08.16.
'Focus' => 'äúî÷ã',
'ForceAlarm' => 'äëøç àæò÷ä',
'Format' => 'úáðéú',
'Frame' => 'ôøééí',
'Focus' => 'התמקד',
'ForceAlarm' => 'הכרח אזעקה',
'Format' => 'תבנית',
'Frame' => 'פריים',
'FrameId' => 'Frame Id',
'FrameRate' => 'Frame Rate',
'FrameSkip' => 'ãìâ ôøééí',
'Frames' => 'ôøééîéí',
'Func' => 'ôåð÷',
'Function' => 'ôåð÷öéä',
'FrameSkip' => 'דלג פריים',
'Frames' => 'פריימים',
'Func' => 'פונק',
'Function' => 'פונקציה',
'Gain' => 'Gain',
'General' => 'ëììé',
'General' => 'כללי',
'GenerateDownload' => 'Generate Download', // Added - 2018-08-30
'GenerateVideo' => 'öåø åéãàå',
'GeneratingVideo' => 'îééöø åéãàå',
'GoToZoneMinder' => 'á÷ø ZoneMinder.com',
'Grey' => 'àôåø',
'Group' => '÷áåöä',
'Groups' => '÷áåöåú',
'GenerateVideo' => 'צור וידאו',
'GeneratingVideo' => 'מייצר וידאו',
'GoToZoneMinder' => 'בקר ZoneMinder.com',
'Grey' => 'אפור',
'Group' => 'קבוצה',
'Groups' => 'קבוצות',
'HasFocusSpeed' => 'Has Focus Speed',
'HasGainSpeed' => 'Has Gain Speed',
'HasHomePreset' => 'Has Home Preset',
@ -394,53 +393,53 @@ $SLANG = array(
'HasTurboTilt' => 'Has Turbo Tilt',
'HasWhiteSpeed' => 'Has White Bal. Speed',
'HasZoomSpeed' => 'Has Zoom Speed',
'High' => 'âáåä',
'HighBW' => 'âáåä&nbsp;ø/ô',
'Home' => 'áéú',
'High' => 'גבוה',
'HighBW' => 'גבוה ר/פ',
'Home' => 'בית',
'Hostname' => 'Hostname', // Added - 2018-08-30
'Hour' => 'ùòä',
'Hour' => 'שעה',
'Hue' => 'Hue',
'Id' => 'æéäåé',
'Idle' => 'äîúðä',
'Ignore' => 'äúòìí',
'Image' => 'úîåðä',
'Id' => 'זיהוי',
'Idle' => 'המתנה',
'Ignore' => 'התעלם',
'Image' => 'תמונה',
'ImageBufferSize' => 'Image Buffer Size (frames)',
'Images' => 'úîåðåú',
'In' => 'áúåê',
'Include' => 'ëìåì',
'Inverted' => 'äôåê',
'Images' => 'תמונות',
'In' => 'בתוך',
'Include' => 'כלול',
'Inverted' => 'הפוך',
'Iris' => 'Iris',
'KeyString' => 'îçøåæú úåéí',
'Label' => 'úååéú',
'Language' => 'ùôä',
'Last' => 'àçøåï',
'KeyString' => 'מחרוזת תוים',
'Label' => 'תווית',
'Language' => 'שפה',
'Last' => 'אחרון',
'Layout' => 'Layout', // Added - 2009-02-08
'Level' => 'Level', // Added - 2011-06-16
'Libvlc' => 'Libvlc',
'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'
'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' => 'Line', // Added - 2011-06-16
'LinkedMonitors' => 'îåðéèåøéí î÷åùøéí',
'List' => 'øùéîä',
'LinkedMonitors' => 'מוניטורים מקושרים',
'List' => 'רשימה',
'ListMatches' => 'List Matches', // Added - 2018-08-30
'Load' => 'èòï',
'Local' => 'î÷åîé',
'Load' => 'טען',
'Local' => 'מקומי',
'Log' => 'Log', // Added - 2011-06-16
'LoggedInAs' => 'äúçáø ë',
'LoggedInAs' => 'התחבר כ',
'Logging' => 'Logging', // Added - 2011-06-16
'LoggingIn' => 'îúçáø',
'Login' => 'äúçáø',
'Logout' => 'äúðú÷',
'LoggingIn' => 'מתחבר',
'Login' => 'התחבר',
'Logout' => 'התנתק',
'Logs' => 'Logs', // Added - 2011-06-17
'Low' => 'ðîåê',
'LowBW' => 'ðîåê&nbsp;ø/ô',
'Main' => 'îøëæé',
'Man' => 'îãøéê',
'Manual' => 'îãøéê',
'Mark' => 'ñîï',
'Max' => 'î÷ñ',
'MaxBandwidth' => 'øåçá ôñ î÷ñ',
'MaxBrScore' => 'ðé÷åã<br/>î÷ñéîìé',
'Low' => 'נמוך',
'LowBW' => 'נמוך ר/פ',
'Main' => 'מרכזי',
'Man' => 'מדריך',
'Manual' => 'מדריך',
'Mark' => 'סמן',
'Max' => 'מקס',
'MaxBandwidth' => 'רוחב פס מקס',
'MaxBrScore' => 'ניקוד<br/>מקסימלי',
'MaxFocusRange' => 'Max Focus Range',
'MaxFocusSpeed' => 'Max Focus Speed',
'MaxFocusStep' => 'Max Focus Step',
@ -463,8 +462,8 @@ $SLANG = array(
'MaxZoomSpeed' => 'Max Zoom Speed',
'MaxZoomStep' => 'Max Zoom Step',
'MaximumFPS' => 'Maximum FPS',
'Medium' => 'áéðåðé',
'MediumBW' => 'Medium&nbsp;B/W',
'Medium' => 'בינוני',
'MediumBW' => 'Medium B/W',
'Message' => 'Message', // Added - 2011-06-16
'MinAlarmAreaLtMax' => 'Minimum alarm area should be less than maximum',
'MinAlarmAreaUnset' => 'You must specify the minimum alarm pixel count',
@ -501,19 +500,19 @@ $SLANG = array(
'MinZoomStep' => 'Min Zoom Step',
'Misc' => 'Misc',
'Mode' => 'Mode', // Added - 2015-04-18
'Monitor' => 'îåðéèåø',
'MonitorIds' => 'Monitor&nbsp;Ids',
'Monitor' => 'מוניטור',
'MonitorIds' => 'Monitor Ids',
'MonitorPreset' => 'Monitor Preset',
'MonitorPresetIntro' => 'Select an appropriate preset from the list below.<br><br>Please note that this may overwrite any values you already have configured for this monitor.<br><br>',
'MonitorProbe' => 'Monitor Probe', // Added - 2009-03-31
'MonitorProbeIntro' => 'The list below shows detected analog and network cameras and whether they are already being used or available for selection.<br/><br/>Select the desired entry from the list below.<br/><br/>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.<br/><br/>', // Added - 2009-03-31
'Monitors' => 'îåðéèåøéí',
'Monitors' => 'מוניטורים',
'Montage' => 'Montage',
'MontageReview' => 'Montage Review', // Added - 2018-08-30
'Month' => 'çåãù',
'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.
@ -524,52 +523,52 @@ $SLANG = array(
'MustConfirmPassword' => 'You must confirm the password',
'MustSupplyPassword' => 'You must supply a password',
'MustSupplyUsername' => 'You must supply a username',
'Name' => 'ùí',
'Near' => 'ìéã',
'Network' => 'øùú',
'New' => 'çãù',
'NewGroup' => '÷áåöä çãùä',
'NewLabel' => 'úååéú çãùä',
'NewPassword' => 'ñéñîà çãùä',
'NewState' => 'îöá çãù',
'NewUser' => 'îùúîù çãù',
'Next' => 'äáà',
'No' => 'ìà',
'Name' => 'שם',
'Near' => 'ליד',
'Network' => 'רשת',
'New' => 'חדש',
'NewGroup' => 'קבוצה חדשה',
'NewLabel' => 'תווית חדשה',
'NewPassword' => 'סיסמא חדשה',
'NewState' => 'מצב חדש',
'NewUser' => 'משתמש חדש',
'Next' => 'הבא',
'No' => 'לא',
'NoDetectedCameras' => 'No Detected Cameras', // Added - 2009-03-31
'NoDetectedProfiles' => 'No Detected Profiles', // Added - 2018-08-30
'NoFramesRecorded' => 'There are no frames recorded for this event',
'NoGroup' => 'ììà ÷áåöä',
'NoGroup' => 'ללא קבוצה',
'NoSavedFilters' => 'NoSavedFilters',
'NoStatisticsRecorded' => 'There are no statistics recorded for this event/frame',
'None' => 'øé÷',
'NoneAvailable' => 'áìúé æîéï',
'Normal' => 'ðåøîìé',
'None' => 'ריק',
'NoneAvailable' => 'בלתי זמין',
'Normal' => 'נורמלי',
'Notes' => 'Notes',
'NumPresets' => 'Num Presets',
'Off' => 'ëáåé',
'On' => 'ãìå÷',
'Off' => 'כבוי',
'On' => 'דלוק',
'OnvifCredentialsIntro'=> 'Please supply user name and password for the selected camera.<br/>If no user has been created for the camera then the user given here will be created with the given password.<br/><br/>', // 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.<br/><br/>Select the desired entry from the list below.<br/><br/>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.<br/><br/>', // Added - 2015-04-18
'OpEq' => 'ùååä ì',
'OpGt' => 'âãåì î',
'OpEq' => 'שווה ל',
'OpGt' => 'גדול מ',
'OpGtEq' => 'greater than or equal to',
'OpIn' => 'in set',
'OpIs' => 'is', // Added - 2018-08-30
'OpIsNot' => 'is not', // Added - 2018-08-30
'OpLt' => 'ôçåú î',
'OpLt' => 'פחות מ',
'OpLtEq' => 'less than or equal to',
'OpMatches' => 'matches',
'OpNe' => 'àéðå ùååä',
'OpNe' => 'אינו שווה',
'OpNotIn' => 'not in set',
'OpNotMatches' => 'àéðå úåàí',
'Open' => 'ôúç',
'OpNotMatches' => 'אינו תואם',
'Open' => 'פתח',
'OptionHelp' => 'OptionHelp',
'OptionRestartWarning' => 'These changes may not come into effect fully\nwhile the system is running. When you have\nfinished making your changes please ensure that\nyou restart ZoneMinder.',
'OptionalEncoderParam' => 'Optional Encoder Parameters', // Added - 2018-08-30
'Options' => 'àôùøåéåú',
'Options' => 'אפשרויות',
'OrEnterNewName' => 'or enter new name',
'Order' => 'îéåï',
'Order' => 'מיון',
'Orientation' => 'Orientation',
'Out' => 'Out',
'OverwriteExisting' => 'Overwrite Existing',
@ -578,27 +577,27 @@ $SLANG = array(
'PanLeft' => 'Pan Left',
'PanRight' => 'Pan Right',
'PanTilt' => 'Pan/Tilt',
'Parameter' => 'ôøîèø',
'Password' => 'ñéñîà',
'Parameter' => 'פרמטר',
'Password' => 'סיסמא',
'PasswordsDifferent' => 'The new and confirm passwords are different',
'Paths' => 'ðúéáéí',
'Paths' => 'נתיבים',
'Pause' => 'Pause',
'Phone' => 'èìôåï',
'PhoneBW' => 'ø/ô&nbsp;èìôåï',
'Phone' => 'טלפון',
'PhoneBW' => 'ר/פ טלפון',
'Pid' => 'PID', // Added - 2011-06-16
'PixelDiff' => 'Pixel Diff',
'Pixels' => 'ôé÷ñìéí',
'Pixels' => 'פיקסלים',
'Play' => 'Play',
'PlayAll' => 'ðâï äëì',
'PleaseWait' => 'äîúï áá÷ùä',
'PlayAll' => 'נגן הכל',
'PleaseWait' => 'המתן בבקשה',
'Plugins' => 'Plugins',
'Point' => 'ð÷åãä',
'Point' => 'נקודה',
'PostEventImageBuffer' => 'Post Event Image Count',
'PreEventImageBuffer' => 'Pre Event Image Count',
'PreserveAspect' => 'Preserve Aspect Ratio',
'Preset' => 'Preset',
'Presets' => 'Presets',
'Prev' => 'ä÷åãí',
'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 .<br/><br/>Select the desired entry from the list below.<br/><br/>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.<br/><br/>', // Added - 2015-04-18
@ -606,188 +605,188 @@ $SLANG = array(
'Protocol' => 'Protocol',
'RTSPDescribe' => 'Use RTSP Response Media URL', // Added - 2018-08-30
'RTSPTransport' => 'RTSP Transport Protocol', // Added - 2018-08-30
'Rate' => 'ãéøåâ',
'Real' => 'àîéúé',
'Rate' => 'דירוג',
'Real' => 'אמיתי',
'RecaptchaWarning' => 'Your reCaptcha secret key is invalid. Please correct it, or reCaptcha will not work', // Added - 2018-08-30
'Record' => 'ä÷ìèä',
'Record' => 'הקלטה',
'RecordAudio' => 'Whether to store the audio stream when saving an event.', // Added - 2018-08-30
'RefImageBlendPct' => 'Reference Image Blend %ge',
'Refresh' => 'øòðåï',
'Remote' => 'îøåç÷',
'RemoteHostName' => 'ùí îàøç îøåç÷',
'RemoteHostPath' => 'ðúéá îàøç îøåç÷',
'RemoteHostPort' => 'ôåøè îàøç îøåç÷',
'Refresh' => 'רענון',
'Remote' => 'מרוחק',
'RemoteHostName' => 'שם מארח מרוחק',
'RemoteHostPath' => 'נתיב מארח מרוחק',
'RemoteHostPort' => 'פורט מארח מרוחק',
'RemoteHostSubPath' => 'Remote Host SubPath', // Added - 2009-02-08
'RemoteImageColours' => 'Remote Image Colours',
'RemoteMethod' => 'Remote Method', // Added - 2009-02-08
'RemoteProtocol' => 'Remote Protocol', // Added - 2009-02-08
'Rename' => 'ùðä ùí',
'Rename' => 'שנה שם',
'Replay' => 'Replay',
'ReplayAll' => 'All Events',
'ReplayGapless' => 'Gapless Events',
'ReplaySingle' => 'Single Event',
'ReportEventAudit' => 'Audit Events Report', // Added - 2018-08-30
'Reset' => 'àôñ',
'Reset' => 'אפס',
'ResetEventCounts' => 'Reset Event Counts',
'Restart' => 'àúçì',
'Restarting' => 'îàúçì',
'Restart' => 'אתחל',
'Restarting' => 'מאתחל',
'RestrictedCameraIds' => 'Restricted Camera Ids',
'RestrictedMonitors' => 'Restricted Monitors',
'ReturnDelay' => 'çæøä îäùäéä',
'ReturnLocation' => 'îé÷åí çæøä',
'ReturnDelay' => 'חזרה מהשהיה',
'ReturnLocation' => 'מיקום חזרה',
'Rewind' => 'Rewind',
'RotateLeft' => 'ñåáá ùîàìä',
'RotateRight' => 'ñåáá éîéðä',
'RotateLeft' => 'סובב שמאלה',
'RotateRight' => 'סובב ימינה',
'RunLocalUpdate' => 'Please run zmupdate.pl to update', // Added - 2011-05-25
'RunMode' => 'öåøú øéöä',
'RunState' => 'îöá øéöä',
'Running' => 'îøéõ',
'Save' => 'ùîåø',
'SaveAs' => 'ùîåø áùí',
'SaveFilter' => 'ùîåø îñðï',
'RunMode' => 'צורת ריצה',
'RunState' => 'מצב ריצה',
'Running' => 'מריץ',
'Save' => 'שמור',
'SaveAs' => 'שמור בשם',
'SaveFilter' => 'שמור מסנן',
'SaveJPEGs' => 'Save JPEGs', // Added - 2018-08-30
'Scale' => 'ñ÷àìä',
'Score' => 'ðé÷åã',
'Secs' => 'ùðéåú',
'Sectionlength' => 'àåøê ÷èò',
'Select' => 'áçø',
'Scale' => 'סקאלה',
'Score' => 'ניקוד',
'Secs' => 'שניות',
'Sectionlength' => 'אורך קטע',
'Select' => 'בחר',
'SelectFormat' => 'Select Format', // Added - 2011-06-17
'SelectLog' => 'Select Log', // Added - 2011-06-17
'SelectMonitors' => 'áçø îåðéèåøéí',
'SelectMonitors' => 'בחר מוניטורים',
'SelfIntersecting' => 'Polygon edges must not intersect',
'Set' => '÷áò',
'Set' => 'קבע',
'SetNewBandwidth' => 'Set New Bandwidth',
'SetPreset' => 'Set Preset',
'Settings' => 'äâãøåú',
'Settings' => 'הגדרות',
'ShowFilterWindow' => 'Show Filter Window',
'ShowTimeline' => 'Show Timeline',
'SignalCheckColour' => 'Signal Check Colour',
'SignalCheckPoints' => 'Signal Check Points', // Added - 2018-08-30
'Size' => 'âåãì',
'Size' => 'גודל',
'SkinDescription' => 'Change the default skin for this computer', // Added - 2011-01-30
'Sleep' => 'ùéðä',
'Sleep' => 'שינה',
'SortAsc' => 'Asc',
'SortBy' => 'Sort by',
'SortDesc' => 'Desc',
'Source' => 'î÷åø',
'Source' => 'מקור',
'SourceColours' => 'Source Colours', // Added - 2009-02-08
'SourcePath' => 'Source Path', // Added - 2009-02-08
'SourceType' => 'ñåâ î÷åø',
'Speed' => 'îäéøåú',
'SpeedHigh' => 'îäéøåú âáåää',
'SpeedLow' => 'îäéøåú ðîåëä',
'SpeedMedium' => 'îöìîä áéðåðéú',
'SpeedTurbo' => 'îäéøåú èåøáå',
'Start' => 'äúçì',
'State' => 'îöá',
'Stats' => 'îöáéí',
'Status' => 'ñèèåñ',
'SourceType' => 'סוג מקור',
'Speed' => 'מהירות',
'SpeedHigh' => 'מהירות גבוהה',
'SpeedLow' => 'מהירות נמוכה',
'SpeedMedium' => 'מצלמה בינונית',
'SpeedTurbo' => 'מהירות טורבו',
'Start' => 'התחל',
'State' => 'מצב',
'Stats' => 'מצבים',
'Status' => 'סטטוס',
'StatusConnected' => 'Capturing', // Added - 2018-08-30
'StatusNotRunning' => 'Not Running', // Added - 2018-08-30
'StatusRunning' => 'Not Capturing', // Added - 2018-08-30
'StatusUnknown' => 'Unknown', // Added - 2018-08-30
'Step' => 'öòã',
'Step' => 'צעד',
'StepBack' => 'Step Back',
'StepForward' => 'Step Forward',
'StepLarge' => 'öòã âãåì',
'StepMedium' => 'öòã áéðåðé',
'StepNone' => 'àì úöòã',
'StepSmall' => 'öòã ÷èï',
'Stills' => 'ñèéìñ',
'Stop' => 'òöåø',
'Stopped' => 'ðòöø',
'StepLarge' => 'צעד גדול',
'StepMedium' => 'צעד בינוני',
'StepNone' => 'אל תצעד',
'StepSmall' => 'צעד קטן',
'Stills' => 'סטילס',
'Stop' => 'עצור',
'Stopped' => 'נעצר',
'StorageArea' => 'Storage Area', // Added - 2018-08-30
'StorageScheme' => 'Scheme', // Added - 2018-08-30
'Stream' => 'ñèøéí',
'Stream' => 'סטרים',
'StreamReplayBuffer' => 'Stream Replay Image Buffer',
'Submit' => 'Submit',
'System' => 'îòøëú',
'System' => 'מערכת',
'SystemLog' => 'System Log', // Added - 2011-06-16
'TargetColorspace' => 'Target colorspace', // Added - 2015-04-18
'Tele' => 'èì',
'Tele' => 'טל',
'Thumbnail' => 'Thumbnail',
'Tilt' => 'Tilt',
'Time' => 'æîï',
'TimeDelta' => 'ùéðåé áæîï',
'TimeStamp' => 'çåúîú æîï',
'Timeline' => '÷å æîï',
'Time' => 'זמן',
'TimeDelta' => 'שינוי בזמן',
'TimeStamp' => 'חותמת זמן',
'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.
'Timestamp' => 'çåúîú æîï',
'Timestamp' => 'חותמת זמן',
'TimestampLabelFormat' => 'Timestamp Label Format',
'TimestampLabelSize' => 'Font Size', // Added - 2018-08-30
'TimestampLabelX' => 'Timestamp Label X',
'TimestampLabelY' => 'Timestamp Label Y',
'Today' => 'äéåí',
'Tools' => 'ëìéí',
'Today' => 'היום',
'Tools' => 'כלים',
'Total' => 'Total', // Added - 2011-06-16
'TotalBrScore' => 'ñê<br/>ðé÷åã',
'TotalBrScore' => 'סך<br/>ניקוד',
'TrackDelay' => 'Track Delay',
'TrackMotion' => 'Track Motion',
'Triggers' => 'èøéâøéí',
'Triggers' => 'טריגרים',
'TurboPanSpeed' => 'Turbo Pan Speed',
'TurboTiltSpeed' => 'Turbo Tilt Speed',
'Type' => 'ñåâ',
'Unarchive' => 'áìúé àøëéá',
'Type' => 'סוג',
'Unarchive' => 'בלתי ארכיב',
'Undefined' => 'Undefined', // Added - 2009-02-08
'Units' => 'éçéãåú',
'Unknown' => 'áìúé éãåò',
'Update' => 'òãëåï',
'UpdateAvailable' => 'òãëåï ìæåï-îéðãø àôùøé.',
'UpdateNotNecessary' => 'òãëåï àéðå äëøçé.',
'Units' => 'יחידות',
'Unknown' => 'בלתי ידוע',
'Update' => 'עדכון',
'UpdateAvailable' => 'עדכון לזון-מינדר אפשרי.',
'UpdateNotNecessary' => 'עדכון אינו הכרחי.',
'Updated' => 'Updated', // Added - 2011-06-16
'Upload' => 'Upload', // Added - 2011-08-23
'UseFilter' => 'ùéîåù áîñðï',
'UseFilterExprsPost' => '&nbsp;filter&nbsp;expressions', // This is used at the end of the phrase 'use N filter expressions'
'UseFilterExprsPre' => 'ùéîåù&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
'UseFilter' => 'שימוש במסנן',
'UseFilterExprsPost' => ' filter expressions', // 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',
'User' => 'îùúîù',
'Username' => 'ùí îùúîù',
'Users' => 'îùúîùéí',
'User' => 'משתמש',
'Username' => 'שם משתמש',
'Users' => 'משתמשים',
'V4L' => 'V4L', // Added - 2015-04-18
'V4LCapturesPerFrame' => 'Captures Per Frame', // Added - 2015-04-18
'V4LMultiBuffer' => 'Multi Buffering', // Added - 2015-04-18
'Value' => 'òøê',
'Version' => 'âéøñä',
'VersionIgnore' => 'äúòìí îâéøñä æå',
'VersionRemindDay' => 'äæëø ìé áòåã éåí àçã',
'VersionRemindHour' => 'äæëø ìé áòåã ùòä àçú',
'Value' => 'ערך',
'Version' => 'גירסה',
'VersionIgnore' => 'התעלם מגירסה זו',
'VersionRemindDay' => 'הזכר לי בעוד יום אחד',
'VersionRemindHour' => 'הזכר לי בעוד שעה אחת',
'VersionRemindNever' => 'Don\'t remind about new versions',
'VersionRemindWeek' => 'Remind again in 1 week',
'Video' => 'åéãàå',
'VideoFormat' => 'úáðéú åéãàå',
'Video' => 'וידאו',
'VideoFormat' => 'תבנית וידאו',
'VideoGenFailed' => 'Video Generation Failed!',
'VideoGenFiles' => 'Existing Video Files',
'VideoGenNoFiles' => 'No Video Files Found',
'VideoGenParms' => 'Video Generation Parameters',
'VideoGenSucceeded' => 'Video Generation Succeeded!',
'VideoSize' => 'âåãì åéãàå',
'VideoSize' => 'גודל וידאו',
'VideoWriter' => 'Video Writer', // Added - 2018-08-30
'View' => 'äöâ',
'ViewAll' => 'äöâ äëì',
'ViewEvent' => 'äöâ àéøåò',
'View' => 'הצג',
'ViewAll' => 'הצג הכל',
'ViewEvent' => 'הצג אירוע',
'ViewPaged' => 'View Paged',
'Wake' => 'äòø',
'Wake' => 'הער',
'WarmupFrames' => 'Warmup Frames',
'Watch' => 'öôä',
'Web' => 'àéðèøðè',
'WebColour' => 'öáò àéðèøðè',
'Watch' => 'צפה',
'Web' => 'אינטרנט',
'WebColour' => 'צבע אינטרנט',
'WebSiteUrl' => 'Website URL', // Added - 2018-08-30
'Week' => 'ùáåò',
'White' => 'ìáï',
'Week' => 'שבוע',
'White' => 'לבן',
'WhiteBalance' => 'White Balance',
'Wide' => 'øçá',
'Wide' => 'רחב',
'X' => 'X',
'X10' => 'X10',
'X10ActivationString' => 'X10 Activation String',
'X10InputAlarmString' => 'X10 Input Alarm String',
'X10OutputAlarmString' => 'X10 Output Alarm String',
'Y' => 'Y',
'Yes' => 'ëï',
'YouNoPerms' => 'àéï ìê äøùàä ìäéëðñ ìî÷åø æä.',
'Zone' => 'àæåø',
'Yes' => 'כן',
'YouNoPerms' => 'אין לך הרשאה להיכנס למקור זה.',
'Zone' => 'אזור',
'ZoneAlarmColour' => 'Alarm Colour (Red/Green/Blue)',
'ZoneArea' => 'Zone Area',
'ZoneExtendAlarmFrames' => 'Extend Alarm Frame Count',
@ -799,10 +798,10 @@ $SLANG = array(
'ZoneMinMaxPixelThres' => 'Min/Max Pixel Threshold (0-255)',
'ZoneMinderLog' => 'ZoneMinder Log', // Added - 2011-06-17
'ZoneOverloadFrames' => 'Overload Frame Ignore Count',
'Zones' => 'àæåøéí',
'Zoom' => 'æåí',
'ZoomIn' => 'æåí ôðéîä',
'ZoomOut' => 'æåí äçåöä',
'Zones' => 'אזורים',
'Zoom' => 'זום',
'ZoomIn' => 'זום פנימה',
'ZoomOut' => 'זום החוצה',
);
// Complex replacements with formatting and/or placements, must be passed through sprintf

View File

@ -24,7 +24,7 @@ foreach ( $servers as $S ) {
$ServersById[$S->Id()] = $S;
}
session_start();
foreach ( array('Group','Function','ServerId','StorageId','Status','MonitorId','MonitorName','Source') as $var ) {
foreach ( array('GroupId','Function','ServerId','StorageId','Status','MonitorId','MonitorName','Source') as $var ) {
if ( isset($_REQUEST[$var]) ) {
if ( $_REQUEST[$var] != '' ) {
$_SESSION[$var] = $_REQUEST[$var];
@ -60,7 +60,7 @@ $groupSql = '';
if ( count($GroupsById) ) {
$html .= '<span id="groupControl"><label>'. translate('Group') .'</label>';
# This will end up with the group_id of the deepest selection
$group_id = isset($_SESSION['Group']) ? $_SESSION['Group'] : null;
$group_id = isset($_SESSION['GroupId']) ? $_SESSION['GroupId'] : null;
$html .= ZM\Group::get_group_dropdown();
$groupSql = ZM\Group::get_group_sql($group_id);
$html .= '</span>

View File

@ -31,7 +31,6 @@ $Monitor = $Event->Monitor();
$countSql = 'SELECT COUNT(*) AS FrameCount FROM Frames AS F WHERE 1 ';
$frameSql = 'SELECT *, unix_timestamp( TimeStamp ) AS UnixTimeStamp FROM Frames AS F WHERE 1 ';
// override the sort_field handling in parseSort for frames
if ( empty($_REQUEST['sort_field']) )
$_REQUEST['sort_field'] = 'FramesTimeStamp';
@ -100,7 +99,8 @@ if ( !empty($page) ) {
}
$maxShortcuts = 5;
$pagination = getPagination($pages, $page, $maxShortcuts, $sortQuery.'&eid='.$eid.$limitQuery.$filterQuery);
$totalQuery = $sortQuery.'&eid='.$eid.$limitQuery.$filterQuery;
$pagination = getPagination($pages, $page, $maxShortcuts, $totalQuery);
$frames = dbFetchAll($frameSql);
@ -125,11 +125,11 @@ if ( $pagination ) {
if ( $pages > 1 ) {
if ( !empty($page) ) {
?>
<a href="?view=<?php echo $view ?>&amp;page=0<?php echo $filterQuery ?><?php echo $sortQuery.$limitQuery ?>"><?php echo translate('ViewAll') ?></a>
<a href="?view=<?php echo $view ?>&amp;page=0<?php echo $totalQuery ?>"><?php echo translate('ViewAll') ?></a>
<?php
} else {
?>
<a href="?view=<?php echo $view ?>&amp;page=1<?php echo $filterQuery ?><?php echo $sortQuery.$limitQuery ?>"><?php echo translate('ViewPaged') ?></a>
<a href="?view=<?php echo $view ?>&amp;page=1<?php echo $totalQuery ?>"><?php echo translate('ViewPaged') ?></a>
<?php
}
}

View File

@ -10,39 +10,31 @@ var controlOptions = new Object();
$controlTypes = array( ''=>translate('None') );
# Temporary workaround to show all ptz control types regardless of monitor source type
# $sql = "select * from Controls where Type = '".$newMonitor['Type']."'";
$sql = "select * from Controls";
foreach( dbFetchAll( $sql ) as $row ) {
$sql = 'SELECT `Id`,`Name`,`HasHomePreset`,`NumPresets` FROM `Controls` ORDER BY lower(`Name`)';
foreach( dbFetchAll($sql) as $row ) {
$controlTypes[$row['Id']] = $row['Name'];
?>
controlOptions[<?php echo $row['Id'] ?>] = new Array();
<?php
if ( $row['HasHomePreset'] ) {
?>
controlOptions[<?php echo $row['Id'] ?>][0] = '<?php echo translate('Home') ?>';
<?php
} else {
?>
controlOptions[<?php echo $row['Id'] ?>][0] = null;
<?php
}
echo '
controlOptions['.$row['Id'].'] = new Array();
controlOptions['.$row['Id'].'][0] = '.
( $row['HasHomePreset'] ? '\''.translate('Home').'\'' : 'null' ).'
';
for ( $i = 1; $i <= $row['NumPresets']; $i++ ) {
?>
controlOptions[<?php echo $row['Id'] ?>][<?php echo $i ?>] = '<?php echo translate('Preset').' '.$i ?>';
<?php
echo 'controlOptions['. $row['Id'].']['.$i.'] = \''.translate('Preset').' '.$i .'\';
';
}
}
}
} # end foreach row
} # end if ZM_OPT_CONTROL
?>
var monitorNames = new Object();
<?php
$query = empty($_REQUEST['mid']) ? dbQuery('SELECT Name FROM Monitors') : dbQuery('SELECT Name FROM Monitors WHERE Id != ?', array($_REQUEST['mid']) );
if ( $query ) {
while ( $name = dbFetchNext($query, 'Name') ) {
?>
monitorNames['<?php echo validJsStr($name) ?>'] = true;
<?php
} // end foreach
while ( $name = dbFetchNext($query, 'Name') ) {
echo '
monitorNames[\''.validJsStr($name).'\'] = true;
';
} // end foreach
} # end if query
?>
@ -140,6 +132,23 @@ function validateForm( form ) {
alert(errors.join("\n"));
return false;
}
var warnings = new Array();
if ( (form.elements['newMonitor[Function]'].value != 'Monitor') && (form.elements['newMonitor[Function]'].value != 'None') ) {
if ( (form.elements['newMonitor[SaveJPEGs]'].value == '0') && (form.elements['newMonitor[VideoWriter]'].value == '0') ) {
warnings[warnings.length] = "<?php echo translate('BadNoSaveJPEGsOrVideoWriter'); ?>";
}
console.log(form.elements['newMonitor[SaveJPEGs]'].value);
console.log(form.elements['newMonitor[VideoWriter]'].value);
}
console.log(warnings);
if ( warnings.length ) {
if ( !confirm(warnings.join("\n")) ) {
return false;
}
}
return true;
}

View File

@ -25,7 +25,7 @@ function Monitor(monitorData) {
}
};
this.eventHandler = function( event ) {
this.eventHandler = function(event) {
console.log(event);
};
@ -210,7 +210,7 @@ function Monitor(monitorData) {
* @param {*} element - the event data passed by onchange callback
*/
function selectLayout(element) {
console.dir(element);
console.log(element);
layout = $j(element).val();
if ( layout_id = parseInt(layout) ) {
@ -254,7 +254,7 @@ function selectLayout(element) {
if ( layouts[layout_id].Name != 'Freeform' ) { // 'montage_freeform.css' ) {
Cookie.write( 'zmMontageScale', '', {duration: 10*365} );
$('scale').set('value', '');
$('width').set('value', '');
$('width').set('value', 'auto');
for ( var i = 0, length = monitors.length; i < length; i++ ) {
var monitor = monitors[i];
var streamImg = $('liveStream'+monitor.id);
@ -318,7 +318,7 @@ function changeSize() {
Cookie.write('zmMontageScale', '', {duration: 10*365});
Cookie.write('zmMontageWidth', width, {duration: 10*365});
Cookie.write('zmMontageHeight', height, {duration: 10*365});
selectLayout('#zmMontageLayout');
//selectLayout('#zmMontageLayout');
} // end function changeSize()
/**

View File

@ -1,5 +1,5 @@
<?php
xhtmlHeaders(__FILE__, translate('Login') );
xhtmlHeaders(__FILE__, translate('Login'));
?>
<body>
<?php echo getNavBarHTML(); ?>
@ -30,10 +30,10 @@ xhtmlHeaders(__FILE__, translate('Login') );
&& defined('ZM_OPT_GOOG_RECAPTCHA_SECRETKEY')
&& ZM_OPT_USE_GOOG_RECAPTCHA && ZM_OPT_GOOG_RECAPTCHA_SITEKEY && ZM_OPT_GOOG_RECAPTCHA_SECRETKEY)
{
echo "<div class='g-recaptcha' data-sitekey='".ZM_OPT_GOOG_RECAPTCHA_SITEKEY."'></div>";
echo '<div class="g-recaptcha" data-sitekey="'.ZM_OPT_GOOG_RECAPTCHA_SITEKEY.'"></div>';
} ?>
<input class="btn btn-lg btn-primary btn-block" type="submit" value="<?php echo translate('Login') ?>"/>
<button class="btn btn-lg btn-primary btn-block" type="submit"><?php echo translate('Login') ?></button>
</div>
</form>

View File

@ -647,7 +647,6 @@ switch ( $tab ) {
foreach ( getEnumValues('Monitors', 'Function') as $f ) {
$function_options[$f] = translate("Fn$f");
}
ZM\Error("Type: " . $monitor->Type());
echo htmlSelect('newMonitor[Function]', $function_options, $monitor->Function());
?>
</td>

View File

@ -51,7 +51,7 @@ $heights = array(
$scale = '100'; # actual
if ( isset( $_REQUEST['scale'] ) ) {
if ( isset($_REQUEST['scale']) ) {
$scale = validInt($_REQUEST['scale']);
} else if ( isset($_COOKIE['zmMontageScale']) ) {
$scale = $_COOKIE['zmMontageScale'];
@ -63,7 +63,14 @@ if ( ! $scale )
$layouts = ZM\MontageLayout::find(NULL, array('order'=>"lower('Name')"));
$layoutsById = array();
foreach ( $layouts as $l ) {
$layoutsById[$l->Id()] = $l;
if ( $l->Name() == 'Freeform' ) {
$layoutsById[$l->Id()] = $l;
break;
}
}
foreach ( $layouts as $l ) {
if ( $l->Name() != "Freeform" )
$layoutsById[$l->Id()] = $l;
}
session_start();
@ -164,19 +171,19 @@ if ( $showZones ) {
<input type="hidden" name="action" value="Save"/>
<span id="widthControl">
<label><?php echo translate('Width') ?>:</label>
<label><?php echo translate('Width') ?></label>
<?php echo htmlSelect('width', $widths, $options['width'], 'changeSize(this);'); ?>
</span>
<span id="heightControl">
<label><?php echo translate('Height') ?>:</label>
<label><?php echo translate('Height') ?></label>
<?php echo htmlSelect('height', $heights, $options['height'], 'changeSize(this);'); ?>
</span>
<span id="scaleControl">
<label><?php echo translate('Scale') ?>:</label>
<label><?php echo translate('Scale') ?></label>
<?php echo htmlSelect('scale', $scales, $scale, 'changeScale(this);'); ?>
</span>
<span id="layoutControl">
<label for="layout"><?php echo translate('Layout') ?>:</label>
<label for="layout"><?php echo translate('Layout') ?></label>
<?php echo htmlSelect('zmMontageLayout', $layoutsById, $layout_id, array('onchange'=>'selectLayout(this);')); ?>
</span>
<input type="hidden" name="Positions"/>

View File

@ -18,6 +18,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
global $cspNonce;
$skinJsPhpFile = getSkinFile('js/skin.js.php');
$skinJsFile = getSkinFile('js/skin.js');
?>

View File

@ -1,6 +1,6 @@
<?php
//
// ZoneMinder web logging in view file, $Date$, $Revision$
// ZoneMinder web logging in view file
// Copyright (C) 2001-2008 Philip Coombes
//
// This program is free software; you can redistribute it and/or
@ -18,7 +18,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
xhtmlHeaders(__FILE__, translate('LoggingIn') );
xhtmlHeaders(__FILE__, translate('LoggingIn'));
?>
<body>
<div id="page">

View File

@ -18,8 +18,6 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
require_once('includes/Monitor.php');
if ( !canView('Stream') ) {
$view = 'error';
return;
@ -37,6 +35,7 @@ if ( ! visibleMonitor($mid) ) {
return;
}
require_once('includes/Monitor.php');
$monitor = new ZM\Monitor($mid);
#Whether to show the controls button

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!@PERL_EXECUTABLE@ -w
#
# ==========================================================================
#