]> git.sesse.net Git - casparcg/blobdiff - modules/ffmpeg/producer/filter/filter.h
set svn:eol-style native on .h and .cpp files
[casparcg] / modules / ffmpeg / producer / filter / filter.h
index da472f0e45a9b64421f38e3b98028843d4c08660..ecac5e7a921d81b2ab7fbb719230504b032455dc 100644 (file)
@@ -1,97 +1,97 @@
-/*\r
-* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
-*\r
-* This file is part of CasparCG (www.casparcg.com).\r
-*\r
-* CasparCG is free software: you can redistribute it and/or modify\r
-* it under the terms of the GNU General Public License as published by\r
-* the Free Software Foundation, either version 3 of the License, or\r
-* (at your option) any later version.\r
-*\r
-* CasparCG is distributed in the hope that it will be useful,\r
-* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-* GNU General Public License for more details.\r
-*\r
-* You should have received a copy of the GNU General Public License\r
-* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
-*\r
-* Author: Robert Nagy, ronag89@gmail.com\r
-*/\r
-\r
-#pragma once\r
-\r
-#include <common/memory.h>\r
-\r
-#include <boost/noncopyable.hpp>\r
-#include <boost/algorithm/string/case_conv.hpp>\r
-\r
-#include <string>\r
-#include <vector>\r
-\r
-struct AVFrame;\r
-enum PixelFormat;\r
-\r
-namespace caspar { namespace ffmpeg {\r
-\r
-static std::wstring append_filter(const std::wstring& filters, const std::wstring& filter)\r
-{\r
-       return filters + (filters.empty() ? L"" : L",") + filter;\r
-}\r
-\r
-class filter : boost::noncopyable\r
-{\r
-public:\r
-       filter(const std::wstring& filters = L"", const std::vector<PixelFormat>& pix_fmts = std::vector<PixelFormat>());\r
-       filter(filter&& other);\r
-       filter& operator=(filter&& other);\r
-\r
-       void push(const std::shared_ptr<AVFrame>& frame);\r
-       std::shared_ptr<AVFrame> poll();\r
-       std::vector<spl::shared_ptr<AVFrame>> poll_all();\r
-\r
-       std::wstring filter_str() const;\r
-                       \r
-       static bool is_double_rate(const std::wstring& filters)\r
-       {\r
-               if(boost::to_upper_copy(filters).find(L"YADIF=1") != std::string::npos)\r
-                       return true;\r
-       \r
-               if(boost::to_upper_copy(filters).find(L"YADIF=3") != std::string::npos)\r
-                       return true;\r
-\r
-               return false;\r
-       }\r
-\r
-       static bool is_deinterlacing(const std::wstring& filters)\r
-       {\r
-               if(boost::to_upper_copy(filters).find(L"YADIF") != std::string::npos)\r
-                       return true;    \r
-               return false;\r
-       }       \r
-       \r
-       static int delay(const std::wstring& filters)\r
-       {\r
-               return is_double_rate(filters) ? 1 : 0;\r
-       }\r
-\r
-       int delay() const\r
-       {\r
-               return delay(filter_str());\r
-       }\r
-\r
-       bool is_double_rate() const\r
-       {\r
-               return is_double_rate(filter_str());\r
-       }\r
-       \r
-       bool is_deinterlacing() const\r
-       {\r
-               return is_deinterlacing(filter_str());\r
-       }\r
-private:\r
-       struct impl;\r
-       spl::shared_ptr<impl> impl_;\r
-};\r
-\r
+/*
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
+*
+* This file is part of CasparCG (www.casparcg.com).
+*
+* CasparCG is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* CasparCG is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
+*
+* Author: Robert Nagy, ronag89@gmail.com
+*/
+
+#pragma once
+
+#include <common/memory.h>
+
+#include <boost/noncopyable.hpp>
+#include <boost/algorithm/string/case_conv.hpp>
+
+#include <string>
+#include <vector>
+
+struct AVFrame;
+enum PixelFormat;
+
+namespace caspar { namespace ffmpeg {
+
+static std::wstring append_filter(const std::wstring& filters, const std::wstring& filter)
+{
+       return filters + (filters.empty() ? L"" : L",") + filter;
+}
+
+class filter : boost::noncopyable
+{
+public:
+       filter(const std::wstring& filters = L"", const std::vector<PixelFormat>& pix_fmts = std::vector<PixelFormat>());
+       filter(filter&& other);
+       filter& operator=(filter&& other);
+
+       void push(const std::shared_ptr<AVFrame>& frame);
+       std::shared_ptr<AVFrame> poll();
+       std::vector<spl::shared_ptr<AVFrame>> poll_all();
+
+       std::wstring filter_str() const;
+                       
+       static bool is_double_rate(const std::wstring& filters)
+       {
+               if(boost::to_upper_copy(filters).find(L"YADIF=1") != std::string::npos)
+                       return true;
+       
+               if(boost::to_upper_copy(filters).find(L"YADIF=3") != std::string::npos)
+                       return true;
+
+               return false;
+       }
+
+       static bool is_deinterlacing(const std::wstring& filters)
+       {
+               if(boost::to_upper_copy(filters).find(L"YADIF") != std::string::npos)
+                       return true;    
+               return false;
+       }       
+       
+       static int delay(const std::wstring& filters)
+       {
+               return is_double_rate(filters) ? 1 : 0;
+       }
+
+       int delay() const
+       {
+               return delay(filter_str());
+       }
+
+       bool is_double_rate() const
+       {
+               return is_double_rate(filter_str());
+       }
+       
+       bool is_deinterlacing() const
+       {
+               return is_deinterlacing(filter_str());
+       }
+private:
+       struct impl;
+       spl::shared_ptr<impl> impl_;
+};
+
 }}
\ No newline at end of file