]> git.sesse.net Git - casparcg/commitdiff
2.0.0.2: Fixed CLEAR command.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Fri, 4 Mar 2011 20:52:16 +0000 (20:52 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Fri, 4 Mar 2011 20:52:16 +0000 (20:52 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@527 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

casparcg.sln
core/producer/frame_producer_device.cpp
core/producer/layer.cpp
core/producer/layer.h
protocol/amcp/AMCPCommandsImpl.cpp

index 060c3f5ba50c3015e6c29de97a9e5c5d03cecf4a..753e0c9890513738e8651efa7ca0aec53d2933c1 100644 (file)
@@ -5,8 +5,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common\common.vcx
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "core\core.vcxproj", "{79388C20-6499-4BF6-B8B9-D8C33D7D4DDD}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcxproj", "{8002D74D-4E89-4BD6-8CE8-0FE4DF14CA5D}"\r
-EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shell", "shell\shell.vcxproj", "{8C26C94F-8092-4769-8D84-DEA479721C5B}"\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "protocol", "protocol\protocol.vcxproj", "{2040B361-1FB6-488E-84A5-38A580DA90DE}"\r
@@ -46,12 +44,6 @@ Global
                {79388C20-6499-4BF6-B8B9-D8C33D7D4DDD}.Profile|Win32.Build.0 = Amplify|Win32\r
                {79388C20-6499-4BF6-B8B9-D8C33D7D4DDD}.Release|Win32.ActiveCfg = Release|Win32\r
                {79388C20-6499-4BF6-B8B9-D8C33D7D4DDD}.Release|Win32.Build.0 = Release|Win32\r
-               {8002D74D-4E89-4BD6-8CE8-0FE4DF14CA5D}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {8002D74D-4E89-4BD6-8CE8-0FE4DF14CA5D}.Debug|Win32.Build.0 = Debug|Win32\r
-               {8002D74D-4E89-4BD6-8CE8-0FE4DF14CA5D}.Develop|Win32.ActiveCfg = Debug|Win32\r
-               {8002D74D-4E89-4BD6-8CE8-0FE4DF14CA5D}.Profile|Win32.ActiveCfg = Release|Win32\r
-               {8002D74D-4E89-4BD6-8CE8-0FE4DF14CA5D}.Release|Win32.ActiveCfg = Release|Win32\r
-               {8002D74D-4E89-4BD6-8CE8-0FE4DF14CA5D}.Release|Win32.Build.0 = Release|Win32\r
                {8C26C94F-8092-4769-8D84-DEA479721C5B}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {8C26C94F-8092-4769-8D84-DEA479721C5B}.Debug|Win32.Build.0 = Debug|Win32\r
                {8C26C94F-8092-4769-8D84-DEA479721C5B}.Develop|Win32.ActiveCfg = Develop|Win32\r
index e6e31e1946fdf3415bfeaa07c916591298b68774..5ad3d892bb1befc7ca6353b62a27fbbddf0f03e1 100644 (file)
@@ -103,16 +103,12 @@ public:
 \r
        void clear(int index)\r
        {\r
-               executor_.invoke([&]{get_layer(index).clear();});\r
+               executor_.invoke([&]{layers_.erase(index);});\r
        }\r
                \r
        void clear()\r
        {\r
-               executor_.invoke([&]\r
-               {\r
-                       BOOST_FOREACH(auto& pair, layers_)\r
-                               pair.second.clear();\r
-               });\r
+               executor_.invoke([&]{layers_.clear();});\r
        }       \r
        \r
        void swap_layer(int index, size_t other_index)\r
index fa21c5b16433b1860ac86bd4ff381b0b2c4ff4a2..33e60ba15b350ce77e0baa5436ba9d57fdb025f2 100644 (file)
@@ -105,15 +105,7 @@ public:
                last_frame_ = draw_frame::empty();\r
                foreground_ = frame_producer::empty();\r
        }\r
-\r
-       void clear()\r
-       {               \r
-               foreground_ = frame_producer::empty();\r
-               background_ = frame_producer::empty();\r
-               last_frame_ = draw_frame::empty();\r
-               is_paused_ = false;\r
-       }\r
-       \r
+               \r
        safe_ptr<draw_frame> receive()\r
        {               \r
                if(is_paused_)\r
@@ -175,7 +167,6 @@ void layer::load(const safe_ptr<frame_producer>& frame_producer, bool play_on_lo
 void layer::play(){impl_->play();}\r
 void layer::pause(){impl_->pause();}\r
 void layer::stop(){impl_->stop();}\r
-void layer::clear(){impl_->clear();}\r
 safe_ptr<draw_frame> layer::receive() {return impl_->receive();}\r
 safe_ptr<frame_producer> layer::foreground() const { return impl_->foreground_;}\r
 safe_ptr<frame_producer> layer::background() const { return impl_->background_;}\r
index dae8b399d3942d335f9bb94c74e714de81cb07ac..cf66e1ea38d83d040f142be136130410ad3ecfce 100644 (file)
@@ -27,7 +27,6 @@ public:
        void play(); // nothrow\r
        void pause(); // nothrow\r
        void stop(); // nothrow\r
-       void clear(); // nothrow\r
 \r
        safe_ptr<frame_producer> foreground() const; // nothrow\r
        safe_ptr<frame_producer> background() const; // nothrow\r
index ad21aec4ba69d32c37df42b14e2771604ea0e8ce..c2570bd19caf3c0fb2e7edaf88c4d1d45c604c94 100644 (file)
@@ -584,7 +584,11 @@ bool StopCommand::DoExecute()
 \r
 bool ClearCommand::DoExecute()\r
 {\r
-       GetChannel()->producer().clear(GetLayerIndex());\r
+       int index = GetLayerIndex(std::numeric_limits<int>::min());\r
+       if(index != std::numeric_limits<int>::min())\r
+               GetChannel()->producer().clear(index);\r
+       else\r
+               GetChannel()->producer().clear();\r
                \r
        SetReplyString(TEXT("202 CLEAR OK\r\n"));\r
 \r