/*\r
-* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
*\r
-* This file is part of CasparCG.\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
+* 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
+* 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 "image/blend_modes.h"\r
\r
-#include "../producer/frame/frame_factory.h"\r
+#include <common/forward.h>\r
+#include <common/future_fwd.h>\r
+#include <common/memory.h>\r
+#include <common/reactive.h>\r
\r
-#include <common/concurrency/governor.h>\r
-#include <common/memory/safe_ptr.h>\r
+#include <core/video_format.h>\r
\r
-#include <agents.h>\r
+#include <boost/property_tree/ptree_fwd.hpp>\r
\r
#include <map>\r
\r
-namespace caspar { \r
+FORWARD2(caspar, diagnostics, class graph);\r
\r
-class executor;\r
+namespace caspar { namespace core {\r
\r
-namespace core {\r
-\r
-class read_frame;\r
-class write_frame;\r
-class basic_frame;\r
-struct frame_transform;\r
-struct frame_transform;\r
-class video_channel_context;;\r
-struct pixel_format;\r
-class ogl_device;\r
-\r
-class mixer : public core::frame_factory\r
+class mixer sealed\r
{\r
-public: \r
+ mixer(const mixer&);\r
+ mixer& operator=(const mixer&);\r
+public:\r
+ \r
+ // Static Members\r
+ \r
+ // Constructors\r
\r
- typedef std::pair<std::map<int, safe_ptr<basic_frame>>, ticket_t> source_element_t;\r
- typedef std::pair<safe_ptr<core::read_frame>, ticket_t> target_element_t;\r
+ explicit mixer(spl::shared_ptr<diagnostics::graph> graph, spl::shared_ptr<class image_mixer> image_mixer);\r
\r
- typedef Concurrency::ISource<source_element_t> source_t;\r
- typedef Concurrency::ITarget<target_element_t> target_t;\r
+ // Methods\r
+ \r
+ class const_frame operator()(std::map<int, class draw_frame> frames, const struct video_format_desc& format_desc);\r
+ \r
+ void set_blend_mode(int index, blend_mode value);\r
\r
- explicit mixer(source_t& source, target_t& target, const video_format_desc& format_desc, ogl_device& ogl);\r
- \r
- virtual safe_ptr<write_frame> create_frame(const void* video_stream_tag, const pixel_format_desc& desc);\r
+ class mutable_frame create_frame(const void* tag, const struct pixel_format_desc& desc);\r
\r
- core::video_format_desc get_video_format_desc() const; // nothrow\r
- \r
- void set_frame_transform(int index, const core::frame_transform& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
- void apply_frame_transform(int index, const std::function<core::frame_transform(core::frame_transform)>& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
- void clear_transforms();\r
+ // Properties\r
\r
- void set_blend_mode(int index, blend_mode::type value);\r
+ boost::unique_future<boost::property_tree::wptree> info() const;\r
\r
private:\r
- struct implementation;\r
- safe_ptr<implementation> impl_;\r
+ struct impl;\r
+ spl::shared_ptr<impl> impl_;\r
};\r
\r
}}
\ No newline at end of file