]> git.sesse.net Git - casparcg/commitdiff
2.0.0.2: Fixed mixer namespace.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sat, 9 Apr 2011 23:45:24 +0000 (23:45 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sat, 9 Apr 2011 23:45:24 +0000 (23:45 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@627 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

22 files changed:
common/utility/tweener.h
core/channel.cpp
core/channel.h
mixer/audio/audio_mixer.cpp
mixer/audio/audio_mixer.h
mixer/frame_mixer_device.cpp
mixer/frame_mixer_device.h
mixer/gpu/device_buffer.cpp
mixer/gpu/device_buffer.h
mixer/gpu/gpu_read_frame.cpp
mixer/gpu/gpu_read_frame.h
mixer/gpu/gpu_write_frame.cpp
mixer/gpu/gpu_write_frame.h
mixer/gpu/host_buffer.cpp
mixer/gpu/host_buffer.h
mixer/gpu/ogl_device.cpp
mixer/gpu/ogl_device.h
mixer/image/image_kernel.cpp
mixer/image/image_kernel.h
mixer/image/image_mixer.cpp
mixer/image/image_mixer.h
shell/main.cpp

index 054954a4a2d3ac6c8f17c334d31b1804bf8ad6c7..ce6504324a1a547251f2cfaec11733b9daa6395e 100644 (file)
@@ -423,11 +423,8 @@ inline tweener_t get_tweener(std::wstring name = L"linear")
 \r
        auto it = tweens.find(name);\r
        if(it == tweens.end())\r
-       {\r
-               CASPAR_LOG(warning) << L"Invalid tween: " << name << L" fallback to \"linear\".";\r
                it = tweens.find(L"linear");\r
-       }\r
-\r
+       \r
        return [=](double t, double b, double c, double d)\r
        {\r
                return it->second(t, b, c, d, params);\r
index be14867128706355bc6c347a42f9f7d1ed6e68a6..59b28b24bf1fa0da3fe3db486eab6536bb9db0b2 100644 (file)
@@ -26,7 +26,7 @@ struct channel::implementation : boost::noncopyable
        const int index_;\r
        video_format_desc format_desc_;\r
        \r
-       safe_ptr<frame_mixer_device>     mixer_;\r
+       safe_ptr<mixer::frame_mixer_device>      mixer_;\r
        safe_ptr<frame_consumer_device> consumer_;\r
        safe_ptr<frame_producer_device> producer_;\r
 \r
@@ -38,7 +38,7 @@ public:
                : index_(index)\r
                , format_desc_(format_desc)\r
                , consumer_(new frame_consumer_device(format_desc))\r
-               , mixer_(new frame_mixer_device(format_desc))\r
+               , mixer_(new mixer::frame_mixer_device(format_desc))\r
                , producer_(new frame_producer_device(format_desc_))    \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
@@ -56,7 +56,7 @@ public:
                mixer_connection_.disconnect();\r
 \r
                consumer_->set_video_format_desc(format_desc_);\r
-               mixer_ = make_safe<frame_mixer_device>(format_desc_);\r
+               mixer_ = make_safe<mixer::frame_mixer_device>(format_desc_);\r
                producer_ = make_safe<frame_producer_device>(format_desc_);\r
 \r
                mixer_connection_ = mixer_->connect([=](const safe_ptr<const read_frame>& frame){consumer_->send(frame);});\r
@@ -67,7 +67,7 @@ public:
 channel::channel(int index, const video_format_desc& format_desc) : impl_(new implementation(index, format_desc)){}\r
 channel::channel(channel&& other) : impl_(std::move(other.impl_)){}\r
 const safe_ptr<frame_producer_device>& channel::producer() { return impl_->producer_;} \r
-const safe_ptr<frame_mixer_device>& channel::mixer() { return impl_->mixer_;} \r
+const safe_ptr<mixer::frame_mixer_device>& channel::mixer() { return impl_->mixer_;} \r
 const safe_ptr<frame_consumer_device>& channel::consumer() { return impl_->consumer_;} \r
 const video_format_desc& channel::get_video_format_desc() const{return impl_->format_desc_;}\r
 void channel::set_video_format_desc(const video_format_desc& format_desc){impl_->set_video_format_desc(format_desc);}\r
index fcf97105186f20f5a687e43346c2ec854f2d796e..bdbc678832d78ad7999fd498cc847bf401163ce9 100644 (file)
@@ -28,7 +28,7 @@ public:
        channel(channel&& other);\r
 \r
        const safe_ptr<frame_producer_device>& producer();\r
-       const safe_ptr<frame_mixer_device>& mixer();\r
+       const safe_ptr<mixer::frame_mixer_device>& mixer();\r
        const safe_ptr<frame_consumer_device>& consumer();\r
 \r
        const video_format_desc& get_video_format_desc() const;\r
index d6a4e0123b6899f76eecd36ff64f66b9ae2afee6..50720fea6ea997613c18b0b61fb9c833a673ba9e 100644 (file)
@@ -6,28 +6,28 @@
 \r
 #include <core/producer/frame/audio_transform.h>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
        \r
 struct audio_mixer::implementation\r
 {\r
        std::vector<short> audio_data_;\r
-       std::stack<audio_transform> transform_stack_;\r
+       std::stack<core::audio_transform> transform_stack_;\r
 \r
-       std::map<int, audio_transform> prev_audio_transforms_;\r
-       std::map<int, audio_transform> next_audio_transforms_;\r
+       std::map<int, core::audio_transform> prev_audio_transforms_;\r
+       std::map<int, core::audio_transform> next_audio_transforms_;\r
 \r
 public:\r
        implementation()\r
        {\r
-               transform_stack_.push(audio_transform());\r
+               transform_stack_.push(core::audio_transform());\r
        }\r
        \r
-       void begin(const basic_frame& frame)\r
+       void begin(const core::basic_frame& frame)\r
        {\r
                transform_stack_.push(transform_stack_.top()*frame.get_audio_transform());\r
        }\r
 \r
-       void visit(const write_frame& frame)\r
+       void visit(const core::write_frame& frame)\r
        {\r
                if(!transform_stack_.top().get_has_audio())\r
                        return;\r
@@ -72,7 +72,7 @@ public:
        }\r
 \r
 \r
-       void begin(const audio_transform& transform)\r
+       void begin(const core::audio_transform& transform)\r
        {\r
                transform_stack_.push(transform_stack_.top()*transform);\r
        }\r
@@ -95,8 +95,8 @@ public:
 };\r
 \r
 audio_mixer::audio_mixer() : impl_(new implementation()){}\r
-void audio_mixer::begin(const basic_frame& frame){impl_->begin(frame);}\r
-void audio_mixer::visit(write_frame& frame){impl_->visit(frame);}\r
+void audio_mixer::begin(const core::basic_frame& frame){impl_->begin(frame);}\r
+void audio_mixer::visit(core::write_frame& frame){impl_->visit(frame);}\r
 void audio_mixer::end(){impl_->end();}\r
 std::vector<short> audio_mixer::begin_pass(){return impl_->begin_pass();}      \r
 void audio_mixer::end_pass(){impl_->end_pass();}\r
index 83fc5d0135e76d26276064fed1293c727198e4bb..d72d9ac4d501bbc24e8f7a3d2f19128007a0d094 100644 (file)
@@ -1,20 +1,19 @@
 #pragma once\r
 \r
 #include <core/producer/frame/frame_visitor.h>\r
+#include <core/producer/frame/audio_transform.h>\r
 \r
 #include <boost/noncopyable.hpp>\r
 \r
-namespace caspar { namespace core {\r
-\r
-class audio_transform;\r
-\r
+namespace caspar { namespace mixer {\r
+       \r
 class audio_mixer : public core::frame_visitor, boost::noncopyable\r
 {\r
 public:\r
        audio_mixer();\r
 \r
-       virtual void begin(const basic_frame& frame);\r
-       virtual void visit(write_frame& frame);\r
+       virtual void begin(const core::basic_frame& frame);\r
+       virtual void visit(core::write_frame& frame);\r
        virtual void end();\r
 \r
        std::vector<short> begin_pass();\r
index e3a1211f2d8c3e303e64bb8f398f748bb9091709..8e26865bbf047c16a2e20b13c7a691826dfde901 100644 (file)
@@ -22,7 +22,7 @@
 \r
 #include <unordered_map>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
                \r
 template<typename T>\r
 class tweened_transform\r
@@ -57,7 +57,7 @@ public:
 \r
 struct frame_mixer_device::implementation : boost::noncopyable\r
 {              \r
-       const video_format_desc format_desc_;\r
+       const core::video_format_desc format_desc_;\r
 \r
        safe_ptr<diagnostics::graph> diag_;\r
        timer perf_timer_;\r
@@ -68,15 +68,15 @@ struct frame_mixer_device::implementation : boost::noncopyable
 \r
        output_t output_;\r
 \r
-       std::unordered_map<int, tweened_transform<image_transform>> image_transforms_;\r
-       std::unordered_map<int, tweened_transform<audio_transform>> audio_transforms_;\r
+       std::unordered_map<int, tweened_transform<core::image_transform>> image_transforms_;\r
+       std::unordered_map<int, tweened_transform<core::audio_transform>> audio_transforms_;\r
 \r
-       tweened_transform<image_transform> root_image_transform_;\r
-       tweened_transform<audio_transform> root_audio_transform_;\r
+       tweened_transform<core::image_transform> root_image_transform_;\r
+       tweened_transform<core::audio_transform> root_audio_transform_;\r
 \r
        executor executor_;\r
 public:\r
-       implementation( const video_format_desc& format_desc) \r
+       implementation(const core::video_format_desc& format_desc) \r
                : format_desc_(format_desc)\r
                , diag_(diagnostics::create_graph(narrow(print())))\r
                , image_mixer_(format_desc)\r
@@ -96,30 +96,30 @@ public:
                return output_.connect(subscriber);\r
        }\r
 \r
-       boost::unique_future<safe_ptr<const host_buffer>> mix_image(std::vector<safe_ptr<basic_frame>> frames)\r
+       boost::unique_future<safe_ptr<const host_buffer>> mix_image(std::vector<safe_ptr<core::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
+               frames.erase(std::remove(frames.begin(), frames.end(), core::basic_frame::empty()), frames.end());\r
+               frames.erase(std::remove(frames.begin(), frames.end(), core::basic_frame::eof()), frames.end());\r
 \r
                auto image = image_mixer_.begin_pass();\r
                BOOST_FOREACH(auto& frame, frames)\r
                {\r
-                       if(format_desc_.mode != video_mode::progressive)\r
+                       if(format_desc_.mode != core::video_mode::progressive)\r
                        {\r
-                               auto frame1 = make_safe<basic_frame>(frame);\r
-                               auto frame2 = make_safe<basic_frame>(frame);\r
+                               auto frame1 = make_safe<core::basic_frame>(frame);\r
+                               auto frame2 = make_safe<core::basic_frame>(frame);\r
 \r
                                frame1->get_image_transform() = root_image_transform_.fetch_and_tick(1)*image_transforms_[frame->get_layer_index()].fetch_and_tick(1);\r
                                frame2->get_image_transform() = root_image_transform_.fetch_and_tick(1)*image_transforms_[frame->get_layer_index()].fetch_and_tick(1);\r
 \r
                                if(frame1->get_image_transform() != frame2->get_image_transform())\r
-                                       basic_frame::interlace(frame1, frame2, format_desc_.mode)->accept(image_mixer_);\r
+                                       core::basic_frame::interlace(frame1, frame2, format_desc_.mode)->accept(image_mixer_);\r
                                else\r
                                        frame2->accept(image_mixer_);\r
                        }\r
                        else\r
                        {\r
-                               auto frame1 = make_safe<basic_frame>(frame);\r
+                               auto frame1 = make_safe<core::basic_frame>(frame);\r
                                frame1->get_image_transform() = root_image_transform_.fetch_and_tick(1)*image_transforms_[frame->get_layer_index()].fetch_and_tick(1);\r
                                frame1->accept(image_mixer_);\r
                        }\r
@@ -128,14 +128,14 @@ public:
                return std::move(image);\r
        }\r
 \r
-       std::vector<short> mix_audio(const std::vector<safe_ptr<basic_frame>>& frames)\r
+       std::vector<short> mix_audio(const std::vector<safe_ptr<core::basic_frame>>& frames)\r
        {\r
                auto audio = audio_mixer_.begin_pass();\r
                BOOST_FOREACH(auto& frame, frames)\r
                {\r
-                       int num = format_desc_.mode == video_mode::progressive ? 1 : 2;\r
+                       int num = format_desc_.mode == core::video_mode::progressive ? 1 : 2;\r
 \r
-                       auto frame1 = make_safe<basic_frame>(frame);\r
+                       auto frame1 = make_safe<core::basic_frame>(frame);\r
                        frame1->get_audio_transform() = root_audio_transform_.fetch_and_tick(num)*audio_transforms_[frame->get_layer_index()].fetch_and_tick(num);\r
                        frame1->accept(audio_mixer_);\r
                }\r
@@ -143,7 +143,7 @@ public:
                return audio;\r
        }\r
                \r
-       void send(const std::vector<safe_ptr<basic_frame>>& frames)\r
+       void send(const std::vector<safe_ptr<core::basic_frame>>& frames)\r
        {                       \r
                executor_.begin_invoke([=]\r
                {                       \r
@@ -162,88 +162,88 @@ public:
                diag_->set_value("input-buffer", static_cast<float>(executor_.size())/static_cast<float>(executor_.capacity()));\r
        }\r
                \r
-       safe_ptr<write_frame> create_frame(void* tag, const pixel_format_desc& desc)\r
+       safe_ptr<core::write_frame> create_frame(void* tag, const core::pixel_format_desc& desc)\r
        {\r
                return make_safe<gpu_write_frame>(reinterpret_cast<int>(tag), desc, image_mixer_.create_buffers(desc));\r
        }\r
                                \r
-       void set_image_transform(const image_transform& transform, int mix_duration, const std::wstring& tween)\r
+       void set_image_transform(const core::image_transform& transform, int mix_duration, const std::wstring& tween)\r
        {\r
                executor_.invoke([&]\r
                {\r
                        auto src = root_image_transform_.fetch();\r
                        auto dst = transform;\r
-                       root_image_transform_ = tweened_transform<image_transform>(src, dst, mix_duration, tween);\r
+                       root_image_transform_ = tweened_transform<core::image_transform>(src, dst, mix_duration, tween);\r
                });\r
        }\r
 \r
-       void set_audio_transform(const audio_transform& transform, int mix_duration, const std::wstring& tween)\r
+       void set_audio_transform(const core::audio_transform& transform, int mix_duration, const std::wstring& tween)\r
        {\r
                executor_.invoke([&]\r
                {\r
                        auto src = root_audio_transform_.fetch();\r
                        auto dst = transform;\r
-                       root_audio_transform_ = tweened_transform<audio_transform>(src, dst, mix_duration, tween);\r
+                       root_audio_transform_ = tweened_transform<core::audio_transform>(src, dst, mix_duration, tween);\r
                });\r
        }\r
 \r
-       void set_image_transform(int index, const image_transform& transform, int mix_duration, const std::wstring& tween)\r
+       void set_image_transform(int index, const core::image_transform& transform, int mix_duration, const std::wstring& tween)\r
        {\r
                executor_.invoke([&]\r
                {\r
                        auto src = image_transforms_[index].fetch();\r
                        auto dst = transform;\r
-                       image_transforms_[index] = tweened_transform<image_transform>(src, dst, mix_duration, tween);\r
+                       image_transforms_[index] = tweened_transform<core::image_transform>(src, dst, mix_duration, tween);\r
                });\r
        }\r
 \r
-       void set_audio_transform(int index, const audio_transform& transform, int mix_duration, const std::wstring& tween)\r
+       void set_audio_transform(int index, const core::audio_transform& transform, int mix_duration, const std::wstring& tween)\r
        {\r
                executor_.invoke([&]\r
                {\r
                        auto src = audio_transforms_[index].fetch();\r
                        auto dst = transform;\r
-                       audio_transforms_[index] = tweened_transform<audio_transform>(src, dst, mix_duration, tween);\r
+                       audio_transforms_[index] = tweened_transform<core::audio_transform>(src, dst, mix_duration, tween);\r
                });\r
        }\r
        \r
-       void apply_image_transform(const std::function<image_transform(const image_transform&)>& transform, int mix_duration, const std::wstring& tween)\r
+       void apply_image_transform(const std::function<core::image_transform(const core::image_transform&)>& transform, int mix_duration, const std::wstring& tween)\r
        {\r
                return executor_.invoke([&]\r
                {\r
                        auto src = root_image_transform_.fetch();\r
                        auto dst = transform(src);\r
-                       root_image_transform_ = tweened_transform<image_transform>(src, dst, mix_duration, tween);\r
+                       root_image_transform_ = tweened_transform<core::image_transform>(src, dst, mix_duration, tween);\r
                });\r
        }\r
 \r
-       void apply_audio_transform(const std::function<audio_transform(audio_transform)>& transform, int mix_duration, const std::wstring& tween)\r
+       void apply_audio_transform(const std::function<core::audio_transform(core::audio_transform)>& transform, int mix_duration, const std::wstring& tween)\r
        {\r
                return executor_.invoke([&]\r
                {\r
                        auto src = root_audio_transform_.fetch();\r
                        auto dst = transform(src);\r
-                       root_audio_transform_ = tweened_transform<audio_transform>(src, dst, mix_duration, tween);\r
+                       root_audio_transform_ = tweened_transform<core::audio_transform>(src, dst, mix_duration, tween);\r
                });\r
        }\r
 \r
-       void apply_image_transform(int index, const std::function<image_transform(image_transform)>& transform, int mix_duration, const std::wstring& tween)\r
+       void apply_image_transform(int index, const std::function<core::image_transform(core::image_transform)>& transform, int mix_duration, const std::wstring& tween)\r
        {\r
                executor_.invoke([&]\r
                {\r
                        auto src = image_transforms_[index].fetch();\r
                        auto dst = transform(src);\r
-                       image_transforms_[index] = tweened_transform<image_transform>(src, dst, mix_duration, tween);\r
+                       image_transforms_[index] = tweened_transform<core::image_transform>(src, dst, mix_duration, tween);\r
                });\r
        }\r
 \r
-       void apply_audio_transform(int index, const std::function<audio_transform(audio_transform)>& transform, int mix_duration, const std::wstring& tween)\r
+       void apply_audio_transform(int index, const std::function<core::audio_transform(core::audio_transform)>& transform, int mix_duration, const std::wstring& tween)\r
        {\r
                executor_.invoke([&]\r
                {\r
                        auto src = audio_transforms_[index].fetch();\r
                        auto dst = transform(src);\r
-                       audio_transforms_[index] = tweened_transform<audio_transform>(src, dst, mix_duration, tween);\r
+                       audio_transforms_[index] = tweened_transform<core::audio_transform>(src, dst, mix_duration, tween);\r
                });\r
        }\r
 \r
@@ -252,8 +252,8 @@ public:
                executor_.invoke([&]\r
                {\r
                        BOOST_FOREACH(auto& t, image_transforms_)                       \r
-                                t.second = tweened_transform<image_transform>(t.second.fetch(), image_transform(), mix_duration, tween);                       \r
-                       root_image_transform_ = tweened_transform<image_transform>(root_image_transform_.fetch(), image_transform(), mix_duration, tween);\r
+                                t.second = tweened_transform<core::image_transform>(t.second.fetch(), core::image_transform(), mix_duration, tween);                   \r
+                       root_image_transform_ = tweened_transform<core::image_transform>(root_image_transform_.fetch(), core::image_transform(), mix_duration, tween);\r
                });\r
        }\r
 \r
@@ -262,8 +262,8 @@ public:
                executor_.invoke([&]\r
                {\r
                        BOOST_FOREACH(auto& t, audio_transforms_)\r
-                               t.second = tweened_transform<audio_transform>(t.second.fetch(), audio_transform(), mix_duration, tween);\r
-                       root_audio_transform_ = tweened_transform<audio_transform>(root_audio_transform_.fetch(), audio_transform(), mix_duration, tween);\r
+                               t.second = tweened_transform<core::audio_transform>(t.second.fetch(), core::audio_transform(), mix_duration, tween);\r
+                       root_audio_transform_ = tweened_transform<core::audio_transform>(root_audio_transform_.fetch(), core::audio_transform(), mix_duration, tween);\r
                });\r
        }\r
 \r
@@ -273,37 +273,37 @@ public:
        }\r
 };\r
        \r
-frame_mixer_device::frame_mixer_device(const video_format_desc& format_desc) : impl_(new implementation(format_desc)){}\r
+frame_mixer_device::frame_mixer_device(const core::video_format_desc& format_desc) : impl_(new implementation(format_desc)){}\r
 frame_mixer_device::frame_mixer_device(frame_mixer_device&& other) : impl_(std::move(other.impl_)){}\r
 boost::signals2::connection frame_mixer_device::connect(const output_t::slot_type& subscriber){return impl_->connect(subscriber);}\r
-void frame_mixer_device::send(const std::vector<safe_ptr<basic_frame>>& frames){impl_->send(frames);}\r
-const video_format_desc& frame_mixer_device::get_video_format_desc() const { return impl_->format_desc_; }\r
-safe_ptr<write_frame> frame_mixer_device::create_frame(void* tag, const pixel_format_desc& desc){ return impl_->create_frame(tag, desc); }             \r
-safe_ptr<write_frame> frame_mixer_device::create_frame(void* tag, size_t width, size_t height, pixel_format::type pix_fmt)\r
+void frame_mixer_device::send(const std::vector<safe_ptr<core::basic_frame>>& frames){impl_->send(frames);}\r
+const core::video_format_desc& frame_mixer_device::get_video_format_desc() const { return impl_->format_desc_; }\r
+safe_ptr<core::write_frame> frame_mixer_device::create_frame(void* tag, const core::pixel_format_desc& desc){ return impl_->create_frame(tag, desc); }         \r
+safe_ptr<core::write_frame> frame_mixer_device::create_frame(void* tag, size_t width, size_t height, core::pixel_format::type pix_fmt)\r
 {\r
        // Create bgra frame\r
-       pixel_format_desc desc;\r
+       core::pixel_format_desc desc;\r
        desc.pix_fmt = pix_fmt;\r
-       desc.planes.push_back( pixel_format_desc::plane(width, height, 4));\r
+       desc.planes.push_back( core::pixel_format_desc::plane(width, height, 4));\r
        return create_frame(tag, desc);\r
 }\r
                        \r
-safe_ptr<write_frame> frame_mixer_device::create_frame(void* tag, pixel_format::type pix_fmt)\r
+safe_ptr<core::write_frame> frame_mixer_device::create_frame(void* tag, core::pixel_format::type pix_fmt)\r
 {\r
        // Create bgra frame with output resolution\r
-       pixel_format_desc desc;\r
+       core::pixel_format_desc desc;\r
        desc.pix_fmt = pix_fmt;\r
-       desc.planes.push_back( pixel_format_desc::plane(get_video_format_desc().width, get_video_format_desc().height, 4));\r
+       desc.planes.push_back( core::pixel_format_desc::plane(get_video_format_desc().width, get_video_format_desc().height, 4));\r
        return create_frame(tag, desc);\r
 }\r
-void frame_mixer_device::set_image_transform(const image_transform& transform, int mix_duration, const std::wstring& tween){impl_->set_image_transform(transform, mix_duration, tween);}\r
-void frame_mixer_device::set_image_transform(int index, const image_transform& transform, int mix_duration, const std::wstring& tween){impl_->set_image_transform(index, transform, mix_duration, tween);}\r
-void frame_mixer_device::set_audio_transform(const audio_transform& transform, int mix_duration, const std::wstring& tween){impl_->set_audio_transform(transform, mix_duration, tween);}\r
-void frame_mixer_device::set_audio_transform(int index, const audio_transform& transform, int mix_duration, const std::wstring& tween){impl_->set_audio_transform(index, transform, mix_duration, tween);}\r
-void frame_mixer_device::apply_image_transform(const std::function<image_transform(image_transform)>& transform, int mix_duration, const std::wstring& tween){impl_->apply_image_transform(transform, mix_duration, tween);}\r
-void frame_mixer_device::apply_image_transform(int index, const std::function<image_transform(image_transform)>& transform, int mix_duration, const std::wstring& tween){impl_->apply_image_transform(index, transform, mix_duration, tween);}\r
-void frame_mixer_device::apply_audio_transform(const std::function<audio_transform(audio_transform)>& transform, int mix_duration, const std::wstring& tween){impl_->apply_audio_transform(transform, mix_duration, tween);}\r
-void frame_mixer_device::apply_audio_transform(int index, const std::function<audio_transform(audio_transform)>& transform, int mix_duration, const std::wstring& tween){impl_->apply_audio_transform(index, transform, mix_duration, tween);}\r
+void frame_mixer_device::set_image_transform(const core::image_transform& transform, int mix_duration, const std::wstring& tween){impl_->set_image_transform(transform, mix_duration, tween);}\r
+void frame_mixer_device::set_image_transform(int index, const core::image_transform& transform, int mix_duration, const std::wstring& tween){impl_->set_image_transform(index, transform, mix_duration, tween);}\r
+void frame_mixer_device::set_audio_transform(const core::audio_transform& transform, int mix_duration, const std::wstring& tween){impl_->set_audio_transform(transform, mix_duration, tween);}\r
+void frame_mixer_device::set_audio_transform(int index, const core::audio_transform& transform, int mix_duration, const std::wstring& tween){impl_->set_audio_transform(index, transform, mix_duration, tween);}\r
+void frame_mixer_device::apply_image_transform(const std::function<core::image_transform(core::image_transform)>& transform, int mix_duration, const std::wstring& tween){impl_->apply_image_transform(transform, mix_duration, tween);}\r
+void frame_mixer_device::apply_image_transform(int index, const std::function<core::image_transform(core::image_transform)>& transform, int mix_duration, const std::wstring& tween){impl_->apply_image_transform(index, transform, mix_duration, tween);}\r
+void frame_mixer_device::apply_audio_transform(const std::function<core::audio_transform(core::audio_transform)>& transform, int mix_duration, const std::wstring& tween){impl_->apply_audio_transform(transform, mix_duration, tween);}\r
+void frame_mixer_device::apply_audio_transform(int index, const std::function<core::audio_transform(core::audio_transform)>& transform, int mix_duration, const std::wstring& tween){impl_->apply_audio_transform(index, transform, mix_duration, tween);}\r
 void frame_mixer_device::reset_image_transform(int mix_duration, const std::wstring& tween){impl_->reset_image_transform(mix_duration, tween);}\r
 void frame_mixer_device::reset_audio_transform(int mix_duration, const std::wstring& tween){impl_->reset_audio_transform(mix_duration, tween);}\r
 \r
index 141feb1db7ea557a032c52f0ccf08e12bda73153..285fe22d1260d3df28f0ccca4a22fde9c303202f 100644 (file)
@@ -19,6 +19,8 @@
 */\r
 #pragma once\r
 \r
+#include <core/consumer/frame/read_frame.h>\r
+#include <core/producer/frame/write_frame.h>\r
 #include <core/producer/frame/frame_factory.h>\r
 #include <core/producer/frame/pixel_format.h>\r
 \r
 \r
 #include <functional>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
        \r
-struct video_format_desc;\r
-class read_frame;\r
-class write_frame;\r
-\r
-class frame_mixer_device : public frame_factory\r
+class frame_mixer_device : public core::frame_factory\r
 {\r
 public:\r
-       typedef boost::signals2::signal<void(const safe_ptr<const read_frame>&)> output_t;\r
+       typedef boost::signals2::signal<void(const safe_ptr<const core::read_frame>&)> output_t;\r
         \r
        boost::signals2::connection connect(const output_t::slot_type& subscriber);\r
        \r
-       frame_mixer_device(const video_format_desc& format_desc);\r
+       frame_mixer_device(const core::video_format_desc& format_desc);\r
        frame_mixer_device(frame_mixer_device&& other); // nothrow\r
                \r
-       void send(const std::vector<safe_ptr<basic_frame>>& frames); // nothrow\r
+       void send(const std::vector<safe_ptr<core::basic_frame>>& frames); // nothrow\r
                \r
-       safe_ptr<write_frame> create_frame(void* tag, const pixel_format_desc& desc);           \r
-       safe_ptr<write_frame> create_frame(void* tag, size_t width, size_t height, pixel_format::type pix_fmt = pixel_format::bgra);                    \r
-       safe_ptr<write_frame> create_frame(void* tag, pixel_format::type pix_fmt = pixel_format::bgra);\r
+       safe_ptr<core::write_frame> create_frame(void* tag, const core::pixel_format_desc& desc);               \r
+       safe_ptr<core::write_frame> create_frame(void* tag, size_t width, size_t height, core::pixel_format::type pix_fmt = core::pixel_format::bgra);                  \r
+       safe_ptr<core::write_frame> create_frame(void* tag, core::pixel_format::type pix_fmt = core::pixel_format::bgra);\r
        \r
-       const video_format_desc& get_video_format_desc() const; // nothrow\r
+       const core::video_format_desc& get_video_format_desc() const; // nothrow\r
 \r
-       void set_image_transform(const image_transform& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
-       void set_image_transform(int index, const image_transform& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
+       void set_image_transform(const core::image_transform& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
+       void set_image_transform(int index, const core::image_transform& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
 \r
-       void set_audio_transform(const audio_transform& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
-       void set_audio_transform(int index, const audio_transform& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
+       void set_audio_transform(const core::audio_transform& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
+       void set_audio_transform(int index, const core::audio_transform& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
        \r
-       void apply_image_transform(const std::function<image_transform(image_transform)>& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
-       void apply_image_transform(int index, const std::function<image_transform(image_transform)>& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
+       void apply_image_transform(const std::function<core::image_transform(core::image_transform)>& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
+       void apply_image_transform(int index, const std::function<core::image_transform(core::image_transform)>& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
 \r
-       void apply_audio_transform(const std::function<audio_transform(audio_transform)>& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
-       void apply_audio_transform(int index, const std::function<audio_transform(audio_transform)>& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
+       void apply_audio_transform(const std::function<core::audio_transform(core::audio_transform)>& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
+       void apply_audio_transform(int index, const std::function<core::audio_transform(core::audio_transform)>& transform, int mix_duration = 0, const std::wstring& tween = L"linear");\r
 \r
        void reset_image_transform(int mix_duration = 0, const std::wstring& tween = L"linear");\r
        void reset_audio_transform(int mix_duration = 0, const std::wstring& tween = L"linear");\r
index 700583e7ffe209232b50bd8ad27e98fd9501296d..c9f3a5d44c61cb1ad26687fec9dce8a46761cf98 100644 (file)
@@ -3,7 +3,7 @@
 #include "device_buffer.h"\r
 \r
 #include <common/gl/gl_check.h>\r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
        \r
 GLenum FORMAT[] = {0, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_BGR, GL_BGRA};\r
 GLenum INTERNAL_FORMAT[] = {0, GL_LUMINANCE8, GL_LUMINANCE8_ALPHA8, GL_RGB8, GL_RGBA8};        \r
index 1c47156d88d37cc8b8804a1ca8708bb88e9c3e41..daeee9017c8951e643d1e3a53fb46c92fb359094 100644 (file)
@@ -6,7 +6,7 @@
 \r
 #include <memory>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
        \r
 class device_buffer : boost::noncopyable\r
 {\r
index a621d8f229f39a8c8a33e17f358f63a90695cbb6..6211f54904b4680ad8e4b827e21e78a254e3e115 100644 (file)
@@ -6,7 +6,7 @@
 \r
 #include <common/gl/gl_check.h>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
                                                                                                                                                                                                                                                                                                                        \r
 struct gpu_read_frame::implementation : boost::noncopyable\r
 {\r
index 5fb4c0b484512c501f700674dac37685bb362feb..db214166508ed6f52691f86d6152d42df5f4db37 100644 (file)
@@ -12,7 +12,7 @@
 \r
 #include <common/memory/safe_ptr.h>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
        \r
 class gpu_read_frame : public core::read_frame\r
 {\r
index 489768c9aec312bd273e9cfd5717b6ea3684f32d..102df6f61dec35e20941ea50bd0d857dcee7f121 100644 (file)
 \r
 #include <boost/range/algorithm.hpp>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
                                                                                                                                                                                                                                                                                                                        \r
 struct gpu_write_frame::implementation : boost::noncopyable\r
 {                              \r
        std::vector<safe_ptr<host_buffer>> buffers_;\r
        std::vector<short> audio_data_;\r
-       const pixel_format_desc desc_;\r
+       const core::pixel_format_desc desc_;\r
        int tag_;\r
 \r
 public:\r
-       implementation(int tag, const pixel_format_desc& desc, const std::vector<safe_ptr<host_buffer>>& buffers) \r
+       implementation(int tag, const core::pixel_format_desc& desc, const std::vector<safe_ptr<host_buffer>>& buffers) \r
                : desc_(desc)\r
                , buffers_(buffers)\r
                , tag_(tag){}\r
        \r
-       void accept(gpu_write_frame& self, frame_visitor& visitor)\r
+       void accept(gpu_write_frame& self, core::frame_visitor& visitor)\r
        {\r
                visitor.begin(self);\r
                visitor.visit(self);\r
@@ -52,7 +52,7 @@ public:
        }\r
 };\r
        \r
-gpu_write_frame::gpu_write_frame(int tag, const pixel_format_desc& desc, const std::vector<safe_ptr<host_buffer>>& buffers) : impl_(new implementation(tag, desc, buffers)){}\r
+gpu_write_frame::gpu_write_frame(int tag, const core::pixel_format_desc& desc, const std::vector<safe_ptr<host_buffer>>& buffers) : impl_(new implementation(tag, desc, buffers)){}\r
 gpu_write_frame::gpu_write_frame(gpu_write_frame&& other) : impl_(std::move(other.impl_)){}\r
 void gpu_write_frame::swap(gpu_write_frame& other){impl_.swap(other.impl_);}\r
 gpu_write_frame& gpu_write_frame::operator=(gpu_write_frame&& other)\r
@@ -61,7 +61,7 @@ gpu_write_frame& gpu_write_frame::operator=(gpu_write_frame&& other)
        temp.swap(*this);\r
        return *this;\r
 }\r
-void gpu_write_frame::accept(frame_visitor& visitor){impl_->accept(*this, visitor);}\r
+void gpu_write_frame::accept(core::frame_visitor& visitor){impl_->accept(*this, visitor);}\r
 boost::iterator_range<unsigned char*> gpu_write_frame::image_data(size_t index){return impl_->image_data(index);}\r
 std::vector<short>& gpu_write_frame::audio_data() { return impl_->audio_data_; }\r
 const boost::iterator_range<const unsigned char*> gpu_write_frame::image_data(size_t index) const\r
@@ -73,6 +73,6 @@ const boost::iterator_range<const short*> gpu_write_frame::audio_data() const
        return boost::iterator_range<const short*>(impl_->audio_data_.data(), impl_->audio_data_.data() + impl_->audio_data_.size());\r
 }\r
 int gpu_write_frame::tag() const {return impl_->tag_;}\r
-const pixel_format_desc& gpu_write_frame::get_pixel_format_desc() const{return impl_->desc_;}\r
+const core::pixel_format_desc& gpu_write_frame::get_pixel_format_desc() const{return impl_->desc_;}\r
 std::vector<safe_ptr<host_buffer>>& gpu_write_frame::get_plane_buffers(){return impl_->buffers_;}\r
 }}
\ No newline at end of file
index 54884a432068f278f7b5967a73437579f21711bd..4666097830148454d1c3b1f6dd253559d1e47bb7 100644 (file)
@@ -2,6 +2,7 @@
 \r
 #include <common/memory/safe_ptr.h>\r
 #include <core/producer/frame/write_frame.h>\r
+#include <core/producer/frame/pixel_format.h>\r
 \r
 #include "../gpu/host_buffer.h"\r
 \r
 #include <memory>\r
 #include <vector>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
        \r
-struct pixel_format_desc;\r
-\r
 class gpu_write_frame : public core::write_frame\r
 {\r
 public:        \r
-       explicit gpu_write_frame(int tag, const pixel_format_desc& desc, const std::vector<safe_ptr<host_buffer>>& buffers);\r
+       explicit gpu_write_frame(int tag, const core::pixel_format_desc& desc, const std::vector<safe_ptr<host_buffer>>& buffers);\r
        gpu_write_frame(gpu_write_frame&& other);\r
        gpu_write_frame& operator=(gpu_write_frame&& other);\r
        \r
        void swap(gpu_write_frame& other);\r
 \r
-       const pixel_format_desc& get_pixel_format_desc() const;\r
+       const core::pixel_format_desc& get_pixel_format_desc() const;\r
        std::vector<safe_ptr<host_buffer>>& get_plane_buffers();\r
                \r
        // core::write_frame\r
@@ -34,7 +33,7 @@ public:
        virtual const boost::iterator_range<const unsigned char*> image_data(size_t plane_index = 0) const;\r
        virtual const boost::iterator_range<const short*> audio_data() const;\r
 \r
-       virtual void accept(frame_visitor& visitor);\r
+       virtual void accept(core::frame_visitor& visitor);\r
 \r
        virtual int tag() const;\r
        \r
index d4120abd34c02d1213ebd68167117314ffe710a4..f8b6ac2d1125085277e81b0d8677af4bf523752a 100644 (file)
@@ -4,7 +4,7 @@
 \r
 #include <common/gl/gl_check.h>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
                                                                                                                                                                                                                                                                                                                                \r
 struct host_buffer::implementation : boost::noncopyable\r
 {      \r
index 24b9e11eabe1f3bcd20947ae7177fbc03af4d24d..8b52072e1b3842a13fcf5bab9390bc4c2ac36cdc 100644 (file)
@@ -4,7 +4,7 @@
 \r
 #include <memory>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
                \r
 class host_buffer : boost::noncopyable\r
 {\r
index 082043bfd7cfcf3c26bfc87a9ccbdc6976eb52dd..db13f4a00a6b3fdd8742c2842380076d5b83ef6f 100644 (file)
@@ -9,7 +9,7 @@
 \r
 #include <boost/foreach.hpp>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
 \r
 ogl_device::ogl_device() : executor_(L"ogl_device")\r
 {\r
index d8cf21eda7b7551ccd5cad1eac1124829b3c0921..8e50c2c28e0ce66ef88ec1a485baa21392167bb2 100644 (file)
@@ -15,7 +15,7 @@
 \r
 #include <SFML/Window/Context.hpp>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
 \r
 class ogl_device\r
 {      \r
index c379aef6668b3e6e036a967adb21af4ba0df78fb..7d4bb2a043db1573ff0c750b612384d26d7950f0 100644 (file)
@@ -15,7 +15,7 @@
 \r
 #include <unordered_map>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
 \r
 class shader_program : boost::noncopyable\r
 {\r
@@ -135,10 +135,10 @@ GLubyte lower_pattern[] = {
 \r
 struct image_kernel::implementation : boost::noncopyable\r
 {      \r
-       std::unordered_map<pixel_format::type, shader_program> shaders_;\r
+       std::unordered_map<core::pixel_format::type, shader_program> shaders_;\r
 \r
 public:\r
-       std::unordered_map<pixel_format::type, shader_program>& shaders()\r
+       std::unordered_map<core::pixel_format::type, shader_program>& shaders()\r
        {\r
                GL(glEnable(GL_POLYGON_STIPPLE));\r
                GL(glEnable(GL_BLEND));\r
@@ -193,7 +193,7 @@ public:
                        "}                                                                                                                                              "                       \r
                        "                                                                                                                                               ";\r
                        \r
-               shaders_[pixel_format::abgr] = shader_program(common_vertex, common_fragment +\r
+               shaders_[core::pixel_format::abgr] = shader_program(common_vertex, common_fragment +\r
 \r
                        "void main()                                                                                                                    "\r
                        "{                                                                                                                                              "\r
@@ -201,7 +201,7 @@ public:
                        "       gl_FragColor = abgr.argb * gain;                                                                        "\r
                        "}                                                                                                                                              ");\r
                \r
-               shaders_[pixel_format::argb]= shader_program(common_vertex, common_fragment +\r
+               shaders_[core::pixel_format::argb]= shader_program(common_vertex, common_fragment +\r
 \r
                        "void main()                                                                                                                    "       \r
                        "{                                                                                                                                              "\r
@@ -209,7 +209,7 @@ public:
                        "       gl_FragColor = argb.grab * gl_Color * gain;                                                     "\r
                        "}                                                                                                                                              ");\r
                \r
-               shaders_[pixel_format::bgra]= shader_program(common_vertex, common_fragment +\r
+               shaders_[core::pixel_format::bgra]= shader_program(common_vertex, common_fragment +\r
 \r
                        "void main()                                                                                                                    "\r
                        "{                                                                                                                                              "\r
@@ -217,7 +217,7 @@ public:
                        "       gl_FragColor = bgra.rgba * gl_Color * gain;                                                     "\r
                        "}                                                                                                                                              ");\r
                \r
-               shaders_[pixel_format::rgba] = shader_program(common_vertex, common_fragment +\r
+               shaders_[core::pixel_format::rgba] = shader_program(common_vertex, common_fragment +\r
 \r
                        "void main()                                                                                                                    "\r
                        "{                                                                                                                                              "\r
@@ -225,7 +225,7 @@ public:
                        "       gl_FragColor = rgba.bgra * gl_Color * gain;                                                     "\r
                        "}                                                                                                                                              ");\r
                \r
-               shaders_[pixel_format::ycbcr] = shader_program(common_vertex, common_fragment +\r
+               shaders_[core::pixel_format::ycbcr] = shader_program(common_vertex, common_fragment +\r
 \r
                        "void main()                                                                                                                    "\r
                        "{                                                                                                                                              "\r
@@ -239,7 +239,7 @@ public:
                        "               gl_FragColor = ycbcra_to_bgra_sd(y, cb, cr, a) * gl_Color * gain;"\r
                        "}                                                                                                                                              ");\r
                \r
-               shaders_[pixel_format::ycbcra] = shader_program(common_vertex, common_fragment +\r
+               shaders_[core::pixel_format::ycbcra] = shader_program(common_vertex, common_fragment +\r
 \r
                        "void main()                                                                                                                    "\r
                        "{                                                                                                                                              "\r
@@ -259,16 +259,16 @@ public:
 \r
 image_kernel::image_kernel() : impl_(new implementation()){}\r
 \r
-void image_kernel::apply(const pixel_format_desc& pix_desc, const image_transform& transform)\r
+void image_kernel::apply(const core::pixel_format_desc& pix_desc, const core::image_transform& transform)\r
 {\r
        impl_->shaders()[pix_desc.pix_fmt].use();\r
 \r
        GL(glUniform1f(impl_->shaders()[pix_desc.pix_fmt].get_location("gain"), static_cast<GLfloat>(transform.get_gain())));\r
        GL(glUniform1i(impl_->shaders()[pix_desc.pix_fmt].get_location("HD"), pix_desc.planes.at(0).height > 700 ? 1 : 0));\r
 \r
-       if(transform.get_mode() == video_mode::upper)\r
+       if(transform.get_mode() == core::video_mode::upper)\r
                glPolygonStipple(upper_pattern);\r
-       else if(transform.get_mode() == video_mode::lower)\r
+       else if(transform.get_mode() == core::video_mode::lower)\r
                glPolygonStipple(lower_pattern);\r
        else\r
                glPolygonStipple(progressive_pattern);\r
index 0494c68e7a98432b632e9086a781aafc1f235101..bcf8fb1219119a6fbdf02654ac629213a16163e8 100644 (file)
@@ -2,17 +2,16 @@
 \r
 #include <memory>\r
 \r
-namespace caspar { namespace core {\r
-\r
-struct pixel_format_desc;\r
-class image_transform;\r
-class image_transform;\r
+#include <core/producer/frame/pixel_format.h>\r
+#include <core/producer/frame/image_transform.h>\r
 \r
+namespace caspar { namespace mixer {\r
+       \r
 class image_kernel\r
 {\r
 public:\r
        image_kernel();\r
-       void apply(const pixel_format_desc& pix_desc, const image_transform& mode);\r
+       void apply(const core::pixel_format_desc& pix_desc, const core::image_transform& mode);\r
 \r
 private:\r
        struct implementation;\r
index f9da7d24b3c5c8cc387044e694b68b1f82ec4ce5..42d2434f6290edf88ed623eaee29e6e1b4dcc16b 100644 (file)
 #include <array>\r
 #include <unordered_map>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { namespace mixer {\r
                \r
 struct image_mixer::implementation : boost::noncopyable\r
 {                      \r
-       const video_format_desc format_desc_;\r
+       const core::video_format_desc format_desc_;\r
        \r
-       std::stack<image_transform> transform_stack_;\r
+       std::stack<core::image_transform> transform_stack_;\r
 \r
        GLuint fbo_;\r
        std::array<std::shared_ptr<device_buffer>, 2> render_targets_;\r
@@ -42,7 +42,7 @@ struct image_mixer::implementation : boost::noncopyable
        safe_ptr<ogl_device> context_;\r
 \r
 public:\r
-       implementation(const video_format_desc& format_desc) \r
+       implementation(const core::video_format_desc& format_desc) \r
                : format_desc_(format_desc)\r
                , context_(ogl_device::create())\r
        {\r
@@ -54,8 +54,8 @@ public:
                \r
                context_->begin_invoke([=]\r
                {\r
-                       transform_stack_.push(image_transform());\r
-                       transform_stack_.top().set_mode(video_mode::progressive);\r
+                       transform_stack_.push(core::image_transform());\r
+                       transform_stack_.top().set_mode(core::video_mode::progressive);\r
 \r
                        GL(glEnable(GL_TEXTURE_2D));\r
                        GL(glDisable(GL_DEPTH_TEST));           \r
@@ -76,12 +76,12 @@ public:
                glDeleteFramebuffersEXT(1, &fbo_);\r
        }\r
 \r
-       void begin(const basic_frame& frame)\r
+       void begin(const core::basic_frame& frame)\r
        {\r
                transform_stack_.push(transform_stack_.top()*frame.get_image_transform());\r
        }\r
                \r
-       void visit(write_frame& frame)\r
+       void visit(core::write_frame& frame)\r
        {\r
                auto gpu_frame = boost::polymorphic_downcast<gpu_write_frame*>(&frame);\r
                auto& desc = gpu_frame->get_pixel_format_desc();\r
@@ -155,10 +155,10 @@ public:
                });\r
        }\r
                \r
-       std::vector<safe_ptr<host_buffer>> create_buffers(const pixel_format_desc& format)\r
+       std::vector<safe_ptr<host_buffer>> create_buffers(const core::pixel_format_desc& format)\r
        {\r
                std::vector<safe_ptr<host_buffer>> buffers;\r
-               std::transform(format.planes.begin(), format.planes.end(), std::back_inserter(buffers), [&](const pixel_format_desc::plane& plane) -> safe_ptr<host_buffer>\r
+               std::transform(format.planes.begin(), format.planes.end(), std::back_inserter(buffers), [&](const core::pixel_format_desc::plane& plane)\r
                {\r
                        return context_->create_host_buffer(plane.size, host_buffer::write_only);\r
                });\r
@@ -166,12 +166,12 @@ public:
        }\r
 };\r
 \r
-image_mixer::image_mixer(const video_format_desc& format_desc) : impl_(new implementation(format_desc)){}\r
-void image_mixer::begin(const basic_frame& frame){impl_->begin(frame);}\r
-void image_mixer::visit(write_frame& frame){impl_->visit(frame);}\r
+image_mixer::image_mixer(const core::video_format_desc& format_desc) : impl_(new implementation(format_desc)){}\r
+void image_mixer::begin(const core::basic_frame& frame){impl_->begin(frame);}\r
+void image_mixer::visit(core::write_frame& frame){impl_->visit(frame);}\r
 void image_mixer::end(){impl_->end();}\r
 boost::unique_future<safe_ptr<const host_buffer>> image_mixer::begin_pass(){   return impl_->begin_pass();}\r
 void image_mixer::end_pass(){impl_->end_pass();}\r
-std::vector<safe_ptr<host_buffer>> image_mixer::create_buffers(const pixel_format_desc& format){return impl_->create_buffers(format);}\r
+std::vector<safe_ptr<host_buffer>> image_mixer::create_buffers(const core::pixel_format_desc& format){return impl_->create_buffers(format);}\r
 \r
 }}
\ No newline at end of file
index 9763f2d416562c1043cfa13fc006cbac195c5149..3d4873771155a6a82aa891fcba0e23eef52d67cd 100644 (file)
@@ -1,6 +1,8 @@
 #pragma once\r
 \r
+#include <core/video_format.h>\r
 #include <core/producer/frame/frame_visitor.h>\r
+#include <core/producer/frame/pixel_format.h>\r
 \r
 #include "../gpu/host_buffer.h"\r
 \r
 #include <memory>\r
 #include <vector>\r
 \r
-namespace caspar { namespace core {\r
-\r
-struct video_format_desc;\r
-struct pixel_format_desc;      \r
-class image_transform;\r
-\r
+namespace caspar { namespace mixer {\r
+       \r
 class image_mixer : public core::frame_visitor, boost::noncopyable\r
 {\r
 public:\r
-       image_mixer(const video_format_desc& format_desc);\r
+       image_mixer(const core::video_format_desc& format_desc);\r
        \r
-       virtual void begin(const basic_frame& frame);\r
-       virtual void visit(write_frame& frame);\r
+       virtual void begin(const core::basic_frame& frame);\r
+       virtual void visit(core::write_frame& frame);\r
        virtual void end();\r
 \r
        boost::unique_future<safe_ptr<const host_buffer>> begin_pass();\r
        void end_pass();\r
 \r
-       std::vector<safe_ptr<host_buffer>> create_buffers(const pixel_format_desc& format);\r
+       std::vector<safe_ptr<host_buffer>> create_buffers(const core::pixel_format_desc& format);\r
 \r
 private:\r
        struct implementation;\r
index e6f030d6058494aa0d7bfd1bf895d6f0f70c996b..67a9c2f9b24f936de8286a7c25a9e1e069944317 100644 (file)
@@ -121,8 +121,8 @@ void print_version()
        CASPAR_LOG(info) << L"FFMPEG-avcodec "  << get_avcodec_version();\r
        CASPAR_LOG(info) << L"FFMPEG-swscale "  << get_avformat_version();\r
        CASPAR_LOG(info) << L"FFMPEG-avformat " << get_swscale_version();\r
-       CASPAR_LOG(info) << L"OpenGL " << ogl_device::create()->invoke([]{return reinterpret_cast<const char*>(glGetString(GL_VERSION));})\r
-                                        << L" "           << ogl_device::create()->invoke([]{return reinterpret_cast<const char*>(glGetString(GL_VENDOR));});\r
+       CASPAR_LOG(info) << L"OpenGL " << mixer::ogl_device::create()->invoke([]{return reinterpret_cast<const char*>(glGetString(GL_VERSION));})\r
+                                        << L" "           << mixer::ogl_device::create()->invoke([]{return reinterpret_cast<const char*>(glGetString(GL_VENDOR));});\r
 \r
        HKEY hkey; \r
        DWORD dwType, dwSize;\r