Commit Graph

151 Commits

Author SHA1 Message Date
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
Isaac Connor 679b6b1b2d remove old qsv code 2019-06-25 15:47:23 -04:00
Isaac Connor cf7f3e8a88 add passing hwaccel name and device. use av_make_error_string(ret).c_str() to reduce code and increase consistency 2019-06-25 15:33:54 -04:00
Isaac Connor 2cbcaeebbc clean out old hwdecode stuff. refactor common code out 2019-06-25 14:11:59 -04:00
Isaac Connor 246b4cb9d1 working hwdecode 2019-06-24 17:22:59 -04:00
Isaac Connor dab9544845
Revert audio sync fixes (#2646)
* Reference /run/zm instead of /var/run/zm because systemd-tmpfiles complains about it

* Spacing, google code style and tabs to spaces

* Revert the work I did to srt packets by dts after changing their time_base.  It doesn't work.  Instead since dts doesn't actually matter to playback, only ffmpeg storing, munge it to whatever is neccessary to make ffmpeg happy.
2019-06-24 11:27:47 -04:00
Isaac Connor 470da03322 Merge sync fixes from storageareas 2019-06-20 15:14:20 -04:00
Isaac Connor 30a210f68f also need to adjust dts of last packet when switching events 2019-06-12 10:05:08 -04:00
Isaac Connor 0a9ae1d4f9 Include pixdesc.h to get av_get_pix_fmt_name(AVPixelFormat) 2019-06-11 13:55:57 -04:00
Isaac Connor acb95709e6 Fix issues with too much audio in events by storing packets in the queue with their timestamps converted to AV_TIME_BASE_Q, so that we can sort video and audio packets together. 2019-06-11 10:19:42 -04:00
Isaac Connor 7671f59d2f Add error counting on decoding 2019-04-09 12:27:40 -04:00
Isaac Connor accaeadb18 code cleanup. dump_codecs 2019-04-08 13:51:41 -04:00
Isaac Connor 9faaba9300 Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2019-04-05 15:18:39 -04:00
Isaac Connor 9ae6acf532 Fix for opening audio_in_codec 2019-04-04 17:20:21 -04:00
Isaac Connor d97dd6cdd9 Should close videostore before closing input codecs/streams. 2019-04-04 14:11:56 -04:00
Isaac Connor bd412fa9ca Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2019-04-02 14:25:50 -04:00
Isaac Connor 036560e3e9 Allow packets with pts=AV_NOPTS_VALUE 2019-04-02 14:23:49 -04:00
Isaac Connor a6998cbc9e Use FFMPEGDeInit instead of avformat_network_deinit 2019-04-01 13:39:11 -04:00
Isaac Connor 6c8eac1ac8 Merge branch 'storageareas' into h265 2019-03-06 11:10:01 -05:00
Isaac Connor 5029d7214a Merge branch 'master' into storageareas 2019-02-18 17:00:45 -05:00
Isaac Connor 9996b3e718 Merge branch 'master' into break_videostorage 2019-02-17 12:10:32 -05:00
Isaac Connor a39b92154c wip 2019-01-17 08:49:48 -05:00
Isaac Connor 87d1390fed Merge branch 'storageareas' into h265 2019-01-16 15:20:17 -05:00
Isaac Connor 8c53f778b6 Start and stop events not just on keyframe. This means we must always queue packets 2019-01-15 11:32:44 -05:00
Isaac Connor 84c812725e spacing, improve debug. WHen looking for starting keyframe in packetqueue, use <= instead of <. 2019-01-14 14:00:45 -05:00
Isaac Connor c4c6d5b642 switch to swr_convert_frame as a test 2019-01-05 10:15:22 -05:00
Isaac Connor 3d9c8814f9 increase error_count logging 2018-12-27 13:52:41 -05:00
Isaac Connor 23124d634c improve ImageBufferCount too small message 2018-12-03 11:02:45 -05:00
Isaac Connor 9cbc3352b9 Implement an error count. Return -1 when it gets over 100 so that the camera will be reopened. 2018-11-29 13:09:29 -05:00
Isaac Connor a8329465fb Merge branch 'master' into h265 2018-10-22 10:30:01 -04:00
Isaac Connor 17726bbe38 Actually say how big the ImageBufferCOunt should be 2018-10-17 17:19:27 -04:00
Isaac Connor 5fce783b65 Merge branch 'smarter_packetqueue' into storageareas 2018-10-15 11:34:05 -04:00
Isaac Connor 990c4b1b45 Add a warning when there are more videoframes in the packetqueue than image_buffers 2018-10-15 11:33:58 -04:00