1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
/**
* @file avfilter.h Video filter using libavfilter -- internal API
*
* Copyright (C) 2020 Mikhail Kurkov
*/
/* Maximum filter length */
#define MAX_DESCR 512
/* Filter state */
struct avfilter_st {
struct vidfilt_enc_st vf; /* base class */
struct vidsz size;
enum vidfmt format;
bool enabled;
AVFilterContext *buffersink_ctx;
AVFilterContext *buffersrc_ctx;
AVFilterGraph *filter_graph;
AVFrame *vframe_in;
AVFrame *vframe_out;
};
/*
* Filter API
*/
int filter_init(struct avfilter_st *st, const char *filter_descr,
struct vidframe *frame);
void filter_reset(struct avfilter_st *st);
bool filter_valid(const struct avfilter_st *st, const struct vidframe *frame);
int filter_encode(struct avfilter_st *st, struct vidframe *frame,
uint64_t *timestamp);
|