Commit Graph

183 Commits

Author SHA1 Message Date
Isaac Connor 7b1ca0e66d Use the new DecodingEnabled function 2020-12-10 14:05:57 -05:00
Isaac Connor c65e63798d Don't do decode when in RECORD OR NODECT and passthrough and no jpegs 2020-12-10 13:47:30 -05:00
Isaac Connor f3f0a6baff remove debug 2020-10-26 18:48:43 -04:00
Isaac Connor 1173f618ec turn off negative pts detection... I have cameras that generate them all the time, they might actually be valid 2020-10-08 15:50:52 -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 b867d0c463 Fix image copy when line sizes are not the same. 2020-08-05 11:33:22 -04:00
Isaac Connor d9a9aeef1d if linesizes don't match, allocate a frame buffer and use that when sws_scaleing and then copy to the image buffer. 2020-07-24 12:37:24 -04:00
Isaac Connor 9b05337e57 Priming capture logs should be debug level, especially if they ar egoing to log passwords 2020-07-13 15:03:04 -04:00
Isaac Connor e675c8373e Merge branch 'release-1.34' 2020-07-07 16:15:56 -04:00
Isaac Connor cae8978501 add an alignment variable to ffmpeg_camera to use wherever we want to tell ffmpeg about the buffer and linesize alignment. Figure out linesize in the constructor so that zm_monitor can pass the info along to zm_image. 2020-07-07 16:12:14 -04:00
Isaac Connor 7354b4d30f Fix compile on old ffmpeg 2020-06-23 14:43:11 -04:00
Isaac Connor 402c0c6a1b Fix build on older ffmpeg 2020-05-14 12:01:03 -04:00
Isaac Connor bbf64de40e If there is a failure when decoding due to lack of support for the codec profile, re-init without hwaccel 2020-05-13 08:04:53 -04:00
Isaac Connor d31216330c Only align buffers to 32bit if using a 32bit pix format. Fixes #2819 2020-04-23 18:07:07 -04:00
Isaac Connor b85cf7d8a1 include error message when complaining about failing to create the hwaccell device 2020-01-07 11:03:45 -05:00
Isaac Connor fd633a2175 Merge branch 'master' of github.com:zoneminder/ZoneMinder 2020-01-05 17:28:50 -05:00
Isaac Connor 05ac82b0bb Handle failure to init hwdevice when trying to use hwaccel. 2020-01-05 17:27:45 -05:00
Isaac Connor b5e3dbd415 put back 32bit alignment with a comment as to why 2019-12-29 12:52:34 -05:00
Isaac Connor 2581b86195 add more content to the error message when can't sws_scale.
Also fix problem when using 32bit on arm instead of 24bit, apparently 0 is a valid return result from sws_scale.
Also change the alignment in av_image_fill_arrays. At some point we cahnged it to 32bit aligned, but in 1.32 we didn't align at all.  Not sure if it matters
.
2019-12-29 12:44:59 -05:00
Selva Nair 5260563ec4 Update frame deltas in the database to be relative to the video start time
Currenltly the frames written to database have delta time measured
from the event start time. As these deltas are also used to generate
any frame on the fly from the recorded video, these should be relative
to the video start time.

Adjust by subtracting the offset of the video start from event start.
Done when the event is closed.

If video is not stored, this has no effect.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2019-11-15 21:55:40 -05:00
Selva Nair dd31279ca3 Fix the recorded video start time
The event start time already includes the duration of the
pre_event frames. Do not back track the video by a further
pre_event_count.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2019-11-15 21:55:40 -05:00
Selva Nair 2e7fad68d1 Properly compute video buffer length when analysis fps is set
Currently the number of video frames kept in the buffer is set as the
pre_event_count. This falls short when the capture fps is larger
than the analysis fps. Fix by computing the retained video duration
as pre_event_count/analysis_fps

