]> git.sesse.net Git - casparcg/commitdiff
* Merged core/fwd.h from 2.0 and added more types to it. Started using it all over...
authorHelge Norberg <helge.norberg@svt.se>
Mon, 15 Jun 2015 15:25:52 +0000 (17:25 +0200)
committerHelge Norberg <helge.norberg@svt.se>
Mon, 15 Jun 2015 15:25:52 +0000 (17:25 +0200)
45 files changed:
accelerator/cpu/image/image_mixer.h
accelerator/ogl/image/image_mixer.h
core/CMakeLists.txt
core/consumer/frame_consumer.cpp
core/consumer/frame_consumer.h
core/consumer/output.h
core/consumer/port.cpp
core/consumer/port.h
core/frame/draw_frame.h
core/frame/frame.h
core/frame/frame_factory.h
core/frame/frame_visitor.h
core/fwd.h [new file with mode: 0644]
core/mixer/mixer.cpp
core/mixer/mixer.h
core/producer/cg_proxy.cpp
core/producer/cg_proxy.h
core/producer/color/color_producer.h
core/producer/draw/freehand_producer.h
core/producer/frame_producer.cpp
core/producer/frame_producer.h
core/producer/layer.h
core/producer/scene/const_producer.cpp
core/producer/scene/const_producer.h
core/producer/scene/scene_producer.h
core/producer/stage.cpp
core/producer/stage.h
core/producer/text/text_producer.h
core/producer/transition/transition_producer.h
core/thumbnail_generator.h
core/video_channel.h
modules/bluefish/consumer/bluefish_consumer.h
modules/bluefish/util/blue_velvet.h
modules/decklink/consumer/decklink_consumer.h
modules/ffmpeg/consumer/ffmpeg_consumer.h
modules/ffmpeg/producer/audio/audio_decoder.h
modules/ffmpeg/producer/ffmpeg_producer.h
modules/ffmpeg/producer/muxer/frame_muxer.h
modules/ffmpeg/producer/util/util.h
modules/html/producer/html_producer.h
modules/newtek/consumer/newtek_ivga_consumer.h
modules/oal/consumer/oal_consumer.h
modules/reroute/producer/reroute_producer.h
modules/screen/consumer/screen_consumer.h
shell/server.h

index f955f68a8e1ce7819f4191b073c9fac96ef9a9e6..f1c202ef2abe7e8d7c49c35ea7c91362fe6a59c7 100644 (file)
@@ -5,19 +5,12 @@
 
 #include <core/mixer/image/blend_modes.h>
 #include <core/mixer/image/image_mixer.h>
+#include <core/fwd.h>
 
 #include <core/frame/frame.h>
 #include <core/frame/frame_visitor.h>
 #include <core/video_format.h>
 
