Isaac Connor
44d4a79f70
Fixes by cppcheck
2021-04-20 11:39:37 -04:00
Isaac Connor
467baf8a95
fix bogus font validation
2021-04-20 11:37:57 -04:00
Isaac Connor
9970df7fde
Pass delta by ref for performance
2021-04-20 11:36:20 -04:00
Isaac Connor
c668eb7134
Add overrides to quiet cppcheck
2021-04-20 11:08:15 -04:00
Isaac Connor
2679b3a51a
fix use of %d when %u is wanted
2021-04-20 11:07:22 -04:00
Isaac Connor
19cb66b70d
fix use of %d when %u is wanted
2021-04-20 11:06:54 -04:00
Isaac Connor
e8b761d2bf
cppcheck cleanups
2021-04-20 11:04:27 -04:00
Isaac Connor
c833833a5e
quiet cppcheck by adding overrides
2021-04-20 11:01:02 -04:00
Isaac Connor
e5d4665a42
Quiet cpp-check complaints
2021-04-20 11:00:13 -04:00
Isaac Connor
b6fcadf31b
Put dbrow and fetch into a scope so that it goes away quick
2021-04-20 10:55:39 -04:00
Isaac Connor
0343642c42
duplicate test for neagtive timestamp
2021-04-20 10:54:24 -04:00
Isaac Connor
88a5afc1d2
Fix cpp-check reporting unused variable
2021-04-20 10:45:33 -04:00
Isaac Connor
51c4211ca6
Remove unused variable
2021-04-20 10:43:27 -04:00
Isaac Connor
ece981c018
Fix bool return value when int is desired
2021-04-20 10:41:41 -04:00
Isaac Connor
ff2017d8b0
Initialize video_sources and audio_sources to prevent crash
2021-04-20 09:22:37 -04:00
Isaac Connor
e0fc265263
spacing
2021-04-19 13:19:23 -04:00
Isaac Connor
f5e249a6f2
ifout an unused constructor in zone. Add polygon copy in copy constructor.
2021-04-19 13:19:17 -04:00
Isaac Connor
f3fb5885a0
Improve debugging
2021-04-19 13:18:35 -04:00
Isaac Connor
3fc9f5ac32
Prevent multiple threads being created by zmc restart by converting sources into a vector
2021-04-19 12:38:35 -04:00
Isaac Connor
c1035b7ffd
spacing, remove dead code
2021-04-19 10:26:08 -04:00
Isaac Connor
63d7c9a577
Don't tidy in extract as we assume the space will be used soon.
2021-04-19 10:26:08 -04:00
Isaac Connor
a9afdbddf1
Remove AddZones function and remove other commented out code
2021-04-19 10:26:08 -04:00
Isaac Connor
a38463f99e
spacing
2021-04-19 10:26:08 -04:00
Isaac Connor
8d883ee7bf
This breaks
2021-04-18 13:58:26 -04:00
Isaac Connor
07b3a7aa57
fix memleak caused by not deleting the packetlock when we can't get the lock
2021-04-17 12:50:26 -04:00
Isaac Connor
5b9745b652
fix memleak due to not delete audio_fifo and video_fifo
2021-04-17 12:50:26 -04:00
Isaac Connor
03767236d9
Clean up constructor/Setup functions. Add copy constructor. Change Load to return a std::list<Zone>
2021-04-17 12:50:26 -04:00
Isaac Connor
5ab9a48599
Don't grab lock in increment_it if we are deleting cuz we will hang
2021-04-17 12:50:26 -04:00
Isaac Connor
96deedfd53
add explicit to LockedPacket constructor
2021-04-17 12:50:26 -04:00
Isaac Connor
5ace2ca082
Fix loading Importance in sql. Change zones to a std::list<Zone>
2021-04-17 12:50:26 -04:00
Isaac Connor
7970bfd3d8
Implement a 10 second timeout in ffmpeg_camera. read_frame can block forever otherwise
2021-04-17 12:50:26 -04:00
Isaac Connor
df36623792
Put a \0 at the beginning of the buffer to help when printing out the contents
2021-04-17 12:50:26 -04:00
Isaac Connor
a0d08b8277
More debug in read_into
2021-04-17 12:50:26 -04:00
Isaac Connor
1d034b16dd
Must join the previous thread before starting a new one or we crash
2021-04-17 12:50:26 -04:00
Isaac Connor
c479c6d68f
Must disconnect on error/reload to avoid memleak. Remove waiting 5 second on failure/reload.
2021-04-17 12:50:26 -04:00
Isaac Connor
968bdc5abe
Correct nal count reporting
2021-04-17 12:50:26 -04:00
Isaac Connor
9b4fcf4e92
Only complain about finding an iterator if we havn't found a new keyframe
2021-04-14 13:00:16 -04:00
Isaac Connor
cfefe3fc1a
Merge pull request #3214 from Carbenium/type-limits
...
Fix warnings reported by Wtype-limits and re-enable the warning on GCC
2021-04-13 10:27:56 -04:00
Isaac Connor
ef10ecc06a
Allow users to start/stop alarms without monitor view permission. When forcing an alarm, disable recording first so that the alarm is distinct. This is necessary due to permissions.
2021-04-12 15:59:31 -04:00
Isaac Connor
e373e871da
Fix memleak caused by loadMonitor that is already loaded
2021-04-12 15:59:31 -04:00
Isaac Connor
cfe51d7349
Disconnect if we call loadMonitor a second time.
2021-04-12 15:59:31 -04:00
Isaac Connor
7adeb87041
fix logic that would leak mem by called loadMonitor repeatedly
2021-04-12 15:59:31 -04:00
Isaac Connor
1a81723ba5
add an isConnected function
2021-04-12 15:59:31 -04:00
Isaac Connor
ab356a3695
Add a warning when connecting without disconnecting which can cause memleaks
2021-04-12 15:59:31 -04:00
Peter Keresztes Schmidt
4894c319cc
Image: Fix Wtype-limits warnings in zm_convert_yuyv_rgb
...
The intermediate values can be negative. Change the variables to be signed so the clamping later on works correctly.
2021-04-12 08:58:57 +02:00
Peter Keresztes Schmidt
11cfa86de3
Image: Fix Wtype-limits warnings in Annotate
...
line[c] is a char. There is no possibility for it to be larger than 0xff. Remove these checks.
2021-04-12 08:58:56 +02:00
Peter Keresztes Schmidt
7e1c580130
define: Add macro to annotate intended switch fallthroughs
...
Follow-up to 814953b331
It turns out [[gcc::fallthrough]] and -Wimplicit-fallthrough were only implemented in GCC 7 and throws a warning on older GCCs.
Add the FALLTHROUGH macro to handle GCC < 7 as found on Xenial.
Warning from GCC 5.5:
/home/runner/work/zoneminder/zoneminder/src/zm_remote_camera_http.cpp:624:13: warning: attributes at the beginning of statement are ignored [-Wattributes]
[[gnu::fallthrough]];
2021-04-11 23:39:35 +02:00
Isaac Connor
f077ec6145
Take first PTS into account when calculating last pts for figuring out which input to use.
2021-04-11 16:35:16 -04:00
Isaac Connor
dab89622af
Not having a video stream isn't actually bad. Change log to debug
2021-04-11 13:29:24 -04:00
Isaac Connor
594cebbcb1
Increase debugging level of input choice
2021-04-11 13:23:21 -04:00