X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffilter_graph.h;h=45ad5d99874a0ef5c95b21c045a8fd6dd9520a24;hb=9c5a7319d807063c22d6bc165ee414ce82e26965;hp=2138943e42b6e3e6ef11ba4967f0c85f0755d618;hpb=3fc3aad8735903ced3dae65f764eb33e3f5b3f11;p=dcpomatic.git diff --git a/src/lib/filter_graph.h b/src/lib/filter_graph.h index 2138943e4..45ad5d998 100644 --- a/src/lib/filter_graph.h +++ b/src/lib/filter_graph.h @@ -21,52 +21,33 @@ * @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 FFmpegContent; -class FilterGraph -{ -public: - virtual bool can_process (libdcp::Size, AVPixelFormat) const = 0; - virtual std::list > process (AVFrame *) = 0; -}; - -class EmptyFilterGraph : public FilterGraph -{ -public: - bool can_process (libdcp::Size, AVPixelFormat) const { - return true; - } - - std::list > process (AVFrame *); -}; - -/** @class FFmpegFilterGraph +/** @class FilterGraph * @brief A graph of FFmpeg filters. */ -class FFmpegFilterGraph : public FilterGraph +class FilterGraph : public boost::noncopyable { public: - FFmpegFilterGraph (boost::shared_ptr film, FFmpegDecoder* decoder, libdcp::Size s, AVPixelFormat p); - ~FFmpegFilterGraph (); + FilterGraph (boost::shared_ptr content, dcp::Size s, AVPixelFormat p); + ~FilterGraph (); - bool can_process (libdcp::Size s, AVPixelFormat p) const; - std::list > process (AVFrame * frame); + bool can_process (dcp::Size s, AVPixelFormat p) const; + std::list, 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 + dcp::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; }; -boost::shared_ptr filter_graph_factory (boost::shared_ptr, FFmpegDecoder *, libdcp::Size, AVPixelFormat); - #endif