Isaac Connor
8c2e6589ac
fifo.h got split into zm_fifo and zm_fifo_debug so update the code in zm_zone
2021-03-01 16:49:27 -05:00
Peter Keresztes Schmidt
76e6c468e8
rgb: Convert some constant defines to constexpr
...
Using defines interferes with fmt.
Also rename them according to the Google styleguide.
2021-03-01 00:38:21 +01:00
Isaac Connor
8aeb4ab758
Switch db_mutex to a std::mutex. Use modern locking with it. Use zmDbDo or dbQueue.push where appropriate. code cleanup.
2021-02-25 12:26:26 -05:00
Isaac Connor
124d9bf798
Fix logging when holding db lock
2021-02-19 12:09:02 -05:00
Peter Keresztes Schmidt
dd527f0888
Consolidate __STDC_FORMAT_MACROS and __STDC_CONSTANT_MACROS definition
...
Move the definitions to zm_define.h and include the header at the appropriate locations.
These macros have not been adopted by the C++11 standard.
However glibc 2.17 (CentOS 7) still depends on them to provide the macros which are guarded by these defines.
2021-02-04 19:58:29 +01:00
Peter Keresztes Schmidt
0dbc39ee25
Cleanup and reorganize includes
...
With this commit a unified structure for includes is introduced.
The general rules:
* Only include what you need
* Include wherever possible in the cpp and forward-declare in the header
The includes are sorted in a local to global fashion. This means for the include order:
0. If cpp file: The corresponding h file and an empty line
1. Includes from the project sorted alphabetically
2. System/library includes sorted alphabetically
3. Conditional includes
2021-02-04 18:02:01 +01:00
Peter Keresztes Schmidt
e09fa1bebf
Remove includes of <cinttypes>
...
Instead of including <cinttypes> directly, zm_define.h should be used
to get the typedef'ed types as well.
2021-02-02 21:37:26 +01:00
Isaac Connor
8d52baeee2
Merge branch 'master' into rtsp_server
...
Cleanup Analysis a bit. We can't skip packets just because they are audio. Clean up the state machine transitions a bit to make them a little more readable.
Change logic of PrimeCapture, success MUST return 1. 0 means no error but also no success.
Debugging and braces improvements in local_camera.
2020-12-17 10:16:54 -05:00
Isaac Connor
46bbbb7dff
Merge branch 'fix_zone_instead_of_ignore'
2020-12-15 16:33:58 -05:00
Isaac Connor
a88ccf793b
correct zone points instead of skipping zone
2020-12-15 16:32:19 -05:00
Isaac Connor
b261fbb397
Merge branch 'master' into zma_to_thread
2020-12-07 16:26:26 -05:00
Isaac Connor
ae4e2a1d5e
We were overwriting the privacy/inactive zone with a more general one. Slight memleak
2020-11-19 10:42:17 -05:00
Isaac Connor
de74a15ab1
Move diag_fifo pipes in SOCKS_DIR instead of assigned Storage area. Storage areas could be a fs that cannot handle sockets or fifos like NFS.
2020-11-12 11:53:51 -05:00
Isaac Connor
2eda49333f
Merge branch 'master' into zma_to_thread
2020-10-20 16:20:29 -04:00
Isaac Connor
387f5dd397
Fix double free of image
2020-10-02 12:47:05 -04:00
Isaac Connor
a39a656373
Merge branch 'master' into zma_to_thread
2020-09-29 11:02:40 -04:00
Isaac Connor
795e98a09c
Merge pull request #2916 from connortechnology/zone_optimise
...
Improve code in zm_zone
2020-09-22 17:48:24 -04:00
Peter Keresztes Schmidt
8f980a1168
Convert NULL/0 to nullptr
...
The 0 -> nullptr changes should definitely improve readability.
2020-08-26 22:03:40 +02:00
Andrew Bauer
e5e2c3b347
fix stats off by 1 frame, don't alert on score 0
2020-08-24 10:57:54 -05:00
Isaac Connor
5fb56c9f57
Merge branch 'master' into zma_to_thread
2020-08-07 17:52:43 -04:00
Isaac Connor
f635afe00f
spacing
2020-07-22 17:30:39 -04:00
Isaac Connor
869860bb26
Merge branch 'master' into zma_to_thread
2020-07-21 17:49:39 -04:00
Isaac Connor
7575afc8d5
Merge branch 'master' into zma_to_thread
2020-07-21 17:38:32 -04:00
Isaac Connor
d716d1d686
Merge branch 'release-1.34'
2020-07-20 16:25:41 -04:00
Isaac Connor
01892352da
rename sseversion to sse_version
2020-07-19 17:50:47 -04:00
Andrew Bauer
dcab218a2e
remove global config item CREATE_ANALYSIS_IMAGES
2020-07-06 12:22:41 -05:00
Isaac Connor
ae9a5766f5
Merge branch 'release-1.34' into fix_zms
2020-04-26 18:19:30 -04:00
Isaac Connor
37c829f2bf
cleanup code a bit. Move BlobStats to the Zone Object so that it isn't constantly being allocated/freed from the heap. Improve ParsePolygon.
2020-04-20 11:19:33 -04:00
Isaac Connor
396be10d6f
Merge branch 'master' into zma_to_thread
2019-08-22 12:57:00 -04:00
Isaac Connor
9713d908fb
Spacing, google code style and tabs to spaces
2019-06-24 10:28:11 -04:00
Mitch Capper
eb005e8b9c
FIFO support for zoneminder zone debugging ( #2594 )
...
Adds fifo options for diagnostic images for much lower impact diagnostics mode. Diagnostic images are only written when there is a client listening for them (otherwise they are skipped). Also added a json stream for the detection data so you can see in real time the pixels or blobs detected for the motion. This allows for easy real time stream of both delta and reference images (as video streams) along with the detection numbers.
2019-05-16 15:37:03 -04:00
Isaac Connor
672b4affe1
Merge branch 'storageareas' into zma_to_thread
2018-08-31 19:05:22 -04:00
Isaac Connor
d296d59625
Merge branch 'master' of github.com:ZoneMinder/ZoneMinder
2018-08-22 16:34:29 -04:00
vajonam
d97eea886a
fix scoring algorithim, to use max_alarm_size when specified instead of the size of the zone. ( #2186 )
2018-08-22 12:58:26 -04:00
Isaac Connor
90eda0b88b
spacing, remove extra parenthesis
2018-08-22 11:14:00 -04:00
Isaac Connor
979b31ffc3
Merge branch 'storageareas' into zma_to_thread
2018-08-11 10:08:30 -04:00
Isaac Connor
8450d532b4
Add STDC_FORMAT_MACROS and include cinttypes so that PRIu64 works on centos7
2018-06-14 12:24:58 -04:00
Isaac Connor
94377a4652
Merge branch 'storageareas' into zma_to_thread
2018-05-05 12:57:50 -04:00
Isaac Connor
f6139d33ed
Merge branch 'storageareas' into zma_to_thread
2018-05-05 12:25:11 -04:00
Isaac Connor
fb9a12ddba
add locking around loading Zone
2018-05-01 12:19:34 -04:00
Isaac Connor
18b015903a
cleanup. Google Code Style. Move diag_path from a static to a class member so that multiple zones will create different diag files.
2018-04-23 14:36:46 -04:00
Isaac Connor
4be64152e8
put mutex around inserting event stats
2018-03-28 09:12:38 -04:00
Isaac Connor
84b7e85259
Add a mutex around mysql operations
2018-02-15 15:54:13 -05:00
Isaac Connor
64816aa005
fixes from cppcheck.
2017-11-18 16:00:10 -05:00
Isaac Connor
ecd86b3fde
cleanup
2017-11-12 15:18:39 -05:00
Isaac Connor
38a4ca1a6f
use storageareas when outputting zone diag images
2017-09-26 09:33:33 -04:00
Isaac Connor
9f93bfc23b
use Monitor Id in path to diag images instead of monitor name as the name is a convenience link and not guaranteed to exist
2017-09-25 18:45:58 -04:00
Isaac Connor
84be41998a
make debug lines more informative
2017-09-25 16:23:27 -04:00
Isaac Connor
259b7f7655
fix memleak
2017-07-31 15:49:27 -04:00
Isaac Connor
b886a2daa2
Merge branch 'master' into storageareas
2017-06-14 11:25:02 -04:00