Merge branch 'master' into storageareas
commit
73ae3f49ed
|
@ -298,7 +298,7 @@ int cURLCamera::Capture( Image &image ) {
|
|||
if(!frameComplete)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cURLCamera::PostCapture() {
|
||||
|
|
|
@ -84,7 +84,7 @@ int FileCamera::PreCapture() {
|
|||
}
|
||||
|
||||
int FileCamera::Capture( Image &image ) {
|
||||
return( image.ReadJpeg( path, colours, subpixelorder )?0:-1 );
|
||||
return( image.ReadJpeg( path, colours, subpixelorder )?1:-1 );
|
||||
}
|
||||
|
||||
int FileCamera::PostCapture() {
|
||||
|
|
|
@ -345,7 +345,8 @@ bool VideoStore::open() {
|
|||
|
||||
AVDictionary *opts = NULL;
|
||||
// av_dict_set(&opts, "movflags", "frag_custom+dash+delay_moov", 0);
|
||||
av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0);
|
||||
// Shiboleth reports that this may break seeking in mp4 before it downloads
|
||||
//av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0);
|
||||
// av_dict_set(&opts, "movflags",
|
||||
// "frag_keyframe+empty_moov+default_base_moof", 0);
|
||||
if ((ret = avformat_write_header(oc, &opts)) < 0) {
|
||||
|
|
|
@ -63,11 +63,11 @@ private $defaults = array(
|
|||
'SectionLength' => 600,
|
||||
'FrameSkip' => 0,
|
||||
'AnalysisFPSLimit' => null,
|
||||
'AnalysisUpdateDelete' => 0,
|
||||
'AnalysisUpdateDelay' => 0,
|
||||
'MaxFPS' => null,
|
||||
'AlarmMaxFPS' => null,
|
||||
'FPSReportIneterval' => 100,
|
||||
'RefBlencPerc' => 6,
|
||||
'FPSReportInterval' => 100,
|
||||
'RefBlendPerc' => 6,
|
||||
'AlarmRefBlendPerc' => 6,
|
||||
'Controllable' => 0,
|
||||
'ControlId' => null,
|
||||
|
@ -78,7 +78,6 @@ private $defaults = array(
|
|||
'TrackDelay' => null,
|
||||
'ReturnLocation' => -1,
|
||||
'ReturnDelay' => null,
|
||||
'DefaultView' => 'Events',
|
||||
'DefaultRate' => 100,
|
||||
'DefaultScale' => 100,
|
||||
'SignalCheckPoints' => 0,
|
||||
|
|
|
@ -18,33 +18,6 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
//
|
||||
|
||||
// I think this is saving a Monitor from ajax...
|
||||
|
||||
if ( isset($_REQUEST['object']) and $_REQUEST['object'] == 'Monitor' ) {
|
||||
if ( $action == 'save' ) {
|
||||
foreach ( $_REQUEST['mids'] as $mid ) {
|
||||
$mid = ValidInt($mid);
|
||||
if ( ! canEdit('Monitors', $mid) ) {
|
||||
ZM\Warning("Cannot edit monitor $mid");
|
||||
continue;
|
||||
}
|
||||
$Monitor = new ZM\Monitor($mid);
|
||||
if ( $Monitor->Type() != 'WebSite' ) {
|
||||
$Monitor->zmaControl('stop');
|
||||
$Monitor->zmcControl('stop');
|
||||
}
|
||||
$Monitor->save($_REQUEST['newMonitor']);
|
||||
if ( $Monitor->Function() != 'None' && $Monitor->Type() != 'WebSite' ) {
|
||||
$Monitor->zmcControl('start');
|
||||
if ( $Monitor->Enabled() ) {
|
||||
$Monitor->zmaControl('start');
|
||||
}
|
||||
}
|
||||
} // end foreach mid
|
||||
$refreshParent = true;
|
||||
} // end if action == save
|
||||
} // end if object is Monitor
|
||||
|
||||
// Monitor edit actions, monitor id derived, require edit permissions for that monitor
|
||||
if ( ! canEdit('Monitors') ) {
|
||||
ZM\Warning("Monitor actions require Monitors Permissions");
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
//
|
||||
// ZoneMinder web action file
|
||||
// Copyright (C) 2019 ZoneMinder LLC
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
//
|
||||
|
||||
// Monitor edit actions, monitor id derived, require edit permissions for that monitor
|
||||
if ( ! canEdit('Monitors') ) {
|
||||
ZM\Warning("Monitor actions require Monitors Permissions");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $action == 'save' ) {
|
||||
foreach ( $_REQUEST['mids'] as $mid ) {
|
||||
$mid = ValidInt($mid);
|
||||
if ( ! canEdit('Monitors', $mid) ) {
|
||||
ZM\Warning("Cannot edit monitor $mid");
|
||||
continue;
|
||||
}
|
||||
$Monitor = new ZM\Monitor($mid);
|
||||
if ( $Monitor->Type() != 'WebSite' ) {
|
||||
$Monitor->zmaControl('stop');
|
||||
$Monitor->zmcControl('stop');
|
||||
}
|
||||
$Monitor->save($_REQUEST['newMonitor']);
|
||||
if ( $Monitor->Function() != 'None' && $Monitor->Type() != 'WebSite' ) {
|
||||
$Monitor->zmcControl('start');
|
||||
if ( $Monitor->Enabled() ) {
|
||||
$Monitor->zmaControl('start');
|
||||
}
|
||||
}
|
||||
} // end foreach mid
|
||||
$refreshParent = true;
|
||||
$view = 'none';
|
||||
} else {
|
||||
ZM\Warning("Unknown action $action in Monitor");
|
||||
} // end if action == Delete
|
||||
?>
|
|
@ -16,10 +16,12 @@ function cycleStart() {
|
|||
}
|
||||
function cycleNext() {
|
||||
monIdx ++;
|
||||
if ( monIdx >= monitorData.length )
|
||||
if ( monIdx >= monitorData.length ) {
|
||||
monIdx = 0;
|
||||
if ( !monitorData[monIdx] )
|
||||
}
|
||||
if ( !monitorData[monIdx] ) {
|
||||
console.log("No monitorData for " + monIdx);
|
||||
}
|
||||
|
||||
window.location.replace('?view=cycle&mid='+monitorData[monIdx].id+'&mode='+mode, cycleRefreshTimeout);
|
||||
}
|
||||
|
@ -71,9 +73,9 @@ function changeSize() {
|
|||
console.log("Did not find liveStream"+monitorData[monIdx].id);
|
||||
}
|
||||
$('scale').set('value', '');
|
||||
Cookie.write('zmCycleScale', '', { duration: 10*365 });
|
||||
Cookie.write('zmCycleWidth', width, { duration: 10*365 });
|
||||
Cookie.write('zmCycleHeight', height, { duration: 10*365 });
|
||||
Cookie.write('zmCycleScale', '', {duration: 10*365});
|
||||
Cookie.write('zmCycleWidth', width, {duration: 10*365});
|
||||
Cookie.write('zmCycleHeight', height, {duration: 10*365});
|
||||
} // end function changeSize()
|
||||
|
||||
function changeScale() {
|
||||
|
|
|
@ -300,9 +300,9 @@ function changeScale() {
|
|||
var scale = $('scale').get('value');
|
||||
$('width').set('value', 'auto');
|
||||
$('height').set('value', 'auto');
|
||||
Cookie.write('zmMontageScale', scale, { duration: 10*365 });
|
||||
Cookie.write('zmMontageWidth', '', { duration: 10*365 });
|
||||
Cookie.write('zmMontageHeight', '', { duration: 10*365 });
|
||||
Cookie.write('zmMontageScale', scale, {duration: 10*365});
|
||||
Cookie.write('zmMontageWidth', '', {duration: 10*365});
|
||||
Cookie.write('zmMontageHeight', '', {duration: 10*365});
|
||||
if ( !scale ) {
|
||||
selectLayout('#zmMontageLayout');
|
||||
return;
|
||||
|
@ -323,7 +323,7 @@ function changeScale() {
|
|||
}
|
||||
// We don't set the frame height because it has the status bar as well
|
||||
//if ( height ) {
|
||||
////monitor_frame.css('height', height+'px');
|
||||
////monitor_frame.css('height', height+'px');
|
||||
//}
|
||||
/*Stream could be an applet so can't use moo tools*/
|
||||
var streamImg = $j('#liveStream'+monitor.id)[0];
|
||||
|
|
|
@ -49,7 +49,7 @@ xhtmlHeaders(__FILE__, translate('Function'));
|
|||
The following monitors will have these settings update when you click Save:<br/><br/>
|
||||
<?php echo implode('<br/>', array_map(function($m){return $m->Id().' ' .$m->Name();}, $monitors)); ?>
|
||||
<form name="contentForm" id="contentForm" method="post" action="?" onsubmit="$j('#contentButtons').hide();return true;">
|
||||
<input type="hidden" name="view" value="none"/>
|
||||
<input type="hidden" name="view" value="monitors"/>
|
||||
<input type="hidden" name="action" value="save"/>
|
||||
<input type="hidden" name="object" value="Monitor"/>
|
||||
<?php
|
||||
|
@ -57,7 +57,7 @@ The following monitors will have these settings update when you click Save:<br/>
|
|||
"\n",
|
||||
array_map(function($m){
|
||||
return '<input type="hidden" name="mids[]" value="'.$m->Id().'"/>';
|
||||
}, $monitors)
|
||||
}, $monitors)
|
||||
);
|
||||
if ( count($ServersById) > 0 ) { ?>
|
||||
<p class="Server"><label><?php echo translate('Server')?></label>
|
||||
|
@ -73,7 +73,7 @@ The following monitors will have these settings update when you click Save:<br/>
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
<p><label><?php echo translate('Function') ?></label>
|
||||
<p class="Function"><label><?php echo translate('Function') ?></label>
|
||||
<?php
|
||||
$options = array();
|
||||
foreach ( getEnumValues('Monitors', 'Function') as $opt ) {
|
||||
|
|
Loading…
Reference in New Issue