-FORWARD1(boost, template<typename> class shared_future);
-FORWARD1(boost, template<typename> class iterator_range);
-FORWARD2(caspar, core, class frame);
-FORWARD2(caspar, core, struct pixel_format_desc);
-FORWARD2(caspar, core, struct video_format_desc);
-FORWARD2(caspar, core, class mutable_frame);
-FORWARD2(caspar, core, struct frame_transform);
-
 namespace caspar { namespace accelerator { namespace cpu {
        
 typedef cache_aligned_vector<uint8_t> buffer;
index af21ceb45c6a47ca4a92d55ad2a50d22a15ce626..5f7e8c845074c05ffdca8338a299b1c6f3955511 100644 (file)
 
 #include <core/mixer/image/blend_modes.h>
 #include <core/mixer/image/image_mixer.h>
+#include <core/fwd.h>
 
 #include <core/frame/frame_visitor.h>
 #include <core/video_format.h>
 
-FORWARD2(caspar, core, class frame);
-FORWARD2(caspar, core, struct pixel_format_desc);
-FORWARD2(caspar, core, struct video_format_desc);
-FORWARD2(caspar, core, class mutable_frame);
-FORWARD2(caspar, core, struct frame_transform);
-
 namespace caspar { namespace accelerator { namespace ogl {
        
 class image_mixer final : public core::image_mixer
index e37d094f13d479f75d095c37968eaef452199d5e..057825719d9bc54e3f1d6f5be49a91af8ad22e04 100644 (file)
@@ -111,6 +111,7 @@ set(HEADERS
                producer/stage.h
                producer/variable.h
 
+               fwd.h
                module_dependencies.h
                system_info_provider.h
                StdAfx.h
index ccafbc6b31440c8569969f6878ab755218d9d36e..b695f5a84fb58d01434cb005fe0e59ec86b26906 100644 (file)
@@ -91,7 +91,7 @@ public:
        }
        
        std::future<bool> send(const_frame frame) override                                                                                                      {return consumer_->send(std::move(frame));}
-       virtual void initialize(const struct video_format_desc& format_desc, int channel_index) override        {return consumer_->initialize(format_desc, channel_index);}
+       virtual void initialize(const video_format_desc& format_desc, int channel_index)        override        {return consumer_->initialize(format_desc, channel_index);}
        std::wstring print() const override                                                                                                                                     {return consumer_->print();}    
        std::wstring name() const override                                                                                                                                      {return consumer_->name();}
        boost::property_tree::wptree info() const override                                                                                                      {return consumer_->info();}
@@ -120,7 +120,7 @@ public:
        }
        
        std::future<bool> send(const_frame frame) override                                                                                                      {return consumer_->send(std::move(frame));}
-       virtual void initialize(const struct video_format_desc& format_desc, int channel_index) override        {return consumer_->initialize(format_desc, channel_index);}
+       virtual void initialize(const video_format_desc& format_desc, int channel_index)        override        {return consumer_->initialize(format_desc, channel_index);}
        std::wstring print() const override                                                                                                                                     {return consumer_->print();}
        std::wstring name() const override                                                                                                                                      {return consumer_->name();}
        boost::property_tree::wptree info() const override                                                                                                      {return consumer_->info();}
@@ -164,7 +164,7 @@ public:
                }
        }
 
-       virtual void initialize(const struct video_format_desc& format_desc, int channel_index)         
+       virtual void initialize(const video_format_desc& format_desc, int channel_index)                
        {
                format_desc_    = format_desc;
                channel_index_  = channel_index;
index a8a1638ba440b3cd659714c3aa3ecaf60a39b7f8..3a0f7ec62de4fbdc21287971e16fa58939168640 100644 (file)
@@ -22,6 +22,7 @@
 #pragma once
 
 #include "../monitor/monitor.h"
+#include "../fwd.h"
 
 #include <common/memory.h>
 #include <common/future_fwd.h>
@@ -34,8 +35,6 @@
 
 namespace caspar { namespace core {
 
-struct interaction_sink;
-
 // Interface
 class frame_consumer
 {
@@ -54,8 +53,8 @@ public:
        
        // Methods
 
-       virtual std::future<bool>                               send(class const_frame frame) = 0;
-       virtual void                                                    initialize(const struct video_format_desc& format_desc, int channel_index) = 0;
+       virtual std::future<bool>                               send(const_frame frame) = 0;
+       virtual void                                                    initialize(const video_format_desc& format_desc, int channel_index) = 0;
        
        // monitor::observable
 
index b6dc929ad2c53260d3a888486a1881148b3e2ed5..762a768c2117c4e6bda1e040b994ee1ec584ea6b 100644 (file)
@@ -22,6 +22,7 @@
 #pragma once
 
 #include "../monitor/monitor.h"
+#include "../fwd.h"
 
 #include <common/forward.h>
 #include <common/future_fwd.h>
@@ -44,15 +45,15 @@ public:
 
        // Constructors
 
-       explicit output(spl::shared_ptr<diagnostics::graph> graph, const struct video_format_desc& format_desc, int channel_index);
+       explicit output(spl::shared_ptr<diagnostics::graph> graph, const video_format_desc& format_desc, int channel_index);
        
        // Methods
 
-       void operator()(class const_frame frame, const struct video_format_desc& format_desc);
+       void operator()(const_frame frame, const video_format_desc& format_desc);
        
-       void add(const spl::shared_ptr<class frame_consumer>& consumer);
-       void add(int index, const spl::shared_ptr<class frame_consumer>& consumer);
-       void remove(const spl::shared_ptr<class frame_consumer>& consumer);
+       void add(const spl::shared_ptr<frame_consumer>& consumer);
+       void add(int index, const spl::shared_ptr<frame_consumer>& consumer);
+       void remove(const spl::shared_ptr<frame_consumer>& consumer);
        void remove(int index);
        
        monitor::subject& monitor_output();
index 2964f908752183abb027e83f7691a64cd3b67173..ac3d04ebcc03b5717c6a7e80bbcc2e532fecff7d 100644 (file)
@@ -25,7 +25,7 @@ public:
                consumer_->monitor_output().attach_parent(monitor_subject_);
        }
        
-       void video_format_desc(const struct video_format_desc& format_desc)
+       void video_format_desc(const core::video_format_desc& format_desc)
        {
                consumer_->initialize(format_desc, channel_index_);
        }
@@ -67,7 +67,7 @@ port::~port(){}
 port& port::operator=(port&& other){impl_ = std::move(other.impl_); return *this;}
 std::future<bool> port::send(const_frame frame){return impl_->send(std::move(frame));} 
 monitor::subject& port::monitor_output() {return *impl_->monitor_subject_;}
-void port::video_format_desc(const struct video_format_desc& format_desc){impl_->video_format_desc(format_desc);}
+void port::video_format_desc(const core::video_format_desc& format_desc){impl_->video_format_desc(format_desc);}
 int port::buffer_depth() const{return impl_->buffer_depth();}
 std::wstring port::print() const{ return impl_->print();}
 bool port::has_synchronization_clock() const{return impl_->has_synchronization_clock();}
index 5251b2f8d9dd1b6c6b5b4bace6829c2970fccdb9..1df8392f9bc5d381f81d68d6b2d99346350b3643 100644 (file)
@@ -1,6 +1,7 @@
 #pragma once
 
 #include "../monitor/monitor.h"
+#include "../fwd.h"
 
 #include <common/memory.h>
 #include <common/future_fwd.h>
@@ -19,7 +20,7 @@ public:
 
        // Constructors
 
-       port(int index, int channel_index, spl::shared_ptr<class frame_consumer> consumer);
+       port(int index, int channel_index, spl::shared_ptr<frame_consumer> consumer);
        port(port&& other);
        ~port();
 
@@ -27,13 +28,13 @@ public:
 
        port& operator=(port&& other);
 
-       std::future<bool> send(class const_frame frame);        
+       std::future<bool> send(const_frame frame);      
 
        monitor::subject& monitor_output();
 
        // Properties
 
-       void video_format_desc(const struct video_format_desc& format_desc);
+       void video_format_desc(const video_format_desc& format_desc);
        std::wstring print() const;
        int buffer_depth() const;
        bool has_synchronization_clock() const;
index 7fd67473cbbd4bb59b9f5055c8cd4038e675a6dd..8ffae33ab8b9e5eeb2cc4ff2981e3133037b1581 100644 (file)
@@ -22,8 +22,7 @@
 #pragma once
 
 #include "frame_visitor.h"
-
-#include <core/video_format.h>
+#include "../fwd.h"
 
 #include <common/memory.h>
 
@@ -31,8 +30,6 @@
 
 namespace caspar { namespace core {
        
-struct frame_transform;
-
 class draw_frame final
 {
 public:                
@@ -52,8 +49,8 @@ public:
        draw_frame();
        draw_frame(const draw_frame& other);
        draw_frame(draw_frame&& other); 
-       explicit draw_frame(class const_frame&& frame);
-       explicit draw_frame(class mutable_frame&& frame);
+       explicit draw_frame(const_frame&& frame);
+       explicit draw_frame(mutable_frame&& frame);
        explicit draw_frame(std::vector<draw_frame> frames);
 
        ~draw_frame();
index 4667c0a2a1402470ef5138e3502fc8f9e189e713..8e680d849634e226eb56573e8873277c60252afd 100644 (file)
@@ -3,7 +3,7 @@
 #undef BOOST_PARAMETER_MAX_ARITY
 #define BOOST_PARAMETER_MAX_ARITY 7
 
-#include "../video_format.h"
+#include "../fwd.h"
 
 #include <common/memory.h>
 #include <common/forward.h>
@@ -34,7 +34,7 @@ public:
        explicit mutable_frame(std::vector<array<std::uint8_t>> image_buffers, 
                                                audio_buffer audio_buffer, 
                                                const void* tag, 
-                                               const struct pixel_format_desc& desc);
+                                               const pixel_format_desc& desc);
        ~mutable_frame();
 
        // Methods
@@ -46,7 +46,7 @@ public:
                        
        // Properties
                        
-       const struct pixel_format_desc& pixel_format_desc() const;
+       const pixel_format_desc& pixel_format_desc() const;
 
        const array<std::uint8_t>& image_data(std::size_t index = 0) const;
        const core::audio_buffer& audio_data() const;
@@ -82,7 +82,7 @@ public:
        explicit const_frame(std::shared_future<array<const std::uint8_t>> image, 
                                                audio_buffer audio_buffer, 
                                                const void* tag, 
-                                               const struct pixel_format_desc& desc);
+                                               const pixel_format_desc& desc);
        const_frame(mutable_frame&& other);
        ~const_frame();
 
@@ -95,7 +95,7 @@ public:
                                
        // Properties
                                
-       const struct pixel_format_desc& pixel_format_desc() const;
+       const pixel_format_desc& pixel_format_desc() const;
 
        array<const std::uint8_t> image_data(int index = 0) const;
        const core::audio_buffer& audio_data() const;
index 4c237d7ba90193332832cc5f79ede6e8d419a16d..5aa865af087cf5c122173a6204601828c5ff5f30 100644 (file)
@@ -22,6 +22,7 @@
 #pragma once
 
 #include "frame.h"
+#include "../fwd.h"
 
 #include <common/memory.h>
 
@@ -41,7 +42,7 @@ public:
 
        // Methods
 
-       virtual class mutable_frame     create_frame(const void* video_stream_tag, const struct pixel_format_desc& desc) = 0;   
+       virtual mutable_frame create_frame(const void* video_stream_tag, const pixel_format_desc& desc) = 0;    
 
        // Properties
 };
index ff11de1535060f9bc4ddc288b2b19a20035c88d1..c44e750be169ac634e87fa88d1fa274d017167a2 100644 (file)
@@ -21,6 +21,8 @@
 
 #pragma once
 
+#include "../fwd.h"
+
 namespace caspar { namespace core {
        
 class frame_visitor
@@ -37,8 +39,8 @@ public:
 
        // Methods
 
-       virtual void push(const struct frame_transform& transform) = 0;
-       virtual void visit(const class const_frame& frame) = 0;
+       virtual void push(const frame_transform& transform) = 0;
+       virtual void visit(const const_frame& frame) = 0;
        virtual void pop() = 0;
 
        // Properties
diff --git a/core/fwd.h b/core/fwd.h
new file mode 100644 (file)
index 0000000..d07c43a
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+* Copyright 2013 Sveriges Television AB http://casparcg.com/
+*
+* This file is part of CasparCG (www.casparcg.com).
+*
+* CasparCG is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* CasparCG is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
+*
+* Author: Robert Nagy, ronag89@gmail.com
+*/
+#pragma once
+
+#include <common/forward.h>
+
+FORWARD3(caspar, core, ogl, class accelerator);
+
+FORWARD2(caspar, core, class stage);
+FORWARD2(caspar, core, class mixer);
+FORWARD2(caspar, core, class output);
+FORWARD2(caspar, core, class image_mixer);
+FORWARD2(caspar, core, struct video_format_desc);
+FORWARD2(caspar, core, class frame_factory);
+FORWARD2(caspar, core, class frame_producer);
+FORWARD2(caspar, core, class frame_consumer);
+FORWARD2(caspar, core, struct interaction_sink);
+FORWARD2(caspar, core, class draw_frame);
+FORWARD2(caspar, core, class mutable_frame);
+FORWARD2(caspar, core, class const_frame);
+FORWARD2(caspar, core, class video_channel);
+FORWARD2(caspar, core, struct pixel_format_desc);
+FORWARD2(caspar, core, struct media_info_repository);
+FORWARD2(caspar, core, enum class field_mode);
+FORWARD2(caspar, core, class thumbnail_generator);
+FORWARD2(caspar, core, class system_info_provider_repository);
+FORWARD2(caspar, core, class cg_producer_registry);
+FORWARD2(caspar, core, struct frame_transform);
+
index 26f97cc34ea0ffdd7fa02e716fdcba6d3ae84c27..014ae8225f1005c4499e96b36d40758f4cbfc7c8 100644 (file)
@@ -132,6 +132,6 @@ mixer::mixer(spl::shared_ptr<diagnostics::graph> graph, spl::shared_ptr<image_mi
 void mixer::set_master_volume(float volume) { impl_->set_master_volume(volume); }
 float mixer::get_master_volume() { return impl_->get_master_volume(); }
 std::future<boost::property_tree::wptree> mixer::info() const{return impl_->info();}
-const_frame mixer::operator()(std::map<int, draw_frame> frames, const struct video_format_desc& format_desc){return (*impl_)(std::move(frames), format_desc);}
+const_frame mixer::operator()(std::map<int, draw_frame> frames, const video_format_desc& format_desc){return (*impl_)(std::move(frames), format_desc);}
 mutable_frame mixer::create_frame(const void* tag, const core::pixel_format_desc& desc) {return impl_->image_mixer_->create_frame(tag, desc);}
 }}
index c5f1bdc4e113791b67e870dd60a459f8b71365ba..cf4e7545aca01f823649c38b7ba7b51e02a26fae 100644 (file)
@@ -28,7 +28,7 @@
 #include <common/memory.h>
 #include <common/reactive.h>
 
-#include <core/video_format.h>
+#include <core/fwd.h>
 
 #include <boost/property_tree/ptree_fwd.hpp>
 
@@ -48,16 +48,16 @@ public:
                                        
        // Constructors
        
-       explicit mixer(spl::shared_ptr<diagnostics::graph> graph, spl::shared_ptr<class image_mixer> image_mixer);
+       explicit mixer(spl::shared_ptr<diagnostics::graph> graph, spl::shared_ptr<image_mixer> image_mixer);
 
        // Methods
                
-       class const_frame operator()(std::map<int, class draw_frame> frames, const struct video_format_desc& format_desc);
+       const_frame operator()(std::map<int, draw_frame> frames, const video_format_desc& format_desc);
 
        void set_master_volume(float volume);
        float get_master_volume();
 
-       class mutable_frame create_frame(const void* tag, const struct pixel_format_desc& desc);
+       mutable_frame create_frame(const void* tag, const pixel_format_desc& desc);
 
        // Properties
 
index b9a9b71b6d83e24c562f00838b82605ea9418a24..a2b045885421c305a4682c0865d598f80616e758 100644 (file)
@@ -137,7 +137,7 @@ public:
        }
 
        spl::shared_ptr<cg_proxy> get_proxy(
-                       const spl::shared_ptr<class video_channel>& video_channel,
+                       const spl::shared_ptr<video_channel>& video_channel,
                        int render_layer) const
        {
                auto producer = spl::make_shared_ptr(video_channel->stage().foreground(render_layer).get());
@@ -146,7 +146,7 @@ public:
        }
 
        spl::shared_ptr<cg_proxy> get_or_create_proxy(
-                       const spl::shared_ptr<class video_channel>& video_channel,
+                       const spl::shared_ptr<video_channel>& video_channel,
                        int render_layer,
                        const std::wstring& filename) const
        {
index c5ea6ef559cc3e4a722d05a02297a2326db94980..76ea8fad61d9c875111aebf52078de73e9e77255 100644 (file)
@@ -57,7 +57,7 @@ typedef std::function<spl::shared_ptr<cg_proxy>(
                const spl::shared_ptr<frame_producer>& producer
        )> cg_proxy_factory;
 typedef std::function<spl::shared_ptr<frame_producer>(
-               const spl::shared_ptr<class frame_factory>& factory,
+               const spl::shared_ptr<frame_factory>& factory,
                const video_format_desc& format_desc,
                const std::wstring& filename
        )> cg_producer_factory;
@@ -77,15 +77,15 @@ public:
                        bool reusable_producer_instance);
 
        spl::shared_ptr<frame_producer> create_producer(
-                       const spl::shared_ptr<class video_channel>& video_channel,
+                       const spl::shared_ptr<video_channel>& video_channel,
                        const std::wstring& filename) const;
        spl::shared_ptr<cg_proxy> get_proxy(
                        const spl::shared_ptr<frame_producer>& producer) const;
        spl::shared_ptr<cg_proxy> get_proxy(
-                       const spl::shared_ptr<class video_channel>& video_channel,
+                       const spl::shared_ptr<video_channel>& video_channel,
                        int render_layer) const;
        spl::shared_ptr<cg_proxy> get_or_create_proxy(
-                       const spl::shared_ptr<class video_channel>& video_channel,
+                       const spl::shared_ptr<video_channel>& video_channel,
                        int render_layer,
                        const std::wstring& filename) const;
        std::string read_meta_info(const std::wstring& filename) const;
index 2a998cf54f57986678f8e8cb9c60fe91b03a2056..40a0972c47d49e85a2430a028f52781a74f57a08 100644 (file)
@@ -23,6 +23,8 @@
 
 #include <common/memory.h>
 
+#include <core/fwd.h>
+
 #include <string>
 #include <vector>
 #include <cstdint>
@@ -31,9 +33,9 @@ namespace caspar { namespace core {
 
 bool try_get_color(const std::wstring& str, uint32_t& value);
 
-spl::shared_ptr<class frame_producer> create_color_producer(const spl::shared_ptr<class frame_factory>& frame_factory, uint32_t value);
-spl::shared_ptr<class frame_producer> create_color_producer(const spl::shared_ptr<class frame_factory>& frame_factory, const std::vector<std::wstring>& params);
-class draw_frame create_color_frame(void* tag, const spl::shared_ptr<frame_factory>& frame_factory, uint32_t value);
-class draw_frame create_color_frame(void* tag, const spl::shared_ptr<class frame_factory>& frame_factory, const std::wstring& color);
+spl::shared_ptr<frame_producer> create_color_producer(const spl::shared_ptr<frame_factory>& frame_factory, uint32_t value);
+spl::shared_ptr<frame_producer> create_color_producer(const spl::shared_ptr<frame_factory>& frame_factory, const std::vector<std::wstring>& params);
+draw_frame create_color_frame(void* tag, const spl::shared_ptr<frame_factory>& frame_factory, uint32_t value);
+draw_frame create_color_frame(void* tag, const spl::shared_ptr<frame_factory>& frame_factory, const std::wstring& color);
 
 }}
index 6546434f7ed32bfaa35623b00b8ed22fcd83ae81..b8ac1c79e562a67494dbcba519c83e411d68e6ac 100644 (file)
 
 #include <common/memory.h>
 
+#include <core/fwd.h>
+
 #include <string>
 #include <vector>
 
 namespace caspar { namespace core {
        
-spl::shared_ptr<class frame_producer> create_freehand_producer(const spl::shared_ptr<class frame_factory>& frame_factory, const std::vector<std::wstring>& params);
+spl::shared_ptr<frame_producer> create_freehand_producer(const spl::shared_ptr<frame_factory>& frame_factory, const std::vector<std::wstring>& params);
 
 }}
index eecb81e6a0e475822763f56363a9bbf2782563b9..f1f6907d244fc92b010e0271937f340a2abff064 100644 (file)
@@ -249,7 +249,7 @@ public:
        const std::vector<std::wstring>&                                        get_variables() const override                                                                                                  {return producer_->get_variables();}
        void                                                                                            leading_producer(const spl::shared_ptr<frame_producer>& producer) override              {return producer_->leading_producer(producer);}
        uint32_t                                                                                        nb_frames() const override                                                                                                              {return producer_->nb_frames();}
-       class draw_frame                                                                        last_frame()                                                                                                                                    {return producer_->last_frame();}
+       draw_frame                                                                                      last_frame()                                                                                                                                    {return producer_->last_frame();}
        draw_frame                                                                                      create_thumbnail_frame()                                                                                                                {return producer_->create_thumbnail_frame();}
        monitor::subject&                                                                       monitor_output() override                                                                                                               {return producer_->monitor_output();}                                                                           
        bool                                                                                            collides(double x, double y) const override                                                                             {return producer_->collides(x, y);}
index c7ea9db43b23b89826f39addd934a2407d7682c7..f0b0dcb71af17f054d3960105bb065a9290f87b2 100644 (file)
@@ -22,7 +22,7 @@
 #pragma once
 
 #include "../monitor/monitor.h"
-#include "../video_format.h"
+#include "../fwd.h"
 #include "../interaction/interaction_sink.h"
 #include "binding.h"
 
@@ -72,7 +72,7 @@ public:
 
        // Methods      
 
-       virtual class draw_frame                                        receive() = 0;
+       virtual draw_frame                                                      receive() = 0;
        virtual std::future<std::wstring>                       call(const std::vector<std::wstring>& params) = 0;
        virtual variable&                                                       get_variable(const std::wstring& name) = 0;
        virtual const std::vector<std::wstring>&        get_variables() const = 0;
@@ -94,8 +94,8 @@ public:
        virtual boost::property_tree::wptree            info() const = 0;
        virtual uint32_t                                                        nb_frames() const = 0;
        virtual uint32_t                                                        frame_number() const = 0;
-       virtual class draw_frame                                        last_frame() = 0;
-       virtual class draw_frame                                        create_thumbnail_frame() = 0;
+       virtual draw_frame                                                      last_frame() = 0;
+       virtual draw_frame                                                      create_thumbnail_frame() = 0;
        virtual constraints&                                            pixel_constraints() = 0;
        virtual void                                                            leading_producer(const spl::shared_ptr<frame_producer>&) {}  
 };
@@ -119,12 +119,12 @@ public:
        void                                            paused(bool value) override;    
        uint32_t                                        nb_frames() const override;
        uint32_t                                        frame_number() const override;
-       virtual class draw_frame        last_frame() override;
-       virtual class draw_frame        create_thumbnail_frame() override;
+       virtual draw_frame                      last_frame() override;
+       virtual draw_frame                      create_thumbnail_frame() override;
 
 private:
-       virtual class draw_frame        receive() override;
-       virtual class draw_frame        receive_impl() = 0;
+       virtual draw_frame                      receive() override;
+       virtual draw_frame                      receive_impl() = 0;
 
        struct impl;
        friend struct impl;
index ee5a722449fc3c935f6e6232add83998c9d5cce3..3e9a517842e85820181abd6f135f8f42fa676d8f 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "../monitor/monitor.h"
 #include "../interaction/interaction_sink.h"
+#include "../fwd.h"
 
 #include <common/forward.h>
 #include <common/future_fwd.h>
@@ -56,12 +57,12 @@ public:
 
        void swap(layer& other);  
                
-       void load(spl::shared_ptr<class frame_producer> producer, bool preview, const boost::optional<int32_t>& auto_play_delta = nullptr); 
+       void load(spl::shared_ptr<frame_producer> producer, bool preview, const boost::optional<int32_t>& auto_play_delta = nullptr); 
        void play(); 
        void pause(); 
        void stop(); 
        
-       class draw_frame receive(const struct video_format_desc& format_desc); 
+       draw_frame receive(const video_format_desc& format_desc); 
        
        // monitor::observable
 
@@ -74,10 +75,10 @@ public:
 
        // Properties
                
-       spl::shared_ptr<class frame_producer>   foreground() const; 
-       spl::shared_ptr<class frame_producer>   background() const; 
+       spl::shared_ptr<frame_producer> foreground() const; 
+       spl::shared_ptr<frame_producer> background() const; 
 
-       boost::property_tree::wptree                    info() const;
+       boost::property_tree::wptree    info() const;
 
 private:
        struct impl;
index 8d51c594e190a635bc7be362c4d4c66784196d27..8a5588121a8d559f68119977e8094b335835d47f 100644 (file)
@@ -89,14 +89,14 @@ public:
        }
 };
 
-spl::shared_ptr<class frame_producer> create_const_producer(
-               const class draw_frame& frame, int width, int height)
+spl::shared_ptr<frame_producer> create_const_producer(
+               const draw_frame& frame, int width, int height)
 {
        return spl::make_shared<const_producer>(frame, width, height);
 }
 
-spl::shared_ptr<class frame_producer> create_const_producer(
-               std::vector<class draw_frame>&& frames, int width, int height)
+spl::shared_ptr<frame_producer> create_const_producer(
+               std::vector<draw_frame>&& frames, int width, int height)
 {
        return spl::make_shared<const_producer>(std::move(frames), width, height);
 }
index a0fdd19255e3ddd97efe16695c1a3162aee3891e..255020c0c97a4744a743ee12d15a22ab9138fe04 100644 (file)
 
 #include <common/memory.h>
 
+#include <core/fwd.h>
+
 #include <string>
 #include <vector>
 
 namespace caspar { namespace core {
 
-spl::shared_ptr<class frame_producer> create_const_producer(
-               const class draw_frame& frame, int width, int height);
-spl::shared_ptr<class frame_producer> create_const_producer(
-               std::vector<class draw_frame>&& frames, int width, int height);
+spl::shared_ptr<frame_producer> create_const_producer(
+               const draw_frame& frame, int width, int height);
+spl::shared_ptr<frame_producer> create_const_producer(
+               std::vector<draw_frame>&& frames, int width, int height);
 
 }}
index 533091cd4d362dfc1687c576c81d0bd2d7a5b451..9ed41463eae1cd736104e0da337c6d9e31df4a08 100644 (file)
 #include <common/log.h>
 
 #include "../frame_producer.h"
+#include "../../fwd.h"
 
 #include "../binding.h"
 #include "../variable.h"
 
-namespace caspar { namespace core {
-
-class frame_factory;
-
-namespace scene {
+namespace caspar { namespace core { namespace scene {
 
 struct coord
 {
@@ -117,7 +114,7 @@ public:
        scene_producer(int width, int height, const video_format_desc& format_desc);
        ~scene_producer();
 
-       class draw_frame receive_impl() override;
+       draw_frame receive_impl() override;
        constraints& pixel_constraints() override;
        void on_interaction(const interaction_event::ptr& event) override;
        bool collides(double x, double y) const override;
index 224d2d1f58d06e72f094281dfa6d56aadd11e1fd..cda09dac54d3980115297b036bfb3bb382cc7cf1 100644 (file)
@@ -51,7 +51,7 @@ struct stage::impl : public std::enable_shared_from_this<impl>
 {                              
        spl::shared_ptr<diagnostics::graph>                                                     graph_;
        spl::shared_ptr<monitor::subject>                                                       monitor_subject_;
-       //reactive::basic_subject<std::map<int, class draw_frame>>      frames_subject_;
+       //reactive::basic_subject<std::map<int, draw_frame>>            frames_subject_;
        std::map<int, layer>                                                                            layers_;        
        std::map<int, tweened_transform>                                                        tweens_;
        interaction_aggregator                                                                          aggregator_;
@@ -66,14 +66,14 @@ public:
                graph_->set_color("produce-time", diagnostics::color(0.0f, 1.0f, 0.0f));
        }
                
-       std::map<int, draw_frame> operator()(const struct video_format_desc& format_desc)
+       std::map<int, draw_frame> operator()(const video_format_desc& format_desc)
        {               
                caspar::timer frame_timer;
 
                auto frames = executor_.invoke([=]() -> std::map<int, draw_frame>
                {
 
-                       std::map<int, class draw_frame> frames;
+                       std::map<int, draw_frame> frames;
                        
                        try
                        {                       
@@ -400,7 +400,7 @@ std::future<std::shared_ptr<frame_producer>> stage::foreground(int index) { retu
 std::future<std::shared_ptr<frame_producer>> stage::background(int index) { return impl_->background(index); }
 std::future<boost::property_tree::wptree> stage::info() const{ return impl_->info(); }
 std::future<boost::property_tree::wptree> stage::info(int index) const{ return impl_->info(index); }
-std::map<int, class draw_frame> stage::operator()(const video_format_desc& format_desc){return (*impl_)(format_desc);}
+std::map<int, draw_frame> stage::operator()(const video_format_desc& format_desc){return (*impl_)(format_desc);}
 monitor::subject& stage::monitor_output(){return *impl_->monitor_subject_;}
 //void stage::subscribe(const frame_observable::observer_ptr& o) {impl_->frames_subject_.subscribe(o);}
 //void stage::unsubscribe(const frame_observable::observer_ptr& o) {impl_->frames_subject_.unsubscribe(o);}
index 834127917391e29e100eb1f1a6d73395c78b94a0..1a606c1316e99ed2442bed526694873471f064a1 100644 (file)
@@ -62,14 +62,14 @@ public:
        
        // Methods
 
-       std::map<int, class draw_frame> operator()(const struct video_format_desc& format_desc);
+       std::map<int, draw_frame>               operator()(const video_format_desc& format_desc);
 
        std::future<void>                               apply_transforms(const std::vector<transform_tuple_t>& transforms);
        std::future<void>                               apply_transform(int index, const transform_func_t& transform, unsigned int mix_duration = 0, const tweener& tween = L"linear");
        std::future<void>                               clear_transforms(int index);
        std::future<void>                               clear_transforms();
        std::future<frame_transform>    get_current_transform(int index);
-       std::future<void>                               load(int index, const spl::shared_ptr<class frame_producer>& producer, bool preview = false, const boost::optional<int32_t>& auto_play_delta = nullptr);
+       std::future<void>                               load(int index, const spl::shared_ptr<frame_producer>& producer, bool preview = false, const boost::optional<int32_t>& auto_play_delta = nullptr);
        std::future<void>                               pause(int index);
        std::future<void>                               play(int index);
        std::future<void>                               stop(int index);
@@ -92,11 +92,11 @@ public:
 
        // Properties
 
-       std::future<std::shared_ptr<class frame_producer>>      foreground(int index);
-       std::future<std::shared_ptr<class frame_producer>>      background(int index);
+       std::future<std::shared_ptr<frame_producer>>    foreground(int index);
+       std::future<std::shared_ptr<frame_producer>>    background(int index);
 
-       std::future<boost::property_tree::wptree>                       info() const;
-       std::future<boost::property_tree::wptree>                       info(int index) const;
+       std::future<boost::property_tree::wptree>               info() const;
+       std::future<boost::property_tree::wptree>               info(int index) const;
 
 private:
        struct impl;
index 731afca3853340a06237627796d6bbff24fc2844..a1cc7c0d405113400daca90f42902038860fbc1d 100644 (file)
@@ -22,6 +22,7 @@
 #pragma once
 
 #include "../frame_producer.h"
+#include "../../fwd.h"
 
 #include <common/memory.h>
 
@@ -43,7 +44,7 @@ class text_producer : public frame_producer_base
 {
 public:
        text_producer(const spl::shared_ptr<frame_factory>& frame_factory, int x, int y, const std::wstring& str, text::text_info& text_info, long parent_width, long parent_height, bool standalone);
-       static spl::shared_ptr<text_producer> create(const spl::shared_ptr<class frame_factory>& frame_factory, int x, int y, const std::wstring& str, text::text_info& text_info, long parent_width, long parent_height, bool standalone = false);
+       static spl::shared_ptr<text_producer> create(const spl::shared_ptr<frame_factory>& frame_factory, int x, int y, const std::wstring& str, text::text_info& text_info, long parent_width, long parent_height, bool standalone = false);
        
        draw_frame receive_impl() override;
        std::future<std::wstring> call(const std::vector<std::wstring>& param) override;
@@ -67,7 +68,7 @@ private:
        spl::unique_ptr<impl> impl_;
 };
 
-spl::shared_ptr<frame_producer> create_text_producer(const spl::shared_ptr<class frame_factory>& frame_factory, const video_format_desc& format_desc, const std::vector<std::wstring>& params);
+spl::shared_ptr<frame_producer> create_text_producer(const spl::shared_ptr<frame_factory>& frame_factory, const video_format_desc& format_desc, const std::vector<std::wstring>& params);
 
 
 }}
index 6eb400368bbb78cfd28e89fb5e290ddf061a5c34..0e965ced2e2cc153b053679d71ad6a93e84d6f99 100644 (file)
@@ -22,6 +22,7 @@
 #pragma once
 
 #include "../../video_format.h"
+#include "../../fwd.h"
 
 #include <common/memory.h>
 #include <common/tweener.h>
@@ -55,6 +56,6 @@ struct transition_info
        caspar::tweener                 tweener         { L"linear" };
 };
 
-spl::shared_ptr<class frame_producer> create_transition_producer(const field_mode& mode, const spl::shared_ptr<class frame_producer>& destination, const transition_info& info);
+spl::shared_ptr<frame_producer> create_transition_producer(const field_mode& mode, const spl::shared_ptr<frame_producer>& destination, const transition_info& info);
 
 }}
index fae7ed51e731b259fe5befb03b389129d6fb2a53..95c06cc167da5dff687215b5b783536250fac478 100644 (file)
 #include <common/memory.h>
 #include <common/filesystem_monitor.h>
 
-namespace caspar { namespace core {
+#include "fwd.h"
 
-class ogl_device;
-class read_frame;
-struct video_format_desc;
-struct media_info_repository;
+namespace caspar { namespace core {
 
 typedef std::function<void (
-               const class const_frame& frame,
+               const const_frame& frame,
                const video_format_desc& format_desc,
                const boost::filesystem::path& output_file,
                int width,
@@ -50,7 +47,7 @@ public:
                        int width,
                        int height,
                        const video_format_desc& render_video_mode,
-                       std::unique_ptr<class image_mixer> image_mixer,
+                       std::unique_ptr<image_mixer> image_mixer,
                        int generate_delay_millis,
                        const thumbnail_creator& thumbnail_creator,
                        spl::shared_ptr<media_info_repository> media_info_repo,
index fb747eefea1a09abcdd61aec9e5ccf53e5df068d..19677b68af24c79410c0b0dcb33c0884dfc7458d 100644 (file)
 #include <common/reactive.h>
 #include <common/forward.h>
 
+#include "fwd.h"
+
 #include "monitor/monitor.h"
 
 #include <boost/property_tree/ptree_fwd.hpp>
 
-FORWARD3(caspar, core, ogl, class accelerator);
-FORWARD2(caspar, core, class stage);
-FORWARD2(caspar, core, class mixer);
-FORWARD2(caspar, core, class output);
-FORWARD2(caspar, core, class image_mixer);
-FORWARD2(caspar, core, struct video_format_desc);
-FORWARD2(caspar, core, class frame_factory);
-
 namespace caspar { namespace core {
        
 class video_channel final
index 850482a18c192bd76d5d65318f7cd0a62c1ec765..855974e2182ecae5b407172ef91ced05c9b296a4 100644 (file)
 
 #include <common/memory.h>
 
-#include <boost/property_tree/ptree.hpp>
+#include <core/fwd.h>
 
-#include <string>
+#include <boost/property_tree/ptree_fwd.hpp>
 
-namespace caspar { 
+#include <string>
 
-namespace core {
-       class frame_consumer;
-       struct interaction_sink;
-}
-        
-namespace bluefish {
+namespace caspar { namespace bluefish {
 
 spl::shared_ptr<core::frame_consumer> create_consumer(
                const std::vector<std::wstring>& params, core::interaction_sink*);
index e18cfbc45595ff3b85b8c1a98d62264f80cf007a..b20f97ba609c17e84427cfe100fd0e4eda017ac0 100644 (file)
 #include <common/memory.h>
 #include <common/except.h>
 
-namespace caspar { 
+#include <core/fwd.h>
 
-namespace core {
-
-struct video_format_desc;
-
-}
-
-namespace bluefish {
+namespace caspar { namespace bluefish {
 
 extern const char* (*BlueVelvetVersion)();
 extern BLUE_UINT32 (*encode_hanc_frame)(struct hanc_stream_info_struct * hanc_stream_ptr, void * audio_pcm_ptr,BLUE_UINT32 no_audio_ch,BLUE_UINT32 no_audio_samples,BLUE_UINT32 nTypeOfSample,BLUE_UINT32 emb_audio_flag);
index 4447baf8d48c8dd33b191dcd5b72ff3e4e8c408e..652e8a6f39a849bbd8678f535b7d8a814cd700a4 100644 (file)
 
 #include <common/memory.h>
 
-#include <core/video_format.h>
+#include <core/fwd.h>
 
-#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/ptree_fwd.hpp>
 
 #include <string>
 #include <vector>
 
-namespace caspar {
-
-namespace core {
-       class frame_consumer;
-       struct interaction_sink;
-}
-
-namespace decklink {
+namespace caspar { namespace decklink {
 
 spl::shared_ptr<core::frame_consumer> create_consumer(
                const std::vector<std::wstring>& params, core::interaction_sink*);
index 51b96af5e57ac829ea1dfa05f90d9c9453b16e6b..931f1a641456cf9aae6537c45e7c5ef299bef762 100644 (file)
 
 #include <common/memory.h>
 
+#include <core/fwd.h>
+
 #include <boost/property_tree/ptree_fwd.hpp>
 
 #include <string>
 #include <vector>
 
-namespace caspar { 
-
-namespace core {
-       class frame_consumer;
-       struct interaction_sink;
-}
-
-namespace ffmpeg {
+namespace caspar { namespace ffmpeg {
 
 spl::shared_ptr<core::frame_consumer> create_consumer(const std::vector<std::wstring>& params, core::interaction_sink*);
 spl::shared_ptr<core::frame_consumer> create_preconfigured_consumer(const boost::property_tree::wptree& ptree, core::interaction_sink*);
index 7e07e1ec4cb44dd91a048c133e827c13b6af2e4d..3a1de55eeb4bf26ba1cf481c3c78f98191a18572 100644 (file)
 struct AVPacket;
 struct AVFormatContext;
 
-namespace caspar { 
-                       
-namespace core {
-
-struct video_format_desc;
-
-}
-
-namespace ffmpeg {
+namespace caspar { namespace ffmpeg {
        
 class audio_decoder : public boost::noncopyable
 {
index 512baf58ae240637f9d383b7e114c4c73ea377c0..b416492e8ca7bf14ab5400817c19786a01ef1046 100644 (file)
 
 #include <common/memory.h>
 
-#include <core/producer/frame_producer.h>
+#include <core/fwd.h>
 #include <core/video_format.h>
 
 #include <string>
 #include <vector>
 
-namespace caspar {
-
-namespace core {
-
-class frame_producer;
-class frame_factory;
-
-}
-       
-namespace ffmpeg {
+namespace caspar { namespace ffmpeg {
 
 spl::shared_ptr<core::frame_producer> create_producer(const spl::shared_ptr<core::frame_factory>& frame_factory, const core::video_format_desc& format_desc, const std::vector<std::wstring>& params);
 
index 1cbda7a48d42145358d31474373350b8196bb735..cf100659bfcec2640c735a994614219148bc2ef4 100644 (file)
@@ -27,7 +27,7 @@
 #include <common/memory.h>
 
 #include <core/mixer/audio/audio_mixer.h>
-#include <core/video_format.h>
+#include <core/fwd.h>
 
 #include <boost/noncopyable.hpp>
 
 
 struct AVFrame;
 
-FORWARD2(caspar, core, struct pixel_format_desc);
-FORWARD2(caspar, core, class frame);
-FORWARD2(caspar, core, class frame_factory);
-FORWARD2(caspar, core, class draw_frame);
-
 namespace caspar { namespace ffmpeg {
 
 class frame_muxer : boost::noncopyable
index eb03224b802d2bf7a656c0855adbfcd7b4839bac..40ace0da2a12a6481900099bd2cf132ea8d7c93b 100644 (file)
@@ -27,6 +27,7 @@
 #include <core/video_format.h>
 #include <core/frame/pixel_format.h>
 #include <core/mixer/audio/audio_mixer.h>
+#include <core/fwd.h>
 
 #include <boost/rational.hpp>
 
@@ -50,10 +51,6 @@ struct AVPacket;
 struct AVRational;
 struct AVCodecContext;
 
-FORWARD2(caspar, core, struct pixel_format_desc);
-FORWARD2(caspar, core, class mutable_frame);
-FORWARD2(caspar, core, class frame_factory);
-
 namespace caspar { namespace ffmpeg {
                
 // Utils
index 484db796e4d2838899e5697c833213811eed21fa..201ff0bc184fa75a221d344ba2453cc519533b78 100644 (file)
 
 #include <common/memory.h>
 
-#include <core/producer/frame_producer.h>
-#include <core/video_format.h>
+#include <core/fwd.h>
 
 #include <string>
 #include <vector>
 
-namespace caspar {
-
-namespace core {
-
-class frame_producer;
-class frame_factory;
-
-}
-
-namespace html {
+namespace caspar { namespace html {
 
 spl::shared_ptr<core::frame_producer> create_producer(
                const spl::shared_ptr<core::frame_factory>& frame_factory,
index 789a5882066c749a20f6270f0dc96784caedde1c..ea8bd23dd557812ea3865012790f7d135d3b6598 100644 (file)
 
 #include <common/memory.h>
 
+#include <core/fwd.h>
+
 #include <boost/property_tree/ptree_fwd.hpp>
 
 #include <string>
 
-namespace caspar { 
-
-namespace core {
-       class frame_consumer;
-       struct interaction_sink;
-}
-        
-namespace newtek {
+namespace caspar { namespace newtek {
 
 spl::shared_ptr<core::frame_consumer> create_ivga_consumer(const std::vector<std::wstring>& params, core::interaction_sink*);
 spl::shared_ptr<core::frame_consumer> create_preconfigured_ivga_consumer(const boost::property_tree::wptree& ptree, core::interaction_sink*);
index a894da414b359867a9fe4e51503ca19a61f7b740..c486b24cfc1fa3d8c19548eca263c18263491a59 100644 (file)
 
 #include <common/memory.h>
 
-#include <core/video_format.h>
+#include <core/fwd.h>
 
 #include <vector>
 
 #include <boost/property_tree/ptree_fwd.hpp>
 
-namespace caspar { 
-
-namespace core {
-       class frame_consumer;
-       struct interaction_sink;
-}      
-
-namespace oal {
+namespace caspar { namespace oal {
        
 spl::shared_ptr<core::frame_consumer> create_consumer(
                const std::vector<std::wstring>& params, core::interaction_sink*);
index bdbc35722a40b07a946db1497e756b41e2e6617a..f3a00291637de849aedaaad1195672edd0d9a2c2 100644 (file)
 #pragma once
 
 #include <common/memory.h>
-#include <common/forward.h>
-#include <common/reactive.h>
 
-FORWARD2(caspar, core, class video_channel);
-FORWARD2(caspar, core, class frame_producer);
+#include <core/fwd.h>
 
 namespace caspar { namespace reroute {
        
index fdbc41148664046d6520107ccd16686e4d972ed8..c443a79befae5daf5199197b1e8fdc6b58079c00 100644 (file)
 
 #include <common/memory.h>
 
+#include <core/fwd.h>
+
 #include <vector>
 #include <boost/property_tree/ptree.hpp>
 
-namespace caspar { 
-       
-namespace core {
-       class frame_consumer;
-       struct interaction_sink;
-}
-
-namespace screen {
-
+namespace caspar { namespace screen {
 
 spl::shared_ptr<core::frame_consumer> create_consumer(
                const std::vector<std::wstring>& params,
index 99e5b096f2ec6a6547432dd46d0792c4776f7003..a67010a33bf12888e00a9dff979e47fc461df7de 100644 (file)
@@ -25,6 +25,7 @@
 #include <common/future_fwd.h>
 
 #include <core/monitor/monitor.h>
+#include <core/fwd.h>
 
 #include <boost/noncopyable.hpp>
 
 
 namespace caspar {
 
-namespace core {
-       class video_channel;
-       class thumbnail_generator;
-       struct media_info_repository;
-       class system_info_provider_repository;
-       class cg_producer_registry;
-}
-
 class server final : public boost::noncopyable
 {
 public: