mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-11-01 04:53:04 +08: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
	 James Almer
					James Almer