No change if analysis fps is not set.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2019-11-15 21:55:40 -05:00
Isaac Connor 46991f04e6 better debugging when fail to sws_scale 2019-11-01 09:24:22 -04:00
Isaac Connor 7068769a90 zm_send_packet_receive_frame sends 0 as success 2019-10-18 13:52:07 -04:00
Isaac Connor 1dda79af46 remove debug 2019-09-25 12:00:00 -04:00
Isaac Connor 17e00cec94 Fix setting rtsp_transport when rtsp 2019-09-17 14:58:16 -04:00
Isaac Connor 4509c6a239 Don't set rtsp options unless we are using rtsp. Should prevent everyone from reporting the warning about unsupported options. Note that I removed some extra includs that have no business in zm_ffmpeg_camera. 2019-09-17 10:31:31 -04:00
Isaac Connor 701aa8d924 add flushing the resample buffer to get the remaining samples encoded 2019-09-13 10:55:30 -04:00
Isaac Connor 59940ab675 report pixformat names instead of just #'s on error 2019-08-28 09:19:57 -04:00
Isaac Connor 886a203bf1 Support hwaccel for non-passthrough case as well 2019-08-21 10:11:58 -04:00
Isaac Connor 01e988ffba remove some redundant debugs. Improve some messages 2019-08-20 14:09:47 -04:00
Isaac Connor ed190340b9 fix typo 2019-08-19 11:12:47 -04:00
Isaac Connor c1984ad7cb Fix problem calculating mem_size using an int from ImageSize. With camera resolutions going up, width*height*colour could exceed 32bits. So use a guarnteed 53bit type, which fixes the memsize calculations. Fixes #2682 2019-08-11 20:21:37 -04:00
Isaac Connor 5b62c91cc2 Improve some debugging to try to diagnose recent segfault report 2019-08-10 14:46:05 -04:00
Isaac Connor bb6d2631c9 Fix hwaccel compile on pi 2019-08-08 09:26:40 -04:00
Isaac Connor f3166663a5 unref hw_device_ctx on Close. I think this should release all the other hwaccel related stuff 2019-07-19 12:51:31 -04:00
Isaac Connor 542d88b6a4 fix compile without HWCONTEXT 2019-07-17 21:10:24 -04:00
Isaac Connor 75af397223 hwFrame isn't defined unless we have HWCONTEXT_H 2019-07-17 20:33:23 -04:00
Isaac Connor ef9fe2dbd6 Free up hwFrame, preventing memleak 2019-07-17 10:06:30 -04:00
Isaac Connor 94cc85aa36 Sorta fix pts on encoded audio packets. Sync is off, but at least it is close 2019-07-07 08:57:22 -04:00
Isaac Connor 726e5c6dd5 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2019-07-03 09:50:49 -04:00
Isaac Connor a9579484b8 gracefully handle failure to config hw pix fmt and debug a bit more 2019-07-03 09:49:53 -04:00
Isaac Connor 2dc60196c5 Code cleanup and cpplint 2019-07-02 11:14:24 -04:00
Isaac Connor dd57fd95ce Clean up cruft from videostore api. Fix packetqueue clear_unwanted_packets to take a pre_event_count and take it into consideration when finding the right spot in the queue to start recording. 2019-06-27 11:11:14 -04:00
Isaac Connor 0686f487ac %s => %d for error count 2019-06-27 04:18:25 -04:00
Isaac Connor d26286a170 fix test for hwtransfer needed 2019-06-27 03:40:18 -04:00
Isaac Connor 2a65b339c1 init hw_pix_fmt in constructor 2019-06-25 22:19:09 -04:00
Isaac Connor 7389bbcb25 better debug in selecting hw_format, add CUDA, add setting device for hwaccel 2019-06-25 21:47:19 -04:00
Isaac Connor a44631a59d rough in support for ffmpeg 3.4 2019-06-25 16:35:07 -04:00
Isaac Connor 5ab4414b11 Only include hwaccel support if LIBAVUTIL_HWCONTEXT_H is deifned 2019-06-25 15:58:55 -04:00