Commit Graph

4767 Commits

Author SHA1 Message Date
Isaac Connor 96b4af6255 Enable multi-threading on decode 2021-11-17 14:43:13 -05:00
Isaac Connor 036d47a832 proper fix to memleak 2021-11-11 14:42:08 -05:00
Isaac Connor 6d30f5431b Merge branch 'master' of github.com:ZoneMinder/zoneminder 2021-11-11 13:58:56 -05:00
Isaac Connor 883772295d spacing and log the new log level string as well as number 2021-11-11 13:51:17 -05:00
Isaac Connor 6cd1f6b5f3 Fix memleak on event creation due to not freeing storage object 2021-11-11 13:50:18 -05:00
Isaac Connor 8d85d0f640 Make state enum start at 0 as we are indexing into an array for StateStrings 2021-11-10 16:53:29 -05:00
Isaac Connor 5ac9f88d00 Use event->StartTime instead of GetVideoWriterStartTime. Add some parenthesis to make logic clearer and add more info to debug statements 2021-11-10 16:53:07 -05:00
Isaac Connor 44d88edbbb Fix some build warnings on arm 2021-11-09 17:01:13 -05:00
Isaac Connor 508be72e08 Don't exit(0) on QUIT. Instead set zm_terminate=true so that all the cleanup routines run. 2021-11-09 15:49:44 -05:00
Isaac Connor 5d23362ae0 use != Monitor instead of all the other cases 2021-11-09 13:59:14 -05:00
Isaac Connor 38105c6796 Spacing 2021-11-09 13:59:14 -05:00
Isaac Connor 7aefd657c7 Cleanup and spacing. Rework last_motion_score to be a bit more efficient and use fewer lines. Fix case where MOCORD was not ending/starting event on alarm. 2021-11-09 13:59:14 -05:00
Isaac Connor 8c2dec03b6 Default to now instead of ... epoch? when endtime is null. Fixes video playing when event is incomplete 2021-11-09 13:59:14 -05:00
Isaac Connor 364ae03195 Set zm_terminate on crash so that other threads exit instead of continuing 2021-11-03 17:04:13 -04:00
Isaac Connor 0119ff46aa Remove redundant debug 2021-11-03 17:03:54 -04:00
Isaac Connor 93055f44e8 Merge UpdateCaptureFPS and UpdateAnalysisFPS into UpdateFPS and call it from zmc after capture. 2021-11-03 17:03:29 -04:00
Isaac Connor 814eca2b4f Include the codec in the resulting mp4 filename. Remove event update setting the mp4 filename after insert, do it on event completing instead. Saves 1 db update. 2021-11-03 17:02:02 -04:00
Isaac Connor a799eb3ad9 add function get_codec to return the codec used in the output mp4 2021-11-03 17:01:11 -04:00
Isaac Connor 8619971864 Better debug messages 2021-11-02 17:24:05 -04:00
Isaac Connor 61f7989bec Actually report the # of dbQueue entries 2021-11-02 17:24:05 -04:00
Isaac Connor dd949bb129 av_write_trailer can return a positive value which is not an error 2021-11-02 17:10:02 -04:00
Isaac Connor e063f0715f reset starttime when changing events. Fixes super fast playback after switch to next event. Also, skip some unneeded calculations and logging. 2021-10-28 13:00:41 -04:00
Isaac Connor c2bd2dc129 Add a warning if db queue is larger than 10 2021-10-28 10:46:50 -04:00
Isaac Connor 1e38cf8bb7 Fix monitor type labels by adding an Unknown for entry 0. Implement Function_Strings. Fix decoding_enabled not being recalculated correctly because we havn't loaded savejpegs or videowriter yet. 2021-10-25 16:40:21 -04:00
Isaac Connor 52f0240334 free and re-init opts as needed 2021-10-19 13:05:11 -04:00
Isaac Connor 6d7f752eb0 Only record when in modect or nodect. Linked monitors would cause a monitor in monitor mode to record 2021-10-19 13:04:49 -04:00
Pascal Muetschard 14e6d660e7 Respect the encoder options for the header write.
Fixes an issue where the encoder options were ignored in the
passthrough case, because the options were free'ed and not
re-initialized.
2021-10-18 20:15:02 -07:00
Isaac Connor 9f023f7bdd
Merge pull request #3372 from SudoMike/writable_image_buffer_function
Added non-const versions of Image::Buffer
2021-10-17 19:11:39 -04:00
Isaac Connor e1d49ea172 fix index -> image_index 2021-10-17 15:13:34 -04:00
Isaac Connor 3f6d6fe7a0 Improve debug logging of packetqueue cleaning 2021-10-17 15:02:31 -04:00
Isaac Connor 6c4156a483 Remove sleeping from Analysis thread. It is uneccessary and results in us starting off way behind the capture thread. It also limits us to 30fps. 2021-10-15 09:56:14 -04:00
Isaac Connor 086bf7a84f introduce new logic that keeps the initial keyframe and deletes 1 video frame after it to keep the count down. Also any audio frames it encounters. 2021-10-14 12:47:51 -04:00
Isaac Connor 411d15605a We can lockup if MaxImageBufferCount is less than keyframe interval. Give up after 10 tries and drop the packet 2021-10-14 10:08:51 -04:00
Isaac Connor 8a9c283c1c Fix loading importance. Needs to be -1 not -2. The first value is 1, but we want zero based. 2021-10-13 16:06:22 -04:00
Isaac Connor 74ac79479f notifying before waiting serves no purpose because we have the lock 2021-10-13 15:02:07 -04:00
Isaac Connor 4fee4d01e3 always correct decoding_enable, as zms needs to know it's correct value 2021-10-13 15:01:46 -04:00
Mike Dussault d38a6adec4 No behavior change. Added non-const versions of Image::Buffer and fixed a few places that were casting away the constness. 2021-10-12 21:54:49 +00:00
Isaac Connor 0bac052a0a
Merge pull request #3370 from SudoMike/add_benchmarks
Add a zmbenchmark program
2021-10-12 13:43:00 -04:00
Peter Keresztes Schmidt cd45c61555 Use mt19937 as PRNG
Reasons: It's faster than rand() and can be made thread-safe
2021-10-12 19:18:21 +02:00
Peter Keresztes Schmidt c027b7a38d Fix some clang-tidy warnings 2021-10-12 19:05:22 +02:00
Peter Keresztes Schmidt 97b38bd4ab Align changes with our codestyle
See https://google.github.io/styleguide/cppguide.html for reference
2021-10-12 18:53:31 +02:00
Isaac Connor c6cac57fb1 remove bogus wanring 2021-10-12 12:45:06 -04:00
Isaac Connor 0ba3d863a6 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2021-10-12 12:25:01 -04:00
Mike Dussault 814124251e Fixed a CodeQL complaint 2021-10-11 23:57:20 +00:00
Mike Dussault 2cf16eb495 Removed some unused code and added more function comments 2021-10-11 15:58:30 -07:00
Mike Dussault 146ff1ac7a Print the benchmark results in a nicer table 2021-10-11 15:53:29 -07:00
Mike Dussault e4542de6f2 Fixed random image generation, and now it shows a proper (giant) perf difference between images that take longer for Zone's FILTERED_PIXELS detection to deal with. 2021-10-11 14:21:08 -07:00
Mike Dussault 9370cfe25c Added TimeSegmentAdder class and got benchmark output looking ok. 2021-10-11 21:12:46 +00:00
Mike Dussault 305af08112 Added Monitor scaffolding and a skeleton benchmark for DetectMotion. 2021-10-11 20:22:10 +00:00
Mike Dussault 3723e136b1 Initial benchmark exe 2021-10-11 19:44:58 +00:00