mirror of
https://github.com/k4yt3x/video2x.git
synced 2024-12-28 23:19:11 +00:00
22 lines
532 B
C++
22 lines
532 B
C++
#ifndef FILTER_H
|
|
#define FILTER_H
|
|
|
|
#include <vector>
|
|
|
|
extern "C" {
|
|
#include <libavcodec/avcodec.h>
|
|
#include <libavfilter/avfilter.h>
|
|
#include <libavutil/buffer.h>
|
|
}
|
|
|
|
// Abstract base class for filters
|
|
class Filter {
|
|
public:
|
|
virtual ~Filter() = default;
|
|
virtual int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) = 0;
|
|
virtual int process_frame(AVFrame *in_frame, AVFrame **out_frame) = 0;
|
|
virtual int flush(std::vector<AVFrame *> &flushed_frames) { return 0; }
|
|
};
|
|
|
|
#endif // FILTER_H
|