diff options
author | James Almer <jamrial@gmail.com> | 2020-06-09 18:31:32 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2020-06-18 17:11:37 -0300 |
commit | 827d6fe73d2f5472c1c2128eb14fab6a4db29032 (patch) | |
tree | 7bc2bdec4590e7b4adb268e34007e42b857d2967 /libavcodec/internal.h | |
parent | 71f19bf5e31ec4039ef0f9e22b157657c57e2cb9 (diff) | |
download | ffmpeg-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/internal.h')
-rw-r--r-- | libavcodec/internal.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 0a72a0e372..78f0e444fa 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -113,6 +113,10 @@ typedef struct DecodeSimpleContext { AVFrame *out_frame; } DecodeSimpleContext; +typedef struct EncodeSimpleContext { + AVFrame *in_frame; +} EncodeSimpleContext; + typedef struct AVCodecInternal { /** * Whether the parent AVCodecContext is a copy of the context which had @@ -151,6 +155,8 @@ typedef struct AVCodecInternal { void *frame_thread_encoder; + EncodeSimpleContext es; + /** * Number of audio samples to skip at the start of the next decoded frame */ @@ -170,7 +176,6 @@ typedef struct AVCodecInternal { * buffers for using new encode/decode API through legacy API */ AVPacket *buffer_pkt; - int buffer_pkt_valid; // encoding: packet without data can be valid AVFrame *buffer_frame; int draining_done; int compat_decode_warned; |