Files
Josh Allmann be728e92af ffmpeg: Flush filters before re-initialization.
Also add another condition for re-initialization: if the
input resolution changes. This triggers the filter graph
to re-build and adjust to the new resolution, when CPU
encoders are in use.
2024-08-19 17:18:10 +00:00

18 lines
687 B
C

#ifndef _LPMS_ENCODER_H_
#define _LPMS_ENCODER_H_
#include "decoder.h"
#include "transcoder.h"
#include "filter.h"
int open_output(struct output_ctx *octx, struct input_ctx *ictx);
int reopen_output(struct output_ctx *octx, struct input_ctx *ictx);
void close_output(struct output_ctx *octx);
void free_output(struct output_ctx *octx);
int process_out(struct input_ctx *ictx, struct output_ctx *octx, AVCodecContext *encoder, AVStream *ost,
struct filter_ctx *filter, AVFrame *inf);
int mux(AVPacket *pkt, AVRational tb, struct output_ctx *octx, AVStream *ost);
int encode(AVCodecContext* encoder, AVFrame *frame, struct output_ctx* octx, AVStream* ost);
#endif // _LPMS_ENCODER_H_