1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-07-11 14:30:22 +02:00

fftools/ffmpeg: add encoder private data

Start by moving OutputStream.last_frame to it. In the future it will
hold other encoder-internal state.
This commit is contained in:
Anton Khirnov
2023-03-25 19:46:28 +01:00
parent 44accfef41
commit f30b620e98
4 changed files with 58 additions and 11 deletions

View File

@ -557,6 +557,8 @@ typedef struct KeyframeForceCtx {
int dropped_keyframe;
} KeyframeForceCtx;
typedef struct Encoder Encoder;
typedef struct OutputStream {
const AVClass *class;
@ -588,9 +590,9 @@ typedef struct OutputStream {
AVRational mux_timebase;
AVRational enc_timebase;
Encoder *enc;
AVCodecContext *enc_ctx;
AVFrame *filtered_frame;
AVFrame *last_frame;
AVFrame *sq_frame;
AVPacket *pkt;
int64_t last_dropped;
@ -824,6 +826,9 @@ AVBufferRef *hw_device_for_filter(void);
int hwaccel_decode_init(AVCodecContext *avctx);
int enc_alloc(Encoder **penc, const AVCodec *codec);
void enc_free(Encoder **penc);
int enc_open(OutputStream *ost, AVFrame *frame);
void enc_subtitle(OutputFile *of, OutputStream *ost, AVSubtitle *sub);
void enc_frame(OutputStream *ost, AVFrame *frame);