diff --git a/.gitignore b/.gitignore index e617d937c..3d61b4f54 100644 --- a/.gitignore +++ b/.gitignore @@ -124,6 +124,7 @@ src/zmc src/zmf src/zms src/zmu +src/zm_rtsp_server src/zoneminder-zmc.8 src/zoneminder-zmc.8.gz src/zoneminder-zmf.8 diff --git a/scripts/zmfilter.pl.in b/scripts/zmfilter.pl.in index 64a20b4d5..1e62cb229 100644 --- a/scripts/zmfilter.pl.in +++ b/scripts/zmfilter.pl.in @@ -399,7 +399,6 @@ sub checkFilter { ) { $Event->save(); } - $ZoneMinder::Database::dbh->commit() if !$$filter{LockRows}; } # end if UpdateDiskSpace } # end foreach event ZoneMinder::Database::end_transaction($dbh, $in_transaction) if $$filter{LockRows}; diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index 6415b2134..b122e0f2b 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -61,13 +61,15 @@ static enum AVPixelFormat find_fmt_by_hw_type(const enum AVHWDeviceType type) { case AV_HWDEVICE_TYPE_DXVA2: return AV_PIX_FMT_DXVA2_VLD; case AV_HWDEVICE_TYPE_D3D11VA: - return = AV_PIX_FMT_D3D11; + return AV_PIX_FMT_D3D11; case AV_HWDEVICE_TYPE_VDPAU: return AV_PIX_FMT_VDPAU; case AV_HWDEVICE_TYPE_CUDA: return AV_PIX_FMT_CUDA; +#ifdef AV_HWDEVICE_TYPE_MMAL case AV_HWDEVICE_TYPE_MMAL: return AV_PIX_FMT_MMAL; +#endif case AV_HWDEVICE_TYPE_VIDEOTOOLBOX: return AV_PIX_FMT_VIDEOTOOLBOX; default: diff --git a/web/lang/en_gb.php b/web/lang/en_gb.php index 8427d5bc6..8b412cd39 100644 --- a/web/lang/en_gb.php +++ b/web/lang/en_gb.php @@ -69,6 +69,11 @@ // setlocale( LC_CTYPE, 'en_GB' ); Character class settings 4.3.0 and after // setlocale( LC_TIME, 'en_GB' ); Date and time formatting 4.3.0 and after +setlocale( LC_TIME, 'en_GB.utf8' ); +define("DATE_FMT_CONSOLE_LONG", "%a %d %b, %Hh%M"); +define( "STRF_FMT_DATETIME_SHORT", "%d/%m/%y %H:%M:%S" ); +define( "STRF_FMT_DATETIME_SHORTER", "%x %H:%M:%S" ); + // Simple String Replacements $SLANG = array( 'SystemLog' => 'System Log', diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index ac9d28b50..68ce50397 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -21,44 +21,50 @@ require_once('includes/Server.php'); require_once('includes/Storage.php'); -if ( !canEdit('Monitors', empty($_REQUEST['mid'])?0:$_REQUEST['mid']) ) { +if (!canEdit('Monitors', empty($_REQUEST['mid'])?0:$_REQUEST['mid'])) { $view = 'error'; return; } $Server = null; -if ( defined('ZM_SERVER_ID') ) { +if (defined('ZM_SERVER_ID')) { $Server = dbFetchOne('SELECT * FROM Servers WHERE Id=?', NULL, array(ZM_SERVER_ID)); } -if ( !$Server ) { +if (!$Server) { $Server = array('Id' => ''); } $mid = null; $monitor = null; -if ( !empty($_REQUEST['mid']) ) { +if (!empty($_REQUEST['mid'])) { $mid = validInt($_REQUEST['mid']); $monitor = new ZM\Monitor($mid); - if ( $monitor and ZM_OPT_X10 ) - $x10Monitor = dbFetchOne('SELECT * FROM TriggersX10 WHERE MonitorId = ?', NULL, array($mid)); + if ($monitor->Id()) { + if (ZM_OPT_X10) { + $x10Monitor = dbFetchOne('SELECT * FROM TriggersX10 WHERE MonitorId = ?', NULL, array($mid)); + } + } else { + $monitor->Name(translate('Monitor').'-'.$mid); + $monitor->WebColour(random_colour()); + } } -if ( !$monitor ) { +if (!$monitor) { $monitor = new ZM\Monitor(); $monitor->Name(translate('Monitor').'-'.getTableAutoInc('Monitors')); $monitor->WebColour(random_colour()); } # end if $_REQUEST['mid'] -if ( isset($_REQUEST['dupId']) ) { +if (isset($_REQUEST['dupId'])) { $monitor = new ZM\Monitor($_REQUEST['dupId']); $monitor->GroupIds(); // have to load before we change the Id - if ( ZM_OPT_X10 ) + if (ZM_OPT_X10) $x10Monitor = dbFetchOne('SELECT * FROM TriggersX10 WHERE MonitorId = ?', NULL, array($_REQUEST['dupId'])); $clonedName = $monitor->Name(); $monitor->Name('Clone of '.$monitor->Name()); $monitor->Id($mid); } -if ( ZM_OPT_X10 && empty($x10Monitor) ) { +if (ZM_OPT_X10 && empty($x10Monitor)) { $x10Monitor = array( 'Activation' => '', 'AlarmInput' => '', @@ -69,14 +75,14 @@ if ( ZM_OPT_X10 && empty($x10Monitor) ) { function fourcc($a, $b, $c, $d) { return ord($a) | (ord($b) << 8) | (ord($c) << 16) | (ord($d) << 24); } -if ( isset($_REQUEST['newMonitor']) ) { +if (isset($_REQUEST['newMonitor'])) { # Update the monitor object with whatever has been set so far. $monitor->set($_REQUEST['newMonitor']); - if ( ZM_OPT_X10 ) + if (ZM_OPT_X10) $newX10Monitor = $_REQUEST['newX10Monitor']; } else { - if ( ZM_OPT_X10 ) + if (ZM_OPT_X10) $newX10Monitor = $x10Monitor; } @@ -349,6 +355,7 @@ $codecs = array( 'MJPEG' => translate('MJPEG'), ); +$monitors = dbFetchAll('SELECT Id, Name FROM Monitors ORDER BY Name,Sequence ASC'); $controls = ZM\Control::find(null, array('order'=>'lower(Name)')); xhtmlHeaders(__FILE__, translate('Monitor').' - '.validHtmlStr($monitor->Name())); @@ -446,6 +453,21 @@ foreach ( $tabs as $name=>$value ) { switch ( $name ) { case 'general' : { + if (!$monitor->Id()) { + $monitor_ids = array(); + foreach ($monitors as $m) { $monitor_ids[] = $m['Id']; } + $available_monitor_ids = array_diff(range(min($monitor_ids),max($monitor_ids)), $monitor_ids); +?> + + +
+10 Available Ids: + + + +Id() ?> @@ -518,7 +540,6 @@ switch ( $name ) { Id() || ($monitor->Id()!= $linked_monitor['Id'])) && visibleMonitor($linked_monitor['Id']) ) {