Commit Graph

145 Commits

Author SHA1 Message Date
Exuvo
d1395dab9a Fix ffmpeg 5 const errors 2022-03-11 21:40:25 +01:00
Isaac Connor
34d7f192b4 Remove field that ffmpeg 5.0 doesn't have. 2022-02-01 07:23:12 -05: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
Peter Keresztes Schmidt
2d71743372 FFmpeg: Remove code paths required only by 2.8 and older
With Xenial support dropped we require FFmpeg 3.2 and newer.
2021-06-05 20:40:12 +02:00
Peter Keresztes Schmidt
0625f6ca1c Misc: Cleanup some includes 2021-06-05 15:08:38 +02:00
Peter Keresztes Schmidt
3d34e6f177 Build: Promote libswresample to a required dependency
FFmpeg is an integral component of ZM. Promote the appropriate libraries to required dependencies.
This reduces the possible build configurations greatly and thus maintenance burden.
2021-06-05 14:27:42 +02:00
Peter Keresztes Schmidt
1a6904a297 Build: Promote libavutil to a required dependency
FFmpeg is an integral component of ZM. Promote the appropriate libraries to required dependencies.
This reduces the possible build configurations greatly and thus maintenance burden.
2021-06-05 14:21:41 +02:00
Peter Keresztes Schmidt
7d501a6585 Remove libavresample support
libavresample hasn't been maintained for a long time by FFmpeg since libswresample superseded it.
In 2018 it was officially deprecated [1].

Let's remove the support for it since there is no need to maintain this option further.

[1] https://patchwork.ffmpeg.org/project/ffmpeg/patch/20171225175335.18183-1-atomnuker@gmail.com/
2021-06-04 23:46:58 +02:00
Isaac Connor
9f685d6c2b Fixup style and warnings in zm_dump_codecpar 2021-06-04 17:32:45 -04:00
Isaac Connor
d713770dea Include more fields in zm_dump_codecpar and zm_dump_codec 2021-06-04 15:01:48 -04:00
Isaac Connor
d2941d6b87 Always print SAR and tel about unknown codec type 2021-05-31 16:00:17 -04:00
Peter Keresztes Schmidt
68bedfe48f Fix logging format string mismatches
* Remove SZFMTD format macro and use %zu instead for size_t. %zu is understood by every compiler nowadays.
2021-04-30 00:26:24 +02:00
Isaac Connor
a38463f99e spacing 2021-04-19 10:26:08 -04:00
Isaac Connor
8a33fb6665 Include codec_type in stream and packet dumps 2021-03-03 15:23:58 -05:00
Isaac Connor
0ac3e6fd5b remove unneeded strlen 2021-02-22 20:40:30 -05:00
Isaac Connor
7a17a6f9e8 Fix always returning YUV420P despite being valid format. 2021-02-22 11:14:00 -05:00
Isaac Connor
8a329df5ec change how fix_deprecated_pix_fmt works to return a value so we can use it elsewhere 2021-02-18 13:47:27 -05:00
Isaac Connor
dcf1ff3133 Merge pull request #3152 from Carbenium/ffmpeg-warnings
Fix some ffmpeg deprecation warnings
2021-02-09 20:15:41 -05:00
Peter Keresztes Schmidt
e18f9e1f03 FFmpeg: Drop function which is not needed with supported ffmpeg versions
avformat_alloc_output_context2 was introduced in libavformat 53.2 (2011). Drop our own implementation which was used if the library version wasn't available. It isn't used anymore an causes compile warnings.
2021-02-10 00:21:23 +01:00
Peter Keresztes Schmidt
d0b80d63c3 FFmpeg: Fix a version check to avoid deprecation warnings on newer systems 2021-02-10 00:20:34 +01:00
Isaac Connor
e3eebeb9dd Must return ret to handle case where ret=0. 2021-02-09 11:30:06 -05:00
Peter Keresztes Schmidt
938676b129 ffmpeg: exit dumpPacket early if debug logging is not enabled 2021-02-07 11:58:17 +01:00
Peter Keresztes Schmidt
0dbc39ee25 Cleanup and reorganize includes
With this commit a unified structure for includes is introduced.
The general rules:
 * Only include what you need
 * Include wherever possible in the cpp and forward-declare in the header

 The includes are sorted in a local to global fashion. This means for the include order:
  0. If cpp file: The corresponding h file and an empty line
  1. Includes from the project sorted alphabetically
  2. System/library includes sorted alphabetically
  3. Conditional includes
