mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-17 12:30:11 +01:00
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:
@@ -24,6 +24,7 @@
|
||||
#include "libavutil/frame.h"
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "packet.h"
|
||||
|
||||
/**
|
||||
* Called by encoders to get the next frame for encoding.
|
||||
@@ -36,4 +37,11 @@
|
||||
*/
|
||||
int ff_encode_get_frame(AVCodecContext *avctx, AVFrame *frame);
|
||||
|
||||
/**
|
||||
* Get a buffer for a packet. This is a wrapper around
|
||||
* AVCodecContext.get_encode_buffer() and should be used instead calling get_encode_buffer()
|
||||
* directly.
|
||||
*/
|
||||
int ff_get_encode_buffer(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int flags);
|
||||
|
||||
#endif /* AVCODEC_ENCODE_H */
|
||||
|
||||
Reference in New Issue
Block a user