3 #include <common/memory/safe_ptr.h>
\r
5 #include <boost/noncopyable.hpp>
\r
13 namespace caspar { namespace ffmpeg {
\r
15 static bool is_double_rate(const std::wstring& filters)
\r
17 if(filters.find(L"YADIF=1") != std::string::npos)
\r
20 if(filters.find(L"YADIF=3") != std::string::npos)
\r
26 static bool is_deinterlacing(const std::wstring& filters)
\r
28 if(filters.find(L"YADIF") != std::string::npos)
\r
33 static std::wstring append_filter(std::wstring& filters, const std::wstring& filter)
\r
35 return filters = filters + (filters.empty() ? L"" : L",") + filter;
\r
38 class filter : boost::noncopyable
\r
41 filter(const std::wstring& filters = L"", const std::vector<PixelFormat>& pix_fmts = std::vector<PixelFormat>());
\r
42 filter(filter&& other);
\r
43 filter& operator=(filter&& other);
\r
45 void push(const std::shared_ptr<AVFrame>& frame);
\r
46 std::shared_ptr<AVFrame> poll();
\r
47 std::vector<safe_ptr<AVFrame>> poll_all();
\r
49 std::string filter_str() const;
\r
52 struct implementation;
\r
53 safe_ptr<implementation> impl_;
\r