]> git.sesse.net Git - casparcg/commitdiff
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sat, 24 Mar 2012 10:54:22 +0000 (10:54 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sat, 24 Mar 2012 10:54:22 +0000 (10:54 +0000)
accelerator/accelerator.vcxproj
accelerator/accelerator.vcxproj.filters
core/producer/stage.cpp
core/producer/stage.h

index 3f3ea9d80a607a87a108278787a26a7feb60a634..91414aa516dc3466b10196cdfa117f460e533c53 100644 (file)
     </Lib>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
-    <ClInclude Include="cpu\image\deinterlacer.h" />\r
     <ClInclude Include="cpu\image\image_mixer.h" />\r
     <ClInclude Include="cpu\util\xmm.h" />\r
     <ClInclude Include="accelerator.h" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="accelerator.cpp" />\r
-    <ClCompile Include="cpu\image\deinterlacer.cpp">\r
-      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../../StdAfx.h</PrecompiledHeaderFile>\r
-      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>\r
-    </ClCompile>\r
     <ClCompile Include="cpu\image\image_mixer.cpp">\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>\r
index 6f9a035dca729b2269f38d5ee8c545beea43cef7..c5dd0891769e47e8a120fc6998c6535283285c68 100644 (file)
@@ -58,9 +58,6 @@
     <ClInclude Include="ogl\util\buffer.h">\r
       <Filter>source\ogl\util</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="cpu\image\deinterlacer.h">\r
-      <Filter>source\cpu\image</Filter>\r
-    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="StdAfx.cpp" />\r
@@ -91,8 +88,5 @@
     <ClCompile Include="ogl\util\buffer.cpp">\r
       <Filter>source\ogl\util</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="cpu\image\deinterlacer.cpp">\r
-      <Filter>source\cpu\image</Filter>\r
-    </ClCompile>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index dd4d3d7896b56c5b6f01e40bf5a3e0379581380a..517036f7947d9fb1c9e2eb5d7ab338ba74539949 100644 (file)
@@ -127,9 +127,9 @@ public:
                return it->second;\r
        }\r
                \r
