X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffilter_graph.h;h=e474f851f47af56ffe6096b583a937202d82ad86;hb=HEAD;hp=2b54d7829b87ef24d9f41e40adc05546fdf54f3d;hpb=b249700e1da7dd6631a8b4440587f4093a2bdef1;p=dcpomatic.git diff --git a/src/lib/filter_graph.h b/src/lib/filter_graph.h index 2b54d7829..e474f851f 100644 --- a/src/lib/filter_graph.h +++ b/src/lib/filter_graph.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2015 Carl Hetherington + Copyright (C) 2012-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,22 +18,32 @@ */ + /** @file src/lib/filter_graph.h * @brief A graph of FFmpeg filters. */ + #ifndef DCPOMATIC_FILTER_GRAPH_H #define DCPOMATIC_FILTER_GRAPH_H -#include "util.h" + +#include "filter.h" +#include +LIBDCP_DISABLE_WARNINGS extern "C" { #include } +LIBDCP_ENABLE_WARNINGS +#include +#include + +class Filter; +class Image; struct AVFilterContext; struct AVFrame; -class Image; -class Filter; + /** @class FilterGraph * @brief A graph of FFmpeg filters. @@ -41,27 +51,28 @@ class Filter; class FilterGraph { public: - FilterGraph (); + FilterGraph() = default; virtual ~FilterGraph (); FilterGraph (FilterGraph const&) = delete; FilterGraph& operator== (FilterGraph const&) = delete; - void setup (std::vector); + void setup(std::vector const&); AVFilterContext* get (std::string name); protected: virtual std::string src_parameters () const = 0; virtual std::string src_name () const = 0; - virtual void* sink_parameters () const = 0; + virtual void set_parameters (AVFilterContext* context) const = 0; virtual std::string sink_name () const = 0; - AVFilterGraph* _graph; + AVFilterGraph* _graph = nullptr; /** true if this graph has no filters in, so it just copies stuff straight through */ - bool _copy; - AVFilterContext* _buffer_src_context; - AVFilterContext* _buffer_sink_context; - AVFrame* _frame; + bool _copy = true; + AVFilterContext* _buffer_src_context = nullptr; + AVFilterContext* _buffer_sink_context = nullptr; + AVFrame* _frame = nullptr; }; + #endif