Isaac Connor
3d20183020
Remove mp4v2
2021-02-04 17:32:53 -05:00
Isaac Connor
8f9637f21a
Merge pull request #3129 from Carbenium/cmake-reformat
...
Build: Reindent the CMakeLists
2021-02-04 17:20:34 -05:00
Isaac Connor
5ce9203d2c
add include <cstring>
2021-02-04 17:07:25 -05:00
Peter Keresztes Schmidt
a1bab9acd4
git: Add .git-blame-ignore-revs file and add previous CMake cleanup commit to it
...
This file can be passed to git blame to ignore the listed revisions. With this large
mechanistic reformats/cleanups can be done without influencing the blame-ability of the codebase.
Sample usage: git blame --ignore-revs-file .git-blame-ignore-revs path/to/file
Also one can make this permanent by using: git config blame.ignoreRevsFile .git-blame-ignore-revs
2021-02-04 22:12:09 +01:00
Peter Keresztes Schmidt
6c9983155c
Build: Reindent the CMakeLists
...
Indent with 2 spaces
Also remove expressions form closing tags. They have been made optional a while ago since they make reading rather more difficult.
2021-02-04 22:00:56 +01:00
Isaac Connor
2ee097c5f2
Merge pull request #3128 from Carbenium/int-type-macros
...
Consolidate __STDC_FORMAT_MACROS and __STDC_CONSTANT_MACROS definition
2021-02-04 14:44:51 -05:00
Isaac Connor
da4b1fe3bc
Use global FFMPEGInit(). Removed compiler warning
2021-02-04 14:07:37 -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
Isaac Connor
c57c50fd4a
Merge pull request #3123 from Carbenium/catch2
...
[RFC] Add Catch2 as C++ test framework and some exemplary tests
2021-02-04 12:57:04 -05:00
Peter Keresztes Schmidt
bb067c065b
tests: Add unit tests for JWT validation
2021-02-04 18:53:58 +01:00
Peter Keresztes Schmidt
bef4e4032f
Add Catch2 as C++ test framework
...
Use -DCMAKE_BUILD_TEST_SUITE=1 during CMake invocation to activate building the tests.
The 'tests' target builds the unit tests which can then be executed using the 'test' target.
We depend on the Catch2 version of the system.
Since development normally takes place on current OSs, this shouldn't pose a problem.
2021-02-04 18:53:54 +01:00
Isaac Connor
513739aeb5
Merge pull request #3127 from Carbenium/header-cleanup
...
Cleanup and reorganize includes
2021-02-04 12:52:04 -05:00
Isaac Connor
2f12f82e82
Merge pull request #3124 from Carbenium/codeql-warning
...
CI/GitHub: Remove checkout step which throws a deprecation warning.
2021-02-04 12:08:06 -05:00
Isaac Connor
bf8b3fee2a
Merge pull request #3126 from Carbenium/cmake-man-pages
...
Build: Make building man pages optional (enabled by default)
2021-02-04 12:05:22 -05:00
Peter Keresztes Schmidt
eef0da8f19
Remove references to <csignal> from AnalysisThread
...
The removed block_set member was unused.
2021-02-04 18:02:08 +01:00
Peter Keresztes Schmidt
21fdb1f345
Build: Add libLive555 to optlibsnotfound if not found
2021-02-04 18:02:08 +01:00
Peter Keresztes Schmidt
22372b5117
Replace #pragama once with include guards to be consistent
2021-02-04 18:02:08 +01:00
Peter Keresztes Schmidt
8869bfd903
Gut out zm.h since it is used only to store the self variable
2021-02-04 18:02:08 +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
Isaac Connor
046e352304
improvements to fps reporting. In analysis, we report based on image packets processed, but the fps value is calculated based on the count of images we did motion detection on. We no longer count audio packets in capture fps reporting.
2021-02-04 11:50:01 -05:00
Isaac Connor
ad9fd05955
When allocating mVideoStream, set mVideoStreamId as well
2021-02-04 10:28:17 -05:00
Isaac Connor
ac42aa2488
Setup mVideoStream and mVideoStreamId and set it in packet.
2021-02-04 10:27:56 -05:00
Peter Keresztes Schmidt
5a57efdfe2
Replace deprecated C header includes with the C++ ones.
2021-02-04 05:39:03 +01:00
Isaac Connor
c61e6a8c56
If there is an open event in disconnect close it. The idea is that by the time we get to the destructor we should be all shut down
2021-02-03 17:04:40 -05:00
Isaac Connor
6ac5472606
Add disconnecting to zmc to free up resources.
2021-02-03 16:58:03 -05:00
Isaac Connor
cb60b6c141
Fix bulk frame code and move it to event. Revert base score to 0. Fix cause of continuous events. Move GetState to .h
2021-02-03 16:57:44 -05:00
Isaac Connor
35470951ad
Move the bulk frame logic from monitor to event. Fix up the logic of when to store a db frame. Fix altering max_score too early
2021-02-03 16:56:34 -05:00
Peter Keresztes Schmidt
4db0dea1f2
Build: Make building man pages optional (enabled by default)
...
Add a new CMake option (-DBUILD_MAN) which can be used
to deactivate the man page build steps.
This is especially useful in a development situation where "make all"
is needlessly slowed down by these build steps.
2021-02-03 21:22:28 +01:00
Isaac Connor
d4e83620b2
Split actions and options columns into 50%
2021-02-03 12:57:17 -05:00
Isaac Connor
a7365323dd
Split actions and options in filters to fit more horizontally
2021-02-03 12:57:17 -05:00
Isaac Connor
e05fdf423b
Merge pull request #3125 from gmanic/patch-1
...
corrected $this to $self
2021-02-03 10:21:33 -05:00
Isaac Connor
e085acedc8
ALlow micro version mismatches to not be fatal. Minor and Major are still fatal.
2021-02-03 09:50:37 -05:00
Isaac Connor
8a99665311
better variable names and code documentation
2021-02-03 09:50:13 -05:00
Isaac Connor
be1db1ff20
Score should be a signed int
2021-02-03 09:08:06 -05:00
Isaac Connor
3fd98ee9c1
Bump version to add RTSPServer column to Monitors
2021-02-03 08:33:10 -05:00
gmanic
037f197f54
corrected $this to $self
2021-02-03 12:53:33 +01:00
Isaac Connor
c35869fd30
Use jquery offset() to get image position
2021-02-02 23:19:53 -05:00
Isaac Connor
f868d92269
Fix colour shift in Crop function due to not multiplying x position by colours
2021-02-02 23:19:53 -05:00
Isaac Connor
49e9bf86fa
Code style
2021-02-02 23:19:53 -05:00
Isaac Connor
09d8dbb460
spacing
2021-02-02 23:19:53 -05:00
Isaac Connor
0958768ce5
Fix no bulk frames by setting score to -1 which means BULK. It will get changed to 0 or more by later code. Fixes #3121
2021-02-02 23:19:53 -05:00
Isaac Connor
7e469a28fa
remove redundant code, code style and remove some unnecessary multiplies
2021-02-02 23:19:53 -05:00
Isaac Connor
38368a8b9d
remove deprecated video_buffer_duration stuff. Fix loading monitor column order
2021-02-02 23:19:53 -05:00
Isaac Connor
c8af90fd24
Add RTSP Server checkbox
2021-02-02 23:19:52 -05:00
Isaac Connor
e09c80e385
Have to close camera AFTER threads have stopped
2021-02-02 23:19:52 -05:00
Isaac Connor
61c3c0d565
Should increment_it after releasing the packet to prevent deadlock
2021-02-02 23:19:52 -05:00
Isaac Connor
8de260472d
improve the logic of clearing packets from queue. make get_event_start_it return a pointer to an it tracked by the packetqueue.
2021-02-02 23:19:52 -05:00
Isaac Connor
cb0008fb8c
Add rtsp_server and accessor
2021-02-02 23:19:52 -05:00
Isaac Connor
afa5e27d56
load RTSPServer column as well. start_it needs to be tracked by packetqueue. We no longer close the camera in Monitor::Close because we need to clear the packetqueue, then wait for threads to finish, THEN close camera. So that logic needs to move to zmc
2021-02-02 23:19:52 -05:00
Isaac Connor
5c6ba2f27f
add RTSPServer column to Monitors
2021-02-02 23:19:52 -05:00