summaryrefslogtreecommitdiff
path: root/libavcodec/codec.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2020-06-09 18:31:32 -0300
committerJames Almer <jamrial@gmail.com>2020-06-18 17:11:37 -0300
commit827d6fe73d2f5472c1c2128eb14fab6a4db29032 (patch)
tree7bc2bdec4590e7b4adb268e34007e42b857d2967 /libavcodec/codec.h
parent71f19bf5e31ec4039ef0f9e22b157657c57e2cb9 (diff)
downloadffmpeg-827d6fe73d2f5472c1c2128eb14fab6a4db29032.tar.gz
avcodec/encode: restructure the core encoding code
This commit follows the same logic as 061a0c14bb, but for the encode API: The new public encoding API will no longer be a wrapper around the old deprecated one, and the internal API used by the encoders now consists of a single receive_packet() callback that pulls frames as required. amf encoders adapted by James Almer librav1e encoder adapted by James Almer nvidia encoders adapted by James Almer MediaFoundation encoders adapted by James Almer vaapi encoders adapted by Linjie Fu v4l2_m2m encoders adapted by Andriy Gelman Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/codec.h')
-rw-r--r--libavcodec/codec.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/libavcodec/codec.h b/libavcodec/codec.h
index 1fda619ee7..713774a632 100644
--- a/libavcodec/codec.h
+++ b/libavcodec/codec.h
@@ -282,14 +282,10 @@ typedef struct AVCodec {
int (*decode)(struct AVCodecContext *, void *outdata, int *outdata_size, struct AVPacket *avpkt);
int (*close)(struct AVCodecContext *);
/**
- * Encode API with decoupled packet/frame dataflow. The API is the
- * same as the avcodec_ prefixed APIs (avcodec_send_frame() etc.), except
- * that:
- * - never called if the codec is closed or the wrong type,
- * - if AV_CODEC_CAP_DELAY is not set, drain frames are never sent,
- * - only one drain frame is ever passed down,
+ * Encode API with decoupled frame/packet dataflow. This function is called
+ * to get one output packet. It should call ff_encode_get_frame() to obtain
+ * input data.
*/
- int (*send_frame)(struct AVCodecContext *avctx, const struct AVFrame *frame);
int (*receive_packet)(struct AVCodecContext *avctx, struct AVPacket *avpkt);
/**