avcodec: add a get_encode_buffer() callback to AVCodecContext

This callback is functionally the same as get_buffer2() is for decoders, and
implements for the new encode API the functionality of the old encode API had
where the user could provide their own buffers.

Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2021-02-20 16:01:52 -03:00
parent 2c96e6cb95
commit 6e7e3a3820
7 changed files with 131 additions and 4 deletions

View File

@ -15,6 +15,13 @@ libavutil: 2017-10-21
API changes, most recent first:
2021-03-12 - xxxxxxxxxx - lavc 58.131.100 - avcodec.h codec.h
Add a get_encode_buffer callback to AVCodecContext, similar to
get_buffer2 but for encoders.
Add avcodec_default_get_encode_buffer().
Add AV_GET_ENCODE_BUFFER_FLAG_REF.
Encoders may now be flagged as AV_CODEC_CAP_DR1 capable.
2021-03-10 - xxxxxxxxxx - lavf 58.72.100 - avformat.h
Change AVBufferRef related AVStream function and struct size
parameter and fields type to size_t at next major bump.