]> git.sesse.net Git - casparcg/blobdiff - modules/ffmpeg/producer/filter/filter.cpp
2.0. parallel_yadif: Reduced overhead.
[casparcg] / modules / ffmpeg / producer / filter / filter.cpp
index 4db46b9503f6ccd13069ac33805c17fb997ab895..9478d523fafd7a96a0440c61d8291262e38bf380 100644 (file)
@@ -6,22 +6,17 @@
 \r
 #include "../../ffmpeg_error.h"\r
 \r
-#include <common/exception/exceptions.h>\r
-#include <core/producer/frame/basic_frame.h>\r
-#include <core/producer/frame/frame_factory.h>\r
-#include <core/mixer/write_frame.h>\r
-\r
-#include <boost/circular_buffer.hpp>\r
-\r
-#include <tbb/task_group.h>\r
+#include <boost/assign.hpp>\r
 \r
 #include <cstdio>\r
 #include <sstream>\r
 \r
+#if defined(_MSC_VER)\r
+#pragma warning (push)\r
+#pragma warning (disable : 4244)\r
+#endif\r
 extern "C" \r
 {\r
-       #define __STDC_CONSTANT_MACROS\r
-       #define __STDC_LIMIT_MACROS\r
        #include <libavutil/avutil.h>\r
        #include <libavutil/imgutils.h>\r
        #include <libavfilter/avfilter.h>\r
@@ -30,6 +25,9 @@ extern "C"
        #include <libavfilter/vsink_buffer.h>\r
        #include <libavfilter/vsrc_buffer.h>\r
 }\r
+#if defined(_MSC_VER)\r
+#pragma warning (pop)\r
+#endif\r
 \r
 namespace caspar {\r
        \r
@@ -76,7 +74,6 @@ struct filter::implementation
 \r
        void push(const std::shared_ptr<AVFrame>& frame)\r
        {               \r
-\r
                if(!graph_)\r
                {\r
                        graph_.reset(avfilter_graph_alloc(), [](AVFilterGraph* p){avfilter_graph_free(&p);});\r
@@ -163,5 +160,7 @@ struct filter::implementation
 };\r
 \r
 filter::filter(const std::wstring& filters) : impl_(new implementation(filters)){}\r
+filter::filter(filter&& other) : impl_(std::move(other.impl_)){}\r
+filter& filter::operator=(filter&& other){impl_ = std::move(other.impl_); return *this;}\r
 std::vector<safe_ptr<AVFrame>> filter::execute(const std::shared_ptr<AVFrame>& frame) {return impl_->execute(frame);}\r
 }
\ No newline at end of file