mirror of
https://github.com/k4yt3x/video2x.git
synced 2026-02-14 00:54:47 +08:00
feat(*): rewritten the project with C/C++ (#1172)
This commit is contained in:
20
include/filter.h
Normal file
20
include/filter.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef FILTER_H
|
||||
#define FILTER_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
extern "C" {
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavfilter/avfilter.h>
|
||||
}
|
||||
|
||||
// Abstract base class for filters
|
||||
class Filter {
|
||||
public:
|
||||
virtual ~Filter() {}
|
||||
virtual int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx) = 0;
|
||||
virtual AVFrame *process_frame(AVFrame *input_frame) = 0;
|
||||
virtual int flush(std::vector<AVFrame *> &processed_frames) = 0;
|
||||
};
|
||||
|
||||
#endif // FILTER_H
|
||||
Reference in New Issue
Block a user