]> git.sesse.net Git - casparcg/commitdiff
2.0.0.2:
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sat, 30 Oct 2010 12:30:42 +0000 (12:30 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sat, 30 Oct 2010 12:30:42 +0000 (12:30 +0000)
- Added the core namespace to all files in core project

git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@187 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

85 files changed:
common/exception/win32_exception.cpp
core/consumer/bluefish/bluefish_consumer.cpp
core/consumer/bluefish/bluefish_consumer.h
core/consumer/bluefish/exception.h
core/consumer/bluefish/fwd.h
core/consumer/bluefish/memory.h
core/consumer/bluefish/util.h
core/consumer/decklink/DecklinkVideoConsumer.cpp
core/consumer/decklink/DecklinkVideoConsumer.h
core/consumer/frame_consumer.h
core/consumer/oal/oal_consumer.cpp
core/consumer/oal/oal_consumer.h
core/consumer/ogl/ogl_consumer.cpp
core/consumer/ogl/ogl_consumer.h
core/core.vcxproj
core/core.vcxproj.filters
core/frame/composite_gpu_frame.cpp
core/frame/composite_gpu_frame.h
core/frame/frame_factory.h
core/frame/frame_format.cpp
core/frame/frame_format.h
core/frame/frame_fwd.h
core/frame/gpu_frame.cpp
core/frame/gpu_frame.h
core/frame/gpu_frame_processor.cpp
core/frame/gpu_frame_processor.h
core/main.cpp
core/producer/color/color_producer.cpp
core/producer/color/color_producer.h
core/producer/ffmpeg/audio/audio_decoder.cpp
core/producer/ffmpeg/audio/audio_decoder.h
core/producer/ffmpeg/ffmpeg_producer.cpp
core/producer/ffmpeg/ffmpeg_producer.h
core/producer/ffmpeg/input.cpp
core/producer/ffmpeg/input.h
core/producer/ffmpeg/packet.h
core/producer/ffmpeg/video/video_decoder.cpp
core/producer/ffmpeg/video/video_decoder.h
core/producer/ffmpeg/video/video_transformer.cpp
core/producer/ffmpeg/video/video_transformer.h
core/producer/flash/FlashAxContainer.cpp
core/producer/flash/FlashAxContainer.h
core/producer/flash/TimerHelper.h
core/producer/flash/bitmap.cpp
core/producer/flash/bitmap.h
core/producer/flash/cg_producer.cpp
core/producer/flash/cg_producer.h
core/producer/flash/ct_producer.cpp
core/producer/flash/ct_producer.h
core/producer/flash/flash_producer.cpp
core/producer/flash/flash_producer.h
core/producer/frame_producer.h
core/producer/image/image_loader.cpp
core/producer/image/image_loader.h
core/producer/image/image_producer.cpp
core/producer/image/image_producer.h
core/producer/image/image_scroll_producer.cpp
core/producer/image/image_scroll_producer.h
core/producer/transition/transition_producer.cpp
core/producer/transition/transition_producer.h
core/protocol/amcp/AMCPCommand.h
core/protocol/amcp/AMCPCommandQueue.cpp
core/protocol/amcp/AMCPCommandQueue.h
core/protocol/amcp/AMCPCommandsImpl.cpp
core/protocol/amcp/AMCPCommandsImpl.h
core/protocol/amcp/AMCPProtocolStrategy.cpp
core/protocol/amcp/AMCPProtocolStrategy.h
core/protocol/cii/CIICommand.h
core/protocol/cii/CIICommandsImpl.cpp
core/protocol/cii/CIICommandsImpl.h
core/protocol/cii/CIIProtocolStrategy.cpp
core/protocol/cii/CIIProtocolStrategy.h
core/protocol/clk/CLKCommand.cpp
core/protocol/clk/CLKCommand.h
core/protocol/clk/CLKProtocolStrategy.cpp
core/protocol/clk/CLKProtocolStrategy.h
core/protocol/media.cpp
core/protocol/media.h
core/renderer/layer.cpp
core/renderer/layer.h
core/renderer/render_device.cpp
core/renderer/render_device.h
core/renderer/renderer_fwd.h
core/server.cpp
core/server.h

index f4044b53dc015beca280fca7c1d6a42d91ad9f3d..2c3bf51b232ececa5f928c9410bb35258a2a1009 100644 (file)
@@ -24,7 +24,7 @@
 \r
 #include "../log/log.h"\r
 \r
-namespace caspar{\r
+namespace caspar {\r
 \r
 void win32_exception::install_handler() \r
 {\r
@@ -66,7 +66,8 @@ win32_access_violation::win32_access_violation(const EXCEPTION_RECORD& info) : w
        badAddress_ = reinterpret_cast<win32_exception::address>(info.ExceptionInformation[1]);\r
 }\r
 \r
-const char* win32_access_violation::what() const {\r
+const char* win32_access_violation::what() const\r
+{\r
        sprintf_s<>(messageBuffer_, "Access violation at %p, trying to %s %p", location(), isWrite_?"write":"read", badAddress_);\r
 \r
        return messageBuffer_;\r
index 1cc3af8320c936d434655ac6f0a2fd9f0fa6bea5..fca88f9b4ff040754d936873dc2d0ab4a96e22a8 100644 (file)
 #include <BlueVelvet4.h>\r
 #include <BlueHancUtils.h>\r
 \r
-#if defined(_MSC_VER)\r
-#pragma warning (push, 1) // TODO: Legacy code, just disable warnings\r
-#endif\r
-\r
-namespace caspar { namespace bluefish {\r
+namespace caspar { namespace core { namespace bluefish {\r
        \r
 struct consumer::implementation\r
 {\r
-       implementation::implementation(const frame_format_desc& format_desc, unsigned int device_index, bool embeed_audio) \r
-               : device_index_(device_index), format_desc_(format_desc), sdk_(BlueVelvetFactory4()), current_id_(0), embeed_audio_(embeed_audio)\r
+       implementation::implementation(const frame_format_desc& format_desc, unsigned int device_index, bool embed_audio) \r
+               : device_index_(device_index), format_desc_(format_desc), sdk_(BlueVelvetFactory4()), current_id_(0), embed_audio_(embed_audio)\r
        {\r
                mem_fmt_                = MEM_FMT_ARGB_PC;\r
                upd_fmt_                = UPD_FMT_FRAME;\r
@@ -140,8 +136,7 @@ struct consumer::implementation
                        BOOST_THROW_EXCEPTION(bluefish_exception() << msg_info("BLUECARD ERROR: Failed to set vido engine."));\r
 \r
                enable_video_output();\r
-\r
-                               \r
+                                               \r
                page_locked_buffer::reserve_working_size(MAX_HANC_BUFFER_SIZE * 3);             \r
                for(int n = 0; n < 3; ++n)\r
                        hanc_buffers_.push_back(std::make_shared<page_locked_buffer>(MAX_HANC_BUFFER_SIZE));\r
@@ -202,7 +197,7 @@ struct consumer::implementation
                unsigned long fieldCount = 0;\r
                sdk_->wait_output_video_synch(UPD_FMT_FRAME, fieldCount);\r
                                \r
-               if(embeed_audio_)\r
+               if(embed_audio_)\r
                {               \r
                        encode_hanc(reinterpret_cast<BLUE_UINT32*>(hanc->data()), frame_audio_data.data(), audio_samples, audio_nchannels);\r
 \r
@@ -302,13 +297,13 @@ struct consumer::implementation
 \r
        std::vector<page_locked_buffer_ptr> hanc_buffers_;\r
        int current_id_;\r
-       bool embeed_audio_;\r
+       bool embed_audio_;\r
 };\r
 \r
-consumer::consumer(const frame_format_desc& format_desc, unsigned int device_index, bool embeed_audio) : impl_(new implementation(format_desc, device_index, embeed_audio)){}  \r
+consumer::consumer(const frame_format_desc& format_desc, unsigned int device_index, bool embed_audio) : impl_(new implementation(format_desc, device_index, embed_audio)){}    \r
 void consumer::display(const gpu_frame_ptr& frame){impl_->display(frame);}\r
 const frame_format_desc& consumer::get_frame_format_desc() const { return impl_->format_desc_;}\r
 \r
-}}\r
+}}}\r
 \r
 #endif
\ No newline at end of file
index 5ddbfd2b7159d91c600a907222e98dd4680672a0..53e247eddcbef8f2dfab442281448569b23caf2c 100644 (file)
 #include "../../frame/frame_fwd.h"\r
 #include "../../consumer/frame_consumer.h"\r
 \r
-namespace caspar { namespace bluefish {\r
+namespace caspar { namespace core { namespace bluefish {\r
        \r
 class consumer : public frame_consumer\r
 {\r
 public:\r
-       consumer(const frame_format_desc& format_desc, unsigned int deviceIndex, bool embedd_audio = false);\r
+       consumer(const frame_format_desc& format_desc, unsigned int deviceIndex, bool embed_audio = false);\r
        \r
        void display(const gpu_frame_ptr&);\r
                \r
@@ -39,4 +39,4 @@ private:
 };\r
 typedef std::tr1::shared_ptr<consumer> BlueFishFrameConsumerPtr;\r
 \r
-}}\r
+}}}\r
index 6b70ec27dc73b06a58dc99125a48637521422c3d..35868f28c5dd5488a506a61b231decd5ed5a1230 100644 (file)
 \r
 #include "../../../common/exception/exceptions.h"\r
 \r
-#include <exception>\r
+namespace caspar { namespace core { namespace bluefish {\r
 \r
-namespace caspar { namespace bluefish {\r
+struct bluefish_exception : public caspar_exception{};\r
 \r
-struct bluefish_exception : public caspar_exception\r
-{\r
-       bluefish_exception(){}\r
-       explicit bluefish_exception(const char* msg) : std::exception(msg) {}\r
-};\r
-\r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 2b39a78fa153053b56cad25229a3c94643f5404c..1daaa513939c1fb131e91d3fdcd3259b60dae29b 100644 (file)
@@ -2,11 +2,11 @@
 \r
 class CBlueVelvet4;\r
 \r
-namespace caspar { namespace bluefish {\r
+namespace caspar { namespace core { namespace bluefish {\r
 \r
 typedef std::tr1::shared_ptr<CBlueVelvet4> BlueVelvetPtr;\r
 \r
 class consumer;\r
 typedef std::shared_ptr<consumer> consumer_ptr;\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 9b4f198556bed8adb3dada9ca08d66c574d46949..c79e2e9ceeb9970b17839d6a7b274de1ae1f3981 100644 (file)
@@ -6,7 +6,7 @@
 #include "../../frame/frame_format.h"\r
 #include "exception.h"\r
 \r
-namespace caspar { namespace bluefish {\r
+namespace caspar { namespace core { namespace bluefish {\r
        \r
 static const size_t MAX_HANC_BUFFER_SIZE = 256*1024;\r
 static const size_t MAX_VBI_BUFFER_SIZE = 36*1920*4;\r
@@ -55,4 +55,4 @@ private:
 };\r
 typedef std::shared_ptr<page_locked_buffer> page_locked_buffer_ptr;\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 02f5b540ae93c93673f435962bcc058a26abdd3c..ae91c29f252a3d47459d02ea9d8ca90d3aec1cdc 100644 (file)
@@ -5,7 +5,7 @@
 \r
 #include <memory>\r
 \r
-namespace caspar { namespace bluefish {\r
+namespace caspar { namespace core { namespace bluefish {\r
        \r
 inline bool is_epoch_card(int card_type)\r
 {\r
@@ -93,4 +93,4 @@ inline int set_card_property(const std::shared_ptr<CBlueVelvet4> pSdk, ULONG pro
        return set_card_property(pSdk.get(), prop, value);\r
 }\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index a71e3a392894afd5be23fef5fceadfba271b6b3b..bdff0d80ecdfdc76e1d80d87c57b42d23ec970ea 100644 (file)
@@ -46,7 +46,7 @@
 \r
 #pragma warning(push)\r
 \r
-namespace caspar{ namespace decklink{\r
+namespace caspar { namespace core { namespace decklink{\r
 \r
 struct DecklinkVideoConsumer::Implementation : public IDeckLinkVideoOutputCallback\r
 {\r
@@ -56,7 +56,7 @@ struct DecklinkVideoConsumer::Implementation : public IDeckLinkVideoOutputCallba
                explicit DecklinkVideoFrame(DecklinkFrameManager* pFactory)\r
                {\r
                        IDeckLinkMutableVideoFrame* frame = NULL;\r
-                       const caspar::frame_format_desc& format_desc = pFactory->pConsumerImpl_->get_frame_format_desc();\r
+                       const frame_format_desc& format_desc = pFactory->pConsumerImpl_->get_frame_format_desc();\r
                        if(pFactory->pConsumerImpl_->pDecklinkOutput_->CreateVideoFrame(format_desc.width, format_desc.height, format_desc.size/format_desc.height, bmdFormat8BitBGRA, bmdFrameFlagDefault, &frame) != S_OK) \r
                        {\r
                                throw std::exception("DECKLINK: Failed to create frame");\r
@@ -177,7 +177,7 @@ struct DecklinkVideoConsumer::Implementation : public IDeckLinkVideoOutputCallba
                        return std::make_shared<DecklinkVideoFrame>(this);\r
                }\r
 \r
-               const caspar::frame_format_desc& get_frame_format_desc() const {\r
+               const frame_format_desc& get_frame_format_desc() const {\r
                        return pConsumerImpl_->get_frame_format_desc();\r
                }\r
 \r
@@ -202,7 +202,7 @@ struct DecklinkVideoConsumer::Implementation : public IDeckLinkVideoOutputCallba
 \r
 //     IDeckLinkMutableVideoFrame* pNextFrame_;\r
 \r
-       explicit Implementation(const caspar::frame_format_desc& format_desc, bool internalKey) \r
+       explicit Implementation(const frame_format_desc& format_desc, bool internalKey) \r
                : format_desc_(format_desc), currentFormat_(frame_format::pal), internalKey_(internalKey)\r
        {\r
        \r
@@ -406,7 +406,7 @@ struct DecklinkVideoConsumer::Implementation : public IDeckLinkVideoOutputCallba
                return S_OK;\r
        }\r
 \r
-       const caspar::frame_format_desc& get_frame_format_desc() const \r
+       const frame_format_desc& get_frame_format_desc() const \r
        {\r
                return frame_format_desc::format_descs[currentFormat_];\r
        }\r
@@ -434,7 +434,7 @@ struct DecklinkVideoConsumer::Implementation : public IDeckLinkVideoOutputCallba
        }\r
 };\r
 \r
-DecklinkVideoConsumer::DecklinkVideoConsumer(const caspar::frame_format_desc& format_desc, bool internalKey) : pImpl_(new Implementation(format_desc, internalKey))\r
+DecklinkVideoConsumer::DecklinkVideoConsumer(const frame_format_desc& format_desc, bool internalKey) : pImpl_(new Implementation(format_desc, internalKey))\r
 {}\r
 \r
 void DecklinkVideoConsumer::display(const gpu_frame_ptr& frame)\r
@@ -448,4 +448,4 @@ const frame_format_desc& DecklinkVideoConsumer::get_frame_format_desc() const
 }\r
        \r
 }      //namespace decklink\r
-}      //namespace caspar
\ No newline at end of file
+}}     //namespace caspar
\ No newline at end of file
index f1d9beeef75eee3fe4972f1865c1be448a8c34f8..099f296b9ad0fed2b84e850e6545ca71162997ce 100644 (file)
 \r
 #include "../../frame/frame_fwd.h"\r
 \r
-namespace caspar { namespace decklink {\r
+namespace caspar { namespace core { namespace decklink {\r
 \r
 class DecklinkVideoConsumer : public frame_consumer\r
 {\r
 public:\r
-       explicit DecklinkVideoConsumer(const caspar::frame_format_desc& format_desc, bool internalKey = false);\r
+       explicit DecklinkVideoConsumer(const frame_format_desc& format_desc, bool internalKey = false);\r
        \r
        void display(const gpu_frame_ptr&);\r
        const frame_format_desc& get_frame_format_desc() const;\r
@@ -37,4 +37,4 @@ private:
        std::tr1::shared_ptr<Implementation> pImpl_;\r
 };\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 3eb7bc6ac5bfb8ba5987dba6e02085fc63dfc76f..e65cbf04c84b815fb17814999f07f9995c7ffe47 100644 (file)
@@ -25,7 +25,7 @@
 \r
 #include <memory>\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
        \r
 struct frame_consumer : boost::noncopyable\r
 {\r
@@ -42,4 +42,4 @@ typedef std::shared_ptr<const frame_consumer> frame_consumer_const_ptr;
 typedef std::unique_ptr<frame_consumer> frame_consumer_uptr;\r
 typedef std::unique_ptr<const frame_consumer> frame_consumer_const_uptr;\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index e94a5001fb6381a39a53cb1589226223f3e2671a..7fe3332ca1a46fc7d49c05e4c8914c9f8c9c5edc 100644 (file)
 \r
 #include <windows.h>\r
 \r
-namespace caspar{ namespace audio{     \r
+namespace caspar { namespace core { namespace audio{   \r
 \r
-class sound_channel : public sf::SoundStream\r
+struct consumer::implementation : public sf::SoundStream, boost::noncopyable\r
 {\r
-public:\r
-       sound_channel() : internal_chunks_(5), silence_(1920*2, 0)\r
+       implementation(const frame_format_desc& format_desc) : format_desc_(format_desc), internal_chunks_(5)\r
        {\r
                external_chunks_.set_capacity(3);\r
                sf::SoundStream::Initialize(2, 48000);\r
        }\r
 \r
-       ~sound_channel()\r
+       ~implementation()\r
        {\r
                external_chunks_.clear();\r
                external_chunks_.push(nullptr);\r
@@ -52,21 +51,16 @@ public:
        \r
        void push(const gpu_frame_ptr& frame)\r
        {\r
-               if(frame->audio_data().empty())\r
-                       frame->audio_data() = silence_;\r
-\r
-               //if(!external_chunks_.try_push(frame))\r
-               //{\r
-                       //CASPAR_LOG(debug) << "Sound Buffer Overrun";\r
-                       external_chunks_.push(frame);\r
-               //}\r
+               static std::vector<short> silence(1920*2, 0);\r
 \r
+               if(frame->audio_data().empty())\r
+                       frame->audio_data() = silence;\r
+               \r
+               external_chunks_.push(frame);\r
                if(GetStatus() != Playing && external_chunks_.size() >= 3)\r
                        Play();\r
        }\r
-\r
-private:\r
-\r
+       \r
        bool OnStart() \r
        {\r
                external_chunks_.clear();\r
@@ -89,35 +83,17 @@ private:
                }\r
 \r
                internal_chunks_.push_back(frame);\r
-               //SetVolume(pChunk->volume());\r
                data.Samples = reinterpret_cast<sf::Int16*>(frame->audio_data().data());\r
                data.NbSamples = frame->audio_data().size();\r
         return true;\r
     }\r
 \r
-       std::vector<short> silence_;\r
        boost::circular_buffer<gpu_frame_ptr> internal_chunks_;\r
        tbb::concurrent_bounded_queue<gpu_frame_ptr> external_chunks_;\r
-};\r
-typedef std::shared_ptr<sound_channel> sound_channelPtr;\r
-\r
-struct consumer::implementation : boost::noncopyable\r
-{      \r
-       implementation(const frame_format_desc& format_desc) : format_desc_(format_desc)\r
-       {\r
-       }\r
-       \r
-       void push(const gpu_frame_ptr& frame)\r
-       {\r
-               channel_.push(frame);\r
-       }\r
-               \r
-       sound_channel channel_;\r
-\r
-       caspar::frame_format_desc format_desc_;\r
+       frame_format_desc format_desc_;\r
 };\r
 \r
-consumer::consumer(const caspar::frame_format_desc& format_desc) : impl_(new implementation(format_desc)){}\r
-const caspar::frame_format_desc& consumer::get_frame_format_desc() const{return impl_->format_desc_;}\r
+consumer::consumer(const frame_format_desc& format_desc) : impl_(new implementation(format_desc)){}\r
+const frame_format_desc& consumer::get_frame_format_desc() const{return impl_->format_desc_;}\r
 void consumer::prepare(const gpu_frame_ptr& frame){impl_->push(frame);}\r
-}}\r
+}}}\r
index e3cf70c59ab98926a7b0031ee48c9c6f1e492320..8ce55cfbac6da6d30444bbe01d746f52a0f0e22e 100644 (file)
@@ -21,7 +21,7 @@
 \r
 #include "../../consumer/frame_consumer.h"\r
 \r
-namespace caspar { namespace audio {\r
+namespace caspar { namespace core { namespace audio {\r
 \r
 class consumer : public frame_consumer\r
 {\r
@@ -36,4 +36,4 @@ private:
        std::shared_ptr<implementation> impl_;\r
 };\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index d48bd43dc24c24b2b3720399460a9097b9dbb3ab..c21ceb2b6726d5fe8b782e2efbf1139612920213 100644 (file)
@@ -37,7 +37,7 @@
 \r
 #include <windows.h>\r
 \r
-namespace caspar{ namespace ogl{       \r
+namespace caspar { namespace core { namespace ogl{     \r
 \r
 void GL_CHECK()\r
 {\r
@@ -287,15 +287,15 @@ struct consumer::implementation : boost::noncopyable
 \r
        std::unique_ptr<sf::Window> window_;\r
        stretch stretch_;\r
-       caspar::frame_format_desc format_desc_;\r
+       frame_format_desc format_desc_;\r
 \r
        std::exception_ptr exception_;\r
        boost::thread thread_;\r
        tbb::concurrent_bounded_queue<gpu_frame_ptr> frame_buffer_;\r
 };\r
 \r
-consumer::consumer(const caspar::frame_format_desc& format_desc, unsigned int screen_index, stretch stretch, bool windowed)\r
+consumer::consumer(const frame_format_desc& format_desc, unsigned int screen_index, stretch stretch, bool windowed)\r
 : impl_(new implementation(format_desc, screen_index, stretch, windowed)){}\r
-const caspar::frame_format_desc& consumer::get_frame_format_desc() const{return impl_->format_desc_;}\r
+const frame_format_desc& consumer::get_frame_format_desc() const{return impl_->format_desc_;}\r
 void consumer::display(const gpu_frame_ptr& frame){impl_->display(frame);}\r
-}}\r
+}}}\r
index 184309239729aa2848ca666fa8e15953622e19bc..1c68350cc29f220b355e34e2f47621219d47ccc6 100644 (file)
@@ -21,7 +21,7 @@
 \r
 #include "../../consumer/frame_consumer.h"\r
 \r
-namespace caspar { namespace ogl {\r
+namespace caspar { namespace core { namespace ogl {\r
 \r
 struct ogl_error : virtual caspar_exception{};\r
 \r
@@ -45,4 +45,4 @@ private:
        std::shared_ptr<implementation> impl_;\r
 };\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index df5b0a47a7914b462a639dab16af9d09d8eb5d5f..04d7febf0c09f9e09db0782176838d83d4383860 100644 (file)
     <None Include="My Amplifier Results\r002lw\r002lw.ampl" />\r
     <None Include="My Amplifier Results\r003lw\r003lw.ampl" />\r
     <None Include="My Amplifier Results\r004hs\r004hs.ampl" />\r
+    <None Include="My Amplifier Results\r005hs\r005hs.ampl" />\r
+    <None Include="My Amplifier Results\r006hs\r006hs.ampl" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ProjectReference Include="..\common\common.vcxproj">\r
index f77e5b16cf6f78e82a38afc136b83a42432b8843..555f8baf34ec5502f055c75922848bb77acdc04f 100644 (file)
     <ClInclude Include="producer\ffmpeg\video\video_transformer.h">\r
       <Filter>Source\producer\ffmpeg\video</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="frame\composite_gpu_frame.h">\r
-      <Filter>Source\frame\gpu</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="producer\flash\bitmap.h">\r
       <Filter>Source\producer\flash</Filter>\r
     </ClInclude>\r
     <ClInclude Include="consumer\bluefish\bluefish_consumer.h">\r
       <Filter>Source\consumer\bluefish</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="frame\composite_gpu_frame.h">\r
+      <Filter>Source\frame\gpu</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="StdAfx.cpp">\r
     <ClCompile Include="frame\gpu_frame.cpp">\r
       <Filter>Source\frame\gpu</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="frame\composite_gpu_frame.cpp">\r
-      <Filter>Source\frame\gpu</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="producer\ffmpeg\video\video_transformer.cpp">\r
       <Filter>Source\producer\ffmpeg\video</Filter>\r
     </ClCompile>\r
     <ClCompile Include="consumer\bluefish\bluefish_consumer.cpp">\r
       <Filter>Source\consumer\bluefish</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="frame\composite_gpu_frame.cpp">\r
+      <Filter>Source\frame\gpu</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <Midl Include="consumer\decklink\DeckLinkAPI_v7_3.idl">\r
     <None Include="My Amplifier Results\r004hs\r004hs.ampl">\r
       <Filter>My Amplifier Results</Filter>\r
     </None>\r
+    <None Include="My Amplifier Results\r005hs\r005hs.ampl">\r
+      <Filter>My Amplifier Results</Filter>\r
+    </None>\r
+    <None Include="My Amplifier Results\r006hs\r006hs.ampl">\r
+      <Filter>My Amplifier Results</Filter>\r
+    </None>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index 4eac38eaa039ee3bd46a2cac00c69c0854232bd9..91152b88602ae17020697cb5919a3654f38ac315 100644 (file)
@@ -7,7 +7,7 @@
 #include <algorithm>\r
 #include <numeric>\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
        \r
 struct composite_gpu_frame::implementation : boost::noncopyable\r
 {\r
@@ -45,12 +45,12 @@ struct composite_gpu_frame::implementation : boost::noncopyable
        {\r
                frames_.push_back(frame);\r
 \r
-               if(audio_data_.empty())\r
-                       audio_data_ = std::move(frame->audio_data());\r
+               if(self_->audio_data().empty())\r
+                       self_->audio_data() = std::move(frame->audio_data());\r
                else\r
                {\r
                        for(size_t n = 0; n < frame->audio_data().size(); ++n)\r
-                               audio_data_[n] = static_cast<short>(static_cast<int>(audio_data_[n]) + static_cast<int>(frame->audio_data()[n]) & 0xFFFF);                              \r
+                               self_->audio_data()[n] = static_cast<short>(static_cast<int>(self_->audio_data()[n]) + static_cast<int>(frame->audio_data()[n]) & 0xFFFF);                              \r
                }\r
        }\r
 \r
@@ -62,7 +62,6 @@ struct composite_gpu_frame::implementation : boost::noncopyable
        composite_gpu_frame* self_;\r
        std::vector<gpu_frame_ptr> frames_;\r
        size_t size_;\r
-       std::vector<short> audio_data_;\r
 };\r
 \r
 #pragma warning (disable : 4355)\r
@@ -74,9 +73,24 @@ void composite_gpu_frame::read_lock(GLenum mode){impl_->read_lock(mode);}
 bool composite_gpu_frame::read_unlock(){return impl_->read_unlock();}\r
 void composite_gpu_frame::draw(){impl_->draw();}\r
 unsigned char* composite_gpu_frame::data(){return impl_->data();}\r
-const std::vector<short>& composite_gpu_frame::audio_data() const { return impl_->audio_data_; }       \r
-std::vector<short>& composite_gpu_frame::audio_data() { return impl_->audio_data_; }\r
-void composite_gpu_frame::reset(){impl_->audio_data_.clear();}\r
 void composite_gpu_frame::add(const gpu_frame_ptr& frame){impl_->add(frame);}\r
 \r
-}
\ No newline at end of file
+gpu_frame_ptr composite_gpu_frame::interlace(const gpu_frame_ptr& frame1 ,const gpu_frame_ptr& frame2, video_mode mode)\r
+{                      \r
+       auto result = std::make_shared<composite_gpu_frame>(frame1->width(), frame1->height());\r
+       result->add(frame1);\r
+       result->add(frame2);\r
+       if(mode == video_mode::upper)\r
+       {\r
+               frame1->mode(video_mode::upper);\r
+               frame2->mode(video_mode::lower);\r
+       }\r
+       else\r
+       {\r
+               frame1->mode(video_mode::lower);\r
+               frame2->mode(video_mode::upper);\r
+       }\r
+       return result;\r
+}\r
+\r
+}}
\ No newline at end of file
index 821ed5cce903bcbe9eab53b889247af3efe130b5..d456eed7bbd8e4decf1559458fd056270fd0bf2c 100644 (file)
@@ -6,7 +6,7 @@
 \r
 #include "gpu_frame.h"\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
        \r
 class composite_gpu_frame : public gpu_frame\r
 {\r
@@ -18,14 +18,12 @@ public:
        void read_lock(GLenum mode);\r
        bool read_unlock();\r
        void draw();\r
-       void reset();\r
-               \r
+\r
        virtual unsigned char* data();\r
                                        \r
-       virtual const std::vector<short>& audio_data() const;   \r
-       virtual std::vector<short>& audio_data();\r
-\r
        void add(const gpu_frame_ptr& frame);\r
+\r
+       static gpu_frame_ptr interlace(const gpu_frame_ptr& frame1 ,const gpu_frame_ptr& frame2, video_mode mode);\r
        \r
 private:\r
        struct implementation;\r
@@ -33,4 +31,4 @@ private:
 };\r
 typedef std::shared_ptr<composite_gpu_frame> composite_gpu_frame_ptr;\r
        \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index 47a7c7886dfbb7fafe45bacaffecef6b93a77c71..ee0c55bdf62d569e887976a73a68282d68e6479c 100644 (file)
@@ -5,7 +5,7 @@
 \r
 #include <memory>\r
 \r
-namespace caspar { \r
+namespace caspar { namespace core { \r
 \r
 struct frame_factory\r
 {\r
@@ -19,4 +19,4 @@ struct frame_factory
 \r
 typedef std::shared_ptr<frame_factory> frame_factory_ptr;\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index 20a73e5e57576eee67df13324ab6ecd24209e09a..5fc658f7da75751666e6f2dbe83e8bb3d6a1115a 100644 (file)
@@ -26,7 +26,7 @@
 \r
 #define DEFINE_VIDEOFORMATDESC(w, h, m, f, s, fmt) { (w), (h), (m), (f), (w)*(h)*4, s, (fmt) }\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
 \r
 const frame_format_desc frame_format_desc::format_descs[frame_format::count] =  \r
 {      \r
@@ -46,16 +46,16 @@ const frame_format_desc frame_format_desc::format_descs[frame_format::count] =
        DEFINE_VIDEOFORMATDESC(1920, 1080,video_mode:: progressive, 30, TEXT("1080p3000"), frame_format::x1080p3000)\r
 };\r
 \r
-frame_format get_video_format(const std::wstring& strVideoMode)\r
+frame_format get_video_format(const std::wstring& str)\r
 {\r
        for(int n = 0; n < frame_format::count; ++n)\r
        {\r
-               if(boost::iequals(frame_format_desc::format_descs[n].name, strVideoMode))\r
+               if(boost::iequals(frame_format_desc::format_descs[n].name, str))\r
                        return static_cast<frame_format>(n);\r
        }\r
 \r
        return frame_format::invalid;\r
 }\r
 \r
-}      //namespace caspar\r
+}}     //namespace caspar\r
 \r
index 9ecf39aef400d933f678ae59b6d838b1dd2d7c9e..104e139b28ce5e27220411520a131ee62ef0f379 100644 (file)
@@ -2,7 +2,7 @@
 \r
 #include <string>\r
 \r
-namespace caspar{\r
+namespace caspar { namespace core {\r
        \r
 enum video_mode\r
 {\r
@@ -60,7 +60,7 @@ inline frame_format_desc get_video_format_desc(const std::wstring& strVideoMode,
 {                      \r
        auto casparVideoFormat = defaultFormat;\r
        if(!strVideoMode.empty())\r
-               casparVideoFormat = caspar::get_video_format(std::wstring(strVideoMode.begin(), strVideoMode.end()));\r
+               casparVideoFormat = get_video_format(std::wstring(strVideoMode.begin(), strVideoMode.end()));\r
        return frame_format_desc::format_descs[casparVideoFormat];\r
 }\r
 \r
@@ -75,4 +75,4 @@ inline std::wostream& operator<<(std::wostream& out, const frame_format_desc& fo
   return out;\r
 }\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index db32e0562473409b41c47aaefc33fbb7b5fe52c2..d6d4bd30dfee5126cf64d865f81c639e47f17b85 100644 (file)
@@ -2,7 +2,7 @@
 \r
 #include <memory>\r
 \r
-namespace caspar{\r
+namespace caspar { namespace core {\r
        \r
 class gpu_frame;\r
 typedef std::shared_ptr<gpu_frame> gpu_frame_ptr;\r
@@ -20,4 +20,4 @@ class audio_chunk;
 typedef std::shared_ptr<audio_chunk> audio_chunk_ptr;\r
 typedef std::unique_ptr<audio_chunk> audio_chunk_uptr;\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index 1b88953a4e22959b35ea0acd103c384356ce0137..c5dab723f22409fe4959a516d514e27012881e09 100644 (file)
@@ -4,7 +4,7 @@
 #include "../../common/utility/memory.h"\r
 #include "../../common/gl/utility.h"\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
        \r
 GLubyte progressive_pattern[] = {\r
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\r
@@ -229,4 +229,4 @@ double gpu_frame::y() const { return impl_->y_;}
 void gpu_frame::translate(double x, double y) { impl_->x_ += x; impl_->y_ += y; }\r
 void gpu_frame::mode(video_mode mode){ impl_->mode_ = mode;}\r
 video_mode gpu_frame::mode() const{ return impl_->mode_;}\r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index 641dbee5480007068e49eaf988adc98767082260..24ed9b2b3579738ccfb3bad2c5974ab062a718cd 100644 (file)
@@ -8,7 +8,7 @@
 \r
 #include <Glee.h>\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
        \r
 class gpu_frame : boost::noncopyable\r
 {\r
@@ -53,4 +53,4 @@ private:
 };\r
 typedef std::shared_ptr<gpu_frame> gpu_frame_ptr;\r
        \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index b9e1e4b2dbd6a03882e7e7371d32deb8e8f68797..67f0f2c5e8f3d7df054e952e63e807de7662751a 100644 (file)
@@ -29,7 +29,7 @@
 #include <unordered_map>\r
 #include <numeric>\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
        \r
 class frame_buffer : boost::noncopyable\r
 {\r
@@ -93,15 +93,14 @@ struct gpu_frame_processor::implementation : boost::noncopyable
                        index_ = 0;\r
                });\r
 \r
-               empty_frame_ = create_frame(format_desc.width, format_desc.height);\r
-               common::clear(empty_frame_->data(), empty_frame_->size());\r
+               auto empty_frame = create_frame(format_desc.width, format_desc.height);\r
+               common::clear(empty_frame->data(), empty_frame->size());\r
                for(int n = 0; n < 3; ++n)\r
-                       finished_frames_.push(empty_frame_);\r
+                       finished_frames_.push(empty_frame);\r
        }\r
 \r
        ~implementation()\r
        {\r
-               finished_frames_.push(nullptr);\r
                executor_.stop();\r
        }\r
                \r
@@ -189,11 +188,9 @@ struct gpu_frame_processor::implementation : boost::noncopyable
                        \r
        tbb::concurrent_unordered_map<size_t, tbb::concurrent_bounded_queue<gpu_frame_ptr>> input_frame_pools_;\r
 \r
-       tbb::concurrent_bounded_queue<gpu_frame_ptr> out_frame_pool_;\r
-               \r
        frame_buffer_ptr fbo_;\r
 \r
-       int index_;\r
+       size_t index_;\r
        std::vector<composite_gpu_frame_ptr>                    input_;\r
        std::vector<composite_gpu_frame_ptr>                    writing_;\r
 \r
@@ -203,9 +200,8 @@ struct gpu_frame_processor::implementation : boost::noncopyable
        frame_format_desc format_desc_;\r
        \r
        std::unique_ptr<sf::Context> context_;\r
+       \r
        common::executor executor_;\r
-\r
-       gpu_frame_ptr empty_frame_;\r
 };\r
        \r
 gpu_frame_processor::gpu_frame_processor(const frame_format_desc& format_desc) : impl_(new implementation(format_desc)){}\r
@@ -213,4 +209,4 @@ void gpu_frame_processor::push(const std::vector<gpu_frame_ptr>& frames){ impl_-
 void gpu_frame_processor::pop(gpu_frame_ptr& frame){ impl_->pop(frame);}\r
 gpu_frame_ptr gpu_frame_processor::create_frame(size_t width, size_t height){return impl_->create_frame(width, height);}\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index 0c1f6b50286bb7ce3c4bef8785ea5cededf44479..f404488688591102502283001595511b95e21086 100644 (file)
@@ -25,7 +25,7 @@
 #include "frame_fwd.h"\r
 #include "frame_factory.h"\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
 \r
 class gpu_frame_processor : public frame_factory,  boost::noncopyable\r
 {\r
@@ -42,4 +42,4 @@ private:
 };\r
 typedef std::shared_ptr<gpu_frame_processor> gpu_frame_processor_ptr;\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index 7f8b8810c27eaa835845a2594c40d82948d1c5ad..730bba10880e16dfa4e5c46bfd89e8cabaf11708 100644 (file)
 \r
 #include "server.h"\r
 #include "protocol/amcp/AMCPProtocolStrategy.h"\r
+#include "../common/exception/win32_exception.h"\r
+\r
+using namespace caspar;\r
+using namespace caspar::core;\r
+using namespace caspar::common;\r
 \r
 class win32_handler_tbb_installer : public tbb::task_scheduler_observer\r
 {\r
 public:\r
        win32_handler_tbb_installer()   {observe(true);}\r
-       void on_scheduler_entry(bool is_worker) {caspar::win32_exception::install_handler();} \r
+       void on_scheduler_entry(bool is_worker) \r
+       {\r
+               CASPAR_LOG(debug) << L"Started TBB Worker Thread.";\r
+               win32_exception::install_handler();\r
+       } \r
 };\r
  \r
 int _tmain(int argc, _TCHAR* argv[])\r
@@ -47,6 +56,9 @@ int _tmain(int argc, _TCHAR* argv[])
        str << "CasparCG " << CASPAR_VERSION_STR << " " << CASPAR_VERSION_TAG;\r
        SetConsoleTitle(str.str().c_str());\r
 \r
+       CASPAR_LOG(info) << L"Starting CasparCG Video Playout Server Ver: " << CASPAR_VERSION_STR << " Tag: " << CASPAR_VERSION_TAG << std::endl;\r
+       CASPAR_LOG(info) << L"Copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\n\n" << std::endl;\r
+\r
        EnableMenuItem(GetSystemMenu(GetConsoleWindow(), FALSE), SC_CLOSE , MF_GRAYED);\r
     DrawMenuBar(GetConsoleWindow());\r
        MoveWindow(GetConsoleWindow(), 800, 0, 800, 1000, true);\r
@@ -60,21 +72,19 @@ int _tmain(int argc, _TCHAR* argv[])
        MessageBox(nullptr, TEXT("Now is the time to connect for remote debugging..."), TEXT("Debug"), MB_OK | MB_TOPMOST);\r
 #endif\r
 \r
-       caspar::log::add_file_sink(caspar::server::log_folder());\r
+       log::add_file_sink(server::log_folder());\r
+       \r
+       CASPAR_LOG(debug) << "Started Main Thread";\r
 \r
        win32_handler_tbb_installer win32_handler_tbb_installer;\r
-       caspar::win32_exception::install_handler();\r
-               \r
-       std::wcout << L"Starting CasparCG Video Playout Server Ver: " << CASPAR_VERSION_STR << " tag: " << CASPAR_VERSION_TAG << std::endl;\r
-       std::wcout << L"Copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\n\n" << std::endl;\r
-               \r
-       CASPAR_LOG(debug) << "Started Main Thread";\r
+       win32_exception::install_handler();\r
+                               \r
        try \r
        {\r
-               caspar::server caspar_device;\r
+               server caspar_device;\r
                                \r
-               auto dummy = std::make_shared<caspar::IO::DummyClientInfo>();\r
-               caspar::amcp::AMCPProtocolStrategy amcp(caspar_device.get_channels());\r
+               auto dummy = std::make_shared<IO::DummyClientInfo>();\r
+               amcp::AMCPProtocolStrategy amcp(caspar_device.get_channels());\r
                bool is_running = true;\r
                while(is_running)\r
                {\r
index d8fc55ed513ce3b008804ee2678d0786bcf68a81..256259bb409fd935daba041672473600b9458ef9 100644 (file)
@@ -27,7 +27,7 @@
 #include <intrin.h>\r
 #pragma intrinsic(__movsd, __stosd)\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
 \r
 class color_producer : public frame_producer\r
 {\r
@@ -88,4 +88,4 @@ frame_producer_ptr create_color_producer(const std::vector<std::wstring>& params
        return std::make_shared<color_producer>(get_pixel_color_value(params[0]), format_desc);\r
 }\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index 397a62421af03205c46af38a98fba363d6605f90..ccef8d773b13c145aeddabf884ebad1e1b88d5f5 100644 (file)
@@ -24,8 +24,8 @@
 #include <string>\r
 #include <vector>\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
        \r
 frame_producer_ptr create_color_producer(const std::vector<std::wstring>& params, const frame_format_desc& format_desc);\r
 \r
-}\r
+}}\r
index e25b54d70a1eaf6490763b8d404bebd517904790..c3c35f84d157d4b361d6a78f4d1b31b29e690bb5 100644 (file)
@@ -6,7 +6,7 @@
 \r
 #include <queue>\r
                \r
-namespace caspar{ namespace ffmpeg{\r
+namespace caspar { namespace core { namespace ffmpeg{\r
 \r
 struct audio_decoder::implementation : boost::noncopyable\r
 {\r
@@ -76,4 +76,4 @@ struct audio_decoder::implementation : boost::noncopyable
 \r
 audio_decoder::audio_decoder() : impl_(new implementation()){}\r
 audio_packet_ptr audio_decoder::execute(const audio_packet_ptr& audio_packet){return impl_->execute(audio_packet);}\r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 67a3811ff11b2c1d0e8ae6e3b9edfc1ed79700cb..cbc772c04b731b2e4f6baed72f5921dd853c9302 100644 (file)
@@ -2,7 +2,7 @@
 \r
 #include "../packet.h"\r
 \r
-namespace caspar{ namespace ffmpeg     {\r
+namespace caspar { namespace core { namespace ffmpeg   {\r
 \r
 class audio_decoder : boost::noncopyable\r
 {\r
@@ -23,4 +23,4 @@ private:
 typedef std::shared_ptr<audio_decoder> audio_decoder_ptr;\r
 typedef std::unique_ptr<audio_decoder> audio_decoder_uptr;\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index e528b73bda98331d7b99d0c2a73d672a03f79dfd..8dc858c495bc65e2950b61a3ea898a9038694ab7 100644 (file)
@@ -45,7 +45,7 @@ extern "C"
 \r
 using namespace boost::assign;\r
 \r
-namespace caspar{ namespace ffmpeg{\r
+namespace caspar { namespace core { namespace ffmpeg{\r
        \r
 struct ffmpeg_producer : public frame_producer\r
 {\r
@@ -165,4 +165,4 @@ frame_producer_ptr create_ffmpeg_producer(const  std::vector<std::wstring>& para
        return std::make_shared<ffmpeg_producer>(result_filename, params, format_desc);\r
 }\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index cbe4b9d9e5a2d6ef9ebd982dd06556031161fb79..233a085930fcb7b107b4caa1c0d25ac39a25fd22 100644 (file)
@@ -5,8 +5,8 @@
 #include <string>\r
 #include <vector>\r
 \r
-namespace caspar { namespace ffmpeg {\r
+namespace caspar { namespace core { namespace ffmpeg {\r
        \r
 frame_producer_ptr create_ffmpeg_producer(const  std::vector<std::wstring>& params, const frame_format_desc& format_desc);\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 4706959c9cdc01052e359d89574d798e6531898d..8c1525280a3da4773bd82e8955938b40515509af 100644 (file)
@@ -16,7 +16,7 @@
 \r
 #pragma warning(disable : 4482)\r
                \r
-namespace caspar{ namespace ffmpeg{\r
+namespace caspar { namespace core { namespace ffmpeg{\r
                \r
 struct input::implementation : boost::noncopyable\r
 {\r
@@ -252,4 +252,4 @@ video_packet_ptr input::get_video_packet(){return impl_->get_video_packet();}
 audio_packet_ptr input::get_audio_packet(){return impl_->get_audio_packet();}\r
 bool input::seek(unsigned long long frame){return impl_->seek(frame);}\r
 void input::start(){impl_->start();}\r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index d69f48e67080ea2efca2a7c6028d187ad59349ba..acb30f668dfc8f432fd348f68885637ecc94ece2 100644 (file)
@@ -5,7 +5,7 @@
 #include <system_error>\r
 #include "../../frame/frame_fwd.h"\r
 \r
-namespace caspar{ namespace ffmpeg{    \r
+namespace caspar { namespace core { namespace ffmpeg{  \r
        \r
 typedef std::shared_ptr<AVFormatContext> AVFormatContextPtr;\r
 \r
@@ -33,4 +33,4 @@ typedef std::shared_ptr<input> input_ptr;
 typedef std::unique_ptr<input> input_uptr;\r
 \r
        }\r
-}\r
+}}\r
index ccfd94fdb1995247b6d9d27f4a82ab22b0778a45..fc2bf90464069cd31d8b82ccfb3a9e1d07fc4d48 100644 (file)
@@ -20,7 +20,7 @@ extern "C"
 #pragma warning (pop)\r
 #endif\r
 \r
-namespace caspar{ namespace ffmpeg{\r
+namespace caspar { namespace core { namespace ffmpeg{\r
 \r
 typedef std::tr1::shared_ptr<AVFrame> AVFramePtr;      \r
 typedef std::tr1::shared_ptr<AVPacket> AVPacketPtr;\r
@@ -91,4 +91,4 @@ struct audio_packet : boost::noncopyable
 typedef std::shared_ptr<audio_packet> audio_packet_ptr;\r
 \r
        }\r
-}\r
+}}\r
index 2f31d04df04a8deb855011b072b0353d663c5085..ee353a05ce620b17fb7dd1d7bd9780a74eac0821 100644 (file)
@@ -2,7 +2,7 @@
 \r
 #include "video_decoder.h"\r
                \r
-namespace caspar{ namespace ffmpeg{\r
+namespace caspar { namespace core { namespace ffmpeg{\r
 \r
 struct video_decoder::implementation : boost::noncopyable\r
 {\r
@@ -20,4 +20,4 @@ struct video_decoder::implementation : boost::noncopyable
 \r
 video_decoder::video_decoder() : impl_(new implementation()){}\r
 video_packet_ptr video_decoder::execute(const video_packet_ptr& video_packet){return impl_->execute(video_packet);}\r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 303a6f5123f08617fa7b76c0263464a3972c6e6c..e341516a61440b7264d15251d933cfb7028c3289 100644 (file)
@@ -2,7 +2,7 @@
 \r
 #include "../packet.h"\r
 \r
-namespace caspar{ namespace ffmpeg{\r
+namespace caspar { namespace core { namespace ffmpeg{\r
 \r
 typedef std::tr1::shared_ptr<AVCodecContext> AVCodecContextPtr;\r
 \r
@@ -19,4 +19,4 @@ typedef std::shared_ptr<video_decoder> video_decoder_ptr;
 typedef std::unique_ptr<video_decoder> video_decoder_uptr;\r
 \r
        }\r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index 1785b9a19a8668a21ab67d27ffcbb3e5518632fc..1c9d9fea379d888708a0da830374d43e2b030caf 100644 (file)
@@ -28,7 +28,7 @@ extern "C"
 #pragma warning (pop)\r
 #endif\r
 \r
-namespace caspar{ namespace ffmpeg{\r
+namespace caspar { namespace core { namespace ffmpeg{\r
        \r
 struct video_transformer::implementation : boost::noncopyable\r
 {\r
@@ -66,4 +66,4 @@ struct video_transformer::implementation : boost::noncopyable
 video_transformer::video_transformer() : impl_(new implementation()){}\r
 video_packet_ptr video_transformer::execute(const video_packet_ptr& video_packet){return impl_->execute(video_packet);}\r
 void video_transformer::initialize(const frame_factory_ptr& factory){impl_->factory_ = factory; }\r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index ecbad02211ee77abae51977fef69f605647c3fb0..61803538e93c35daba709e96b794810093c7e3b4 100644 (file)
@@ -4,7 +4,7 @@
 \r
 #include "../../../frame/frame_fwd.h"\r
 \r
-namespace caspar{ namespace ffmpeg{\r
+namespace caspar { namespace core { namespace ffmpeg{\r
 \r
 class video_transformer : boost::noncopyable\r
 {\r
@@ -19,4 +19,4 @@ private:
 typedef std::shared_ptr<video_transformer> video_transformer_ptr;\r
 typedef std::unique_ptr<video_transformer> video_transformer_uptr;\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 6eabb597f326b28ef3eeb5d604062a652881df02..ddb966ecf094f98f42f95c66be54d3804da0dff9 100644 (file)
@@ -31,7 +31,7 @@ using namespace ATL;
 #pragma warning (push, 1) // TODO: Legacy code, just disable warnings\r
 #endif\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
 namespace flash {\r
 \r
 CComBSTR FlashAxContainer::flashGUID_(_T("{D27CDB6E-AE6D-11CF-96B8-444553540000}"));\r
@@ -774,7 +774,7 @@ HRESULT FlashAxContainer::CreateAxControl()
        return S_OK;\r
 }\r
 \r
-HRESULT FlashAxContainer::SetFormat(const caspar::frame_format_desc& format_desc) \r
+HRESULT FlashAxContainer::SetFormat(const frame_format_desc& format_desc) \r
 {\r
        if(m_spInPlaceObjectWindowless == nullptr)\r
                return E_FAIL;\r
@@ -827,7 +827,7 @@ bool FlashAxContainer::DrawControl(HDC targetDC)
        assert(SUCCEEDED(hr));\r
        bInvalidRect_ = false;\r
 \r
-/*     const caspar::frame_format_desc& format_desc = caspar::frame_format_desc::format_descs[format_];\r
+/*     const frame_format_desc& format_desc = frame_format_desc::format_descs[format_];\r
 \r
        //Trying to redraw just the dirty rectangles. Doesn't seem to work when the movie uses "filters", such as glow, dropshadow etc.\r
        std::vector<flash::DirtyRect>::iterator it = bDirtyRects_.begin();\r
@@ -898,4 +898,4 @@ bool FlashAxContainer::IsEmpty() const
 \r
 \r
 }      //namespace flash\r
-}      //namespace caspar
\ No newline at end of file
+}}     //namespace caspar
\ No newline at end of file
index e95a7f0ee854accc77f56c1f085618362ff11718..dd94080b6441e07ab27f4ef9c8faf5a1839c7522 100644 (file)
@@ -45,7 +45,7 @@
 #include "axflash.h"\r
 //#import "progid:ShockwaveFlash.ShockwaveFlash.9" no_namespace, named_guids\r
 \r
-namespace caspar { namespace flash {\r
+namespace caspar { namespace core { namespace flash {\r
        \r
 class flash_producer;\r
 \r
@@ -259,7 +259,7 @@ public:
        flash::flash_producer* pflash_producer_;\r
        std::vector<DirtyRect> bDirtyRects_;\r
 \r
-       HRESULT SetFormat(const caspar::frame_format_desc&);\r
+       HRESULT SetFormat(const frame_format_desc&);\r
        bool IsReadyToRender() const;\r
        void EnterFullscreen();\r
 \r
@@ -290,6 +290,6 @@ private:
 };\r
 \r
 }      //namespace flash\r
-}      //namespace caspar\r
+}}     //namespace caspar\r
 \r
 #endif //_FLASHAXCONTAINER_H__
\ No newline at end of file
index a0de2b19e8bf86bdf0403c02860e15f912684e7e..b409d135cbb13cc3ed52be12d4c6a60ce6c28ada 100644 (file)
 *    along with CasparCG.  If not, see <http://www.gnu.org/licenses/>.\r
 *\r
 */\r
\r
-#ifndef _TIMER_HELPER_H__\r
-#define _TIMER_HELPER_H__\r
+#pragma once\r
 \r
-#include "FlashAxContainer.h"\r
+#include <boost/noncopyable.hpp>\r
 \r
-namespace caspar {\r
-namespace flash {\r
+namespace caspar { namespace core { namespace flash {\r
 \r
-       class TimerHelper\r
+class TimerHelper : boost::noncopyable\r
+{\r
+public:\r
+       TimerHelper(){}\r
+       TimerHelper(DWORD first, DWORD interv, ITimerSink* pTS) : firstTime(first), interval(interv), currentTime(first), pTimerSink(pTS), ID(first){}\r
+       void Setup(DWORD first, DWORD interv, ITimerSink* pTS)\r
        {\r
-               TimerHelper(const TimerHelper&);\r
-               const TimerHelper& operator=(const TimerHelper&);\r
-\r
-       public:\r
-               TimerHelper()\r
-               {}\r
-               TimerHelper(DWORD first, DWORD interv, ITimerSink* pTS) : firstTime(first), interval(interv), currentTime(first), pTimerSink(pTS)\r
-               {\r
-                       ID = first;\r
-               }\r
-               ~TimerHelper()\r
-               {\r
-               }\r
-               void Setup(DWORD first, DWORD interv, ITimerSink* pTS)\r
-               {\r
-                       firstTime = first;\r
-                       interval = interv;\r
-                       currentTime = first;\r
-                       pTimerSink = pTS;\r
-                       ID = first;\r
-               }\r
-\r
-               DWORD Invoke()\r
+               firstTime = first;\r
+               interval = interv;\r
+               currentTime = first;\r
+               pTimerSink = pTS;\r
+               ID = first;\r
+       }\r
+\r
+       DWORD Invoke()\r
+       {\r
+               if(pTimerSink != 0)\r
                {\r
-                       if(pTimerSink != 0)\r
-                       {\r
-                               VARIANT value;\r
-                               value.vt = VT_UI4;\r
-                               value.ulVal = currentTime;\r
+                       VARIANT value;\r
+                       value.vt = VT_UI4;\r
+                       value.ulVal = currentTime;\r
 \r
-                               pTimerSink->OnTimer(value);\r
-                               currentTime += interval;\r
-                       }\r
-                       return currentTime;\r
+                       pTimerSink->OnTimer(value);\r
+                       currentTime += interval;\r
                }\r
+               return currentTime;\r
+       }\r
 \r
-               DWORD firstTime;\r
-               DWORD interval;\r
-               DWORD currentTime;\r
-               ATL::CComPtr<ITimerSink> pTimerSink;\r
-               DWORD ID;\r
-       };\r
-\r
-}      //namespace flash\r
-}      //namespace caspar\r
+       DWORD firstTime;\r
+       DWORD interval;\r
+       DWORD currentTime;\r
+       ATL::CComPtr<ITimerSink> pTimerSink;\r
+       DWORD ID;\r
+};\r
 \r
-#endif //_TIMER_HELPER_H__
\ No newline at end of file
+}}}
\ No newline at end of file
index dc8b215ca247ebfc68965edfb829ab8cd07043a7..1f97c632c21f7262b0a864423ed712cd438cda02 100644 (file)
@@ -24,7 +24,7 @@
 \r
 #include <windows.h>\r
 \r
-namespace caspar{\r
+namespace caspar { namespace core {\r
        \r
 struct bitmap::implementation : boost::noncopyable\r
 {\r
@@ -76,4 +76,4 @@ size_t bitmap::height() const { return impl_->height_; }
 unsigned char* bitmap::data() { return impl_->bitmap_data_; }\r
 HDC bitmap::hdc() { return impl_->hdc_; }\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index dfe7b2900e4fb05c234fc0cace5e33165db8b357..11f01d19546f3ec941e77149e18d73c62b7b0a43 100644 (file)
@@ -21,7 +21,7 @@
 \r
 #include <memory>\r
 \r
-namespace caspar{\r
+namespace caspar { namespace core {\r
 \r
 class bitmap\r
 {\r
@@ -40,5 +40,5 @@ private:
 typedef std::shared_ptr<bitmap> bitmap_ptr;\r
 typedef std::unique_ptr<bitmap> bitmap_uptr;\r
 \r
-}\r
+}}\r
 \r
index 871647940f596b2471adee639463241122004ba2..5a659e0a62d452ffb9bbcd54424aa77c7d70e22b 100644 (file)
@@ -16,7 +16,7 @@
 #include <boost/assign.hpp>\r
 #include <tbb/concurrent_unordered_map.h>\r
                \r
-namespace caspar{ namespace flash{\r
+namespace caspar { namespace core { namespace flash{\r
 \r
 struct flash_cg_proxy\r
 {\r
@@ -243,8 +243,7 @@ public:
        {\r
                return flash_producer_ ? flash_producer_->get_frame() : nullptr;\r
        }\r
-\r
-       \r
+               \r
        void initialize(const frame_factory_ptr& factory)\r
        {\r
                factory_ = factory;\r
@@ -258,21 +257,20 @@ public:
        frame_factory_ptr factory_;\r
 };\r
        \r
-\r
 // This is somewhat a hack... needs redesign\r
-cg_producer_ptr get_default_cg_producer(const renderer::render_device_ptr& prender_device, unsigned int exLayer)\r
+cg_producer_ptr get_default_cg_producer(const renderer::render_device_ptr& render_device, unsigned int exLayer)\r
 {\r
-       if(!prender_device)\r
-               BOOST_THROW_EXCEPTION(null_argument() << msg_info("prender_device"));\r
+       if(!render_device)\r
+               BOOST_THROW_EXCEPTION(null_argument() << msg_info("render_device"));\r
        \r
-       auto pProducer = std::dynamic_pointer_cast<cg_producer>(prender_device->active(exLayer));\r
-       if(!pProducer)  \r
+       auto producer = std::dynamic_pointer_cast<cg_producer>(render_device->active(exLayer));\r
+       if(!producer)\r
        {\r
-               pProducer = std::make_shared<cg_producer>(prender_device->frame_format_desc());         \r
-               prender_device->load(exLayer, pProducer, renderer::load_option::auto_play); \r
+               producer = std::make_shared<cg_producer>(render_device->get_frame_format_desc());               \r
+               render_device->load(exLayer, producer, renderer::load_option::auto_play); \r
        }\r
        \r
-       return pProducer;\r
+       return producer;\r
 }\r
 \r
 cg_producer::cg_producer(const frame_format_desc& fmtDesc) : impl_(new implementation(fmtDesc)){}\r
@@ -286,5 +284,5 @@ void cg_producer::next(int layer){impl_->next(layer);}
 void cg_producer::update(int layer, const std::wstring& data){impl_->update(layer, data);}\r
 void cg_producer::invoke(int layer, const std::wstring& label){impl_->invoke(layer, label);}\r
 const frame_format_desc& cg_producer::get_frame_format_desc() const { return impl_->format_desc_; }\r
-void cg_producer::initialize(const caspar::frame_factory_ptr& factory){impl_->initialize(factory);}\r
-}}
\ No newline at end of file
+void cg_producer::initialize(const frame_factory_ptr& factory){impl_->initialize(factory);}\r
+}}}
\ No newline at end of file
index e4e9b920108a29c83da874197c082b30fd57ba48..2055b755be1c8576b3c3a46b81972b04d8c7f249 100644 (file)
@@ -4,7 +4,7 @@
 #include "../../frame/frame_fwd.h"\r
 #include "../../renderer/render_device.h"\r
 \r
-namespace caspar{ namespace flash{\r
+namespace caspar { namespace core { namespace flash{\r
                \r
 class cg_producer : public frame_producer\r
 {\r
@@ -23,7 +23,7 @@ public:
        void invoke(int layer, const std::wstring& label);\r
 \r
        const frame_format_desc& get_frame_format_desc() const;\r
-       void initialize(const caspar::frame_factory_ptr& factory);\r
+       void initialize(const frame_factory_ptr& factory);\r
 private:\r
        struct implementation;\r
        std::shared_ptr<implementation> impl_;\r
@@ -34,4 +34,4 @@ static const unsigned int CG_DEFAULT_LAYER = 5000;
 \r
 cg_producer_ptr get_default_cg_producer(const renderer::render_device_ptr& render_device, unsigned int layer_index = CG_DEFAULT_LAYER);\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 732954449b82bae300a39f8eb8ddb25d8adcfb36..14ad97b42cdcc5235c66c99ce2d5bbbde5c697d2 100644 (file)
@@ -32,7 +32,7 @@
 \r
 using namespace boost::assign;\r
 \r
-namespace caspar { namespace flash {\r
+namespace caspar { namespace core { namespace flash {\r
        \r
 frame_producer_ptr create_ct_producer(const std::vector<std::wstring>& params, const frame_format_desc& format_desc) \r
 {\r
@@ -53,4 +53,4 @@ frame_producer_ptr create_ct_producer(const std::vector<std::wstring>& params, c
 \r
 }\r
 \r
-}      //namespace caspar
\ No newline at end of file
+}}     //namespace caspar
\ No newline at end of file
index 581edf547f0c354f9adbf11e004ab1bdc9ae1bce..50edc9a854ce3ee2fd28270c7e2aff7358fd3a01 100644 (file)
@@ -21,8 +21,8 @@
 \r
 #include "../frame_producer.h"\r
 \r
-namespace caspar{ namespace flash{\r
+namespace caspar { namespace core { namespace flash{\r
                \r
-caspar::frame_producer_ptr create_ct_producer(const std::vector<std::wstring>& params, const frame_format_desc& format_desc);\r
+frame_producer_ptr create_ct_producer(const std::vector<std::wstring>& params, const frame_format_desc& format_desc);\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 440f15199a91b7cb3270ad80547050ac6e5506bf..887c4ffb3a1dbda085f73b96e241f649f645e90d 100644 (file)
@@ -49,7 +49,7 @@
 \r
 #include <type_traits>\r
 \r
-namespace caspar { namespace flash {\r
+namespace caspar { namespace core { namespace flash {\r
 \r
 using namespace boost::assign;\r
 \r
@@ -225,29 +225,17 @@ struct flash_producer::implementation
                                return;\r
                        }\r
 \r
-                       bool isProgressive = format_desc_.mode == video_mode::progressive || (flashax_container_->GetFPS() - format_desc_.fps/2 == 0);\r
+                       bool is_progressive = format_desc_.mode == video_mode::progressive || (flashax_container_->GetFPS() - format_desc_.fps/2 == 0);\r
 \r
                        gpu_frame_ptr result;\r
 \r
-                       if(isProgressive)                                                       \r
+                       if(is_progressive)                                                      \r
                                result = render_frame();                \r
                        else\r
                        {\r
-                               auto result = std::make_shared<composite_gpu_frame>(format_desc_.width, format_desc_.height);\r
-                               auto frame1 = render_frame();\r
-                               auto frame2 = render_frame();\r
-                               result->add(frame1);\r
-                               result->add(frame2);\r
-                               if(format_desc_.mode == video_mode::upper)\r
-                               {\r
-                                       frame1->mode(video_mode::upper);\r
-                                       frame2->mode(video_mode::lower);\r
-                               }\r
-                               else\r
-                               {\r
-                                       frame1->mode(video_mode::lower);\r
-                                       frame2->mode(video_mode::upper);\r
-                               }\r
+                               gpu_frame_ptr frame1 = render_frame();\r
+                               gpu_frame_ptr frame2 = render_frame();\r
+                               result = composite_gpu_frame::interlace(frame1, frame2, format_desc_.mode);\r
                        }\r
 \r
                        frame_buffer_.push(result);\r
@@ -273,11 +261,8 @@ struct flash_producer::implementation
                        auto pool = bitmap_pool_;\r
                        current_frame_.reset(frame.get(), [=](bitmap*)\r
                        {\r
-                               common::function_task::enqueue([=]\r
-                               {\r
-                                       if(pool->try_push(frame))\r
-                                               common::clear(frame->data(), frame->size());\r
-                               });\r
+                               if(pool->try_push(frame))\r
+                                       common::clear(frame->data(), frame->size());\r
                        });\r
                }       \r
 \r
@@ -304,7 +289,7 @@ struct flash_producer::implementation
        std::shared_ptr<bitmap_pool> bitmap_pool_;\r
        frame_format_desc format_desc_;\r
 \r
-       CComObject<caspar::flash::FlashAxContainer>* flashax_container_;\r
+       CComObject<flash::FlashAxContainer>* flashax_container_;\r
                \r
        tbb::concurrent_bounded_queue<gpu_frame_ptr> frame_buffer_;\r
        gpu_frame_ptr last_frame_;\r
@@ -347,4 +332,4 @@ flash_producer_ptr create_flash_producer(const std::vector<std::wstring>& params
        return result_filename.empty() ? nullptr : std::make_shared<flash_producer>(result_filename, format_desc);\r
 }\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index df10bcc6c9f3547022b686b8cd56e6f0e963e9ce..5b14699d4968ed48ea7693557e0db030e4e1eb2c 100644 (file)
@@ -21,7 +21,7 @@
 \r
 #include "../frame_producer.h"\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
 \r
 class Monitor;\r
 \r
@@ -63,4 +63,4 @@ typedef std::tr1::shared_ptr<flash_producer> flash_producer_ptr;
 \r
 flash_producer_ptr create_flash_producer(const std::vector<std::wstring>& params, const frame_format_desc& format_desc);\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index b85b516a32cc3c42eb381814fae2e9dcd06b39e4..c4de357e4a0b61b54fa28e7b50a64127e71d60d2 100644 (file)
@@ -27,7 +27,7 @@
 \r
 #include <memory>\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
        \r
 class frame_producer : boost::noncopyable\r
 {\r
@@ -41,4 +41,4 @@ public:
 };\r
 typedef std::shared_ptr<frame_producer> frame_producer_ptr;\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index a4293e8d45b1202bea5d971163e7fc1c991e4902..7fc7444626c5d361c8d3a56aa3bc7b498811e7b4 100644 (file)
 #include <boost/filesystem.hpp>\r
 #include <boost/exception/errinfo_file_name.hpp>\r
 \r
-namespace caspar{ namespace image{\r
+namespace caspar { namespace core { namespace image{\r
+\r
+struct FreeImage_initializer\r
+{\r
+       FreeImage_initializer(){FreeImage_Initialise(true);}\r
+       ~FreeImage_initializer(){FreeImage_DeInitialise();}\r
+};\r
+\r
+FreeImage_initializer init;\r
 \r
 std::shared_ptr<FIBITMAP> load_image(const std::string& filename)\r
 {\r
@@ -47,4 +55,4 @@ std::shared_ptr<FIBITMAP> load_image(const std::wstring& filename)
        return load_image(common::narrow(filename));\r
 }\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 53cfec39211b77940b6374e5902d2bd71590bcfd..ecca8072068884c230fc65a8784f230102c77c71 100644 (file)
@@ -5,9 +5,9 @@
 #include <memory>\r
 #include <string>\r
 \r
-namespace caspar{ namespace image{\r
+namespace caspar { namespace core { namespace image{\r
 \r
 std::shared_ptr<FIBITMAP> load_image(const std::string& filename);\r
 std::shared_ptr<FIBITMAP> load_image(const std::wstring& filename);\r
 \r
-}}\r
+}}}\r
index 6718121e9b0ea3a7612a8e228f46400ff97cc083..69ce620bb04a3b5e12483432c90e93d15822782b 100644 (file)
@@ -13,7 +13,7 @@
 \r
 using namespace boost::assign;\r
 \r
-namespace caspar{ namespace image{\r
+namespace caspar { namespace core { namespace image{\r
 \r
 struct image_producer : public frame_producer\r
 {\r
@@ -53,4 +53,4 @@ frame_producer_ptr create_image_producer(const  std::vector<std::wstring>& param
        return nullptr;\r
 }\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 54df972d62add82fd3ccd72bedcd00c9fbfd3942..c5f77889147916b94893bda0a74d11c771d88aff 100644 (file)
@@ -5,8 +5,8 @@
 #include <string>\r
 #include <vector>\r
 \r
-namespace caspar { namespace image {\r
+namespace caspar { namespace core { namespace image {\r
 \r
 frame_producer_ptr create_image_producer(const std::vector<std::wstring>& params, const frame_format_desc& format_desc);\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 48cca8844f3152a29a76667dbe9b99abdc0c7033..3ac0f1fbeabe1fe921ff12d834cde20bf125fa2e 100644 (file)
@@ -21,7 +21,7 @@
 \r
 using namespace boost::assign;\r
 \r
-namespace caspar{ namespace image{\r
+namespace caspar { namespace core { namespace image{\r
 \r
 enum direction\r
 {\r
@@ -130,32 +130,16 @@ struct image_scroll_producer : public frame_producer
                \r
        gpu_frame_ptr get_frame()\r
        {               \r
-               gpu_frame_ptr result;\r
-               if(format_desc_.mode == video_mode::progressive)                                                        \r
-                       result = render_frame();                \r
-               else\r
+               if(format_desc_.mode != video_mode::progressive)                                \r
                {\r
-                       auto result = std::make_shared<composite_gpu_frame>(format_desc_.width, format_desc_.height);\r
                        gpu_frame_ptr frame1;\r
                        gpu_frame_ptr frame2;\r
                        tbb::parallel_invoke([&]{ frame1 = render_frame(); }, [&]{ frame2 = render_frame(); });\r
-                       result->add(frame1);\r
-                       result->add(frame2);\r
-                       if(format_desc_.mode == video_mode::upper)\r
-                       {\r
-                               frame1->mode(video_mode::upper);\r
-                               frame2->mode(video_mode::lower);\r
-                       }\r
-                       else\r
-                       {\r
-                               frame1->mode(video_mode::lower);\r
-                               frame2->mode(video_mode::upper);\r
-                       }\r
-               }\r
+                       return composite_gpu_frame::interlace(frame1, frame2, format_desc_.mode);\r
+               }                       \r
 \r
-               return result;\r
+               return render_frame();  \r
        }\r
-\r
        \r
        void initialize(const frame_factory_ptr& factory)\r
        {\r
@@ -187,4 +171,4 @@ frame_producer_ptr create_image_scroll_producer(const std::vector<std::wstring>&
        return nullptr;\r
 }\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 99d10fecaf333e3597900e94befdc6f2d5550b8c..bd3190b89d92a3ff30330169f9849d5accc08949 100644 (file)
@@ -5,8 +5,8 @@
 #include <string>\r
 #include <vector>\r
 \r
-namespace caspar { namespace image {\r
+namespace caspar { namespace core { namespace image {\r
        \r
 frame_producer_ptr create_image_scroll_producer(const std::vector<std::wstring>& params, const frame_format_desc& format_desc);\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index d066d99f950521095b7246966840908d3dddaff2..62232be6351f931caf017dc65fc43e6fd06064dc 100644 (file)
 \r
 #include <boost/range/algorithm/copy.hpp>\r
 \r
-namespace caspar{      \r
+namespace caspar { namespace core {    \r
 \r
 struct transition_producer::implementation : boost::noncopyable\r
 {\r
        implementation(const frame_producer_ptr& dest, const transition_info& info, const frame_format_desc& format_desc) \r
-               : current_frame_(0), info_(info), border_color_(0), format_desc_(format_desc), dest_(dest)\r
+               : current_frame_(0), info_(info), format_desc_(format_desc), dest_(dest)\r
        {\r
                if(!dest)\r
                        BOOST_THROW_EXCEPTION(null_argument() << arg_name_info("dest"));\r
@@ -54,10 +54,7 @@ struct transition_producer::implementation : boost::noncopyable
                \r
        gpu_frame_ptr get_frame()\r
        {\r
-               if(++current_frame_ >= info_.duration)\r
-                       return nullptr;\r
-\r
-               return compose(get_producer_frame(dest_), get_producer_frame(source_));\r
+               return ++current_frame_ >= info_.duration ? nullptr : compose(get_producer_frame(dest_), get_producer_frame(source_));\r
        }\r
 \r
        gpu_frame_ptr get_producer_frame(frame_producer_ptr& producer)\r
@@ -77,12 +74,14 @@ struct transition_producer::implementation : boost::noncopyable
                catch(...)\r
                {\r
                        CASPAR_LOG_CURRENT_EXCEPTION();\r
+                       producer = nullptr;\r
                        CASPAR_LOG(warning) << "Removed renderer from transition.";\r
                }\r
 \r
-               if(frame == nullptr && producer->get_following_producer() != nullptr)\r
+               if(frame == nullptr && producer != nullptr && producer->get_following_producer() != nullptr)\r
                {\r
                        auto following = producer->get_following_producer();\r
+                       following->initialize(factory_);\r
                        following->set_leading_producer(producer);\r
                        producer = following;\r
                        return get_producer_frame(producer);\r
@@ -98,7 +97,7 @@ struct transition_producer::implementation : boost::noncopyable
                if(info_.type == transition_type::cut || !dest_frame)           \r
                        return src_frame;\r
                \r
-               int volume = static_cast<int>(static_cast<float>(current_frame_)/static_cast<float>(info_.duration)*256.0f);\r
+               int volume = static_cast<int>(static_cast<double>(current_frame_)/static_cast<double>(info_.duration)*256.0);\r
                                \r
                for(size_t n = 0; n < dest_frame->audio_data().size(); ++n)\r
                        dest_frame->audio_data()[n] = static_cast<short>((static_cast<int>(dest_frame->audio_data()[n])*volume)>>8);\r
@@ -152,7 +151,6 @@ struct transition_producer::implementation : boost::noncopyable
        unsigned short                  current_frame_;\r
        \r
        const transition_info   info_;\r
-       const unsigned long             border_color_;\r
        frame_factory_ptr               factory_;\r
 };\r
 \r
@@ -164,5 +162,5 @@ void transition_producer::set_leading_producer(const frame_producer_ptr& produce
 const frame_format_desc& transition_producer::get_frame_format_desc() const { return impl_->format_desc_; } \r
 void transition_producer::initialize(const frame_factory_ptr& factory) { impl_->initialize(factory);}\r
 \r
-}\r
+}}\r
 \r
index f49617465c4a7153ff8197bbd869277963356966..34e06b0260cc3519376534da81c6bdede8dd8f01 100644 (file)
@@ -24,7 +24,7 @@
 #include <string>\r
 #include <vector>\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
 \r
 enum transition_type\r
 {\r
@@ -38,21 +38,16 @@ enum transition_type
 enum transition_direction\r
 {\r
        from_left = 1,\r
-       from_right,\r
-       from_top,\r
-       from_bottom\r
+       from_right\r
 };\r
 \r
 struct transition_info\r
 {\r
-       transition_info() : type(transition_type::cut), duration(0), border_width(0), border_color(TEXT("#00000000")), direction(transition_direction::from_left){}\r
+       transition_info() : type(transition_type::cut), duration(0), direction(transition_direction::from_left){}\r
     \r
-       unsigned short                                  duration;\r
-       unsigned short                                  border_width;\r
-       transition_direction                    direction;\r
-       transition_type                                 type;\r
-       std::wstring                                    border_color;\r
-       std::wstring                                    border_image;\r
+       size_t                                  duration;\r
+       transition_direction    direction;\r
+       transition_type                 type;\r
 };\r
 \r
 class transition_producer : public frame_producer\r
@@ -72,4 +67,4 @@ private:
 };\r
 typedef std::shared_ptr<transition_producer> transition_producer_ptr;\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index 7e1d914a0ef242d3fd2cb609dc1140c1854f8794..a79a8fad728b4ac33b79ed82209b76f2fd49ba4a 100644 (file)
@@ -24,7 +24,7 @@
 #include <boost/algorithm/string.hpp>\r
 #include "../../renderer/render_device.h"\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
 namespace amcp {\r
 \r
        enum AMCPCommandScheduling\r
@@ -51,8 +51,8 @@ namespace amcp {
 \r
                void AddParameter(const std::wstring& param){_parameters.push_back(param);}\r
 \r
-               void SetClientInfo(caspar::IO::ClientInfoPtr& s){pClientInfo_ = s;}\r
-               caspar::IO::ClientInfoPtr GetClientInfo(){return pClientInfo_;}\r
+               void SetClientInfo(IO::ClientInfoPtr& s){pClientInfo_ = s;}\r
+               IO::ClientInfoPtr GetClientInfo(){return pClientInfo_;}\r
 \r
                void SetChannel(const renderer::render_device_ptr& pChannel){pChannel_ = pChannel;}\r
                renderer::render_device_ptr GetChannel(){return pChannel_;}\r
@@ -79,7 +79,7 @@ namespace amcp {
        private:\r
                unsigned int channelIndex_;\r
                int layerIndex_;\r
-               caspar::IO::ClientInfoPtr pClientInfo_;\r
+               IO::ClientInfoPtr pClientInfo_;\r
                renderer::render_device_ptr pChannel_;\r
                AMCPCommandScheduling scheduling_;\r
                std::wstring replyString_;\r
@@ -107,4 +107,4 @@ namespace amcp {
                virtual bool DoExecute() = 0;\r
        };      \r
 \r
-}}\r
+}}}\r
index d07d4449a513892011dab74742cd52acf3e6157e..e4ca1b9ca174f90501f86a66897f572d78f7b8a8 100644 (file)
@@ -22,7 +22,7 @@
 \r
 #include "AMCPCommandQueue.h"\r
 \r
-namespace caspar { namespace amcp {\r
+namespace caspar { namespace core { namespace amcp {\r
 \r
 using namespace common;\r
 \r
@@ -131,4 +131,4 @@ bool AMCPCommandQueue::OnUnhandledException(const std::exception& ex) throw()
        return bDoRestart;\r
 }\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 4da281baf46f8b8a83238c7014032bd9ec66c949..d83d3c44270709a01e815e2b7655320e362a27b7 100644 (file)
@@ -25,7 +25,7 @@
 \r
 #include <tbb\mutex.h>\r
 \r
-namespace caspar { namespace amcp {\r
+namespace caspar { namespace core { namespace amcp {\r
 \r
 class AMCPCommandQueue : public common::IRunnable\r
 {\r
@@ -52,4 +52,4 @@ private:
 };\r
 typedef std::tr1::shared_ptr<AMCPCommandQueue> AMCPCommandQueuePtr;\r
 \r
-}}\r
+}}}\r
index e1d0b33dbac45ad9377be0609caf2d228e0f800c..c9a0535cc3ee4dc61836b872eab166b621d6d7ab 100644 (file)
@@ -68,7 +68,7 @@
 600 [kommando] FAILED  funktion ej implementerad\r
 */\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
 \r
 std::wstring ListMedia()\r
 {      \r
@@ -170,7 +170,7 @@ bool LoadCommand::DoExecute()
        //Perform loading of the clip\r
        try\r
        {\r
-               auto pFP = load_media(_parameters,  GetChannel()->frame_format_desc()); \r
+               auto pFP = load_media(_parameters,  GetChannel()->get_frame_format_desc());     \r
                bool autoPlay = std::find(_parameters.begin(), _parameters.end(), TEXT("AUTOPLAY")) != _parameters.end();               \r
                GetChannel()->load(GetLayerIndex(), pFP, autoPlay ? renderer::load_option::auto_play : renderer::load_option::preview);\r
        \r
@@ -238,21 +238,6 @@ bool LoadbgCommand::DoExecute()
                                        transitionInfo.direction = transition_direction::from_right;\r
                                else if(direction == TEXT("RIGHT"))\r
                                        transitionInfo.direction = transition_direction::from_left;\r
-\r
-                               if(_parameters.size() > static_cast<unsigned short>(transitionParameterIndex+3))        //border\r
-                               {\r
-                                       std::wstring border = _parameters[transitionParameterIndex+3];\r
-                                       if(border.size()>0)\r
-                                       {\r
-                                               if(border[0] == TEXT('#'))\r
-                                                       transitionInfo.border_color = border;\r
-                                               else\r
-                                                       transitionInfo.border_image = border;\r
-                                       }\r
-\r
-                                       if(_parameters.size() > static_cast<unsigned short>(transitionParameterIndex+4))        //border width\r
-                                               transitionInfo.border_width = _ttoi(_parameters[transitionParameterIndex+4].c_str());\r
-                               }\r
                        }\r
                }\r
        }\r
@@ -260,11 +245,11 @@ bool LoadbgCommand::DoExecute()
        //Perform loading of the clip\r
        try\r
        {\r
-               auto pFP = load_media(_parameters,  GetChannel()->frame_format_desc());\r
+               auto pFP = load_media(_parameters,  GetChannel()->get_frame_format_desc());\r
                if(pFP == nullptr)\r
                        BOOST_THROW_EXCEPTION(file_not_found() << msg_info(_parameters.size() > 0 ? common::narrow(_parameters[0]) : ""));\r
 \r
-               pFP = std::make_shared<transition_producer>(pFP, transitionInfo, GetChannel()->frame_format_desc());\r
+               pFP = std::make_shared<transition_producer>(pFP, transitionInfo, GetChannel()->get_frame_format_desc());\r
                bool autoPlay = std::find(_parameters.begin(), _parameters.end(), TEXT("AUTOPLAY")) != _parameters.end();\r
                GetChannel()->load(GetLayerIndex(), pFP, autoPlay ? renderer::load_option::auto_play : renderer::load_option::none); // TODO: LOOP\r
        \r
@@ -744,7 +729,7 @@ bool CinfCommand::DoExecute()
 \r
 void GenerateChannelInfo(int index, const renderer::render_device_ptr& pChannel, std::wstringstream& replyString)\r
 {\r
-       replyString << index << TEXT(" ") << pChannel->frame_format_desc().name  << TEXT("\r\n") << (pChannel->active(0) != nullptr ? TEXT(" PLAYING") : TEXT(" STOPPED"));\r
+       replyString << index << TEXT(" ") << pChannel->get_frame_format_desc().name  << TEXT("\r\n") << (pChannel->active(0) != nullptr ? TEXT(" PLAYING") : TEXT(" STOPPED"));\r
 }\r
 \r
 bool InfoCommand::DoExecute()\r
@@ -848,4 +833,4 @@ bool SetCommand::DoExecute()
 \r
 \r
 }      //namespace amcp\r
-}      //namespace caspar
\ No newline at end of file
+}}     //namespace caspar
\ No newline at end of file
index 9c08e53db881f0e698fb64da72ec90b00be758e9..885ea1b773dfc22c3b20cd7c0a02c16af9ff64a8 100644 (file)
@@ -23,7 +23,7 @@
 \r
 #include "AMCPCommand.h"\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
        \r
 std::wstring ListMedia();\r
 std::wstring ListTemplates();\r
@@ -142,6 +142,6 @@ class SetCommand : public AMCPCommandBase<true, AddToQueue, 2>
 //};\r
 \r
 }      //namespace amcp\r
-}      //namespace caspar\r
+}}     //namespace caspar\r
 \r
 #endif //__AMCPCOMMANDSIMPL_H__
\ No newline at end of file
index d5953b4992d4bfa442852a0d10502e33fcda923f..9d38e6b4b0e797cab439820603e8dcd05e7e6803 100644 (file)
@@ -40,7 +40,7 @@
 #pragma warning (push, 1) // TODO: Legacy code, just disable warnings\r
 #endif\r
 \r
-namespace caspar { namespace amcp {\r
+namespace caspar { namespace core { namespace amcp {\r
 \r
 using namespace common;\r
 using IO::ClientInfoPtr;\r
@@ -403,4 +403,4 @@ std::size_t AMCPProtocolStrategy::TokenizeMessage(const std::wstring& message, s
 }\r
 \r
 }      //namespace amcp\r
-}      //namespace caspar
\ No newline at end of file
+}}     //namespace caspar
\ No newline at end of file
index f2a101de6e4216e9cb5b097be0026fdf9b4bb3ad..0e191c6f0875de0cf416c14c42de219e441a1170 100644 (file)
@@ -23,7 +23,7 @@
 #include "AMCPCommand.h"\r
 #include "AMCPCommandQueue.h"\r
 \r
-namespace caspar { namespace amcp {\r
+namespace caspar { namespace core { namespace amcp {\r
 \r
 class AMCPProtocolStrategy : public IO::IProtocolStrategy\r
 {\r
@@ -43,7 +43,7 @@ public:
        AMCPProtocolStrategy(const std::vector<renderer::render_device_ptr>& channels);\r
        virtual ~AMCPProtocolStrategy();\r
 \r
-       virtual void Parse(const TCHAR* pData, int charCount, caspar::IO::ClientInfoPtr pClientInfo);\r
+       virtual void Parse(const TCHAR* pData, int charCount, IO::ClientInfoPtr pClientInfo);\r
        virtual UINT GetCodepage() {\r
                return CP_UTF8;\r
        }\r
@@ -53,7 +53,7 @@ public:
 private:\r
        friend class AMCPCommand;\r
 \r
-       void ProcessMessage(const std::wstring& message, caspar::IO::ClientInfoPtr& pClientInfo);\r
+       void ProcessMessage(const std::wstring& message, IO::ClientInfoPtr& pClientInfo);\r
        std::size_t TokenizeMessage(const std::wstring& message, std::vector<std::wstring>* pTokenVector);\r
        AMCPCommandPtr CommandFactory(const std::wstring& str);\r
 \r
@@ -64,4 +64,4 @@ private:
        static const std::wstring MessageDelimiter;\r
 };\r
 \r
-}}\r
+}}}\r
index dfb099c93dbc0623b20963c5a24460249b170b2a..c8c6692e14dfc66de5734c711d9c6be834d2aebe 100644 (file)
@@ -20,7 +20,7 @@
  \r
 #pragma once\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
 namespace cii {\r
 \r
 class ICIICommand\r
@@ -35,4 +35,4 @@ public:
 typedef std::tr1::shared_ptr<ICIICommand> CIICommandPtr;\r
 \r
 }      //namespace cii\r
-}      //namespace caspar
\ No newline at end of file
+}}     //namespace caspar
\ No newline at end of file
index 95265fb160d7a111c2168de228669d63e4485eb3..e5efad0bdbb77fa3dffd64cff9fcd12e2d466e0c 100644 (file)
@@ -26,7 +26,7 @@
 #include <algorithm>\r
 #include "../../producer/flash/cg_producer.h"\r
 \r
-namespace caspar { namespace cii {\r
+namespace caspar { namespace core { namespace cii {\r
 \r
 /////////////////\r
 // MediaCommand\r
@@ -189,4 +189,4 @@ void KeydataCommand::Setup(const std::vector<std::wstring>& parameters) {
                state_ = 3;\r
 }\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 19ca55f8a59f8b6756f23ea7ce14b8ac9e855b52..ad8c4a468d57543f19571f43258e2c2017b00e21 100644 (file)
@@ -22,7 +22,7 @@
 \r
 #include "ciicommand.h"\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
 \r
 namespace cii {\r
 \r
@@ -131,4 +131,4 @@ private:
 };\r
 \r
 }      //namespace cii\r
-}      //namespace caspar
\ No newline at end of file
+}}     //namespace caspar
\ No newline at end of file
index 996744064f9c2ccf3640419bb8654a56a0c0094b..fa0fd4656a8957c419e505443cdc98f623a18e20 100644 (file)
@@ -35,7 +35,7 @@
 #pragma warning (push, 1) // TODO: Legacy code, just disable warnings\r
 #endif\r
 \r
-namespace caspar { namespace cii {\r
+namespace caspar { namespace core { namespace cii {\r
 \r
 using namespace common;\r
 \r
@@ -50,7 +50,7 @@ CIIProtocolStrategy::CIIProtocolStrategy(const std::vector<renderer::render_devi
        executor_.start();\r
 }\r
 \r
-void CIIProtocolStrategy::Parse(const TCHAR* pData, int charCount, caspar::IO::ClientInfoPtr pClientInfo) \r
+void CIIProtocolStrategy::Parse(const TCHAR* pData, int charCount, IO::ClientInfoPtr pClientInfo) \r
 {\r
        std::size_t pos;\r
        std::wstring msg(pData, charCount);\r
@@ -187,7 +187,7 @@ void CIIProtocolStrategy::WriteTemplateData(const std::wstring& templateName, co
        \r
        std::vector<std::wstring> params;\r
        params.push_back(server::template_folder()+TEXT("CG.fth"));\r
-       auto pFP = flash::create_flash_producer(params, GetChannel()->frame_format_desc());\r
+       auto pFP = flash::create_flash_producer(params, GetChannel()->get_frame_format_desc());\r
        if(pFP != 0)\r
        {\r
                //TODO: Initialize with valid FrameFactory\r
@@ -224,8 +224,8 @@ void CIIProtocolStrategy::DisplayMediaFile(const std::wstring& filename)
        transition.type = transition_type::mix;\r
        transition.duration = 12;\r
 \r
-       auto pFP = load_media(boost::assign::list_of(filename), pChannel_->frame_format_desc());\r
-       auto pTransition = std::make_shared<transition_producer>(pFP, transition, pChannel_->frame_format_desc());\r
+       auto pFP = load_media(boost::assign::list_of(filename), pChannel_->get_frame_format_desc());\r
+       auto pTransition = std::make_shared<transition_producer>(pFP, transition, pChannel_->get_frame_format_desc());\r
 \r
        try\r
        {\r
@@ -283,4 +283,4 @@ bool operator==(const std::wstring& lhs, const CIIProtocolStrategy::TitleHolder&
        return lhs == rhs.titleName;\r
 }\r
 \r
-}}\r
+}}}\r
index 860340d53e0f511fc51768a29fb512de59db6438..c109dcd9054b32439cc2863a59b0bf1476fa7d48 100644 (file)
 #include "../../../common/concurrency/executor.h"\r
 #include "../../renderer/render_device.h"\r
 \r
-namespace caspar { namespace cii {\r
+namespace caspar { namespace core { namespace cii {\r
 \r
-class CIIProtocolStrategy : public caspar::IO::IProtocolStrategy\r
+class CIIProtocolStrategy : public IO::IProtocolStrategy\r
 {\r
 public:\r
        CIIProtocolStrategy(const std::vector<renderer::render_device_ptr>& channels);\r
 \r
-       void Parse(const TCHAR* pData, int charCount, caspar::IO::ClientInfoPtr pClientInfo);\r
+       void Parse(const TCHAR* pData, int charCount, IO::ClientInfoPtr pClientInfo);\r
        UINT GetCodepage() {return 28591;}      //ISO 8859-1\r
 \r
        void SetProfile(const std::wstring& profile) {currentProfile_ = profile;}\r
@@ -85,4 +85,4 @@ private:
        renderer::render_device_ptr pChannel_;\r
 };\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 315b0b617dfff5451871771a12629888356f6203..5fc7ae07e04be3ba7ae4cad3921d752e3d142605 100644 (file)
@@ -23,7 +23,7 @@
 #include <locale>\r
 #include "CLKCommand.h"\r
 \r
-namespace caspar { namespace CLK {\r
+namespace caspar { namespace core { namespace CLK {\r
 \r
 CLKCommand::CLKCommand() : clockID_(0), command_(CLKInvalidCommand) {}\r
 \r
@@ -91,4 +91,4 @@ void CLKCommand::Clear()
        parameters_.clear();\r
 }\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 79d58598ce5f197f91e28ae133f0eb8623465a4a..18b38f4b1c3203e1db19934a77a9441074ff440a 100644 (file)
@@ -20,7 +20,7 @@
  \r
 #pragma once\r
 \r
-namespace caspar{ namespace CLK {\r
+namespace caspar { namespace core { namespace CLK {\r
 \r
 class CLKCommand\r
 {\r
@@ -58,4 +58,4 @@ public:
        std::vector<std::wstring> parameters_;\r
 };\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 21662095237d37a71cd768389b7cce7dde2f6d84..9c5d8f05f3b88845fab982a2dd60d88561c1de10 100644 (file)
@@ -29,7 +29,7 @@
 #include <sstream>\r
 #include <algorithm>\r
 \r
-namespace caspar { namespace CLK {\r
+namespace caspar { namespace core { namespace CLK {\r
 \r
 using namespace common;\r
 \r
@@ -41,7 +41,7 @@ CLKProtocolStrategy::CLKProtocolStrategy(const std::vector<renderer::render_devi
        pChannel_ = channels[0];\r
 }\r
 \r
-void CLKProtocolStrategy::Parse(const TCHAR* pData, int charCount, caspar::IO::ClientInfoPtr pClientInfo) \r
+void CLKProtocolStrategy::Parse(const TCHAR* pData, int charCount, IO::ClientInfoPtr pClientInfo) \r
 {\r
        for(int index = 0; index < charCount; ++index) \r
        {\r
@@ -148,4 +148,4 @@ void CLKProtocolStrategy::Parse(const TCHAR* pData, int charCount, caspar::IO::C
 }\r
 \r
 }      //namespace CLK\r
-}      //namespace caspar
\ No newline at end of file
+}}     //namespace caspar
\ No newline at end of file
index 1a6d5145ac5136add211feb83557fc0545f2b8bf..382b9e7aea8a07ad3f96a785d1ec4f7ab0e39185 100644 (file)
 #include "../../../common/io/ProtocolStrategy.h"\r
 #include "../../renderer/render_device.h"\r
 \r
-namespace caspar { namespace CLK {\r
+namespace caspar { namespace core { namespace CLK {\r
 \r
-class CLKProtocolStrategy : public caspar::IO::IProtocolStrategy\r
+class CLKProtocolStrategy : public IO::IProtocolStrategy\r
 {\r
 public:\r
        CLKProtocolStrategy(const std::vector<renderer::render_device_ptr>& channels);\r
 \r
-       void Parse(const TCHAR* pData, int charCount, caspar::IO::ClientInfoPtr pClientInfo);\r
+       void Parse(const TCHAR* pData, int charCount, IO::ClientInfoPtr pClientInfo);\r
        UINT GetCodepage() { return 28591; }    //ISO 8859-1\r
        \r
 private:\r
@@ -53,4 +53,4 @@ private:
        bool bClockLoaded_;\r
 };\r
 \r
-}}\r
+}}}\r
index 0a4a892c909425c7f441cd062e00bdfe645c7419..a2ad3fd4e1dd3a50143f28da2fdc71eae9ed8c65 100644 (file)
@@ -16,7 +16,7 @@
 \r
 using namespace boost::assign;\r
 \r
-namespace caspar { \r
+namespace caspar { namespace core { \r
        \r
 frame_producer_ptr load_media(const std::vector<std::wstring>& params, const frame_format_desc& format_desc)\r
 {              \r
@@ -25,8 +25,8 @@ frame_producer_ptr load_media(const std::vector<std::wstring>& params, const fra
        const auto producerFactories = list_of<ProducerFactory>\r
                (&flash::create_flash_producer)\r
                (&flash::create_ct_producer)\r
-               (&caspar::image::create_image_producer)\r
-               (&caspar::image::create_image_scroll_producer)\r
+               (&image::create_image_producer)\r
+               (&image::create_image_scroll_producer)\r
                (&ffmpeg::create_ffmpeg_producer)\r
                (&create_color_producer);\r
 \r
@@ -50,4 +50,4 @@ frame_producer_ptr load_media(const std::vector<std::wstring>& params, const fra
        return pProducer;\r
 }\r
 \r
-}\r
+}}\r
index 8b6e292acb9b7ca28b81a5994eb5badaef82c7de..2ae9e7ab35e8d362427ccc324c426852c46de01c 100644 (file)
@@ -6,8 +6,8 @@
 #include <string>\r
 #include <vector>\r
 \r
-namespace caspar { \r
+namespace caspar { namespace core { \r
        \r
 frame_producer_ptr load_media(const std::vector<std::wstring>& params, const frame_format_desc& format_desc);\r
 \r
-}\r
+}}\r
index d3e1114ecb6a2f6d36d4737e693e95992558d2bc..a061937e728f81171ff06d5d850c53712bb578d8 100644 (file)
@@ -6,9 +6,9 @@
 \r
 #include "../frame/frame_format.h"\r
 \r
-namespace caspar { namespace renderer {\r
+namespace caspar { namespace core { namespace renderer {\r
 \r
-struct layer::implementation : boost::noncopyable\r
+struct layer::implementation\r
 {              \r
        implementation() : preview_frame_(nullptr), active_(nullptr), background_(nullptr), last_frame_(nullptr) {}\r
        \r
@@ -18,21 +18,16 @@ struct layer::implementation : boost::noncopyable
                        BOOST_THROW_EXCEPTION(null_argument() << arg_name_info("frame_producer"));\r
                        \r
                last_frame_ = nullptr;\r
+               background_ = frame_producer;\r
                if(option == load_option::preview)              \r
                {\r
                        last_frame_ = frame_producer->get_frame();\r
                        if(last_frame_ != nullptr)\r
                                last_frame_->audio_data().clear(); // No audio\r
                        active_ = nullptr;      \r
-                       background_ = frame_producer;\r
                }\r
                else if(option == load_option::auto_play)\r
-               {\r
-                       background_ = frame_producer;\r
-                       play();         \r
-               }\r
-               else\r
-                       background_ = frame_producer;\r
+                       play();                 \r
        }\r
        \r
        void play()\r
@@ -120,4 +115,4 @@ void layer::clear(){impl_->clear();}
 gpu_frame_ptr layer::get_frame() {return impl_->get_frame();}\r
 frame_producer_ptr layer::active() const { return impl_->active_;}\r
 frame_producer_ptr layer::background() const { return impl_->background_;}\r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 1814a15faa856284d37482e369a1497c4140819e..05ac1fb12975d90d87cbe5eae596162d17153bd7 100644 (file)
@@ -2,7 +2,7 @@
 \r
 #include "../producer/frame_producer.h"\r
 \r
-namespace caspar { namespace renderer {\r
+namespace caspar { namespace core { namespace renderer {\r
 \r
 enum load_option\r
 {\r
@@ -37,4 +37,4 @@ private:
 typedef std::shared_ptr<layer> layer_ptr;\r
 typedef std::unique_ptr<layer> layer_uptr;\r
 \r
-}}
\ No newline at end of file
+}}}
\ No newline at end of file
index 9a64f75b7c7b43be7482aa5338fc9edc1d3f8f4a..f868fb44aafc480edabdac86e5c85e9ce88b9922 100644 (file)
@@ -31,7 +31,7 @@
 \r
 using namespace boost::assign;\r
        \r
-namespace caspar{ namespace renderer{\r
+namespace caspar { namespace core { namespace renderer {\r
        \r
 std::vector<gpu_frame_ptr> render_frames(std::map<int, layer>& layers)\r
 {      \r
@@ -48,7 +48,7 @@ std::vector<gpu_frame_ptr> render_frames(std::map<int, layer>& layers)
 \r
 struct render_device::implementation : boost::noncopyable\r
 {      \r
-       implementation(const caspar::frame_format_desc& format_desc, unsigned int index, const std::vector<frame_consumer_ptr>& consumers)  \r
+       implementation(const frame_format_desc& format_desc, unsigned int index, const std::vector<frame_consumer_ptr>& consumers)  \r
                : consumers_(consumers), fmt_(format_desc), frame_processor_(new gpu_frame_processor(format_desc)), needs_clock_(false)\r
        {       \r
                is_running_ = true;\r
@@ -111,7 +111,7 @@ struct render_device::implementation : boost::noncopyable
 \r
        struct video_sync_clock\r
        {\r
-               video_sync_clock(const caspar::frame_format_desc& format_desc)\r
+               video_sync_clock(const frame_format_desc& format_desc)\r
                {\r
                        period_ = static_cast<long>(get_frame_format_period(format_desc)*1000000.0);\r
                        time_ = boost::posix_time::microsec_clock::local_time();\r
@@ -250,7 +250,7 @@ struct render_device::implementation : boost::noncopyable
        boost::thread render_thread_;\r
        boost::thread display_thread_;\r
                \r
-       caspar::frame_format_desc fmt_;\r
+       frame_format_desc fmt_;\r
        tbb::concurrent_bounded_queue<gpu_frame_ptr> frame_buffer_;\r
        \r
        std::vector<frame_consumer_ptr> consumers_;\r
@@ -265,7 +265,7 @@ struct render_device::implementation : boost::noncopyable
        bool needs_clock_;\r
 };\r
 \r
-render_device::render_device(const caspar::frame_format_desc& format_desc, unsigned int index, const std::vector<frame_consumer_ptr>& consumers) \r
+render_device::render_device(const frame_format_desc& format_desc, unsigned int index, const std::vector<frame_consumer_ptr>& consumers) \r
        : impl_(new implementation(format_desc, index, consumers)){}\r
 void render_device::load(int exLayer, const frame_producer_ptr& pProducer, load_option option){impl_->load(exLayer, pProducer, option);}\r
 void render_device::pause(int exLayer){impl_->pause(exLayer);}\r
@@ -275,5 +275,5 @@ void render_device::clear(int exLayer){impl_->clear(exLayer);}
 void render_device::clear(){impl_->clear();}\r
 frame_producer_ptr render_device::active(int exLayer) const {return impl_->active(exLayer);}\r
 frame_producer_ptr render_device::background(int exLayer) const {return impl_->background(exLayer);}\r
-const frame_format_desc& render_device::frame_format_desc() const{return impl_->fmt_;}\r
-}}\r
+const frame_format_desc& render_device::get_frame_format_desc() const{return impl_->fmt_;}\r
+}}}\r
index c6af8d0f971543e96adb010d2f822ee177ffc5ef..8fd6d5c9bf930025c1104d48d0e570e5078602ec 100644 (file)
@@ -2,21 +2,18 @@
 \r
 #include "../producer/frame_producer.h"\r
 #include "../consumer/frame_consumer.h"\r
+#include "../frame/frame_format.h"\r
 \r
 #include "layer.h"\r
 \r
-namespace caspar{\r
-       \r
-class Monitor;\r
-\r
-namespace renderer{\r
+namespace caspar { namespace core { namespace renderer {\r
        \r
 class render_device : boost::noncopyable\r
 {      \r
 public:\r
        render_device(const frame_format_desc& format_desc, unsigned int index, const std::vector<frame_consumer_ptr>& consumers);\r
        \r
-       void load(int exLayer, const frame_producer_ptr& pProducer, load_option option = load_option::none);    \r
+       void load(int exLayer, const frame_producer_ptr& producer, load_option option = load_option::none);     \r
        void pause(int exLayer);\r
        void play(int exLayer);\r
        void stop(int exLayer);\r
@@ -26,7 +23,7 @@ public:
        frame_producer_ptr active(int exLayer) const;\r
        frame_producer_ptr background(int exLayer) const;\r
 \r
-       const frame_format_desc& frame_format_desc() const;             \r
+       const frame_format_desc& get_frame_format_desc() const;         \r
 private:\r
        struct implementation;\r
        std::shared_ptr<implementation> impl_;\r
@@ -34,4 +31,4 @@ private:
 typedef std::shared_ptr<render_device> render_device_ptr;\r
 typedef std::unique_ptr<render_device> render_device_uptr;\r
 \r
-}}\r
+}}}\r
index 6f8aa0c515ccc3cd5b4334495a89fb06826868dd..e84ffb39f52e3b404907bd78d328f2941dd8efdf 100644 (file)
@@ -2,7 +2,7 @@
 \r
 #include <memory>\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
 \r
 class Monitor;\r
 \r
@@ -15,4 +15,4 @@ class layer;
 typedef std::shared_ptr<layer> layer_ptr;\r
 typedef std::unique_ptr<layer> layer_uptr;\r
 \r
-}}\r
+}}}\r
index 0e0bb8a88f274d9b17b7172df8e9394be64adfb9..56f1ef6e08fe3f1cdcdc5b3bc63158d645d094e9 100644 (file)
@@ -9,8 +9,6 @@
 #include "consumer/decklink/DecklinkVideoConsumer.h"\r
 #include "consumer/ogl/ogl_consumer.h"\r
 \r
-#include <FreeImage.h>\r
-\r
 #include "protocol/amcp/AMCPProtocolStrategy.h"\r
 #include "protocol/cii/CIIProtocolStrategy.h"\r
 #include "protocol/CLK/CLKProtocolStrategy.h"\r
 #include <boost/property_tree/ptree.hpp>\r
 #include <boost/property_tree/xml_parser.hpp>\r
 \r
-namespace caspar{\r
+namespace caspar { namespace core {\r
 \r
 struct server::implementation : boost::noncopyable\r
 {\r
        implementation()                                                                                                \r
-       {\r
-               FreeImage_Initialise(true);     \r
-                               \r
+       {                       \r
                boost::property_tree::ptree pt;\r
                boost::property_tree::read_xml(boost::filesystem::initial_path().file_string() + "\\caspar.config", pt);\r
 \r
@@ -41,13 +37,12 @@ struct server::implementation : boost::noncopyable
                setup_channels(pt);\r
                setup_controllers(pt);\r
        \r
-               //if(!flash::FlashAxContainer::CheckForFlashSupport())\r
-               //      CASPAR_LOG(error) << "No flashplayer activex-control installed. Flash support will be disabled";\r
+               if(!flash::FlashAxContainer::CheckForFlashSupport())\r
+                       CASPAR_LOG(error) << "No flashplayer activex-control installed. Flash support will be disabled";\r
        }\r
 \r
        ~implementation()\r
-       {               \r
-               FreeImage_DeInitialise();\r
+       {                               \r
                async_servers_.clear();\r
                channels_.clear();\r
        }\r
@@ -134,7 +129,7 @@ struct server::implementation : boost::noncopyable
                                {                                       \r
                                        unsigned int port = xml_controller.second.get<unsigned int>("port");\r
                                        port = port != 0 ? port : 5250;\r
-                                       auto asyncserver = std::make_shared<caspar::IO::AsyncEventServer>(create_protocol(protocol), port);\r
+                                       auto asyncserver = std::make_shared<IO::AsyncEventServer>(create_protocol(protocol), port);\r
                                        asyncserver->Start();\r
                                        async_servers_.push_back(asyncserver);\r
                                }\r
@@ -206,4 +201,4 @@ const std::wstring& server::data_folder()
 \r
 const std::vector<renderer::render_device_ptr>& server::get_channels() const{ return impl_->channels_; }\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index 6085b0d5ee1b3b19ba501cbed602e54a1b5e787a..3077ebd079bcd13052011b38a1e630adf4c64557 100644 (file)
@@ -2,7 +2,7 @@
 \r
 #include "renderer/renderer_fwd.h"\r
 \r
-namespace caspar { \r
+namespace caspar { namespace core { \r
        \r
 struct invalid_configuration : virtual boost::exception, virtual std::exception {};\r
 \r
@@ -22,4 +22,4 @@ private:
        std::shared_ptr<implementation> impl_;\r
 };\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file