- FilterGraph (boost::shared_ptr<const FFmpegContent> content, libdcp::Size s, AVPixelFormat p);
- ~FilterGraph ();
-
- bool can_process (libdcp::Size s, AVPixelFormat p) const;
- std::list<std::pair<boost::shared_ptr<Image>, int64_t> > process (AVFrame * frame);
-
-private:
- AVFilterContext* _buffer_src_context;
- AVFilterContext* _buffer_sink_context;
- libdcp::Size _size; ///< size of the images that this chain can process
- AVPixelFormat _pixel_format; ///< pixel format of the images that this chain can process
- AVFrame* _frame;
+ FilterGraph() = default;
+ virtual ~FilterGraph ();
+
+ FilterGraph (FilterGraph const&) = delete;
+ FilterGraph& operator== (FilterGraph const&) = delete;
+
+ void setup (std::vector<Filter const *>);
+ AVFilterContext* get (std::string name);
+
+protected:
+ virtual std::string src_parameters () const = 0;
+ virtual std::string src_name () const = 0;
+ virtual void set_parameters (AVFilterContext* context) const = 0;
+ virtual std::string sink_name () const = 0;
+
+ AVFilterGraph* _graph = nullptr;
+ /** true if this graph has no filters in, so it just copies stuff straight through */
+ bool _copy = false;
+ AVFilterContext* _buffer_src_context = nullptr;
+ AVFilterContext* _buffer_sink_context = nullptr;
+ AVFrame* _frame = nullptr;