Commit Graph

133 Commits

Author SHA1 Message Date
Isaac Connor
8d38d1c36e Implement 25% zoom incrementts with no max 2022-05-06 12:11:47 -04:00
Isaac Connor
c42a5759a4 Remove unneeded setLastViewed 2022-04-28 19:17:21 -04:00
Isaac Connor
a247645046 Use std::this_thread::sleep_for(MAX_SLEEP); instead 2022-04-28 17:13:47 -04:00
Isaac Connor
aab717bc91 Add early test for zm_terminate after processing comms 2022-04-28 16:45:54 -04:00
Isaac Connor
554217931c Remove debugging 2022-04-28 16:43:13 -04:00
Isaac Connor
eeb69cbb54 Move the tests for monitor connectedness down into the main while loop so that we also check for feof etc. The gist is to stay running even if monitor is not running. We will wait for it to come back 2022-04-28 16:41:11 -04:00
Isaac Connor
e7dcfa6166 Put back code that calculates how long it takes to send a frame, but make it just a debug instead of a warning when we are too slow 2022-04-20 09:58:37 -04:00
Isaac Connor
88665a68f5 Don't warn about not being able to keep up to maxfps 2022-04-10 13:09:55 -04:00
Isaac Connor
ed41e63980 Can't treat anlysing as a boolean because ANALYSING_NONE==1. Should fix zm oing motion detection when set to NONE 2022-03-20 19:13:46 -04:00
Isaac Connor
9b9746113e If we asked for stream, keep streaming even not decoding or other problem. We will wait for the situation to change 2022-03-04 12:06:24 -05:00
Isaac Connor
cd2c977ed8 Merge branch 'master' into replace_function_concept 2022-02-16 14:25:38 -05:00
Isaac Connor
c9de883a7c Rework to remove static temp_img_buffer. Is now a class member. Must be allocated as needed. 2022-02-16 14:18:37 -05:00
Isaac Connor
23bfbcd6ce Merge branch 'master' into multistream 2022-01-26 10:13:20 -05:00
Isaac Connor
05043a37b1 include image index in debug 2022-01-19 12:27:16 -05:00
Isaac Connor
fd3a70172d Merge branch 'master' into multistream 2022-01-10 17:51:50 -05:00
Isaac Connor
76fe20c69f Only send analysis_frame if doing motion detection. Add debuging. Remove other debugging 2022-01-07 15:57:28 -05:00
Isaac Connor
df0a0c7853 Add CMD_ANALYZE_ON and OFF 2022-01-07 13:50:40 -05:00
Isaac Connor
58858d2d25 Include alarm_image in shared_mem 2022-01-07 13:12:44 -05:00
Isaac Connor
6d3c6330df Fix freebsd build by fixing incorrect use of SystemTimePoint when we want TimePoint 2022-01-07 10:34:44 -05:00
Isaac Connor
aefed4e174 Merge branch 'master' into multistream 2022-01-05 18:03:44 -05:00
Isaac Connor
8c8a9ca32a Rework the logic around waiting for capture to be in both single jpeg mode and streaming. 2022-01-01 17:54:20 -05:00
Isaac Connor
a66adb6dcd fix SteadyClock vs Systemclock issues 2021-12-31 18:36:23 -05:00
Isaac Connor
6bd04de5f6 Merge branch 'master' into multistream 2021-12-31 17:53:36 -05:00
Isaac Connor
5933aa8a6f Use > 0.0 instead of boolean when testing maxfps 2021-12-28 15:34:31 -05:00
Isaac Connor
81048b6191 Reduce code 2021-12-17 13:29:30 -05:00
Isaac Connor
77793da70e If no max_fps set we don't care how long it takes to send frame 2021-12-17 13:29:30 -05:00
Isaac Connor
60d2186ff4 Move from SystemTimePoint to SteadyTimePoint where possible. Implement MAXFPS command. Change the logic of calculating sleep time to make more sense. Get rid of frame_mod use in favour of calculating when then next frame should get sent and just waiting till then. 2021-12-16 16:35:20 -05:00
Isaac Connor
4edd5c1bf5 Don't alter maxfps. Just report that we are too slow. Don't use ZM_RATE_BASE in sleep time calculations it amplifies the sleep seconds by 100 times. Removing allows us to view a full framerate. 2021-12-15 16:57:17 -05:00
Isaac Connor
2529765df3 timestamp image before scaling. Fixes lack of scaling when TIMESTAMP_ON_CAPTURE
is off
2021-11-19 11:59:19 -05:00
Isaac Connor
c76e688f05 Don't exit(0) on QUIT. Instead set zm_terminate=true so that all the cleanup routines run. 2021-11-12 15:11:48 -05:00
Isaac Connor
824322dff6 spacing and setLastViewed in monitor when streaming 2021-10-24 17:43:02 -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
a9379e5813 Need to increase frame_count or else frame_count%frame_mod will never == 0 2021-09-10 10:58:06 -04:00
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
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
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
6114d40593 misc: Replace usleep with std::this_thread::sleep_for 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
e1fe53338c BaseStream: Convert internals to std::chrono 2021-06-13 11:29:59 +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
7474294ac3 Time: Remove DELTA_TIMEVAL macro and replace usage with proper std::chrono::duration operations 2021-06-06 16:41:36 +02:00
Peter Keresztes Schmidt
a9ad5c5eee Build: Promote libavcodec to a required dependency
FFmpeg is an integral component of ZM. Promote the appropriate libraries to required dependencies.
This reduces the possible build configurations greatly and thus maintenance burden.
2021-06-05 14:25:54 +02:00
Isaac Connor
2cf6ad8089 Switch ZMPacket * to a shared_ptr<ZMPacket>. This is so that in LockedPacket we can unlock and then notify and be confident that packet_ won't have been deleted. Change ZMPacket->timestamp to be a timeval instead of timeval *. This might not have been necessary but I like it. No longer cuse the ZMPacket object to wrap the shared image buffers and timestamps. Use a vector for image_buffers. 2021-05-08 21:14:20 -04:00
Isaac Connor
4f4a1a4565 if sendTextFrame fails, just exit. 2021-05-03 16:27:37 -04:00
Peter Keresztes Schmidt
68bedfe48f Fix logging format string mismatches
* Remove SZFMTD format macro and use %zu instead for size_t. %zu is understood by every compiler nowadays.
2021-04-30 00:26:24 +02:00
Isaac Connor
77055ee1cc Remove unused code 2021-04-20 16:18:50 -04:00
Isaac Connor
e373e871da Fix memleak caused by loadMonitor that is already loaded 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
Peter Keresztes Schmidt
9f643ddd00 MonitorStream: Actually use the MAX_SLEEP_USEC variable meant for this class 2021-04-11 14:39:08 +02:00