]> git.sesse.net Git - casparcg/commitdiff
2.0.0.2: Added check for channel formats when swapping layers.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Fri, 4 Mar 2011 19:31:10 +0000 (19:31 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Fri, 4 Mar 2011 19:31:10 +0000 (19:31 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@525 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

core/core.vcxproj.filters
core/producer/frame_producer_device.cpp

index 868a9f5732f85bdd8ae26e35f4e631964cd991a2..80d30fe7ed694f12f7c127972555c5fb13748627 100644 (file)
@@ -70,9 +70,6 @@
     <Filter Include="Source\producer\silverlight\interop">\r
       <UniqueIdentifier>{865b1b03-83c0-4c59-b896-f98cd3323c00}</UniqueIdentifier>\r
     </Filter>\r
-    <Filter Include="Source\producer\diagnostics">\r
-      <UniqueIdentifier>{fb911bef-1f24-492e-9806-827d8609b866}</UniqueIdentifier>\r
-    </Filter>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="consumer\decklink\DeckLinkAPI_h.h">\r
index f7edb86166ef601a1c03d51eea311f5db28976ad..e6e31e1946fdf3415bfeaa07c916591298b68774 100644 (file)
@@ -129,6 +129,9 @@ public:
                        swap_layer(index, other_index);\r
                else\r
                {\r
+                       if(factory_->get_video_format_desc() != other.impl_->factory_->get_video_format_desc())\r
+                               BOOST_THROW_EXCEPTION(invalid_operation() << msg_info("Cannot swap between channels with different formats."));\r
+\r
                        auto func = [&]\r
                        {\r
                                get_layer(index).swap(other.impl_->layers_.at(other_index));            \r
@@ -145,6 +148,9 @@ public:
                if(other.impl_.get() == this)\r
                        return;\r
 \r
+               if(factory_->get_video_format_desc() != other.impl_->factory_->get_video_format_desc())\r
+                       BOOST_THROW_EXCEPTION(invalid_operation() << msg_info("Cannot swap between channels with different formats."));\r
+\r
                auto func = [&]\r
                {\r
                        std::set<int> my_indices;\r