Isaac Connor
bbba0f679b
Don't need to set timebase. Continue supporting old ffmpeg
2021-01-27 11:48:32 -05:00
Isaac Connor
c94e2c0f13
cleanup
2021-01-22 19:24:27 -05:00
Isaac Connor
736b14327e
allocate our own CodecContext for decoding. Reusing the existing one doesn't work for hwaccel. Add hwaccel flags to let it use Constrained Baseline for Baseline profile streams. Try without specified device if hwdevice_ctx_create fails.
2021-01-08 15:48:01 -05:00
Isaac Connor
f729034e9f
improve hwaccel support
2021-01-07 15:11:46 -05:00
Isaac Connor
d6bbc9bbbb
Set codec_type in ffmpeg_camera instead of in monitor
2020-12-27 11:56:44 -05:00
Isaac Connor
8d52baeee2
Merge branch 'master' into rtsp_server
...
Cleanup Analysis a bit. We can't skip packets just because they are audio. Clean up the state machine transitions a bit to make them a little more readable.
Change logic of PrimeCapture, success MUST return 1. 0 means no error but also no success.
Debugging and braces improvements in local_camera.
2020-12-17 10:16:54 -05:00
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
Isaac Connor
a39a656373
Merge branch 'master' into zma_to_thread
2020-09-29 11:02:40 -04:00
Isaac Connor
d21c04e5dc
add Debug
2020-09-25 16:19:31 -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
5fb56c9f57
Merge branch 'master' into zma_to_thread
2020-08-07 17:52:43 -04: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
869860bb26
Merge branch 'master' into zma_to_thread
2020-07-21 17:49:39 -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
4ff341a0f5
Merge branch 'master' into zma_to_thread
2020-05-02 18:03:42 -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
d2872becfc
Only align buffers to 32bit if using a 32bit pix format. Fixes #2819
2020-02-23 18:14:17 -05: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
Isaac Connor
09fcbad666
Merge branch 'master' into zma_to_thread
2019-11-30 14:59:39 -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
396be10d6f
Merge branch 'master' into zma_to_thread
2019-08-22 12:57:00 -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