-       void apply_transforms(const std::vector<std::tuple<int, stage::transform_func_t, unsigned int, tweener>>& transforms)\r
+       boost::unique_future<void> apply_transforms(const std::vector<std::tuple<int, stage::transform_func_t, unsigned int, tweener>>& transforms)\r
        {\r
-               executor_.begin_invoke([=]\r
+               return executor_.begin_invoke([=]\r
                {\r
                        BOOST_FOREACH(auto& transform, transforms)\r
                        {\r
@@ -140,9 +140,9 @@ public:
                }, task_priority::high_priority);\r
        }\r
                                                \r
-       void apply_transform(int index, const stage::transform_func_t& transform, unsigned int mix_duration, const tweener& tween)\r
+       boost::unique_future<void> apply_transform(int index, const stage::transform_func_t& transform, unsigned int mix_duration, const tweener& tween)\r
        {\r
-               executor_.begin_invoke([=]\r
+               return executor_.begin_invoke([=]\r
                {\r
                        auto src = tweens_[index].fetch();\r
                        auto dst = transform(src);\r
@@ -150,76 +150,76 @@ public:
                }, task_priority::high_priority);\r
        }\r
 \r
-       void clear_transforms(int index)\r
+       boost::unique_future<void> clear_transforms(int index)\r
        {\r
-               executor_.begin_invoke([=]\r
+               return executor_.begin_invoke([=]\r
                {\r
                        tweens_.erase(index);\r
                }, task_priority::high_priority);\r
        }\r
 \r
-       void clear_transforms()\r
+       boost::unique_future<void> clear_transforms()\r
        {\r
-               executor_.begin_invoke([=]\r
+               return executor_.begin_invoke([=]\r
                {\r
                        tweens_.clear();\r
                }, task_priority::high_priority);\r
        }\r
                \r
-       void load(int index, const spl::shared_ptr<frame_producer>& producer, bool preview, const boost::optional<int32_t>& auto_play_delta)\r
+       boost::unique_future<void> load(int index, const spl::shared_ptr<frame_producer>& producer, bool preview, const boost::optional<int32_t>& auto_play_delta)\r
        {\r
-               executor_.begin_invoke([=]\r
+               return executor_.begin_invoke([=]\r
                {\r
                        get_layer(index).load(producer, preview, auto_play_delta);                      \r
                }, task_priority::high_priority);\r
        }\r
 \r
-       void pause(int index)\r
+       boost::unique_future<void> pause(int index)\r
        {               \r
-               executor_.begin_invoke([=]\r
+               return executor_.begin_invoke([=]\r
                {\r
                        layers_[index].pause();\r
                }, task_priority::high_priority);\r
        }\r
 \r
-       void play(int index)\r
+       boost::unique_future<void> play(int index)\r
        {               \r
-               executor_.begin_invoke([=]\r
+               return executor_.begin_invoke([=]\r
                {\r
                        layers_[index].play();\r
                }, task_priority::high_priority);\r
        }\r
 \r
-       void stop(int index)\r
+       boost::unique_future<void> stop(int index)\r
        {               \r
-               executor_.begin_invoke([=]\r
+               return executor_.begin_invoke([=]\r
                {\r
                        layers_[index].stop();\r
                }, task_priority::high_priority);\r
        }\r
 \r
-       void clear(int index)\r
+       boost::unique_future<void> clear(int index)\r
        {\r
-               executor_.begin_invoke([=]\r
+               return executor_.begin_invoke([=]\r
                {\r
                        layers_.erase(index);\r
                }, task_priority::high_priority);\r
        }\r
                \r
-       void clear()\r
+       boost::unique_future<void> clear()\r
        {\r
-               executor_.begin_invoke([=]\r
+               return executor_.begin_invoke([=]\r
                {\r
                        layers_.clear();\r
                }, task_priority::high_priority);\r
        }       \r
                \r
-       void swap_layers(stage& other)\r
+       boost::unique_future<void> swap_layers(stage& other)\r
        {\r
                auto other_impl = other.impl_;\r
 \r
                if(other_impl.get() == this)\r
-                       return;\r
+                       return async(launch::deferred, []{});\r
                \r
                auto func = [=]\r
                {\r
@@ -240,26 +240,27 @@ public:
                        BOOST_FOREACH(auto& layer, other_layers)\r
                                layer.subscribe(event_subject_);\r
                };              \r
-               executor_.begin_invoke([=]\r
+\r
+               return executor_.begin_invoke([=]\r
                {\r
                        other_impl->executor_.invoke(func, task_priority::high_priority);\r
                }, task_priority::high_priority);\r
        }\r
 \r
-       void swap_layer(int index, int other_index)\r
+       boost::unique_future<void> swap_layer(int index, int other_index)\r
        {\r
-               executor_.begin_invoke([=]\r
+               return executor_.begin_invoke([=]\r
                {\r
                        std::swap(layers_[index], layers_[other_index]);\r
                }, task_priority::high_priority);\r
        }\r
 \r
-       void swap_layer(int index, int other_index, stage& other)\r
+       boost::unique_future<void> swap_layer(int index, int other_index, stage& other)\r
        {\r
                auto other_impl = other.impl_;\r
 \r
                if(other_impl.get() == this)\r
-                       swap_layer(index, other_index);\r
+                       return swap_layer(index, other_index);\r
                else\r
                {\r
                        auto func = [=]\r
@@ -275,7 +276,8 @@ public:
                                my_layer.subscribe(event_subject_);\r
                                other_layer.subscribe(other_impl->event_subject_);\r
                        };              \r
-                       executor_.begin_invoke([=]\r
+\r
+                       return executor_.begin_invoke([=]\r
                        {\r
                                other_impl->executor_.invoke(func, task_priority::high_priority);\r
                        }, task_priority::high_priority);\r
@@ -329,19 +331,19 @@ public:
 \r
 stage::stage(spl::shared_ptr<diagnostics::graph> graph) : impl_(new impl(std::move(graph))){}\r
 boost::unique_future<std::wstring> stage::call(int index, const std::wstring& params){return impl_->call(index, params);}\r
-void stage::apply_transforms(const std::vector<stage::transform_tuple_t>& transforms){impl_->apply_transforms(transforms);}\r
-void stage::apply_transform(int index, const std::function<core::frame_transform(core::frame_transform)>& transform, unsigned int mix_duration, const tweener& tween){impl_->apply_transform(index, transform, mix_duration, tween);}\r
-void stage::clear_transforms(int index){impl_->clear_transforms(index);}\r
-void stage::clear_transforms(){impl_->clear_transforms();}\r
-void stage::load(int index, const spl::shared_ptr<frame_producer>& producer, bool preview, const boost::optional<int32_t>& auto_play_delta){impl_->load(index, producer, preview, auto_play_delta);}\r
-void stage::pause(int index){impl_->pause(index);}\r
-void stage::play(int index){impl_->play(index);}\r
-void stage::stop(int index){impl_->stop(index);}\r
-void stage::clear(int index){impl_->clear(index);}\r
-void stage::clear(){impl_->clear();}\r
-void stage::swap_layers(stage& other){impl_->swap_layers(other);}\r
-void stage::swap_layer(int index, int other_index){impl_->swap_layer(index, other_index);}\r
-void stage::swap_layer(int index, int other_index, stage& other){impl_->swap_layer(index, other_index, other);}\r
+boost::unique_future<void> stage::apply_transforms(const std::vector<stage::transform_tuple_t>& transforms){return impl_->apply_transforms(transforms);}\r
+boost::unique_future<void> stage::apply_transform(int index, const std::function<core::frame_transform(core::frame_transform)>& transform, unsigned int mix_duration, const tweener& tween){return impl_->apply_transform(index, transform, mix_duration, tween);}\r
+boost::unique_future<void> stage::clear_transforms(int index){return impl_->clear_transforms(index);}\r
+boost::unique_future<void> stage::clear_transforms(){return impl_->clear_transforms();}\r
+boost::unique_future<void> stage::load(int index, const spl::shared_ptr<frame_producer>& producer, bool preview, const boost::optional<int32_t>& auto_play_delta){return impl_->load(index, producer, preview, auto_play_delta);}\r
+boost::unique_future<void> stage::pause(int index){return impl_->pause(index);}\r
+boost::unique_future<void> stage::play(int index){return impl_->play(index);}\r
+boost::unique_future<void> stage::stop(int index){return impl_->stop(index);}\r
+boost::unique_future<void> stage::clear(int index){return impl_->clear(index);}\r
+boost::unique_future<void> stage::clear(){return impl_->clear();}\r
+boost::unique_future<void> stage::swap_layers(stage& other){return impl_->swap_layers(other);}\r
+boost::unique_future<void> stage::swap_layer(int index, int other_index){return impl_->swap_layer(index, other_index);}\r
+boost::unique_future<void> stage::swap_layer(int index, int other_index, stage& other){return impl_->swap_layer(index, other_index, other);}\r
 boost::unique_future<spl::shared_ptr<frame_producer>> stage::foreground(int index) {return impl_->foreground(index);}\r
 boost::unique_future<spl::shared_ptr<frame_producer>> stage::background(int index) {return impl_->background(index);}\r
 boost::unique_future<boost::property_tree::wptree> stage::info() const{return impl_->info();}\r
index 604999ab3b2d5604b7197a377449a5a836f73c78..e07c71b85e16fb8ee261e392d0832142e6707b6b 100644 (file)
@@ -60,22 +60,20 @@ public:
 \r
        std::map<int, class draw_frame> operator()(const struct video_format_desc& format_desc);\r
 \r
-       void apply_transforms(const std::vector<transform_tuple_t>& transforms);\r
-       void apply_transform(int index, const transform_func_t& transform, unsigned int mix_duration = 0, const tweener& tween = L"linear");\r
-       void clear_transforms(int index);\r
-       void clear_transforms();\r
-                               \r
-       void load(int index, const spl::shared_ptr<class frame_producer>& producer, bool preview = false, const boost::optional<int32_t>& auto_play_delta = nullptr);\r
-       void pause(int index);\r
-       void play(int index);\r
-       void stop(int index);\r
-       void clear(int index);\r
-       void clear();   \r
-       void swap_layers(stage& other);\r
-       void swap_layer(int index, int other_index);\r
-       void swap_layer(int index, int other_index, stage& other);\r
-       \r
-       boost::unique_future<std::wstring> call(int index, const std::wstring& params);\r
+       boost::unique_future<void>                      apply_transforms(const std::vector<transform_tuple_t>& transforms);\r
+       boost::unique_future<void>                      apply_transform(int index, const transform_func_t& transform, unsigned int mix_duration = 0, const tweener& tween = L"linear");\r
+       boost::unique_future<void>                      clear_transforms(int index);\r
+       boost::unique_future<void>                      clear_transforms();                             \r
+       boost::unique_future<void>                      load(int index, const spl::shared_ptr<class frame_producer>& producer, bool preview = false, const boost::optional<int32_t>& auto_play_delta = nullptr);\r
+       boost::unique_future<void>                      pause(int index);\r
+       boost::unique_future<void>                      play(int index);\r
+       boost::unique_future<void>                      stop(int index);\r
+       boost::unique_future<std::wstring>      call(int index, const std::wstring& params);\r
+       boost::unique_future<void>                      clear(int index);\r
+       boost::unique_future<void>                      clear();        \r
+       boost::unique_future<void>                      swap_layers(stage& other);\r
+       boost::unique_future<void>                      swap_layer(int index, int other_index);\r
+       boost::unique_future<void>                      swap_layer(int index, int other_index, stage& other);   \r
 \r
        // monitor::observable\r
 \r