Commit Graph

25 Commits

Author SHA1 Message Date
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
Isaac Connor
9f86fd3b16 add default_width and height to constructor 2022-01-10 17:36:49 -05: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
762476ec76 Build: Promote libswscale 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:31 +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
Isaac Connor
a0df6aacaf Spacing 2021-05-21 10:38:55 -04:00
Isaac Connor
db944cbca8 add debug of frame and align to 32bytes 2021-05-19 16:11:25 -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
c8abeddc9c swscale is a problem. When to use alignment/padding? Defaulting to alignment=1 makes libvnc work, but is less performant. Some scale operations require padding. 2021-02-24 10:10:37 -05:00
Isaac Connor
bf0ae8b270 use fix_deprecated_pix_fmt function. Fix logic on out_buffer_size. 2021-02-19 20:43:24 -05:00
Isaac Connor
6d8a7a7a4c add SWSCale::GetBufferSize to reduce duplicated lines of code. Makes input buffer size not have to match the aligned size. Reading from doesn't generally cause a crash. 2021-02-18 13:47:27 -05: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
Isaac Connor
284b9f963f Merge branch 'master' into zma_to_thread 2020-12-29 12:18:26 -05:00
Isaac Connor
b261fbb397 Merge branch 'master' into zma_to_thread 2020-12-07 16:26:26 -05:00
Isaac Connor
9713a2ec00 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2020-11-17 11:09:31 -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
Isaac Connor
7575afc8d5 Merge branch 'master' into zma_to_thread 2020-07-21 17:38:32 -04:00
hax0kartik
6886b2b375 Modify Convert to scale as well 2020-03-28 15:17:19 -07:00
Isaac Connor
cd3046abb3 Merge branch 'storageareas' into zma_to_thread 2018-04-14 11:03:08 -04:00
Isaac Connor
c6635b8096 make swscale more robust by moving bits that can fail into an init function instead of the constructor 2018-04-12 10:24:10 -04:00
Isaac Connor
ef5e296144 some fixes 2017-11-17 14:30:38 -05:00
Isaac Connor
3129afa5d6 fixup decoding when recording from a non-ffmpeg suorce 2017-11-14 13:16:07 -08:00
Isaac Connor
39b12057f2 add saveJPEGs to Events 2017-11-13 21:34:39 -05:00
Isaac Connor
a4cf47b5c3 move swscale into it's own files 2017-08-23 15:06:12 -04:00