Commit Graph

4683 Commits

Author SHA1 Message Date
Isaac Connor
328bd15360 Fix frame_count fps when paused 2021-08-30 18:06:05 -04:00
Isaac Connor
381fa0d08d Fix viewing fps display by keeping track of last update time, last frame count and actually calculate it based on frames sent over a period of time. 2021-08-30 17:55:32 -04:00
Isaac Connor
8199554217 Spacing and fix the bogus setting shared_data->valid to false on disconnect. Other processes call disconnect. Only the capturing thread should set it to false. 2021-08-30 13:33:26 -04:00
Isaac Connor
048b8b13a3 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2021-08-29 09:17:36 -04:00
Isaac Connor
6de8c71d2a Set shm->valid to false on disconnect. 2021-08-29 09:17:31 -04:00
Isaac Connor
4af979c842 spacing 2021-08-29 09:15:40 -04:00
Isaac Connor
a4c079d1b3 Add code to set colour ranges so that we can safely convert to YUV420p instead of YUVJ420P 2021-08-26 14:15:09 -04:00
Isaac Connor
7c1c8482c6 Make failure to resolve non fatal 2021-08-24 10:23:24 -04:00
Isaac Connor
848a537a0f Fix zms giving 500 code instead of displaying error image due to not having sent the headers yet. 2021-08-23 18:10:31 -04:00
Isaac Connor
a3a592d5e1 Fix errors due to not stopping the dbQueue. Fix crash when querying v4l devices 2021-08-05 14:48:14 -04:00
Isaac Connor
85d5dd806e Read 4k at a time instead of 32 bytes. OS will read whatever is available. This basically reduces logging and a little cpu overhead 2021-08-05 13:30:52 -04:00
Peter Keresztes Schmidt
4392198d14 Fix closing event in MOCORD mode
Bug introduced in 707975e567
2021-08-03 09:56:07 +02:00
Isaac Connor
1766bbdfcd Handle the case when the monitor doesn't exist more gracefully and not crash. Fixes #3316 2021-07-08 10:07:01 -04:00
Isaac Connor
b0cf3a4732 Merge pull request #3314 from Carbenium/path-max
Fix Wformat for stringtf and convert path buffers depending on PATH_MAX to std::string
2021-07-07 11:34:03 -04:00
Peter Keresztes Schmidt
eaf2e51b0c utils: Make sure the compiler can emit format warnings for stringtf
Unfortunately the compilers can't emit Wformat warnings for variadic templates
and those can't be annotated with the format attribute.
Use a variadic function which can be annotated and thus warns on format string-args mismatches.

