Commit Graph

97 Commits

Author SHA1 Message Date
Isaac Connor
2cb85492e9 Clean out cruft from prepareImage. Fixes not sending scaled image. 2022-05-11 10:05:48 -04:00
Isaac Connor
3804f6c66c Finally fix centering of zoomed image 2022-05-07 11:37:58 -04:00
Isaac Connor
a8583086ce Rework zooming. We now crop first, then scale to retain image fidelity as much as possible. More work to be done but is working better than the old code and I think is more readable. This also makes Box a class member instead of a static 2022-05-06 11:45:12 -04:00
Isaac Connor
5aca811d5d Don't delete the socket file because another zms might have opened it and be waiting on the lock. This should remove a ton of zms error messages 2022-04-28 19:16:22 -04:00
Isaac Connor
063f27e5f7 Debug log when failed sending 2022-04-28 16:42:16 -04:00
Isaac Connor
39d45e527c Switch from DecodingEnabled to DecodingOption. Implement the logic in ::Decode. 2022-03-28 17:44:44 -04:00
Isaac Connor
bf4d2a82d6 handle when maxfps is not specified 2022-03-27 12:17:00 -04:00
Isaac Connor
cd2c977ed8 Merge branch 'master' into replace_function_concept 2022-02-16 14:25:38 -05:00
Isaac Connor
67563737c3 Rework to remove static temp_img_buffer. Is now a class member. Must be allocated as needed. 2022-02-16 14:16:46 -05:00
Isaac Connor
fd3a70172d Merge branch 'master' into multistream 2022-01-10 17:51:50 -05:00
Isaac Connor
b406bf8fd1 remove last_send_image_width/height. Not really useful or relevant 2022-01-10 17:36:49 -05:00
Isaac Connor
657fc5cad5 convert function to relevant capturing/analysing 2022-01-07 11:52:19 -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
854d11ce9d List the connkey that isn't open, differentiate logs a bit to help debug. 2021-12-15 09:11:55 -05: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
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
Peter Keresztes Schmidt
e1fe53338c BaseStream: Convert internals to std::chrono 2021-06-13 11:29:59 +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
Peter Keresztes Schmidt
8f685b3d66 Box+Poly: Remove direct accessors to {Hi,Lo}{X,Y} 2021-05-16 16:42:58 +02:00
Peter Keresztes Schmidt
f85e3765db Box: Remove unnecessary constructors 2021-05-16 16:42:58 +02: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
cfe51d7349 Disconnect if we call loadMonitor a second time. 2021-04-12 15:59:31 -04:00
Isaac Connor
1bfc61a5b7 change log level to debug when monitor is not decoding 2021-03-23 10:32:59 -04:00
Isaac Connor
14ef8336b9 If ffmpeg and decoding Disabled don't stream 2021-03-16 20:10:00 -04:00
Isaac Connor
c0242e7369 Fix memleak when connect fails 2021-03-16 13:28:00 -04:00
Peter Keresztes Schmidt
d9568a98c0 Drop zm_thread which has been replaced by STL implementations 2021-03-04 10:55:46 +01:00
Peter Keresztes Schmidt
f43507dce0 Use the power of smart pointers to manage Monitor instances 2021-02-07 21:20:45 +01:00
Isaac Connor
7f99635763 Fix xenial builds. Fixes #3130 2021-02-05 12:30:51 -05: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
d6345d32fd Reduce error level of warnings about monitors having Function==NONE 2020-11-25 09:53:06 -05:00
Isaac Connor
e1a0c4f973 Don't log a warning of comms not open if no connkey 2020-11-20 16:31:12 -05:00
Isaac Connor
cb38242917 use nullptr when appropriate 2020-10-08 16:46:47 -04:00
Isaac Connor
71085d9724 Clear the textframe before Annotating it. 2020-10-05 13:16:22 -04:00
Isaac Connor
f3873d65e4 remove debug 2020-09-02 17:33:38 -04:00
Isaac Connor
ea3fcb16a6 Changes to not just die if not connected to monitor. Instead wait around spitting out an error image. 2020-09-02 16:36:05 -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
Isaac Connor
e21ffbea7d Merge branch 'fix_zms' 2020-04-26 18:43:39 -04:00
Isaac Connor
ae9a5766f5 Merge branch 'release-1.34' into fix_zms 2020-04-26 18:19:30 -04:00
Isaac Connor
c6c8a23c02 sun_path is defined to be 108 bytes. No need for 4095. Quiets compiler warnings 2020-04-24 18:03:00 -04:00
Isaac Connor
ffed88454f Provide a more useful error message when the monitor's function is set to NONE. Fixes #2877 2020-03-09 13:14:09 -04:00
Isaac Connor
492be7cc33 make last_zoom last_scale last_x and last_y members of the StreamBase object instead of static vars so that we can access them in monitorStream 2019-09-26 13:51:49 -04:00
Isaac Connor
09934ed7f5 Fix sendTextFrame 2019-07-26 12:21:25 -04:00
Isaac Connor
8417230690 debug where the comms sock is 2019-03-18 10:55:08 -04:00
Isaac Connor
9b713a489d fix sleep time by using a comparison between the frame display time and the distance between now and when we started playing.
handle infinite fps
2019-03-06 14:50:36 -05:00
Isaac Connor
6c8eac1ac8 Merge branch 'storageareas' into h265 2019-03-06 11:10:01 -05:00
Isaac Connor
abfb5642c8 cleanup and document updateFrameRate 2019-03-06 09:46:28 -05:00
Isaac Connor
95567e07a4 Merge branch 'storageareas' of github.com:/ConnorTechnology/ZoneMinder into storageareas 2019-02-26 11:43:07 -05:00
Isaac Connor
7260f823cb Merge branch 'master' into storageareas 2019-01-21 13:52:38 -05:00
Isaac Connor
a81428f701 add a test for a 0 fps passed in to updateFrameRate which would cause an infinite loop. Fixes #2427 2019-01-21 13:30:00 -05:00
Isaac Connor
87d1390fed Merge branch 'storageareas' into h265 2019-01-16 15:20:17 -05:00