Isaac Connor
f947c041df
Fix status of delete button when archived. Change title to say that you can't delete due to archived
2021-05-20 18:54:37 -04:00
Isaac Connor
2f78916ab8
change mem_file to std::string to resolve initialization problems
2021-05-20 16:28:22 -04:00
Isaac Connor
16d9819796
include memory to fix build on centos 7
2021-05-20 15:56:31 -04:00
Isaac Connor
7ad92e51c3
Fix initializers to compile on centos7
2021-05-20 15:56:15 -04:00
Isaac Connor
1d5cdf9965
use ubuntu2004 for hirsute
2021-05-19 21:41:35 -04:00
Isaac Connor
1cd59c189d
Remove debug
2021-05-19 20:48:54 -04:00
Isaac Connor
0b4c35c58e
Merge pull request #3241 from connortechnology/fix_3239
...
Fix 3239
2021-05-19 20:39:42 -04:00
Isaac Connor
1abbc187e9
Merge pull request #3242 from connortechnology/fix_3232_api_monitor_event_summaries
...
Add Event_Summary model so that it is included in monitor listing
2021-05-19 20:32:50 -04:00
Isaac Connor
a4df8df5e5
Fix status of delete button when archived. Change title to say that you can't delete due to archived
2021-05-19 20:32:26 -04:00
Isaac Connor
f6a271c90d
Merge pull request #3240 from connortechnology/fix_3237
...
fix warnings not being displayed
2021-05-19 20:32:11 -04:00
Isaac Connor
db944cbca8
add debug of frame and align to 32bytes
2021-05-19 16:11:25 -04:00
Isaac Connor
e864d00e9a
Merge pull request #3247 from Carbenium/1.36-backports
...
[Backport 1.36] Misc. fixes
2021-05-19 14:05:13 -04:00
Peter Keresztes Schmidt
730a057e18
LocalCamera: Fix some format warnings reported by clang
...
`capturePixFormat` and `imagePixFormat` are no enum entries. Do no try to log them as FourCC.
(cherry picked from commit 77068163a3
)
2021-05-19 19:38:34 +02:00
Peter Keresztes Schmidt
bcb2f63fab
Image: Fix a dynamic-stack-buffer-overflow when filling polygons
...
Make sure we don't read past the end of global_edges when i = 0.
We are moving the elements backwards so at most n_global_edges - 1 elements can be moved.
==6818==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address 0x7ffff888ae00 at pc 0x7fe4fd7be8ae bp 0x7ffff888ac90 sp 0x7ffff888a440
READ of size 96 at 0x7ffff888ae00 thread T0
#0 0x7fe4fd7be8ad in __interceptor_memmove (/lib/x86_64-linux-gnu/libasan.so.5+0x378ad)
#1 0x56524b2dba31 in Image::Fill(unsigned int, int, Polygon const&) /root/zoneminder/src/zm_image.cpp:2514
#2 0x56524af55530 in Monitor::DumpZoneImage(char const*) /root/zoneminder/src/zm_monitor.cpp:1510
#3 0x56524aeb38cb in main /root/zoneminder/src/zmu.cpp:574
#4 0x7fe4fb2b009a in __libc_start_main ../csu/libc-start.c:308
#5 0x56524aeb87a9 in _start (/root/zoneminder/cmake-build-relwithdebinfo-remote/src/zmu+0xf87a9)
(cherry picked from commit 63cea992a0
)
2021-05-19 19:38:24 +02:00
Isaac Connor
d1002fbf91
Merge pull request #3246 from Carbenium/1.36-gcc11
...
[Backport 1.36] Utils: Fix possible name clash between std::clamp and ZM::clamp
2021-05-19 13:32:49 -04:00
Peter Keresztes Schmidt
31adca440f
Utils: Fix possible name clash between std::clamp and ZM::clamp
...
The naming was ambiguous when compinling in C++17 mode.
(cherry picked from commit a335e740f3
)
2021-05-19 19:26:40 +02:00
Isaac Connor
bfd3131e63
try additional unrefs of hw_device_ctx and unref'ing after freeing codec
2021-05-19 10:04:54 -04:00
Isaac Connor
574adf0d1d
Merge branch 'master' into fix_out_of_files_in_encoding
2021-05-18 17:16:35 -04:00
Isaac Connor
db701e0647
Merge pull request #3241 from connortechnology/fix_3239
...
Fix 3239
2021-05-18 12:04:30 -04:00
Isaac Connor
8506a2a75b
Merge pull request #3242 from connortechnology/fix_3232_api_monitor_event_summaries
...
Add Event_Summary model so that it is included in monitor listing
2021-05-18 12:04:15 -04:00
Isaac Connor
6350184346
Add Event_Summary model so that it is included in monitor listing
2021-05-18 11:12:37 -04:00
Isaac Connor
50c0dddb10
Merge pull request #3240 from connortechnology/fix_3237
...
fix warnings not being displayed
2021-05-18 10:53:16 -04:00
Isaac Connor
8c7e004187
Use calculateAuthHash instead of generateAuthHash because we are sessionless and improve output on success and failure. Fixes #2329
2021-05-18 10:52:07 -04:00
Isaac Connor
fffe72a3fa
Split calculateAuthHash out from generateAuthHash. API is sessionless, so we just want provide a means of getting the auth hash without caching or do anything else fancy with it.
2021-05-18 10:51:29 -04:00
Isaac Connor
c1260028af
fix warnings not being displayed
2021-05-18 10:10:19 -04:00
Isaac Connor
8dd1c67c1c
Merge pull request #3238 from Carbenium/gnutls-hash
...
Restore GnuTLS support after VLA removal
2021-05-17 19:13:03 -04:00
Peter Keresztes Schmidt
deb12f5613
Restore GnuTLS support after VLA removal
...
298415fff3
made variables constexpr which led to build failures with GnuTLS.
2021-05-18 00:18:26 +02:00
Isaac Connor
ccc4d4af54
Merge branch 'master' into fix_out_of_files_in_encoding
2021-05-17 16:32:58 -04:00
Isaac Connor
24b3f4c1b7
When de-interlacing, need to wait for decoder. Fixes race
2021-05-17 16:32:33 -04:00
Isaac Connor
68fb87c861
Remove debug
2021-05-17 16:32:33 -04:00
Isaac Connor
26a9797909
code style and remove orientation setting when encoding. frames are already rotated
2021-05-17 16:32:33 -04:00
Isaac Connor
e01fcf1e94
Only set rotation if doing passthrough. undef hw_device_ctx in Close.
2021-05-17 16:30:33 -04:00
Isaac Connor
56a1e8d13b
cleanup CheckSignal, set usedsubpixorder
2021-05-17 16:29:57 -04:00
Isaac Connor
91b23a8760
Merge pull request #3235 from Carbenium/vla
...
Remove variable-length arrays from the codebase
2021-05-17 16:22:32 -04:00
Isaac Connor
f52d4c261c
Merge pull request #3236 from Carbenium/wformat
...
LocalCamera: Fix some format warnings reported by clang
2021-05-17 16:12:15 -04:00
Peter Keresztes Schmidt
c8f2a813e3
Build: Enable VLA warnings
...
VLAs (variable-length arrays) are a C99 feature and were never standardised for C++.
There are better alternatives in C++ (mainly std::vector). Enable the warnings
so no new ones can be introduced.
2021-05-17 22:12:04 +02:00
Peter Keresztes Schmidt
298415fff3
Remove remaining usages of VLAs
2021-05-17 22:12:04 +02:00
Peter Keresztes Schmidt
77068163a3
LocalCamera: Fix some format warnings reported by clang
...
`capturePixFormat` and `imagePixFormat` are no enum entries. Do no try to log them as FourCC.
2021-05-17 20:37:37 +02:00
Peter Keresztes Schmidt
c0017a5263
Image: Move Edge class to its own namespace
...
The Edge class is an implementation detail of the scan-line polygon filling algorithm.
Tuck it away in the newly created PolygonFill namespace.
2021-05-17 20:20:33 +02:00
Peter Keresztes Schmidt
6642ca4515
Image: Eliminate VLAs from polygon fill algorithm implementation
2021-05-17 20:16:55 +02:00
Peter Keresztes Schmidt
a335e740f3
Utils: Fix possible name clash between std::clamp and ZM::clamp
...
The naming was ambiguous when compinling in C++17 mode.
2021-05-17 10:46:50 +02:00
Isaac Connor
4ee234293a
Merge branch 'master' into fix_out_of_files_in_encoding
2021-05-16 17:05:51 -04:00
Isaac Connor
2d9161551d
code style and remove orientation setting when encoding. frames are already rotated
2021-05-16 17:05:40 -04:00
Isaac Connor
e18f9676cd
Bump version to new 1.37 dev version
2021-05-16 13:55:01 -04:00
Isaac Connor
bd7a4fd552
Add closing the codec to hopefully free the file handles in use in hwaccel
2021-05-16 13:53:56 -04:00
Isaac Connor
23312a36b4
Merge pull request #3234 from Carbenium/poly
...
Rework API of geometry classes
2021-05-16 13:53:20 -04:00
Peter Keresztes Schmidt
b1de220958
Polygon: Perform clip operation on existing object instead of returning a new clipped one
2021-05-16 19:42:41 +02:00
Peter Keresztes Schmidt
63cea992a0
Image: Fix a dynamic-stack-buffer-overflow when filling polygons
...
Make sure we don't read past the end of global_edges when i = 0.
We are moving the elements backwards so at most n_global_edges - 1 elements can be moved.
==6818==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address 0x7ffff888ae00 at pc 0x7fe4fd7be8ae bp 0x7ffff888ac90 sp 0x7ffff888a440
READ of size 96 at 0x7ffff888ae00 thread T0
#0 0x7fe4fd7be8ad in __interceptor_memmove (/lib/x86_64-linux-gnu/libasan.so.5+0x378ad)
#1 0x56524b2dba31 in Image::Fill(unsigned int, int, Polygon const&) /root/zoneminder/src/zm_image.cpp:2514
#2 0x56524af55530 in Monitor::DumpZoneImage(char const*) /root/zoneminder/src/zm_monitor.cpp:1510
#3 0x56524aeb38cb in main /root/zoneminder/src/zmu.cpp:574
#4 0x7fe4fb2b009a in __libc_start_main ../csu/libc-start.c:308
#5 0x56524aeb87a9 in _start (/root/zoneminder/cmake-build-relwithdebinfo-remote/src/zmu+0xf87a9)
2021-05-16 19:41:45 +02:00
Peter Keresztes Schmidt
09665b139f
Monitor: Clip zone polygon to image size when dumping
...
The polygon vertex coordinated of extra_zone are directly parsed from user input.
Clip the resulting polygon to the image size so we don't try to draw outside of the image.
This is already done for zone polygons stored and loaded from the DB.
2021-05-16 19:41:45 +02:00
Peter Keresztes Schmidt
29488900a1
Box: Make range calculations mathematically correct
2021-05-16 19:41:45 +02:00