Ref 0796a2262e
2021-07-06 10:33:17 +02:00
Peter Keresztes Schmidt
80b08a2075 Convert path buffers depending on PATH_MAX to std::string 2021-07-06 10:33:17 +02:00
Peter Keresztes Schmidt
65656de6ce db: Adjust the query methods to accept std::strings 2021-07-06 10:20:46 +02:00
Peter Keresztes Schmidt
c60b577aec Convert more char array buffers to std::string
Remove now unused ZM_SQL_*SIZE defines
2021-07-06 10:20:46 +02:00
Peter Keresztes Schmidt
fc15afefcf Event: Remove unused and broken prepared statement code 2021-07-06 10:20:45 +02:00
Peter Keresztes Schmidt
cf9c47149f db: Add helper for escaping strings and use it 2021-07-06 10:20:45 +02:00
Peter Keresztes Schmidt
ea10939970 zmu: Fix missing include 2021-06-15 00:16:08 +02:00
Peter Keresztes Schmidt
531694bf8d RtspThread: Add missing static_cast when fprinting duration .count() 2021-06-14 20:09:30 +02:00
Isaac Connor
fa11c20bf8 Merge pull request #3297 from Carbenium/time-misc
Convert the rest of the codebase to std::chrono
2021-06-13 17:47:40 -04:00
Peter Keresztes Schmidt
d69afc9672 misc: Convert time(nullptr) calls to std::chrono 2021-06-13 23:22:51 +02:00
Peter Keresztes Schmidt
6114d40593 misc: Replace usleep with std::this_thread::sleep_for 2021-06-13 23:22:51 +02:00
Peter Keresztes Schmidt
f675afc3f2 zmc: Convert internals to std::chrono 2021-06-13 23:22:51 +02:00
Peter Keresztes Schmidt
3e8b10d813 zm::Select: Convert API to std::chrono 2021-06-13 23:22:51 +02:00
Peter Keresztes Schmidt
c823b9c00e Buffer: Convert API to std::chrono 2021-06-13 23:22:51 +02:00
Peter Keresztes Schmidt
707975e567 Monitor: Convert API to std::chrono 2021-06-13 23:22:49 +02:00
Peter Keresztes Schmidt
dff5452f11 Event: Convert API to std::chrono 2021-06-13 23:20:24 +02:00
Peter Keresztes Schmidt
335e950654 Frame: Convert API to std::chrono 2021-06-13 23:20:24 +02:00
Peter Keresztes Schmidt
7c6a6ac309 VideoStream: Convert internals to std::chrono 2021-06-13 23:20:24 +02:00
Peter Keresztes Schmidt
ce55ba5fb7 VideoStore: Convert internals to std::chrono 2021-06-13 23:20:22 +02:00
Isaac Connor
c2f4d65860 Turn down debugging 2021-06-13 14:08:51 -04:00
Isaac Connor
c56025beab Use std::unordered_map instead of std::map for performance. Be slightly more efficicent by storing an interator and using it instead of continually indexing into the std::map. Fix crash when a monitor's mmap file size changes 2021-06-13 14:08:51 -04:00
Isaac Connor
9f8c8a2664 Return early if packetqueue is empty instead of getting the lock. Return early in clear() if we are not initialised 2021-06-13 14:08:51 -04:00
Peter Keresztes Schmidt
f374b319e0 RtpSource: Convert internals partially to std::chrono
This allows us to remove the tvNow() helper method.
2021-06-13 16:35:27 +02:00
Peter Keresztes Schmidt
ff8c9f67c1 Image: Convert API to std::chrono
Utils: Remove TimespecDiff. It is not used anymore
2021-06-13 14:50:16 +02:00
Peter Keresztes Schmidt
b2ee71c96e EventStream: Finalize conversion of internals to std::chrono 2021-06-13 11:30:22 +02:00
Peter Keresztes Schmidt
e1fe53338c BaseStream: Convert internals to std::chrono 2021-06-13 11:29:59 +02:00
Peter Keresztes Schmidt
95dd0c1491 Monitor: Convert internals to std::chrono 2021-06-13 09:58:33 +02:00
Peter Keresztes Schmidt
07dbb75c56 Merge pull request #3285 from Carbenium/time-event
Convert Event and Logger internals to std::chrono
2021-06-08 23:29:57 +02:00
Isaac Connor
0301011f7e Adjust debug logging 2021-06-08 16:58:50 -04:00
Isaac Connor
afecd33879 Use new get_packet_and_increment_it in decoder. Adjust some debugging levels 2021-06-08 16:58:50 -04:00
Isaac Connor
84035ef4f7 Adjust debug logging 2021-06-08 16:54:41 -04:00
Peter Keresztes Schmidt
b0b2f5fc16 Logger: Convert internals to std::chrono 2021-06-08 19:45:23 +02:00
Peter Keresztes Schmidt
44ace34593 Event: Convert internals to std::chrono 2021-06-08 19:41:11 +02:00
Peter Keresztes Schmidt
d8d27bcc92 Time: Replace remaining DeltaTimeval usage with std::chrono 2021-06-07 23:53:53 +02:00
Peter Keresztes Schmidt
6c68397249 Time: Convert some timeval operations to std::chrono
Also remove now defunct timeval helper methods.
2021-06-07 23:53:53 +02:00
Peter Keresztes Schmidt
46155942c1 Misc: Rename namespace ZM to zm
We had a mixture of both spellings. Unify it according to our code-style.
2021-06-06 19:11:11 +02:00