implementation(int index, const video_format_desc& format_desc) \r
: index_(index)\r
, format_desc_(format_desc)\r
- , consumer_(new frame_consumer_device(std::bind(&implementation::print, this), format_desc))\r
- , mixer_(new frame_mixer_device(std::bind(&implementation::print, this), format_desc))\r
- , producer_(new frame_producer_device(std::bind(&implementation::print, this), safe_ptr<frame_factory>(mixer_))) \r
- {\r
- mixer_connection_ = mixer_->connect([=](const safe_ptr<const read_frame>& frame){consumer_->send(frame);});\r
- producer_connection_ = producer_->connect([=](const std::vector<safe_ptr<basic_frame>>& frames){mixer_->send(frames);});\r
- }\r
+ , consumer_(new frame_consumer_device([=]{return print();}, format_desc))\r
+ , mixer_(new frame_mixer_device([=]{return print();}, format_desc))\r
+ , producer_(new frame_producer_device([=]{return print();}, safe_ptr<frame_factory>(mixer_))) \r
+ , mixer_connection_(mixer_->connect([=](const safe_ptr<const read_frame>& frame){consumer_->send(frame);}))\r
+ , producer_connection_(producer_->connect([=](const std::vector<safe_ptr<basic_frame>>& frames){mixer_->send(frames);}))\r
+ {}\r
\r
std::wstring print() const\r
{\r
: frames_(std::move(frames))\r
, index_(std::numeric_limits<int>::min()) {}\r
\r
- void accept(basic_frame& self, frame_visitor& visitor)\r
+ void accept(const basic_frame& self, frame_visitor& visitor)\r
{\r
visitor.begin(self);\r
BOOST_FOREACH(auto frame, frames_)\r
*/\r
#pragma once\r
\r
-#include "write_frame.h"\r
-\r
#include "pixel_format.h"\r
-#include "../../video_format.h"\r
\r
#include <common/memory/safe_ptr.h>\r
\r
#include <boost/noncopyable.hpp>\r
\r
namespace caspar { namespace core {\r
+ \r
+class write_frame;\r
+struct pixel_format_desc;\r
+struct video_format_desc;\r
\r
struct frame_factory : boost::noncopyable\r
{\r
struct frame_visitor\r
{\r
virtual void begin(const basic_frame& frame) = 0;\r
- virtual void visit(write_frame& frame) = 0;\r
virtual void end() = 0;\r
+ virtual void visit(write_frame& frame) = 0;\r
};\r
\r
}}
\ No newline at end of file
\r
#include <core/video_format.h>\r
\r
-#include <boost/tuple/tuple.hpp>\r
-#include <boost/thread/future.hpp>\r
-#include <boost/noncopyable.hpp>\r
-\r
-#include <memory>\r
#include <array>\r
\r
namespace caspar { namespace core {\r
\r
namespace caspar { namespace core {\r
\r
-struct pixel_format_desc;\r
-\r
class write_frame : public basic_frame, boost::noncopyable\r
{\r
public: \r
virtual void tag(int tag) = 0;\r
virtual int tag() const = 0;\r
};\r
-typedef std::shared_ptr<write_frame> write_frame_impl_ptr;\r
-\r
\r
}}
\ No newline at end of file
#include "layer.h"\r
#include "frame_producer.h"\r
\r
-#include "../video_format.h"\r
-\r
#include <common/concurrency/executor.h>\r
+#include <common/exception/exceptions.h>\r
#include <common/utility/assert.h>\r
#include <common/utility/printer.h>\r
\r
class frame_producer_remover\r
{\r
executor executor_;\r
- tbb::atomic<int> count_;\r
\r
void do_remove(safe_ptr<frame_producer>& producer)\r
{\r
producer = frame_producer::empty();\r
CASPAR_LOG(info) << name << L" Removed.";\r
}\r
+\r
public:\r
\r
- frame_producer_remover()\r
+ frame_producer_remover() : executor_(L"frame_producer_remover")\r
{\r
executor_.start();\r
- count_ = 0;\r
}\r
\r
void remove(safe_ptr<frame_producer>&& producer)\r
\r
frame_producer_remover g_remover;\r
\r
-\r
struct layer::implementation : boost::noncopyable\r
{ \r
mutable tbb::spin_mutex printer_mutex_;\r
\r
auto following = foreground_->get_following_producer();\r
following->set_leading_producer(foreground_);\r
- following->set_parent_printer(boost::bind(&implementation::print, this));\r
+ following->set_parent_printer([=]{return print();});\r
g_remover.remove(std::move(foreground_));\r
foreground_ = following;\r
CASPAR_LOG(info) << foreground_->print() << L" Added.";\r
\r
#include <boost/noncopyable.hpp>\r
\r
-#include <tbb/atomic.h>\r
-\r
#include <memory>\r
+#include <numeric>\r
\r
namespace caspar { namespace core {\r
\r
#include <common/diagnostics/graph.h>\r
#include <common/utility/assert.h>\r
#include <common/utility/timer.h>\r
-#include <common/gl/gl_check.h>\r
\r
#include <core/video_format.h>\r
\r
-#include <tbb/concurrent_queue.h>\r
-#include <tbb/concurrent_unordered_map.h>\r
-\r
-#include <boost/range/algorithm.hpp>\r
-\r
#include <unordered_map>\r
\r
namespace caspar { namespace core {\r
return output_.connect(subscriber);\r
}\r
\r
- boost::unique_future<safe_ptr<const host_buffer>> mix_image(const std::vector<safe_ptr<basic_frame>>& frames)\r
+ boost::unique_future<safe_ptr<const host_buffer>> mix_image(std::vector<safe_ptr<basic_frame>> frames)\r
{\r
+ frames.erase(std::remove(frames.begin(), frames.end(), basic_frame::empty()), frames.end());\r
+ frames.erase(std::remove(frames.begin(), frames.end(), basic_frame::eof()), frames.end());\r
+\r
auto image = image_mixer_.begin_pass();\r
BOOST_FOREACH(auto& frame, frames)\r
{\r
*/\r
#pragma once\r
\r
-#include "fwd.h"\r
-\r
-#include <core/video_format.h>\r
-#include <core/producer/frame/pixel_format.h>\r
#include <core/producer/frame/frame_factory.h>\r
+#include <core/producer/frame/pixel_format.h>\r
\r
#include "image/image_mixer.h"\r
#include "audio/audio_mixer.h"\r
\r
-#include "gpu/gpu_write_frame.h"\r
-\r
#include <common/memory/safe_ptr.h>\r
#include <common/utility/printer.h>\r
\r
-#include <core/video_format.h>\r
-\r
#include <boost/signals2.hpp>\r
\r
#include <functional>\r
\r
namespace caspar { namespace core {\r
\r
-struct video_format;\r
+struct video_format_desc;\r
+class read_frame;\r
+class write_frame;\r
\r
class frame_mixer_device : public frame_factory\r
{\r
+++ /dev/null
-#pragma once\r
-\r
-#include <memory>\r
-\r
-namespace caspar { namespace core {\r
- \r
-class read_frame;\r
-class write_frame;\r
-class basic_frame;\r
-\r
-class image_mixer;\r
-struct frame_factory;\r
-class audio_mixer;\r
-class frame_mixer_device;\r
-\r
-struct pixel_format_desc;\r
-\r
-}}
\ No newline at end of file
#pragma once\r
\r
-#include "../fwd.h"\r
-\r
+#include <common/memory/safe_ptr.h>\r
#include <core/producer/frame/write_frame.h>\r
-#include <core/video_format.h>\r
\r
#include "../gpu/host_buffer.h"\r
\r
#include <common/exception/exceptions.h>\r
#include <common/gl/gl_check.h>\r
\r
+#include <core/video_format.h>\r
+#include <core/producer/frame/pixel_format.h>\r
#include <core/producer/frame/image_transform.h>\r
\r
#include <Glee.h>\r
\r
namespace caspar { namespace core {\r
\r
-class shader_program\r
+class shader_program : boost::noncopyable\r
{\r
GLuint program_;\r
public:\r
\r
shader_program() : program_(0) {}\r
+ shader_program(shader_program&& other) : program_(other.program_){other.program_ = 0;}\r
shader_program(const std::string& vertex_source_str, const std::string& fragment_source_str) : program_(0)\r
{\r
GLint success;\r
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,\r
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff};\r
\r
-struct image_kernel::implementation\r
+struct image_kernel::implementation : boost::noncopyable\r
{ \r
std::unordered_map<pixel_format::type, shader_program> shaders_;\r
\r
#pragma once\r
\r
-#include <core/video_format.h>\r
-#include <core/producer/frame/pixel_format.h>\r
-\r
#include <memory>\r
\r
namespace caspar { namespace core {\r
\r
+struct pixel_format_desc;\r
+class image_transform;\r
class image_transform;\r
\r
class image_kernel\r
#include "../gpu/device_buffer.h"\r
#include "../gpu/gpu_write_frame.h"\r
\r
+#include <common/concurrency/executor.h>\r
#include <common/exception/exceptions.h>\r
#include <common/gl/gl_check.h>\r
-#include <common/concurrency/executor.h>\r
\r
#include <core/producer/frame/image_transform.h>\r
+#include <core/producer/frame/pixel_format.h>\r
+#include <core/video_format.h>\r
\r
#include <boost/cast.hpp>\r
\r
#include <Glee.h>\r
#include <SFML/Window/Context.hpp>\r
+\r
+#include <array>\r
#include <unordered_map>\r
\r
namespace caspar { namespace core {\r
\r
#include "../gpu/host_buffer.h"\r
\r
-#include <core/video_format.h>\r
-\r
#include <boost/noncopyable.hpp>\r
#include <boost/thread/future.hpp>\r
\r
\r
namespace caspar { namespace core {\r
\r
+struct video_format_desc;\r
struct pixel_format_desc; \r
class image_transform;\r
\r
<ItemGroup>\r
<ClInclude Include="audio\audio_mixer.h" />\r
<ClInclude Include="frame_mixer_device.h" />\r
- <ClInclude Include="fwd.h" />\r
<ClInclude Include="gpu\device_buffer.h" />\r
<ClInclude Include="gpu\gpu_read_frame.h" />\r
<ClInclude Include="gpu\gpu_write_frame.h" />\r
</ClInclude>\r
<ClInclude Include="StdAfx.h" />\r
<ClInclude Include="frame_mixer_device.h" />\r
- <ClInclude Include="fwd.h" />\r
<ClInclude Include="image\image_kernel.h">\r
<Filter>image</Filter>\r
</ClInclude>\r
<OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">interop\</OutputDirectory>\r
<OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">interop\</OutputDirectory>\r
<OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">interop\</OutputDirectory>\r
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">true</ExcludedFromBuild>\r
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">true</ExcludedFromBuild>\r
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
</Midl>\r
<Midl Include="interop\DeckLinkAPI_v7_1.idl">\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">true</ExcludedFromBuild>\r
\r
\r
/* File created by MIDL compiler version 7.00.0555 */\r
-/* at Wed Mar 09 13:57:51 2011\r
+/* at Wed Mar 09 22:31:19 2011\r
*/\r
/* Compiler settings for interop\DeckLinkAPI.idl:\r
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 \r
\r
\r
/* File created by MIDL compiler version 7.00.0555 */\r
-/* at Wed Mar 09 13:57:51 2011\r
+/* at Wed Mar 09 22:31:19 2011\r
*/\r
/* Compiler settings for interop\DeckLinkAPI.idl:\r
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 \r
#include <common/diagnostics/graph.h>\r
\r
#include <core/producer/frame/basic_frame.h>\r
+#include <core/producer/frame/write_frame.h>\r
#include <core/producer/frame/audio_transform.h>\r
#include <core/video_format.h>\r
\r
#include <core/video_format.h>\r
\r
#include <core/producer/frame/basic_frame.h>\r
+#include <core/producer/frame/write_frame.h>\r
#include <core/producer/frame/image_transform.h>\r
\r
#include <tbb/parallel_for.h>\r
#include <core/video_format.h>\r
\r
#include <core/producer/frame/basic_frame.h>\r
-#include <mixer/frame_mixer_device.h>\r
+#include <core/producer/frame/write_frame.h>\r
\r
#include <common/concurrency/executor.h>\r
#include <common/utility/timer.h>\r
\r
#include <core/video_format.h>\r
\r
-#include <mixer/frame_mixer_device.h>\r
#include <core/producer/frame/basic_frame.h>\r
+#include <core/producer/frame/write_frame.h>\r
\r
#include <common/env.h>\r
\r