Isaac Connor
75a014321e
Spacing, remove tests for v4l2, move control setting/getting code to a single function.
2021-10-05 19:49:42 -04:00
Isaac Connor
509a5549be
Merge branch 'master' of https://github.com/ZoneMinder/zoneminder
2021-09-28 10:31:04 -04:00
Isaac Connor
aca477e737
Add warning when MaxImageBufferCount is less than keyframe interval
2021-09-28 10:30:51 -04:00
Isaac Connor
95a7c6c32f
fix crash on 32bit pi due to use of %ld instead of %PRId64
2021-09-28 10:29:41 -04:00
Isaac Connor
ac375bc623
fix errant =
2021-09-27 11:03:29 -04:00
Isaac Connor
202d95fc5a
handle AV_HWDEVICE_TYPE_MMAL not being defined
2021-09-27 10:58:16 -04:00
Isaac Connor
c78e035057
Fix crash due to int64 cast to a %ld format.
2021-09-23 19:07:07 -04:00
Isaac Connor
aae967e895
Add mmal device/pix fmt type
2021-09-23 16:39:35 -04:00
Isaac Connor
30fa641186
initialize video_first_pts and when setting it need to specify microseconds otherwise we get nanoseconds. White space.
2021-09-21 14:29:05 -04:00
Isaac Connor
fba7dba3d0
Reduce logging level to debug dealing with index == -1, which is used in zmu to mean the last captured image. Fixes #3354
2021-09-16 10:03:30 -04:00
ColorfullyZhang
6009bba339
Set mysql character set to utf8 explicitly to support chinese characters (or other special characters).
2021-09-16 14:41:24 +08:00
Isaac Connor
e6f4cdb584
Remove redundant notify_all, spelling mistake
2021-09-15 13:38:06 -04:00
Mike Dussault
3f97df72c8
Fixed a bug in Image::Buffer that would return the wrong location in the image if the image had > 1 channels (and if the request were for x > 0).
2021-09-15 10:13:02 -07:00
Isaac Connor
1ee85caaae
Don't crash when unable to create source. erase will call the desctructor. Fixes #3344
2021-09-15 12:56:39 -04:00
Isaac Connor
d2cf89565e
wait won't wake up other threads, so notify first. Since we have the lock, this should be ok
2021-09-15 12:53:41 -04:00
Isaac Connor
bf5c0a8617
More properly fix the threading lock. Instead of waiting on a packet, release it and wait on the packetqueue.
2021-09-14 16:21:32 -04:00
Isaac Connor
167dece604
Revert "use get_packet_and_increment_it instead of the two step to improve locking"
...
This reverts commit a44bbf8e34
.
2021-09-14 15:47:35 -04:00
Isaac Connor
e140620900
notify anyone waiting in packetqueue before waiting on a packet in motion detection. Should fix decode lockup
2021-09-14 13:38:55 -04:00
Isaac Connor
58f933ba1e
Add missing update_function_pointers so that we use SSE blend functions. Significantly reduces cpu use in motion detection.
2021-09-13 15:03:42 -04:00
Peter Keresztes Schmidt
5fda85bf2e
Image: Codestyle changes
2021-09-12 11:38:44 +02:00
Peter Keresztes Schmidt
ecf6cc80aa
Image: Fix Wclobbered warnings
...
From C99 spec:
[...] objects of automatic storage duration that are local to the function containing the invocation of the corresponding setjmp macro that do not have volatile-qualified type and have been changed between the setjmp invocation and longjmp call are indeterminate
Remove the variables in question or pass them as const refs.
2021-09-12 11:36:51 +02: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
a44bbf8e34
use get_packet_and_increment_it instead of the two step to improve locking
2021-09-08 18:35:01 -04:00
Peter Keresztes Schmidt
6e96cbe14a
Misc: Merge ZM_HAS_V4L with ZM_HAS_V4L2
2021-09-08 00:19:08 +02:00
Peter Keresztes Schmidt
0ac060fb78
LocalCamera: Fix Wformat warnings on FreeBSD
2021-09-08 00:19:08 +02:00
Peter Keresztes Schmidt
443b84270a
LocalCamera: Add a missing include to fix FreeBSD build
...
Fixes #3330
2021-09-08 00:19:08 +02:00
Peter Keresztes Schmidt
c83882a4c7
Build: Move V4L2 detection into its own module
...
Improves detection across different platforms (esp. FreeBSD) since system paths are automatically taken into account (this is in contrast to check_include_file).
2021-09-08 00:18:24 +02: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
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