Skip to content

Commit cbefd3e

Browse files
Merge branch 'ai_server' of github.com:connortechnology/zoneminder into ai_server
2 parents aa41ad1 + 11047d9 commit cbefd3e

File tree

8 files changed

+24
-16
lines changed

8 files changed

+24
-16
lines changed

db/zm_update-1.37.73.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
UPDATE `Config` SET Value='https://telemetry.zoneminder.com/index.php' WHERE Value='https://zmanon:2b2d0b4skps@telemetry.zoneminder.com/zmtelemetry/testing5';

distros/redhat/zoneminder.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
%global zmtargetdistro %{?rhel:el%{rhel}}%{!?rhel:fc%{fedora}}
2121

2222
Name: zoneminder
23-
Version: 1.37.72
23+
Version: 1.37.73
2424
Release: 1%{?dist}
2525
Summary: A camera monitoring and analysis tool
2626
Group: System Environment/Daemons

scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2740,7 +2740,7 @@ our @options = (
27402740
},
27412741
{
27422742
name => 'ZM_TELEMETRY_SERVER_ENDPOINT',
2743-
default => 'https://zmanon:2b2d0b4skps@telemetry.zoneminder.com/zmtelemetry/testing5',
2743+
default => 'https://telemetry.zoneminder.com/index.php',
27442744
description => 'URL that ZoneMinder will send usage data to',
27452745
help => '',
27462746
type => $types{url},

scripts/zmtelemetry.pl.in

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,17 @@ my $show = 0;
5050
# Interval between version checks
5151
my $interval;
5252
my $version;
53+
my $dry_run = 0;
54+
my $verbose;
5355

5456
GetOptions(
55-
force => \$force,
56-
help => \$help,
57-
show => \$show,
58-
interval => \$interval,
59-
version => \$version
57+
force => \$force,
58+
help => \$help,
59+
show => \$show,
60+
interval=> \$interval,
61+
version => \$version,
62+
verbose => \$verbose,
63+
dry_run => \$dry_run,
6064
);
6165

6266
if ($version) {
@@ -76,7 +80,7 @@ if ($show) {
7680
collectData($dbh, \%telemetry);
7781
my $result = jsonEncode(\%telemetry);
7882
print($result);
79-
exit(0);
83+
exit(0) if $dry_run;
8084
}
8185

8286
if (!defined $interval) {
@@ -140,6 +144,7 @@ sub collectData {
140144
my $dbh = shift;
141145
my $telemetry = shift;
142146
$telemetry->{uuid} = getUUID($dbh);
147+
$telemetry->{timezone} = $Config{ZM_TIMEZONE};
143148
@$telemetry{qw(city region country latitude longitude)} = getGeo();
144149
$telemetry->{timestamp} = strftime('%Y-%m-%dT%H:%M:%S%z', localtime());
145150
$telemetry->{monitor_count} = countQuery($dbh, 'Monitors');
@@ -188,7 +193,7 @@ sub sendData {
188193
$ua->proxy('https', $Config{ZM_UPDATE_CHECK_PROXY});
189194
}
190195

191-
Debug("Posting telemetry data to: $server_endpoint");
196+
Debug("Posting telemetry data $msg to: $server_endpoint");
192197

193198
# set custom HTTP request header fields
194199
my $req = HTTP::Request->new(POST => $server_endpoint);
@@ -286,8 +291,8 @@ sub getMonitorRef {
286291
my $dbh = shift;
287292

288293
my $sql = 'SELECT `Id`,`Name`,`Type`,`Capturing`,`Analysing`,`Recording`,`Width`,`Height`,`Colours`,`MaxFPS`,`AlarmMaxFPS`,
289-
(SELECT Name FROM Manufacturers WHERE Manufacturers.Id = ManufacturerId),
290-
(SELECT Name FROM Models WHERE Models.Id = ModelId)
294+
(SELECT Name FROM Manufacturers WHERE Manufacturers.Id = ManufacturerId) AS Manufacturer,
295+
(SELECT Name FROM Models WHERE Models.Id = ModelId) AS Model
291296
FROM `Monitors`';
292297
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
293298
my $res = $sth->execute() or die( "Can't execute: ".$sth->errstr() );

src/zm_ffmpeg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static CodecData enc_codecs[] = {
7474
{ AV_CODEC_ID_H265, "hevc", "h265_ni_quadra_enc", AV_PIX_FMT_YUV420P, AV_PIX_FMT_NI_QUAD, AV_HWDEVICE_TYPE_NI_QUADRA, "-1", nullptr },
7575
{ AV_CODEC_ID_H265, "hevc", "h265_ni_quadra_enc", AV_PIX_FMT_YUV420P, AV_PIX_FMT_NI_QUAD, AV_HWDEVICE_TYPE_NI_QUADRA, "-1", nullptr },
7676
{ AV_CODEC_ID_H264, "h264", "h264_ni_quadra_enc", AV_PIX_FMT_YUV420P, AV_PIX_FMT_NI_QUAD, AV_HWDEVICE_TYPE_NI_QUADRA, "-1", nullptr },
77-
{ AV_CODEC_ID_MJPEG, "mjpeg", "jpeg_ni_quadra_enc", AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NI_QUAD, AV_HWDEVICE_TYPE_NI_QUADRA, "-1", nullptr },
77+
//{ AV_CODEC_ID_MJPEG, "mjpeg", "jpeg_ni_quadra_enc", AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NI_QUAD, AV_HWDEVICE_TYPE_NI_QUADRA, "-1", nullptr },
7878
#endif
7979
{ AV_CODEC_ID_H265, "hevc", "hevc_vaapi", AV_PIX_FMT_YUV420P, AV_PIX_FMT_VAAPI, AV_HWDEVICE_TYPE_VAAPI, nullptr, nullptr },
8080
{ AV_CODEC_ID_H265, "hevc", "hevc_qsv", AV_PIX_FMT_YUV420P, AV_PIX_FMT_QSV, AV_HWDEVICE_TYPE_QSV, nullptr, nullptr },

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.37.72
1+
1.37.73

web/skins/classic/views/js/monitor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ function ControlList_onClick() {
840840

841841
function ObjectDetection_onChange(od_select) {
842842
const od = od_select.value;
843-
if (od == 'none') {
843+
if (od == 'none') {
844844
// Hide other options
845845
$j('#ObjectDetectionModel').hide();
846846
$j('#ObjectDetectionObjectThreshold').hide();
@@ -857,7 +857,7 @@ function ObjectDetection_onChange(od_select) {
857857

858858
od_model_select.innerHTML = '';
859859
for (const [key, value] of Object.entries(od_models[od])) {
860-
let opt = document.createElement('option');
860+
const opt = document.createElement('option');
861861
opt.value = key; // the index
862862
opt.innerHTML = value;
863863
od_model_select.append(opt);

web/skins/classic/views/js/watch.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,9 @@ function monitorsSetScale(id=null) {
13561356
var currentMonitor = monitorStream;
13571357
} else if (typeof monitors !== 'undefined') {
13581358
//used on Montage, Watch & Event page.
1359-
var currentMonitor = monitors.find((o) => { return parseInt(o["id"]) === id; });
1359+
var currentMonitor = monitors.find((o) => {
1360+
return parseInt(o["id"]) === id;
1361+
});
13601362
} else {
13611363
//Stream is missing
13621364
return;

0 commit comments

Comments
 (0)