Use plain git hash for VERSION when there is no exact tag.
[dcpomatic.git] / src / lib / filter_graph.h
index d5a2da7a29be925cbbb6e572544a8390dd2c57ba..e474f851f47af56ffe6096b583a937202d82ad86 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 /** @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 "warnings.h"
-DCPOMATIC_DISABLE_WARNINGS
+
+#include "filter.h"
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
 extern "C" {
 #include <libavfilter/buffersink.h>
 }
-DCPOMATIC_ENABLE_WARNINGS
+LIBDCP_ENABLE_WARNINGS
+#include <string>
+#include <vector>
 
+
+class Filter;
+class Image;
 struct AVFilterContext;
 struct AVFrame;
-class Image;
-class Filter;
+
 
 /** @class FilterGraph
  *  @brief A graph of FFmpeg filters.
@@ -44,13 +51,13 @@ class Filter;
 class FilterGraph
 {
 public:
-       FilterGraph ();
+       FilterGraph() = default;
        virtual ~FilterGraph ();
 
        FilterGraph (FilterGraph const&) = delete;
        FilterGraph& operator== (FilterGraph const&) = delete;
 
-       void setup (std::vector<Filter const *>);
+       void setup(std::vector<Filter> const&);
        AVFilterContext* get (std::string name);
 
 protected:
@@ -59,12 +66,13 @@ protected:
        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