Commit Graph
401 Commits
Author SHA1 Message Date
Alejandro Criado-Pérez 543683aa4c Corrections on cpp and h files 2023-08-13 01:27:19 +02:00
Isaac Connor d21d53eeb9 Remove reorder_queue_size when re-parsing opts to avoid warnings 2023-08-12 14:50:30 -04:00
Isaac Connor f4d3b979f4 Implement automatic setting of redorder_queue_size in videostore by implementing has_out_of_order_packets and get_max_keyframe_interval in the monitor object. 2023-07-19 12:38:11 -04:00
Isaac Connor 24eecfeddb Put back support for ffmpeg < 5 2023-06-27 15:16:00 -04:00
iconnor 62789a83ab Implement more fixes for ffmpeg5 channel deprecations. 2023-06-27 13:20:19 -04:00
Isaac Connor 070b70c26b Handle ffmpeg5 channel deprecations 2023-06-19 10:57:13 -04:00
Isaac Connor 9a4376adcc Add reason for error setting up device 2023-02-26 16:31:32 -05:00
Isaac Connor af6d2c6ca3 The sw pix format for qsv should be YUV420P 2023-02-26 11:00:50 -05:00
Isaac Connor 6505bba826 Add qsv codec options 2023-02-25 19:00:31 -05:00
Isaac Connor 95f9e0b19a Fix crash from getting packet from rend 2023-01-12 09:25:44 -05:00
Isaac Connor 65952705ac Fix logging of situation. I think inserting at rend, changes the value of rend. So reorder the lines a bit and include the dts of the packet we are inserting after 2022-12-24 12:33:41 -05:00
Isaac Connor a1595c0093 Default to use faststart since we close events in a separate thread we can get away with this now 2022-10-12 19:15:04 -04:00
Isaac Connor 1cf0245aca Don't set AVFMT_TS_NONSTRICT. Crashes on ffmpeg 5. Fixes #3497 2022-08-12 18:21:58 -04:00
Isaac Connor 3034636501 Provide support for libaom-av1 2022-08-09 15:47:39 -04:00
Doug Nazar f4dd897ef4 Convert AVFrame* to custom unique_ptr (av_frame_ptr).
Switch all owning AVFrame* variables to av_frame_ptr for
automatic cleanup.

Use AVBufferRef to store frame data in AVFrame where appropriate
so that it can be freed automatically with it's AVFrame.

Handle allocation errors.
2022-07-30 13:21:11 -04:00
Doug Nazar acbdf1854d Add guard to handle resetting AVPacket after use.
Also handle allocation failures.
2022-07-29 14:56:38 -04:00
Doug Nazar 110cc436a3 Switch from av_init_packet() to av_packet_alloc()
Remove all uses of deprecated av_init_packet() and switch any stack
based AVPackets to unique_ptrs allocated with av_packet_alloc().

