]> 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>
Fri, 17 Jun 2011 10:54:14 +0000 (10:54 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Fri, 17 Jun 2011 10:54:14 +0000 (10:54 +0000)
core/producer/layer.cpp
core/producer/transition/transition_producer.cpp

index 09e5f6c9173d57dd800853d15c117f7f538136a2..0f4ec257467ef326584a227a6aa3f08448d7dea2 100644 (file)
 #include "../stdafx.h"\r
 \r
 #include "layer.h"\r
-#include "frame_producer.h"\r
 \r
-#include "../producer/frame/basic_frame.h"\r
-#include "../producer/frame/audio_transform.h"\r
+#include "frame_producer.h"\r
 \r
 namespace caspar { namespace core {\r
        \r
index 18a048e8b80562d85c81f643e901fcc4d55e7b30..20559c377f5ec747e097afa0c3d9a25bddb983fc 100644 (file)
@@ -32,7 +32,7 @@ namespace caspar { namespace core {
 struct transition_producer : public frame_producer\r
 {      \r
        const video_mode::type          mode_;\r
-       uint32_t                                        current_frame_;\r
+       unsigned int                            current_frame_;\r
        \r
        const transition_info           info_;\r
        \r
@@ -87,10 +87,10 @@ struct transition_producer : public frame_producer
                if(info_.type == transition::cut)               \r
                        return src_frame;\r
                                                                                \r
-               double delta1 = info_.tweener(current_frame_*2-1, 0.0, 1.0, info_.duration*2);\r
-               double delta2 = info_.tweener(current_frame_*2, 0.0, 1.0, info_.duration*2);  \r
+               const double delta1 = info_.tweener(current_frame_*2-1, 0.0, 1.0, info_.duration*2);\r
+               const double delta2 = info_.tweener(current_frame_*2, 0.0, 1.0, info_.duration*2);  \r
 \r
-               double dir = info_.direction == transition_direction::from_left ? 1.0 : -1.0;           \r
+               const double dir = info_.direction == transition_direction::from_left ? 1.0 : -1.0;             \r
                \r
                // For interlaced transitions. Seperate fields into seperate frames which are transitioned accordingly.\r
                \r
@@ -130,8 +130,8 @@ struct transition_producer : public frame_producer
                        d_frame2->get_image_transform().set_clip_scale(delta2, 1.0);                    \r
                }\r
                                \r
-               auto s_frame = s_frame1->get_image_transform() == s_frame2->get_image_transform() ? s_frame2 : basic_frame::interlace(s_frame1, s_frame2, mode_);\r
-               auto d_frame = d_frame1->get_image_transform() == d_frame2->get_image_transform() ? d_frame2 : basic_frame::interlace(d_frame1, d_frame2, mode_);\r
+               const auto s_frame = s_frame1->get_image_transform() == s_frame2->get_image_transform() ? s_frame2 : basic_frame::interlace(s_frame1, s_frame2, mode_);\r
+               const auto d_frame = d_frame1->get_image_transform() == d_frame2->get_image_transform() ? d_frame2 : basic_frame::interlace(d_frame1, d_frame2, mode_);\r
                \r
                return basic_frame::combine(s_frame, d_frame);\r
        }\r