Merge master and multifarious hackery.
[dcpomatic.git] / src / lib / filter_graph.h
index 2138943e42b6e3e6ef11ba4967f0c85f0755d618..e294812c2baa9836f5aeff99711057bae611148e 100644 (file)
  *  @brief A graph of FFmpeg filters.
  */
 
-#ifndef DVDOMATIC_FILTER_GRAPH_H
-#define DVDOMATIC_FILTER_GRAPH_H
+#ifndef DCPOMATIC_FILTER_GRAPH_H
+#define DCPOMATIC_FILTER_GRAPH_H
 
 #include "util.h"
 
 class Image;
 class VideoFilter;
-class FFmpegDecoder;
 
-class FilterGraph
-{
-public:
-       virtual bool can_process (libdcp::Size, AVPixelFormat) const = 0;
-       virtual std::list<boost::shared_ptr<Image> > process (AVFrame *) = 0;
-};
-
-class EmptyFilterGraph : public FilterGraph
-{
-public:
-       bool can_process (libdcp::Size, AVPixelFormat) const {
-               return true;
-       }
-
-       std::list<boost::shared_ptr<Image> > process (AVFrame *);
-};
-
-/** @class FFmpegFilterGraph
+/** @class FilterGraph
  *  @brief A graph of FFmpeg filters.
  */
-class FFmpegFilterGraph : public FilterGraph
+class FilterGraph
 {
 public:
-       FFmpegFilterGraph (boost::shared_ptr<Film> film, FFmpegDecoder* decoder, libdcp::Size s, AVPixelFormat p);
-       ~FFmpegFilterGraph ();
+       FilterGraph (boost::shared_ptr<const FFmpegContent> content, libdcp::Size s, AVPixelFormat p);
+       ~FilterGraph ();
 
        bool can_process (libdcp::Size s, AVPixelFormat p) const;
        std::list<boost::shared_ptr<Image> > process (AVFrame * frame);
@@ -67,6 +49,4 @@ private:
        AVFrame* _frame;
 };
 
-boost::shared_ptr<FilterGraph> filter_graph_factory (boost::shared_ptr<Film>, FFmpegDecoder *, libdcp::Size, AVPixelFormat);
-
 #endif