2021-02-04 18:02:01 +01:00
Peter Keresztes Schmidt
e09fa1bebf Remove includes of <cinttypes>
Instead of including <cinttypes> directly, zm_define.h should be used
to get the typedef'ed types as well.
2021-02-02 21:37:26 +01:00
Isaac Connor
9ef9fe81fa Don't log error when flushing queues 2021-01-30 14:05:19 -05:00
Isaac Connor
95d2b1518e Don't treat send_frame null as errors. We are ni flushing mode 2021-01-29 17:07:58 -05:00
Isaac Connor
d16a7b98eb fix send_packet_receive_frame. Can't just resend the same packet until we get a frame! 2021-01-28 10:04:02 -05:00
Isaac Connor
d64745a5da Add debug in zm_send_packet_receive_frame 2021-01-28 09:08:33 -05:00
Isaac Connor
08165c06df Add audio details to zm_dump_codecpar 2021-01-22 19:24:15 -05:00
Isaac Connor
430d64ba67 create fix_deprecated_pix_fmt function to adjust deprecated pixfmts 2021-01-15 17:01:59 -05:00
Isaac Connor
6c696f4025 Return avcodec errors codes instead of 0/1 2020-12-30 21:22:55 -05:00
Isaac Connor
a39a656373 Merge branch 'master' into zma_to_thread 2020-09-29 11:02:40 -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
Andrew Bauer
a0bc60ceda change not enabling ffmpeg msg to debug 2020-08-18 10:34:07 -05:00
Isaac Connor
869860bb26 Merge branch 'master' into zma_to_thread 2020-07-21 17:49:39 -04:00
Isaac Connor
7575afc8d5 Merge branch 'master' into zma_to_thread 2020-07-21 17:38:32 -04:00
Isaac Connor
9f73a55087 Make params to is_video_* a const because we don
't alter it
2020-05-07 13:39:32 -04:00
Isaac Connor
4ff341a0f5 Merge branch 'master' into zma_to_thread 2020-05-02 18:03:42 -04:00
Isaac Connor
7a7f366eb1 Change semantics of zm_send_packetreceive_frame to return the # of bytes consumed. This is inline with how to old deprecated api used to work. The new api consumes the packet, so just return packet size. 2020-04-24 19:05:17 -04:00
Isaac Connor
bbcd1846e7 Fix hang caused by using %d instead of PRIu64 in formatting string 2019-12-29 12:44:30 -05:00
Andrew Bauer
00cedc92d2 fix typo 2019-12-28 08:37:16 -06:00
Isaac Connor
09fcbad666 Merge branch 'master' into zma_to_thread 2019-11-30 14:59:39 -05:00
Isaac Connor
a0f021ee12 Handle the case of flushing resampler by sending NULL 2019-10-17 17:37:36 -04:00
Isaac Connor
d03de98317 remove carriage returns in ffmpeg log lines 2019-10-16 09:00:39 -04:00
Isaac Connor
6925a75831 codec not ready is not an error. Make it a debug 2019-09-15 18:01:38 -04:00
Isaac Connor
306bda86c2 fix sws_get_delay 2019-09-13 21:28:43 -04:00
Isaac Connor
eafa0da06f fixes, handle when audio codec isn't open in ffmpeg_camera 2019-09-13 16:06:25 -04:00
Isaac Connor
3a5d1ff3ca Hack in missing bits for ubuntu trusty/libav/avresample 2019-09-13 15:51:35 -04:00
Isaac Connor
5ddd20ed1a refactor code. Handle resample buffering during encoding instead of when closing file 2019-09-13 14:34:53 -04:00
Isaac Connor
701aa8d924 add flushing the resample buffer to get the remaining samples encoded 2019-09-13 10:55:30 -04:00