]> git.sesse.net Git - casparcg/commitdiff
2.0.0.2: - Removed parent printer to reduce complexity. Might be re-added in the...
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 6 Apr 2011 20:04:23 +0000 (20:04 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 6 Apr 2011 20:04:23 +0000 (20:04 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@608 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

37 files changed:
common/common.vcxproj
common/common.vcxproj.filters
common/diagnostics/graph.h
common/object.h [deleted file]
common/utility/printer.h [deleted file]
core/channel.cpp
core/consumer/frame_consumer.h
core/consumer/frame_consumer_device.cpp
core/consumer/frame_consumer_device.h
core/producer/color/color_producer.cpp
core/producer/frame_producer.h
core/producer/frame_producer_device.cpp
core/producer/frame_producer_device.h
core/producer/layer.cpp
core/producer/layer.h
core/producer/transition/transition_producer.cpp
core/producer/transition/transition_producer.h
mixer/frame_mixer_device.cpp
mixer/frame_mixer_device.h
modules/bluefish/consumer/bluefish_consumer.cpp
modules/bluefish/consumer/bluefish_consumer.h
modules/decklink/consumer/decklink_consumer.cpp
modules/decklink/consumer/decklink_consumer.h
modules/decklink/producer/decklink_producer.cpp
modules/ffmpeg/consumer/ffmpeg_consumer.cpp
modules/ffmpeg/consumer/ffmpeg_consumer.h
modules/ffmpeg/producer/ffmpeg_producer.cpp
modules/ffmpeg/producer/input.cpp
modules/ffmpeg/producer/input.h
modules/flash/producer/cg_producer.cpp
modules/flash/producer/flash_producer.cpp
modules/image/producer/image_producer.cpp
modules/oal/consumer/oal_consumer.cpp
modules/oal/consumer/oal_consumer.h
modules/ogl/consumer/ogl_consumer.cpp
modules/ogl/consumer/ogl_consumer.h
modules/silverlight/producer/silverlight_producer.cpp

index 29d7af30e3f08da8b3ef7ef8abc33fbd52371660..da1b1d6129d2e3d17aa6efeb54aec4c69646be7b 100644 (file)
     <ClInclude Include="memory\page_locked_allocator.h" />\r
     <ClInclude Include="memory\safe_ptr.h" />\r
     <ClInclude Include="env.h" />\r
-    <ClInclude Include="object.h" />\r
     <ClInclude Include="stdafx.h" />\r
     <ClInclude Include="utility\assert.h" />\r
-    <ClInclude Include="utility\printer.h" />\r
     <ClInclude Include="utility\string.h" />\r
     <ClInclude Include="utility\timer.h" />\r
     <ClInclude Include="utility\tweener.h" />\r
index 8a523dabbebc6e93bda3e3b9d8e0d67542c3ef7d..a34c1be6ec936c4483c201938e8a967f39b4bbb2 100644 (file)
@@ -78,9 +78,6 @@
     <ClInclude Include="utility\assert.h">\r
       <Filter>utility</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="utility\printer.h">\r
-      <Filter>utility</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="utility\string.h">\r
       <Filter>utility</Filter>\r
     </ClInclude>\r
@@ -90,6 +87,5 @@
     <ClInclude Include="utility\tweener.h">\r
       <Filter>utility</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="object.h" />\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index 2b5fe3f6549fb6f498d9ec684581e62a9ff069f9..c4af813ca1d8713f198822d1ef98a2e29f73cbf6 100644 (file)
@@ -2,8 +2,7 @@
 \r
 #include "../memory/safe_ptr.h"\r
 \r
-#include "../utility/printer.h"\r
-\r
+#include <functional>\r
 #include <string>\r
 #include <vector>\r
 #include <map>\r
 #include <boost/range/iterator_range.hpp>\r
 #include <boost/circular_buffer.hpp>\r
 \r
-namespace caspar { namespace diagnostics {\r
+namespace caspar {\r
+               \r
+typedef std::function<std::wstring()> printer;\r
+       \r
+namespace diagnostics {\r
        \r
 struct color\r
 {\r
diff --git a/common/object.h b/common/object.h
deleted file mode 100644 (file)
index 37d24ce..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#pragma once\r
-\r
-#include <string>\r
-\r
-#include <tbb/spin_mutex.h>\r
-\r
-namespace caspar {\r
-\r
-//class object\r
-//{\r
-//     mutable tbb::spin_mutex mutex_;\r
-//     const object* parent_;\r
-//public:\r
-//     object(const object* parent = nullptr){set_parent(parent);}\r
-//\r
-//     std::wstring print() const\r
-//     {\r
-//             tbb::spin_mutex::scoped_lock lock(mutex_);\r
-//             return (parent_ ? parent_->print() + L"/" : L"") + do_print();\r
-//     }\r
-//             \r
-//     const object* get_parent() const\r
-//     {\r
-//             tbb::spin_mutex::scoped_lock lock(mutex_);\r
-//             return parent_;\r
-//     }\r
-//\r
-//     void set_parent(const object* parent)\r
-//     {\r
-//             tbb::spin_mutex::scoped_lock lock(mutex_);\r
-//             parent_ = parent != this ? parent : nullptr;\r
-//     }\r
-//\r
-//private:\r
-//\r
-//     virtual std::wstring do_print() const = 0;\r
-//};\r
-\r
-class object\r
-{\r
-       mutable tbb::spin_mutex mutex_;\r
-       const object* parent_;\r
-public:\r
-       object(const object* parent = nullptr){set_parent(parent);}\r
-\r
-       virtual std::wstring print() const\r
-       {\r
-               tbb::spin_mutex::scoped_lock lock(mutex_);\r
-               return (parent_ ? parent_->print() + L"/" : L"");\r
-       }\r
-               \r
-       const object* get_parent() const\r
-       {\r
-               tbb::spin_mutex::scoped_lock lock(mutex_);\r
-               return parent_;\r
-       }\r
-\r
-       void set_parent(const object* parent)\r
-       {\r
-               tbb::spin_mutex::scoped_lock lock(mutex_);\r
-               parent_ = parent != this ? parent : nullptr;\r
-       }\r
-};\r
-\r
-}
\ No newline at end of file
diff --git a/common/utility/printer.h b/common/utility/printer.h
deleted file mode 100644 (file)
index 40b0ceb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#pragma once\r
-\r
-#include <string>\r
-#include <functional>\r
-#include <memory>\r
-\r
-namespace caspar {\r
-\r
-typedef std::function<std::wstring()> printer;\r
-\r
-}
\ No newline at end of file
index 129edd52c1ce018cd198ff0581eaf864c9987714..289f06a64b850fce73a1ff3b63a1d6e8db6f1f97 100644 (file)
@@ -8,7 +8,6 @@
 #include "producer/layer.h"\r
 \r
 #include <common/concurrency/executor.h>\r
-#include <common/utility/printer.h>\r
 \r
 #include <boost/range/algorithm_ext/erase.hpp>\r
 \r
@@ -38,9 +37,9 @@ public:
        implementation(int index, const video_format_desc& format_desc)  \r
                : index_(index)\r
                , format_desc_(format_desc)\r
-               , consumer_(new frame_consumer_device([=]{return print();}, format_desc))\r
-               , mixer_(new frame_mixer_device([=]{return print();}, format_desc))\r
-               , producer_(new frame_producer_device([=]{return print();}, safe_ptr<frame_factory>(mixer_)))   \r
+               , consumer_(new frame_consumer_device(format_desc))\r
+               , mixer_(new frame_mixer_device(format_desc))\r
+               , producer_(new frame_producer_device(safe_ptr<frame_factory>(mixer_))) \r
                , mixer_connection_(mixer_->connect([=](const safe_ptr<const read_frame>& frame){consumer_->send(frame);}))\r
                , producer_connection_(producer_->connect([=](const std::vector<safe_ptr<basic_frame>>& frames){mixer_->send(frames);}))\r
        {}\r
@@ -57,8 +56,8 @@ public:
                mixer_connection_.disconnect();\r
 \r
                consumer_->set_video_format_desc(format_desc_);\r
-               mixer_.reset(new frame_mixer_device([=]{return print();}, format_desc_));\r
-               producer_.reset(new frame_producer_device([=]{return print();}, safe_ptr<frame_factory>(mixer_)));\r
+               mixer_.reset(new frame_mixer_device(format_desc_));\r
+               producer_.reset(new frame_producer_device(safe_ptr<frame_factory>(mixer_)));\r
 \r
                mixer_connection_ = mixer_->connect([=](const safe_ptr<const read_frame>& frame){consumer_->send(frame);});\r
                producer_connection_ = producer_->connect([=](const std::vector<safe_ptr<basic_frame>>& frames){mixer_->send(frames);});\r
index c8c9dcfbb7f205a0cf3e89ff1c97cff511f5b198..a5fe5d4e4a4e03141a340c823e1d4a7202969d65 100644 (file)
 #pragma once\r
 \r
 #include <common/memory/safe_ptr.h>\r
-#include <common/utility/printer.h>\r
 \r
 #include <boost/noncopyable.hpp>\r
 \r
+#include <functional>\r
 #include <string>\r
 #include <vector>\r
 \r
@@ -38,7 +38,7 @@ struct frame_consumer : boost::noncopyable
        \r
        virtual void send(const safe_ptr<const read_frame>& frame) = 0;\r
        virtual size_t buffer_depth() const = 0;\r
-       virtual void initialize(const video_format_desc& format_desc, const printer& parent_printer = nullptr) = 0;\r
+       virtual void initialize(const video_format_desc& format_desc) = 0;\r
        virtual std::wstring print() const = 0;\r
 \r
        static const safe_ptr<frame_consumer>& empty()\r
@@ -47,7 +47,7 @@ struct frame_consumer : boost::noncopyable
                {\r
                        virtual void send(const safe_ptr<const read_frame>&){}\r
                        virtual size_t buffer_depth() const{return 0;}\r
-                       virtual void initialize(const video_format_desc&, const printer&){}\r
+                       virtual void initialize(const video_format_desc&){}\r
                        virtual std::wstring print() const {return L"empty";}\r
                };\r
                static safe_ptr<frame_consumer> consumer = make_safe<empty_frame_consumer>();\r
index 20324b248ea27c731078aa770eb8f28939d0215f..7045ebf8759e9d71e66a55a881c3007f9c37a880 100644 (file)
@@ -20,8 +20,6 @@ namespace caspar { namespace core {
        \r
 struct frame_consumer_device::implementation\r
 {      \r
-       const printer parent_printer_;\r
-\r
        boost::circular_buffer<safe_ptr<const read_frame>> buffer_;\r
 \r
        std::map<int, std::shared_ptr<frame_consumer>> consumers_; // Valid iterators after erase\r
@@ -30,9 +28,8 @@ struct frame_consumer_device::implementation
        \r
        executor executor_;     \r
 public:\r
-       implementation(const printer& parent_printer, const video_format_desc& format_desc) \r
-               : parent_printer_(parent_printer)\r
-               , format_desc_(format_desc)\r
+       implementation( const video_format_desc& format_desc) \r
+               : format_desc_(format_desc)\r
                , executor_(L"frame_consumer_device")\r
        {               \r
                executor_.set_capacity(2);\r
@@ -51,7 +48,7 @@ public:
 \r
        void add(int index, safe_ptr<frame_consumer>&& consumer)\r
        {               \r
-               consumer->initialize(format_desc_, [this]{return print();});\r
+               consumer->initialize(format_desc_);\r
                executor_.invoke([&]\r
                {\r
                        if(buffer_.capacity() < consumer->buffer_depth())\r
@@ -102,23 +99,22 @@ public:
 \r
        std::wstring print() const\r
        {\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + L"consumer";\r
+               return L"frame_consumer_device";\r
        }\r
        \r
        void set_video_format_desc(const video_format_desc& format_desc)\r
        {\r
-               auto p =  [this]{return print();};\r
                executor_.invoke([&]\r
                {\r
                        format_desc_ = format_desc;\r
                        buffer_.clear();\r
                        BOOST_FOREACH(auto& consumer, consumers_)\r
-                               consumer.second->initialize(format_desc_, p);\r
+                               consumer.second->initialize(format_desc_);\r
                });\r
        }\r
 };\r
 \r
-frame_consumer_device::frame_consumer_device(const printer& parent_printer, const video_format_desc& format_desc) : impl_(new implementation(parent_printer, format_desc)){}\r
+frame_consumer_device::frame_consumer_device(const video_format_desc& format_desc) : impl_(new implementation(format_desc)){}\r
 void frame_consumer_device::add(int index, safe_ptr<frame_consumer>&& consumer){impl_->add(index, std::move(consumer));}\r
 void frame_consumer_device::remove(int index){impl_->remove(index);}\r
 void frame_consumer_device::send(const safe_ptr<const read_frame>& future_frame) { impl_->send(future_frame); }\r
index 016757da246ca2af73c01ef2930f6e17120ea1ac..5dfb21793bf966f5775570d3545301e77abb94f2 100644 (file)
@@ -3,7 +3,6 @@
 #include "../consumer/frame_consumer.h"\r
 \r
 #include <common/memory/safe_ptr.h>\r
-#include <common/utility/printer.h>\r
 \r
 #include <vector>\r
 \r
@@ -17,7 +16,7 @@ struct video_format_desc;
 class frame_consumer_device : boost::noncopyable\r
 {\r
 public:\r
-       explicit frame_consumer_device(const printer& parent_printer, const video_format_desc& format_desc);\r
+       explicit frame_consumer_device(const video_format_desc& format_desc);\r
 \r
        void add(int index, safe_ptr<frame_consumer>&& consumer);\r
        void remove(int index);\r
index dca22ba787cc305996a723037c780ef22ab3fa0b..01afdc44637de653cd4129291b774c34b72f9851 100644 (file)
@@ -34,7 +34,6 @@ class color_producer : public frame_producer
        std::wstring color_str_;\r
 \r
 public:\r
-\r
        explicit color_producer(const std::wstring& color) \r
                : color_str_(color)\r
                , frame_(basic_frame::empty())\r
@@ -54,7 +53,7 @@ public:
                \r
        virtual safe_ptr<basic_frame> receive() { return frame_; }\r
        \r
-       virtual std::wstring print() const { return frame_producer::print() + L"color[" + color_str_ + L"]"; }\r
+       virtual std::wstring print() const { return L"color[" + color_str_ + L"]"; }\r
 };\r
 \r
 safe_ptr<frame_producer> create_color_producer(const std::vector<std::wstring>& params)\r
index 8dbac788289d68384dc22b80ca40ae658b53556f..e6f22f58f2af200ff9931591fe8657392320c370 100644 (file)
@@ -20,7 +20,6 @@
 #pragma once\r
 \r
 #include <common/memory/safe_ptr.h>\r
-#include <common/object.h>\r
 \r
 #include "../producer/frame/basic_frame.h"\r
 #include "../producer/frame/frame_factory.h"\r
@@ -33,7 +32,7 @@
 \r
 namespace caspar { namespace core {\r
 \r
-class frame_producer : public object, boost::noncopyable\r
+class frame_producer : boost::noncopyable\r
 {\r
 public:\r
        virtual ~frame_producer(){}     \r
@@ -77,6 +76,8 @@ public:
        virtual void set_frame_factory(const safe_ptr<frame_factory>& frame_factory) = 0;\r
 \r
        virtual void param(const std::wstring&){}\r
+\r
+       virtual std::wstring print() const = 0;\r
        \r
        static const safe_ptr<frame_producer>& empty()  // nothrow\r
        {\r
@@ -84,7 +85,6 @@ public:
                {\r
                        virtual safe_ptr<basic_frame> receive(){return basic_frame::empty();}\r
                        virtual void set_frame_factory(const safe_ptr<frame_factory>&){}\r
-                       virtual void set_parent(const object* parent) {}\r
                        virtual std::wstring print() const { return L"empty";}\r
                };\r
                static safe_ptr<frame_producer> producer = make_safe<empty_frame_producer>();\r
index 34640f21d7bc66bfe88d7aad3884ff9da89511d3..2c9c1c966caaf44a3983d10d9fba26373cb8451a 100644 (file)
@@ -8,7 +8,6 @@
 #include "layer.h"\r
 \r
 #include <common/concurrency/executor.h>\r
-#include <common/utility/printer.h>\r
 \r
 #include <boost/range/algorithm_ext/erase.hpp>\r
 #include <boost/lexical_cast.hpp>\r
 \r
 namespace caspar { namespace core {\r
 \r
-struct frame_producer_device::implementation : public object, boost::noncopyable\r
+struct frame_producer_device::implementation : boost::noncopyable\r
 {              \r
-       const printer parent_printer_;\r
-\r
        std::map<int, layer> layers_;           \r
        \r
        const safe_ptr<frame_factory> factory_;\r
@@ -34,10 +31,9 @@ struct frame_producer_device::implementation : public object, boost::noncopyable
        \r
        mutable executor executor_;\r
 public:\r
-       implementation(const printer& parent_printer, const safe_ptr<frame_factory>& factory)  \r
-               : parent_printer_(parent_printer)\r
-               , factory_(factory)\r
-               , executor_(print())\r
+       implementation(const safe_ptr<frame_factory>& factory)  \r
+               : factory_(factory)\r
+               , executor_(L"frame_producer_device")\r
        {\r
                executor_.start();\r
        }\r
@@ -70,7 +66,7 @@ public:
        {\r
                auto it = layers_.find(index);\r
                if(it == layers_.end())\r
-                       it = layers_.insert(std::make_pair(index, layer(this, index))).first;\r
+                       it = layers_.insert(std::make_pair(index, layer(index))).first;\r
                return it->second;\r
        }\r
        \r
@@ -191,11 +187,11 @@ public:
 \r
        std::wstring print() const\r
        {\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + L"producer";\r
+               return L"frame_producer_device";\r
        }\r
 };\r
 \r
-frame_producer_device::frame_producer_device(const printer& parent_printer, const safe_ptr<frame_factory>& factory) : impl_(new implementation(parent_printer, factory)){}\r
+frame_producer_device::frame_producer_device(const safe_ptr<frame_factory>& factory) : impl_(new implementation(factory)){}\r
 frame_producer_device::frame_producer_device(frame_producer_device&& other) : impl_(std::move(other.impl_)){}\r
 boost::signals2::connection frame_producer_device::connect(const output_t::slot_type& subscriber){return impl_->connect(subscriber);}\r
 void frame_producer_device::swap(frame_producer_device& other){impl_->swap(other);}\r
index 5f959a3a63223b23f7e27ea95601269db525dd80..74c3cef0b07f7a1d50d5b81cc3c577da194ed52c 100644 (file)
@@ -3,7 +3,6 @@
 #include "frame_producer.h"\r
 \r
 #include <common/memory/safe_ptr.h>\r
-#include <common/utility/printer.h>\r
 \r
 #include <boost/noncopyable.hpp>\r
 #include <boost/thread/future.hpp>\r
@@ -32,7 +31,7 @@ public:
         \r
        boost::signals2::connection connect(const output_t::slot_type& subscriber);\r
 \r
-       explicit frame_producer_device(const printer& parent_printer, const safe_ptr<frame_factory>& factory);\r
+       explicit frame_producer_device(const safe_ptr<frame_factory>& factory);\r
        frame_producer_device(frame_producer_device&& other);\r
        void swap(frame_producer_device& other);\r
                \r
index 44c1d928a869fd0fd59d1fbf536cbf6de555ece3..d11fc716466acb715f5b0a127fed7bcd9fc52196 100644 (file)
@@ -6,7 +6,6 @@
 #include <common/concurrency/executor.h>\r
 #include <common/exception/exceptions.h>\r
 #include <common/utility/assert.h>\r
-#include <common/utility/printer.h>\r
 \r
 #include "../producer/frame/basic_frame.h"\r
 #include "../producer/frame/audio_transform.h"\r
@@ -43,28 +42,26 @@ public:
 \r
 frame_producer_remover g_remover;\r
 \r
-struct layer::implementation : public object, boost::noncopyable\r
+struct layer::implementation : boost::noncopyable\r
 {                              \r
-       mutable tbb::spin_mutex         printer_mutex_;\r
-       printer                                         parent_printer_;\r
-       int                                                     index_;\r
+       tbb::atomic<int>                        index_;\r
        \r
        safe_ptr<frame_producer>        foreground_;\r
        safe_ptr<frame_producer>        background_;\r
        safe_ptr<basic_frame>           last_frame_;\r
        bool                                            is_paused_;\r
 public:\r
-       implementation(const object* parent, int index) \r
-               : object(parent)\r
-               , index_(index)\r
-               , foreground_(frame_producer::empty())\r
+       implementation(int index) \r
+               : foreground_(frame_producer::empty())\r
                , background_(frame_producer::empty())\r
                , last_frame_(basic_frame::empty())\r
-               , is_paused_(false){}\r
+               , is_paused_(false)\r
+       {\r
+               index_ = index;\r
+       }\r
        \r
        void load(const safe_ptr<frame_producer>& frame_producer, bool play_on_load, bool preview)\r
        {               \r
-               frame_producer->set_parent(this);\r
                background_ = frame_producer;\r
                is_paused_ = false;\r
 \r
@@ -120,7 +117,6 @@ public:
 \r
                                auto following = foreground_->get_following_producer();\r
                                following->set_leading_producer(foreground_);\r
-                               following->set_parent(this);\r
                                g_remover.remove(std::move(foreground_));\r
                                foreground_ = following;\r
                                CASPAR_LOG(info) << foreground_->print() << L" Added.";\r
@@ -140,12 +136,11 @@ public:
                \r
        std::wstring print() const\r
        {\r
-               tbb::spin_mutex::scoped_lock lock(printer_mutex_); // Child-producers may call print asynchronously to the producer thread.\r
-               return object::print() + L"layer[" + boost::lexical_cast<std::wstring>(index_) + L"]";\r
+               return L"layer[" + boost::lexical_cast<std::wstring>(index_) + L"]";\r
        }\r
 };\r
 \r
-layer::layer(const object* parent, int index) : impl_(new implementation(parent, index)){}\r
+layer::layer(int index) : impl_(new implementation(index)){}\r
 layer::layer(layer&& other) : impl_(std::move(other.impl_)){}\r
 layer& layer::operator=(layer&& other)\r
 {\r
@@ -156,8 +151,6 @@ void layer::swap(layer& other)
 {\r
        impl_.swap(other.impl_);\r
        // Printer state is not swapped.\r
-       tbb::spin_mutex::scoped_lock lock(impl_->printer_mutex_);\r
-       std::swap(impl_->parent_printer_, other.impl_->parent_printer_);\r
        std::swap(impl_->index_, other.impl_->index_);\r
 }\r
 void layer::load(const safe_ptr<frame_producer>& frame_producer, bool play_on_load, bool preview){return impl_->load(frame_producer, play_on_load, preview);}  \r
index 12b3630c88a936411b9db35b774d4f720f4a9149..52ea01e98b939af49857f2e78c462c438f4e348b 100644 (file)
@@ -1,8 +1,6 @@
 #pragma once\r
 \r
-#include <common/object.h>\r
 #include <common/memory/safe_ptr.h>\r
-#include <common/utility/printer.h>\r
 \r
 #include <boost/noncopyable.hpp>\r
 \r
@@ -17,7 +15,7 @@ class basic_frame;
 class layer : boost::noncopyable\r
 {\r
 public:\r
-       explicit layer(const object* parent = nullptr, int index = std::numeric_limits<int>::min()); // nothrow\r
+       explicit layer(int index = std::numeric_limits<int>::min()); // nothrow\r
        layer(layer&& other); // nothrow\r
        layer& operator=(layer&& other); // nothrow\r
 \r
index 89b39c57df41f7f8ebc02432c147ec9e635ab19a..1d94bb2a283d2b0028e6f3b51b915b42c66dc2ea 100644 (file)
@@ -50,7 +50,6 @@ struct transition_producer::implementation : boost::noncopyable
                , dest_producer_(dest)\r
                , source_producer_(frame_producer::empty())\r
        {\r
-               dest_producer_->set_parent(self_);\r
                frame_buffer_.push_back(basic_frame::empty());\r
        }\r
                                \r
@@ -68,7 +67,6 @@ struct transition_producer::implementation : boost::noncopyable
        void set_leading_producer(const safe_ptr<frame_producer>& producer)\r
        {\r
                source_producer_ = producer;\r
-               source_producer_->set_parent(self_);\r
        }\r
 \r
        safe_ptr<basic_frame> receive()\r
@@ -112,7 +110,6 @@ struct transition_producer::implementation : boost::noncopyable
                                auto following = producer->get_following_producer();\r
                                following->set_frame_factory(safe_ptr<frame_factory>(frame_factory_));\r
                                following->set_leading_producer(producer);\r
-                               following->set_parent(self_);\r
                                producer = std::move(following);\r
                        }\r
                        catch(...)\r
@@ -185,7 +182,7 @@ struct transition_producer::implementation : boost::noncopyable
                return basic_frame(s_frame, d_frame);\r
        }\r
 \r
-       virtual std::wstring print() const\r
+       std::wstring print() const\r
        {\r
                return L"transition[" + info_.name() + L":" + boost::lexical_cast<std::wstring>(info_.duration) + L"]";\r
        }\r
@@ -200,7 +197,7 @@ safe_ptr<basic_frame> transition_producer::receive(){return impl_->receive();}
 safe_ptr<frame_producer> transition_producer::get_following_producer() const{return impl_->get_following_producer();}\r
 void transition_producer::set_leading_producer(const safe_ptr<frame_producer>& producer) { impl_->set_leading_producer(producer); }\r
 void transition_producer::set_frame_factory(const safe_ptr<frame_factory>& frame_factory) { impl_->set_frame_factory(frame_factory);}\r
-std::wstring transition_producer::print() const { return frame_producer::print();}// + impl_->print();}\r
+std::wstring transition_producer::print() const { return impl_->print();}\r
 \r
 }}\r
 \r
index 2b6819ab68551cd8fc61c80165d07119a3402fdc..84266a13984d2937735504666fa4cccbea23d8bf 100644 (file)
@@ -83,13 +83,11 @@ public:
        explicit transition_producer(const safe_ptr<frame_producer>& destination, const transition_info& info);\r
        transition_producer(transition_producer&& other);\r
 \r
+       // frame_producer\r
        virtual safe_ptr<basic_frame> receive();\r
-\r
        virtual safe_ptr<frame_producer> get_following_producer() const;\r
-\r
        virtual void set_leading_producer(const safe_ptr<frame_producer>& producer);\r
        virtual void set_frame_factory(const safe_ptr<frame_factory>& frame_factory);\r
-\r
        virtual std::wstring print() const;\r
 private:\r
        struct implementation;\r
index f423220064af1f78ccf8f36c3365e2fc2737c518..dee228509f46a7f6b59932ed8ddffcf30a7943c2 100644 (file)
@@ -57,7 +57,6 @@ public:
 \r
 struct frame_mixer_device::implementation : boost::noncopyable\r
 {              \r
-       const printer                   parent_printer_;\r
        const video_format_desc format_desc_;\r
 \r
        safe_ptr<diagnostics::graph> diag_;\r
@@ -77,9 +76,8 @@ struct frame_mixer_device::implementation : boost::noncopyable
 \r
        executor executor_;\r
 public:\r
-       implementation(const printer& parent_printer, const video_format_desc& format_desc) \r
-               : parent_printer_(parent_printer)\r
-               , format_desc_(format_desc)\r
+       implementation( const video_format_desc& format_desc) \r
+               : format_desc_(format_desc)\r
                , diag_(diagnostics::create_graph(narrow(print())))\r
                , image_mixer_(format_desc)\r
                , executor_(print())\r
@@ -271,11 +269,11 @@ public:
 \r
        std::wstring print() const\r
        {\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + L"mixer";\r
+               return L"frame_mixer_device";\r
        }\r
 };\r
        \r
-frame_mixer_device::frame_mixer_device(const printer& parent_printer, const video_format_desc& format_desc) : impl_(new implementation(parent_printer, format_desc)){}\r
+frame_mixer_device::frame_mixer_device(const video_format_desc& format_desc) : impl_(new implementation(format_desc)){}\r
 frame_mixer_device::frame_mixer_device(frame_mixer_device&& other) : impl_(std::move(other.impl_)){}\r
 boost::signals2::connection frame_mixer_device::connect(const output_t::slot_type& subscriber){return impl_->connect(subscriber);}\r
 void frame_mixer_device::send(const std::vector<safe_ptr<basic_frame>>& frames){impl_->send(frames);}\r
index 295091da4e344d97d5aba97703c8b14af51a2ebd..5b41b4387755197f139d7b6d437c2073c0ba0c52 100644 (file)
@@ -26,7 +26,6 @@
 #include "audio/audio_mixer.h"\r
 \r
 #include <common/memory/safe_ptr.h>\r
-#include <common/utility/printer.h>\r
 \r
 #include <boost/signals2.hpp>\r
 \r
@@ -45,7 +44,7 @@ public:
         \r
        boost::signals2::connection connect(const output_t::slot_type& subscriber);\r
        \r
-       frame_mixer_device(const printer& parent_printer, const video_format_desc& format_desc);\r
+       frame_mixer_device(const video_format_desc& format_desc);\r
        frame_mixer_device(frame_mixer_device&& other); // nothrow\r
                \r
        void send(const std::vector<safe_ptr<basic_frame>>& frames); // nothrow\r
index b88a01168e9d0330ef3721702687e1c118c195cb..4902850d8f3509096bfeed729705762ebba3caf5 100644 (file)
@@ -81,7 +81,6 @@ void blue_initialize()
                \r
 struct bluefish_consumer::implementation : boost::noncopyable\r
 {\r
-       printer                         parent_printer_;\r
        std::wstring            model_name_;\r
        const unsigned int      device_index_;\r
 \r
@@ -137,10 +136,9 @@ public:
                CASPAR_LOG(info) << print() << L" Shutting down.";      \r
        }\r
 \r
-       void initialize(const core::video_format_desc& format_desc, const printer& parent_printer)\r
+       void initialize(const core::video_format_desc& format_desc)\r
        {               \r
                format_desc_ = format_desc;\r
-               parent_printer_ = parent_printer;\r
 \r
                blue_.reset(BlueVelvetFactory4());\r
 \r
@@ -343,16 +341,16 @@ public:
        \r
        std::wstring print() const\r
        {\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + model_name_ + L" [" + boost::lexical_cast<std::wstring>(device_index_) + L"]";\r
+               return model_name_ + L" [" + boost::lexical_cast<std::wstring>(device_index_) + L"]";\r
        }\r
 };\r
 \r
 bluefish_consumer::bluefish_consumer(unsigned int device_index, bool embed_audio) : impl_(new implementation(device_index, embed_audio)){}     \r
 bluefish_consumer::bluefish_consumer(bluefish_consumer&& other) : impl_(std::move(other.impl_)){}\r
-void bluefish_consumer::initialize(const core::video_format_desc& format_desc, const printer& parent_printer)\r
+void bluefish_consumer::initialize(const core::video_format_desc& format_desc)\r
 {\r
        impl_.reset(new implementation(impl_->device_index_, impl_->embed_audio_));\r
-       impl_->initialize(format_desc, parent_printer);\r
+       impl_->initialize(format_desc);\r
 }\r
 void bluefish_consumer::send(const safe_ptr<const core::read_frame>& frame){impl_->send(frame);}\r
 size_t bluefish_consumer::buffer_depth() const{return impl_->buffer_depth();}\r
index 31eeebf80aa163af695d7fa16f32a7a7a0162aca..b7d0c6d6246c797a45aa26a5175e37ea3f4afc2c 100644 (file)
@@ -36,7 +36,7 @@ public:
        explicit bluefish_consumer(unsigned int device_index, bool embed_audio = false);\r
        bluefish_consumer(bluefish_consumer&& other);\r
        \r
-       virtual void initialize(const core::video_format_desc& format_desc, const printer& parent_printer);\r
+       virtual void initialize(const core::video_format_desc& format_desc);\r
        virtual void send(const safe_ptr<const core::read_frame>&);\r
        virtual size_t buffer_depth() const;\r
        virtual std::wstring print() const;\r
index 0976838e770101aa33be94623d959db2c7a7eb43..3792ca2a80e82c5ec5c7e0ce9c54b8009d1d6cba 100644 (file)
@@ -61,7 +61,6 @@ struct decklink_output : public IDeckLinkVideoOutputCallback, public IDeckLinkAu
                ~co_init(){CoUninitialize();}\r
        } co_;\r
        \r
-       const printer   parent_printer_;\r
        std::wstring    model_name_;\r
        const size_t    device_index_;\r
        tbb::atomic<bool> is_running_;\r
@@ -90,9 +89,8 @@ struct decklink_output : public IDeckLinkVideoOutputCallback, public IDeckLinkAu
        tbb::concurrent_bounded_queue<safe_ptr<const core::read_frame>> audio_frame_buffer_;\r
 \r
 public:\r
-       decklink_output(const core::video_format_desc& format_desc, const printer& parent_printer, size_t device_index, bool embed_audio, bool internalKey) \r
-               : parent_printer_(parent_printer)\r
-               , model_name_(L"DECKLINK")\r
+       decklink_output(const core::video_format_desc& format_desc,size_t device_index, bool embed_audio, bool internalKey) \r
+               :  model_name_(L"DECKLINK")\r
                , device_index_(device_index)\r
                , audio_container_(5)\r
                , embed_audio_(embed_audio)\r
@@ -283,7 +281,7 @@ public:
 \r
        std::wstring print() const\r
        {\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + model_name_ + L" [" + boost::lexical_cast<std::wstring>(device_index_) + L"]";\r
+               return model_name_ + L" [" + boost::lexical_cast<std::wstring>(device_index_) + L"]";\r
        }\r
 };\r
 \r
@@ -314,11 +312,11 @@ public:
                });\r
        }\r
 \r
-       void initialize(const core::video_format_desc& format_desc, const printer& parent_printer)\r
+       void initialize(const core::video_format_desc& format_desc)\r
        {\r
                executor_.invoke([&]\r
                {\r
-                       input_.reset(new decklink_output(format_desc, parent_printer, device_index_, embed_audio_, internal_key_));\r
+                       input_.reset(new decklink_output(format_desc, device_index_, embed_audio_, internal_key_));\r
                });\r
        }\r
        \r
@@ -340,7 +338,7 @@ public:
 \r
 decklink_consumer::decklink_consumer(size_t device_index, bool embed_audio, bool internalKey) : impl_(new implementation(device_index, embed_audio, internalKey)){}\r
 decklink_consumer::decklink_consumer(decklink_consumer&& other) : impl_(std::move(other.impl_)){}\r
-void decklink_consumer::initialize(const core::video_format_desc& format_desc, const printer& parent_printer){impl_->initialize(format_desc, parent_printer);}\r
+void decklink_consumer::initialize(const core::video_format_desc& format_desc){impl_->initialize(format_desc);}\r
 void decklink_consumer::send(const safe_ptr<const core::read_frame>& frame){impl_->send(frame);}\r
 size_t decklink_consumer::buffer_depth() const{return impl_->buffer_depth();}\r
 std::wstring decklink_consumer::print() const{return impl_->print();}\r
index 657afc8ee4e0a66bc2a0d1f454e661353fa8a99a..ee70d59746e587ebbcb3f5da95cbf771a1d48ef4 100644 (file)
@@ -34,7 +34,7 @@ public:
        explicit decklink_consumer(size_t device_index, bool embed_audio = false, bool internal_key = false);\r
        decklink_consumer(decklink_consumer&& other);\r
        \r
-       virtual void initialize(const core::video_format_desc& format_desc, const printer& parent_printer);\r
+       virtual void initialize(const core::video_format_desc& format_desc);\r
        virtual void send(const safe_ptr<const core::read_frame>&);\r
        virtual size_t buffer_depth() const;\r
        virtual std::wstring print() const;\r
index 0f3111688112981a4e96946a9693b9dea6cbe468..a3f3fee0025358a54c6ad851e0b53448e6333b1b 100644 (file)
@@ -30,6 +30,7 @@
 #include <common/exception/exceptions.h>\r
 #include <common/utility/timer.h>\r
 \r
+#include <core/producer/frame/frame_factory.h>\r
 #include <core/producer/frame/write_frame.h>\r
 \r
 #include <tbb/concurrent_queue.h>\r
@@ -59,7 +60,6 @@ class decklink_input : public IDeckLinkInputCallback
                ~co_init(){CoUninitialize();}\r
        } co_;\r
 \r
-       const object* parent_;\r
        const core::video_format_desc format_desc_;\r
        std::wstring model_name_;\r
        const size_t device_index_;\r
@@ -79,9 +79,8 @@ class decklink_input : public IDeckLinkInputCallback
        safe_ptr<core::basic_frame> tail_;\r
 \r
 public:\r
-       decklink_input(const object* parent, const core::video_format_desc& format_desc, size_t device_index, const std::shared_ptr<core::frame_factory>& frame_factory)\r
-               : parent_(parent)\r
-               , format_desc_(format_desc)\r
+       decklink_input(const core::video_format_desc& format_desc, size_t device_index, const std::shared_ptr<core::frame_factory>& frame_factory)\r
+               : format_desc_(format_desc)\r
                , device_index_(device_index)\r
                , model_name_(L"decklink")\r
                , frame_factory_(frame_factory)\r
@@ -235,10 +234,10 @@ public:
                frame_buffer_.try_pop(tail_);\r
                return tail_;\r
        }\r
-\r
+       \r
        std::wstring print() const\r
        {\r
-               return static_cast<const core::frame_producer*>(parent_)->print() + L" [" + model_name_ + L"device:" + boost::lexical_cast<std::wstring>(device_index_) + L"]";\r
+               return L" [" + model_name_ + L"device:" + boost::lexical_cast<std::wstring>(device_index_) + L"]";\r
        }\r
 };\r
        \r
@@ -271,7 +270,7 @@ public:
                executor_.start();\r
                executor_.invoke([=]\r
                {\r
-                       input_.reset(new decklink_input(this, format_desc_, device_index_, frame_factory));\r
+                       input_.reset(new decklink_input(format_desc_, device_index_, frame_factory));\r
                });\r
        }\r
                \r
@@ -282,7 +281,7 @@ public:
        \r
        std::wstring print() const\r
        {\r
-               return (input_ ? input_->print() : L"Unknown Decklink [input-" + boost::lexical_cast<std::wstring>(device_index_) + L"]");\r
+               return input_ ? input_->print() : L"decklink_producer";\r
        }\r
 };\r
 \r
index 424e0d2a66ebe5a48dd82b4cc7af9fb39ff15c05..50a7f703b48ce510aac76d7a07f130d5c42b3a57 100644 (file)
@@ -54,7 +54,6 @@ namespace caspar {
        \r
 struct ffmpeg_consumer::implementation : boost::noncopyable\r
 {              \r
-       printer parent_printer_;\r
        std::string filename_;\r
 \r
        // Audio\r
@@ -114,10 +113,9 @@ public:
                        url_fclose(oc_->pb); // Close the output ffmpeg.\r
        }\r
 \r
-       void initialize(const core::video_format_desc& format_desc, const printer& parent_printer)\r
+       void initialize(const core::video_format_desc& format_desc)\r
        {\r
                format_desc_ = format_desc;\r
-               parent_printer_ = parent_printer;\r
                executor_.start();\r
                active_ = executor_.begin_invoke([]{});\r
 \r
@@ -196,7 +194,7 @@ public:
        \r
        std::wstring print() const\r
        {\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + L"ffmpeg[" + widen(filename_) + L"]";\r
+               return L"ffmpeg[" + widen(filename_) + L"]";\r
        }\r
 \r
        AVStream* add_video_stream(enum CodecID codec_id)\r
@@ -401,10 +399,10 @@ ffmpeg_consumer::ffmpeg_consumer(const std::wstring& filename) : impl_(new imple
 ffmpeg_consumer::ffmpeg_consumer(ffmpeg_consumer&& other) : impl_(std::move(other.impl_)){}\r
 void ffmpeg_consumer::send(const safe_ptr<const core::read_frame>& frame){impl_->send(frame);}\r
 size_t ffmpeg_consumer::buffer_depth() const{return impl_->buffer_depth();}\r
-void ffmpeg_consumer::initialize(const core::video_format_desc& format_desc, const printer& parent_printer)\r
+void ffmpeg_consumer::initialize(const core::video_format_desc& format_desc)\r
 {\r
        impl_.reset(new implementation(impl_->filename_));\r
-       impl_->initialize(format_desc, parent_printer);\r
+       impl_->initialize(format_desc);\r
 }\r
 std::wstring ffmpeg_consumer::print() const {return impl_->print();}\r
 \r
index 412d7caabd2bedf0a74425a59e1e7862bf6516e7..281038da0b8eb43d47aed96bff52858ff7c6a571 100644 (file)
@@ -30,7 +30,7 @@ public:
        explicit ffmpeg_consumer(const std::wstring& filename);\r
        ffmpeg_consumer(ffmpeg_consumer&& other);\r
        \r
-       virtual void initialize(const core::video_format_desc& format_desc, const printer& parent_printer);\r
+       virtual void initialize(const core::video_format_desc& format_desc);\r
        virtual void send(const safe_ptr<const core::read_frame>&);\r
        virtual size_t buffer_depth() const;\r
        virtual std::wstring print() const;\r
index 0e9fd6d005d6e8482dccbd99799a745f8f489199..7c7882491628258d4b2dab0ee7b4b4e2e82c9521 100644 (file)
@@ -60,7 +60,7 @@ public:
        virtual void set_frame_factory(const safe_ptr<core::frame_factory>& frame_factory)\r
        {\r
                frame_factory_ = frame_factory;\r
-               input_.reset(new input(safe_ptr<diagnostics::graph>(graph_), filename_, loop_, std::bind(&ffmpeg_producer::print, this)));\r
+               input_.reset(new input(safe_ptr<diagnostics::graph>(graph_), filename_, loop_));\r
                video_decoder_.reset(input_->get_video_codec_context().get() ? new video_decoder(input_->get_video_codec_context().get(), frame_factory) : nullptr);\r
                audio_decoder_.reset(input_->get_audio_codec_context().get() ? new audio_decoder(input_->get_audio_codec_context().get(), frame_factory->get_video_format_desc().fps) : nullptr);\r
 \r
@@ -180,7 +180,7 @@ public:
 \r
        virtual std::wstring print() const\r
        {\r
-               return frame_producer::print() + L"ffmpeg[" + boost::filesystem::wpath(filename_).filename() + L"]";\r
+               return L"ffmpeg[" + boost::filesystem::wpath(filename_).filename() + L"]";\r
        }\r
 };\r
 \r
index 212720321762b72b2c74bce82495ba5ddf41886f..24677c1f4dac927c170abe60aafa11a57872b783 100644 (file)
@@ -6,7 +6,6 @@
 \r
 #include <common/concurrency/executor.h>\r
 #include <common/diagnostics/graph.h>\r
-#include <common/utility/printer.h>\r
 \r
 #include <tbb/concurrent_queue.h>\r
 #include <tbb/queuing_mutex.h>\r
@@ -35,7 +34,6 @@ struct input::implementation : boost::noncopyable
 {              \r
        static const size_t PACKET_BUFFER_COUNT = 50;\r
 \r
-       printer parent_printer_;\r
        safe_ptr<diagnostics::graph> graph_;\r
 \r
        std::shared_ptr<AVFormatContext> format_context_;       // Destroy this last\r
@@ -57,9 +55,8 @@ struct input::implementation : boost::noncopyable
        \r
        executor executor_;\r
 public:\r
-       explicit implementation(const safe_ptr<diagnostics::graph>& graph, const std::wstring& filename, bool loop, const printer& parent_printer) \r
-               : parent_printer_(parent_printer)\r
-               , graph_(graph)\r
+       explicit implementation(const safe_ptr<diagnostics::graph>& graph, const std::wstring& filename, bool loop) \r
+               : graph_(graph)\r
                , loop_(loop)\r
                , video_s_index_(-1)\r
                , audio_s_index_(-1)\r
@@ -219,11 +216,11 @@ public:
 \r
        std::wstring print() const\r
        {\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + L"input";\r
+               return L"ffmpeg_input";\r
        }\r
 };\r
 \r
-input::input(const safe_ptr<diagnostics::graph>& graph, const std::wstring& filename, bool loop, const printer& parent_printer) : impl_(new implementation(graph, filename, loop, parent_printer)){}\r
+input::input(const safe_ptr<diagnostics::graph>& graph, const std::wstring& filename, bool loop) : impl_(new implementation(graph, filename, loop)){}\r
 const std::shared_ptr<AVCodecContext>& input::get_video_codec_context() const{return impl_->video_codec_context_;}\r
 const std::shared_ptr<AVCodecContext>& input::get_audio_codec_context() const{return impl_->audio_codex_context_;}\r
 bool input::is_eof() const{return impl_->is_eof();}\r
index ca87036044cf651769216e89b5f33f5e1c882449..11c318ce70e033e7e5235b72705f593ceb4bdfc3 100644 (file)
@@ -1,7 +1,6 @@
 #pragma once\r
 \r
 #include <common/diagnostics/graph.h>\r
-#include <common/utility/printer.h>\r
 \r
 #include <tbb/cache_aligned_allocator.h>\r
 \r
@@ -17,7 +16,7 @@ typedef std::vector<unsigned char, tbb::cache_aligned_allocator<unsigned char>>
 class input : boost::noncopyable\r
 {\r
 public:\r
-       explicit input(const safe_ptr<diagnostics::graph>& graph, const std::wstring& filename, bool loop, const printer& parent_printer);\r
+       explicit input(const safe_ptr<diagnostics::graph>& graph, const std::wstring& filename, bool loop);\r
        const std::shared_ptr<AVCodecContext>& get_video_codec_context() const;\r
        const std::shared_ptr<AVCodecContext>& get_audio_codec_context() const;\r
 \r
index 2aa868f001be1ce80441d81b15a70fcc3d3f4cb4..a1b3a187d878b2f3bbc1868806db664c1c61c81c 100644 (file)
@@ -25,14 +25,11 @@ public:
        implementation(const cg_producer* self) \r
                : self_(self)\r
                , flash_producer_(create_flash_producer(boost::assign::list_of(env::template_host())))\r
-       {\r
-               flash_producer_->set_parent(self_);\r
-       }\r
+       {}\r
 \r
        void clear()\r
        {\r
                flash_producer_ = create_flash_producer(boost::assign::list_of(env::template_host()));\r
-               flash_producer_->set_parent(self_);\r
                flash_producer_->set_frame_factory(safe_ptr<core::frame_factory>(frame_factory_));\r
        }\r
 \r
@@ -91,7 +88,7 @@ public:
        \r
        std::wstring print() const\r
        {\r
-               return L"cg";\r
+               return flash_producer_->print();\r
        }\r
 };\r
        \r
@@ -133,6 +130,6 @@ 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
 void cg_producer::set_frame_factory(const safe_ptr<core::frame_factory>& frame_factory){impl_->set_frame_factory(frame_factory);}\r
-std::wstring cg_producer::print() const{return frame_producer::print() + impl_->print();}\r
+std::wstring cg_producer::print() const{return impl_->print();}\r
 \r
 }
\ No newline at end of file
index aab9a7729393fa6f09decafe25482f32ada249de..21eab727c6ce27b4ee8f4f785d72c4fdeed71214 100644 (file)
@@ -29,6 +29,7 @@
 \r
 #include <core/video_format.h>\r
 \r
+#include <core/producer/frame/frame_factory.h>\r
 #include <core/producer/frame/basic_frame.h>\r
 #include <core/producer/frame/write_frame.h>\r
 \r
@@ -57,7 +58,6 @@ class flash_renderer
                ~co_init(){CoUninitialize();}\r
        } co_;\r
        \r
-       const object* parent_;\r
        const std::wstring filename_;\r
        const core::video_format_desc format_desc_;\r
 \r
@@ -74,9 +74,8 @@ class flash_renderer
        timer perf_timer_;\r
        \r
 public:\r
-       flash_renderer(const object* parent, const safe_ptr<diagnostics::graph>& graph, const std::shared_ptr<core::frame_factory>& frame_factory, const std::wstring& filename) \r
-               : parent_(parent)\r
-               , graph_(graph)\r
+       flash_renderer(const safe_ptr<diagnostics::graph>& graph, const std::shared_ptr<core::frame_factory>& frame_factory, const std::wstring& filename) \r
+               : graph_(graph)\r
                , filename_(filename)\r
                , format_desc_(frame_factory->get_video_format_desc())\r
                , frame_factory_(frame_factory)\r
@@ -165,9 +164,9 @@ public:
        \r
        std::wstring print()\r
        {\r
-               return parent_->print();\r
+               return L"flash[" + boost::filesystem::wpath(filename_).filename() + L"]";               \r
        }\r
-\r
+       \r
 private:\r
 \r
        safe_ptr<core::basic_frame> render_simple_frame(bool underflow)\r
@@ -280,7 +279,7 @@ public:
                {\r
                        if(!renderer_)\r
                        {\r
-                               renderer_.reset(new flash_renderer(this, safe_ptr<diagnostics::graph>(graph_), frame_factory_, filename_));\r
+                               renderer_.reset(new flash_renderer(safe_ptr<diagnostics::graph>(graph_), frame_factory_, filename_));\r
                                while(frame_buffer_.try_push(core::basic_frame::empty())){}             \r
                        }\r
 \r
@@ -298,7 +297,7 @@ public:
                \r
        virtual std::wstring print() const\r
        { \r
-               return frame_producer::print() + L"flash[" + boost::filesystem::wpath(filename_).filename() + L", " + \r
+               return L"flash[" + boost::filesystem::wpath(filename_).filename() + L", " + \r
                                        boost::lexical_cast<std::wstring>(fps_) + \r
                                        (interlaced(fps_, format_desc_) ? L"i" : L"p") + L"]";          \r
        }       \r
index eb7d5fb4034817810fb31027ce977c8504471823..daec6cc9e884748a9e7046148828b2323259ae06 100644 (file)
@@ -46,7 +46,7 @@ struct image_producer : public core::frame_producer
        \r
        virtual std::wstring print() const\r
        {\r
-               return frame_producer::print() + L"image_producer[" + filename_ + L"]";\r
+               return L"image_producer[" + filename_ + L"]";\r
        }\r
 };\r
 \r
index e2efa3ceaf4646befa33098fe6ec80f867a782ee..259e88cc330756308d01aa08df2ecd8c4a2e09ab 100644 (file)
@@ -38,7 +38,6 @@ namespace caspar {
 \r
 struct oal_consumer::implementation : public sf::SoundStream, boost::noncopyable\r
 {\r
-       printer parent_printer_;\r
        safe_ptr<diagnostics::graph> graph_;\r
        timer perf_timer_;\r
 \r
@@ -48,9 +47,8 @@ struct oal_consumer::implementation : public sf::SoundStream, boost::noncopyable
 \r
        core::video_format_desc format_desc_;\r
 public:\r
-       implementation(const core::video_format_desc& format_desc, const printer& parent_printer) \r
-               : parent_printer_(parent_printer)\r
-               , graph_(diagnostics::create_graph(narrow(print())))\r
+       implementation(const core::video_format_desc& format_desc) \r
+               : graph_(diagnostics::create_graph(narrow(print())))\r
                , container_(5)\r
                , format_desc_(format_desc)\r
        {\r
@@ -102,7 +100,7 @@ public:
 \r
        std::wstring print() const\r
        {\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + L"oal[default]";\r
+               return L"oal[default]";\r
        }\r
 };\r
 \r
@@ -110,7 +108,7 @@ oal_consumer::oal_consumer(){}
 oal_consumer::oal_consumer(oal_consumer&& other) : impl_(std::move(other.impl_)){}\r
 void oal_consumer::send(const safe_ptr<const core::read_frame>& frame){impl_->send(frame);}\r
 size_t oal_consumer::buffer_depth() const{return impl_->buffer_depth();}\r
-void oal_consumer::initialize(const core::video_format_desc& format_desc, const printer& parent_printer){impl_.reset(new implementation(format_desc, parent_printer));}\r
+void oal_consumer::initialize(const core::video_format_desc& format_desc){impl_.reset(new implementation(format_desc));}\r
 std::wstring oal_consumer::print() const { return impl_->print(); }\r
 \r
 safe_ptr<core::frame_consumer> create_oal_consumer(const std::vector<std::wstring>& params)\r
index a0e1988d96d948ccdb5858052fe8b4528e6bd523..2068f7b5c83ad6eadffce9148f8426425b327a89 100644 (file)
@@ -32,7 +32,7 @@ public:
        explicit oal_consumer();\r
        oal_consumer(oal_consumer&& other);\r
 \r
-       virtual void initialize(const core::video_format_desc& format_desc, const printer& parent_printer);     \r
+       virtual void initialize(const core::video_format_desc& format_desc);    \r
 \r
        virtual void send(const safe_ptr<const core::read_frame>&);\r
        virtual size_t buffer_depth() const;\r
index ddfd6b2e7e4f990eef20b80c7fbe96ddf7295411..24ee295a2fa5e3664ff07c8a489bda66b0e7ce2b 100644 (file)
@@ -45,7 +45,6 @@ namespace caspar {
 struct ogl_consumer::implementation : boost::noncopyable\r
 {              \r
        timer clock_;\r
-       printer parent_printer_;\r
        boost::unique_future<void> active_;\r
                \r
        float width_;\r
@@ -89,13 +88,12 @@ public:
                CASPAR_LOG(info) << print() << L" Shutting down.";      \r
        }\r
 \r
-       void initialize(const core::video_format_desc& format_desc, const printer& parent_printer)\r
+       void initialize(const core::video_format_desc& format_desc)\r
        {\r
                if(!GLEE_VERSION_2_1)\r
                        BOOST_THROW_EXCEPTION(not_supported() << msg_info("Missing OpenGL 2.1 support."));\r
                \r
                format_desc_ = format_desc;\r
-               parent_printer_ = parent_printer;\r
 \r
                square_width_ = format_desc_.width;\r
                square_height_ = format_desc_.height;\r
@@ -290,7 +288,7 @@ public:
 \r
        std::wstring print() const\r
        {\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + L"ogl[" + boost::lexical_cast<std::wstring>(screen_index_) + L"]";\r
+               return L"ogl[" + boost::lexical_cast<std::wstring>(screen_index_) + L"]";\r
        }\r
 \r
        size_t buffer_depth() const{return 2;}\r
@@ -300,10 +298,10 @@ ogl_consumer::ogl_consumer(ogl_consumer&& other) : impl_(std::move(other.impl_))
 ogl_consumer::ogl_consumer(unsigned int screen_index, stretch stretch, bool windowed) : impl_(new implementation(screen_index, stretch, windowed)){}\r
 void ogl_consumer::send(const safe_ptr<const core::read_frame>& frame){impl_->send(frame);}\r
 size_t ogl_consumer::buffer_depth() const{return impl_->buffer_depth();}\r
-void ogl_consumer::initialize(const core::video_format_desc& format_desc, const printer& parent_printer)\r
+void ogl_consumer::initialize(const core::video_format_desc& format_desc)\r
 {\r
        impl_.reset(new implementation(impl_->screen_index_, impl_->stretch_, impl_->windowed_));\r
-       impl_->initialize(format_desc, parent_printer);\r
+       impl_->initialize(format_desc);\r
 }\r
 std::wstring ogl_consumer::print() const {return impl_->print();}\r
 \r
index 8ebaf21577c032f4e067a755e881be45c7c814de..dc29ebee5eeb7309e4e6f45854bb4ad7ea267b9a 100644 (file)
@@ -40,7 +40,7 @@ public:
        explicit ogl_consumer(unsigned int screen_index = 0, stretch stretch = stretch::fill, bool windowed = false);\r
        ogl_consumer(ogl_consumer&& other);\r
        \r
-       virtual void initialize(const core::video_format_desc& format_desc, const printer& parent_printer);\r
+       virtual void initialize(const core::video_format_desc& format_desc);\r
        virtual void send(const safe_ptr<const core::read_frame>&);\r
        virtual size_t buffer_depth() const;\r
        virtual std::wstring print() const;\r
index 7b8397f58c01f9c716891dabdaa8686204eb47b0..83a2085435fe5b7d71ef5b1af85e5c731c1a90bb 100644 (file)
@@ -161,7 +161,7 @@ public:
                return renderer_->get_frame();\r
        }\r
 \r
-       std::wstring print() const{ return frame_producer::print() + L"silverlight"; }  \r
+       std::wstring print() const{ return L"silverlight"; }    \r
 };\r
 \r
 safe_ptr<core::frame_producer> create_silverlight_producer(const std::vector<std::wstring>& params)\r