Ensure that all code paths call av_packet_unref() after use to reset
before next usage.
2022-07-29 14:56:26 -04:00
Isaac Connor 7f192c4e47 Merge pull request #3551 from dougnazar/fix_crash
Fix zmc Segfault on 1.36.20
2022-07-28 16:28:32 -04:00
Isaac Connor f463246e43 Log reorder_queue_size 2022-07-28 15:46:01 -04:00
Isaac Connor 89277f8e67 Use encoder options to specify reorder_queue size used. Clean up repeated options parsing 2022-07-07 13:33:06 -04:00
Isaac Connor 0da5403a3c rework queuing to just have a depth of 10. Finish replacing AvPacket opkt with AVPacket *opkt 2022-06-17 10:34:59 -04:00
Isaac Connor c2e91529ef make reorder_queues a map. Move it to writePacket. Update code for opkt.. 2022-06-16 18:29:23 -04:00
Isaac Connor 4e39de0e00 Merge branch 'master' into reorder_queue 2022-06-13 18:20:01 -04:00
Isaac Connor 95fe6e1e00 Don't coipy opkt.dts to pts as it will be done in write_packet 2022-05-30 09:53:32 -04:00
Isaac Connor f8767f7dfd Merge branch 'master' of github.com:ZoneMinder/zoneminder 2022-05-20 14:14:24 -04:00
Isaac Connor 15fda49b64 Put back assigning pts to dts if ipkt->pts == AV_NOPTS_VALUE 2022-05-20 14:14:19 -04:00
Isaac Connor 3f2de7a45b Fix inverted logic breaking audio 2022-05-20 13:56:32 -04:00
Isaac Connor 7aaa32d424 Use AV_NOPTS_VALUE instead of 0 in first_dts/first_pts variables. Don't adjust dts when it's AV_NOPTS_VALUE in writeVideoPacket. Handle it better in writePacket. 2022-05-12 11:05:38 -04:00
Isaac Connor 180ef61641 Rouge in a reorder queue in videostore to handle out of order h265 packets 2022-05-01 13:17:28 -04:00
Isaac Connor cffb57799a const_cast away the constness of oformat so that we can set AV_TS_NOTSTRICT 2022-04-30 09:30:04 -04:00
Isaac Connor 1df601c20d Don't set flags |= AVFMT_TS_NONSTRICT because we can't in ffmpeg5 2022-04-28 15:40:54 -04:00
Isaac Connor a092ca90eb Fix logging of next_dts instead of last_dts 2022-04-28 10:36:06 -04:00
Isaac Connor ccfbed6735 remove setting time base I don't know which version of ffmpe supports this, but not mine so it isn't solving the problem I thought it was 2022-04-21 17:00:10 -04:00
Isaac Connor 1a6f651424 time_base requires newer ffmpeg 2022-04-21 10:36:28 -04:00
Isaac Connor 8ed50ea435 pkt_duration isn't use for decoding so don't bother setting it. Set the time base for the frame. Reduce content in debug logging. 2022-04-20 18:47:09 -04:00
Isaac Connor 2b1aa90b8e Implement last_dts[] because next_dts[] isn't actually useful. This fixes another ffmpeg deprecation problem by keep our own copy of cur_dts 2022-04-07 13:12:34 -04:00
Isaac Connor 1e6f34235c replace cur_dts mangling with use of our next_dts array 2022-04-06 09:59:13 -04:00
Isaac Connor 278624081f Must set AVFMT_TS_NONSTRICT in oformat->flags not oc->flags 2022-04-04 16:28:46 -04:00
Isaac Connor a689b3636d Only define av1 for newer ffmpeg 2022-04-03 17:38:27 -04:00
Isaac Connor 513c228ff3 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2022-04-03 16:29:15 -04:00
Isaac Connor 162595edbc Don't try to mangle pts and dts. We will have to depend on packetqueue re-ordering 2022-04-03 16:25:05 -04:00
Exuvo c3b216d90e Ignore cur_dts for now 2022-03-11 21:46:59 +01:00
Exuvo d1395dab9a Fix ffmpeg 5 const errors 2022-03-11 21:40:25 +01:00
Exuvo 9fd0a94c9f Add support for vp9 and av1 encoding 2022-03-11 13:37:27 +01:00
Isaac Connor aaaf87abdb Don't try again if the error was ENOSPACE. it crashes and there is just no point. 2022-01-11 09:08:01 -05:00
Isaac Connor b88e699d7e Merge branch 'master' of github.com:ZoneMinder/zoneminder 2022-01-10 19:56:04 -05:00
Isaac Connor 81fc392bc2 If error is ENOSPACE just give up. ffmpeg crashes if we try again. 2022-01-10 19:56:00 -05:00
Isaac Connor 376d7fd7e5 log error if avcodec_parameters_to_context fails. Mostly to quiet cppcheck. Remove duplicated assignment to sample_fmt. 2022-01-10 17:36:50 -05:00
Isaac Connor dd949bb129 av_write_trailer can return a positive value which is not an error 2021-11-02 17:10:02 -04:00
Isaac Connor 52f0240334 free and re-init opts as needed 2021-10-19 13:05:11 -04:00