\r
FORWARD1(boost, template<typename> class shared_future);\r
FORWARD1(boost, template<typename> class iterator_range);\r
-FORWARD2(caspar, core, struct write_frame);\r
+FORWARD2(caspar, core, class write_frame);\r
FORWARD2(caspar, core, struct pixel_format_desc);\r
FORWARD2(caspar, core, struct video_format_desc);\r
-FORWARD2(caspar, core, struct data_Frame);\r
+FORWARD2(caspar, core, class data_frame);\r
FORWARD2(caspar, core, struct frame_transform);\r
\r
namespace caspar { namespace accelerator { namespace cpu {\r
#include <stdint.h>\r
#include <vector>\r
\r
-FORWARD2(caspar, core, struct frame_visitor);\r
+FORWARD2(caspar, core, class frame_visitor);\r
FORWARD2(caspar, core, struct pixel_format_desc);\r
\r
namespace caspar { namespace accelerator { namespace cpu {\r
#include <core/frame/frame_visitor.h>\r
\r
FORWARD1(boost, template<typename> class unique_future);\r
-FORWARD2(caspar, core, struct write_frame);\r
+FORWARD2(caspar, core, class write_frame);\r
FORWARD2(caspar, core, struct pixel_format_desc);\r
FORWARD2(caspar, core, struct video_format_desc);\r
-FORWARD2(caspar, core, struct data_Frame);\r
+FORWARD2(caspar, core, class data_frame);\r
FORWARD2(caspar, core, struct frame_transform);\r
\r
namespace caspar { namespace accelerator { namespace ogl {\r
#include <vector>\r
\r
FORWARD1(boost, template <typename> class iterator_range);\r
-FORWARD2(caspar, core, struct frame_visitor);\r
+FORWARD2(caspar, core, class frame_visitor);\r
FORWARD2(caspar, core, struct pixel_format_desc);\r
\r
namespace caspar { namespace accelerator { namespace ogl {\r
};\r
\r
template<typename I, typename O = I>\r
-struct subject : public observer<I>, public observable<O>\r
+class subject : public observer<I>, public observable<O>\r
{\r
+public:\r
typedef typename observable<O>::observer observer;\r
typedef typename observable<O>::observer_ptr observer_ptr;\r
\r
}); \r
}\r
\r
- virtual bool send(const spl::shared_ptr<const struct data_frame>& frame) override {return (*consumer_)->send(frame);}\r
+ virtual bool send(const spl::shared_ptr<const class data_frame>& frame) override {return (*consumer_)->send(frame);}\r
virtual void initialize(const struct video_format_desc& format_desc, int channel_index) override {return (*consumer_)->initialize(format_desc, channel_index);}\r
virtual std::wstring print() const override {return (*consumer_)->print();}\r
virtual boost::property_tree::wptree info() const override {return (*consumer_)->info();}\r
CASPAR_LOG(info) << str << L" Uninitialized.";\r
}\r
\r
- virtual bool send(const spl::shared_ptr<const struct data_frame>& frame) override {return consumer_->send(frame);}\r
+ virtual bool send(const spl::shared_ptr<const class data_frame>& frame) override {return consumer_->send(frame);}\r
virtual void initialize(const struct video_format_desc& format_desc, int channel_index) override {return consumer_->initialize(format_desc, channel_index);}\r
virtual std::wstring print() const override {return consumer_->print();}\r
virtual boost::property_tree::wptree info() const override {return consumer_->info();}\r
{\r
}\r
\r
- virtual bool send(const spl::shared_ptr<const struct data_frame>& frame) \r
+ virtual bool send(const spl::shared_ptr<const class data_frame>& frame) \r
{\r
try\r
{\r
\r
const spl::shared_ptr<frame_consumer>& frame_consumer::empty()\r
{\r
- struct empty_frame_consumer : public frame_consumer\r
+ class empty_frame_consumer : public frame_consumer\r
{\r
+ public:\r
virtual bool send(const spl::shared_ptr<const data_frame>&) override {return false;}\r
virtual void initialize(const video_format_desc&, int) override{}\r
virtual std::wstring print() const override {return L"empty";}\r
\r
namespace caspar { namespace core {\r
\r
-struct frame_consumer : boost::noncopyable\r
+class frame_consumer : boost::noncopyable\r
{\r
+public:\r
frame_consumer(){}\r
virtual ~frame_consumer() {}\r
\r
- virtual bool send(const spl::shared_ptr<const struct data_frame>& frame) = 0;\r
+ virtual bool send(const spl::shared_ptr<const class data_frame>& frame) = 0;\r
virtual void initialize(const struct video_format_desc& format_desc, int channel_index) = 0;\r
virtual std::wstring print() const = 0;\r
virtual boost::property_tree::wptree info() const = 0;\r
\r
// output\r
\r
- void operator()(spl::shared_ptr<const struct data_frame> frame, const struct video_format_desc& format_desc);\r
+ void operator()(spl::shared_ptr<const class data_frame> frame, const struct video_format_desc& format_desc);\r
\r
- void add(const spl::shared_ptr<struct frame_consumer>& consumer);\r
- void add(int index, const spl::shared_ptr<struct frame_consumer>& consumer);\r
- void remove(const spl::shared_ptr<struct frame_consumer>& consumer);\r
+ void add(const spl::shared_ptr<class frame_consumer>& consumer);\r
+ void add(int index, const spl::shared_ptr<class frame_consumer>& consumer);\r
+ void remove(const spl::shared_ptr<class frame_consumer>& consumer);\r
void remove(int index);\r
\r
boost::unique_future<boost::property_tree::wptree> info() const;\r
\r
spl::shared_ptr<data_frame> data_frame::empty()\r
{\r
- struct empty_frame : public data_frame\r
+ class empty_frame : public data_frame\r
{\r
+ public:\r
empty_frame(){}\r
virtual const struct pixel_format_desc& get_pixel_format_desc() const override\r
{\r
\r
typedef std::vector<int32_t, tbb::cache_aligned_allocator<int32_t>> audio_buffer;\r
\r
-struct data_frame\r
+class data_frame\r
{\r
+public:\r
data_frame(){}\r
virtual ~data_frame(){}\r
\r
\r
namespace caspar { namespace core {\r
\r
-struct frame_factory : boost::noncopyable\r
+class frame_factory : boost::noncopyable\r
{\r
+public:\r
virtual ~frame_factory(){}\r
\r
- virtual spl::shared_ptr<struct write_frame> create_frame(const void* video_stream_tag, const struct pixel_format_desc& desc) = 0; \r
+ virtual spl::shared_ptr<class write_frame> create_frame(const void* video_stream_tag, const struct pixel_format_desc& desc) = 0; \r
virtual struct video_format_desc video_format_desc() const = 0; // nothrow\r
};\r
\r
\r
namespace caspar { namespace core {\r
\r
-struct frame_visitor : boost::noncopyable\r
+class frame_visitor : boost::noncopyable\r
{\r
+public:\r
virtual ~frame_visitor(){}\r
virtual void push(const struct frame_transform& transform) = 0;\r
- virtual void visit(const struct data_frame& frame) = 0;\r
+ virtual void visit(const class data_frame& frame) = 0;\r
virtual void pop() = 0;\r
};\r
\r
\r
namespace caspar { namespace core {\r
\r
-struct write_frame : public draw_frame, public data_frame\r
+class write_frame : public draw_frame, public data_frame\r
{\r
};\r
\r
audio_mixer();\r
\r
virtual void push(const struct frame_transform& transform);\r
- virtual void visit(const struct data_frame& frame);\r
+ virtual void visit(const class data_frame& frame);\r
virtual void pop();\r
\r
audio_buffer operator()(const struct video_format_desc& format_desc);\r
#include <stdint.h>\r
\r
FORWARD1(boost, template<typename> class shared_future);\r
-FORWARD2(caspar, core, struct write_frame);\r
+FORWARD2(caspar, core, class write_frame);\r
FORWARD2(caspar, core, struct pixel_format_desc);\r
\r
namespace caspar { namespace core {\r
\r
-struct image_mixer : public frame_visitor\r
+class image_mixer : public frame_visitor\r
{\r
+public:\r
virtual ~image_mixer(){}\r
\r
virtual void push(const struct frame_transform& frame) = 0;\r
- virtual void visit(const struct data_frame& frame) = 0;\r
+ virtual void visit(const class data_frame& frame) = 0;\r
virtual void pop() = 0;\r
\r
virtual void begin_layer(blend_mode blend_mode) = 0;\r
\r
namespace caspar { namespace core {\r
\r
-struct mixed_frame : public data_frame\r
+class mixed_frame : public data_frame\r
{\r
mutable boost::shared_future<boost::iterator_range<const uint8_t*>> image_data_;\r
const audio_buffer audio_data_;\r
\r
spl::shared_ptr<const data_frame> operator()(std::map<int, spl::shared_ptr<draw_frame>> frames, const video_format_desc& format_desc)\r
{ \r
- return executor_.invoke([=]() mutable -> spl::shared_ptr<const struct data_frame>\r
+ return executor_.invoke([=]() mutable -> spl::shared_ptr<const class data_frame>\r
{ \r
try\r
{ \r
class mixer sealed : boost::noncopyable\r
{\r
public: \r
- explicit mixer(spl::shared_ptr<diagnostics::graph> graph, spl::unique_ptr<struct image_mixer> image_mixer);\r
+ explicit mixer(spl::shared_ptr<diagnostics::graph> graph, spl::unique_ptr<class image_mixer> image_mixer);\r
\r
- spl::shared_ptr<const struct data_frame> operator()(std::map<int, spl::shared_ptr<class draw_frame>> frames, const struct video_format_desc& format_desc);\r
+ spl::shared_ptr<const class data_frame> operator()(std::map<int, spl::shared_ptr<class draw_frame>> frames, const struct video_format_desc& format_desc);\r
\r
void set_blend_mode(int index, blend_mode value);\r
\r
boost::unique_future<boost::property_tree::wptree> info() const;\r
\r
- spl::shared_ptr<struct write_frame> create_frame(const void* tag, const struct pixel_format_desc& desc);\r
+ spl::shared_ptr<class write_frame> create_frame(const void* tag, const struct pixel_format_desc& desc);\r
private:\r
struct impl;\r
spl::shared_ptr<impl> impl_;\r
\r
namespace caspar { namespace core {\r
\r
-spl::shared_ptr<struct frame_producer> create_color_producer(const spl::shared_ptr<struct frame_factory>& frame_factory, const std::vector<std::wstring>& params);\r
-spl::shared_ptr<struct write_frame> create_color_frame(void* tag, const spl::shared_ptr<struct frame_factory>& frame_factory, const std::wstring& color);\r
+spl::shared_ptr<class frame_producer> create_color_producer(const spl::shared_ptr<class frame_factory>& frame_factory, const std::vector<std::wstring>& params);\r
+spl::shared_ptr<class write_frame> create_color_frame(void* tag, const spl::shared_ptr<class frame_factory>& frame_factory, const std::wstring& color);\r
\r
}}\r
\r
const spl::shared_ptr<frame_producer>& frame_producer::empty() // nothrow\r
{\r
-\r
-struct empty_frame_producer : public frame_producer\r
-{\r
- virtual spl::shared_ptr<draw_frame> receive(int){return draw_frame::empty();}\r
- virtual spl::shared_ptr<draw_frame> last_frame() const{return draw_frame::empty();}\r
- virtual void set_frame_factory(const spl::shared_ptr<frame_factory>&){}\r
- virtual uint32_t nb_frames() const {return 0;}\r
- virtual std::wstring print() const { return L"empty";}\r
- virtual void subscribe(const monitor::observable::observer_ptr& o){}\r
- virtual void unsubscribe(const monitor::observable::observer_ptr& o){} \r
- virtual std::wstring name() const {return L"empty";}\r
- \r
- virtual boost::property_tree::wptree info() const override\r
+ class empty_frame_producer : public frame_producer\r
{\r
- boost::property_tree::wptree info;\r
- info.add(L"type", L"empty-producer");\r
- return info;\r
- }\r
-};\r
+ public:\r
+ virtual spl::shared_ptr<draw_frame> receive(int){return draw_frame::empty();}\r
+ virtual spl::shared_ptr<draw_frame> last_frame() const{return draw_frame::empty();}\r
+ virtual void set_frame_factory(const spl::shared_ptr<frame_factory>&){}\r
+ virtual uint32_t nb_frames() const {return 0;}\r
+ virtual std::wstring print() const { return L"empty";}\r
+ virtual void subscribe(const monitor::observable::observer_ptr& o){}\r
+ virtual void unsubscribe(const monitor::observable::observer_ptr& o){} \r
+ virtual std::wstring name() const {return L"empty";}\r
+ \r
+ virtual boost::property_tree::wptree info() const override\r
+ {\r
+ boost::property_tree::wptree info;\r
+ info.add(L"type", L"empty-producer");\r
+ return info;\r
+ }\r
+ };\r
\r
static spl::shared_ptr<frame_producer> producer = spl::make_shared<empty_frame_producer>();\r
return producer;\r
\r
namespace caspar { namespace core {\r
\r
-struct frame_producer : public monitor::observable\r
+class frame_producer : public monitor::observable\r
, boost::noncopyable\r
{\r
+public:\r
struct flags_def\r
{\r
enum type\r
virtual void unsubscribe(const monitor::observable::observer_ptr& o) {}\r
};\r
\r
-typedef std::function<spl::shared_ptr<core::frame_producer>(const spl::shared_ptr<struct frame_factory>&, const std::vector<std::wstring>&)> producer_factory_t;\r
+typedef std::function<spl::shared_ptr<core::frame_producer>(const spl::shared_ptr<class frame_factory>&, const std::vector<std::wstring>&)> producer_factory_t;\r
void register_producer_factory(const producer_factory_t& factory); // Not thread-safe.\r
\r
spl::shared_ptr<core::frame_producer> create_producer(const spl::shared_ptr<frame_factory>&, const std::vector<std::wstring>& params);\r
\r
void swap(layer& other); // nothrow \r
\r
- void load(spl::shared_ptr<struct frame_producer> producer, const boost::optional<int32_t>& auto_play_delta = nullptr); // nothrow\r
+ void load(spl::shared_ptr<class frame_producer> producer, const boost::optional<int32_t>& auto_play_delta = nullptr); // nothrow\r
void play(); // nothrow\r
void pause(); // nothrow\r
void stop(); // nothrow\r
\r
- spl::shared_ptr<struct frame_producer> foreground() const; // nothrow\r
- spl::shared_ptr<struct frame_producer> background() const; // nothrow\r
+ spl::shared_ptr<class frame_producer> foreground() const; // nothrow\r
+ spl::shared_ptr<class frame_producer> background() const; // nothrow\r
\r
spl::shared_ptr<class draw_frame> receive(frame_producer::flags flags, const struct video_format_desc& format_desc); // nothrow\r
\r
\r
namespace caspar { namespace core { \r
\r
-struct separated_producer : public frame_producer\r
+class separated_producer : public frame_producer\r
{ \r
spl::shared_ptr<frame_producer> fill_producer_;\r
spl::shared_ptr<frame_producer> key_producer_;\r
spl::shared_ptr<draw_frame> key_;\r
spl::shared_ptr<draw_frame> last_frame_;\r
\r
+public:\r
explicit separated_producer(const spl::shared_ptr<frame_producer>& fill, const spl::shared_ptr<frame_producer>& key) \r
: fill_producer_(fill)\r
, key_producer_(key)\r
\r
namespace caspar { namespace core {\r
\r
-spl::shared_ptr<struct frame_producer> create_separated_producer(const spl::shared_ptr<struct frame_producer>& fill, const spl::shared_ptr<struct frame_producer>& key);\r
+spl::shared_ptr<class frame_producer> create_separated_producer(const spl::shared_ptr<class frame_producer>& fill, const spl::shared_ptr<class frame_producer>& key);\r
\r
}}
\ No newline at end of file
void clear_transforms(int index);\r
void clear_transforms();\r
\r
- void load(int index, const spl::shared_ptr<struct frame_producer>& producer, const boost::optional<int32_t>& auto_play_delta = nullptr);\r
+ void load(int index, const spl::shared_ptr<class frame_producer>& producer, const boost::optional<int32_t>& auto_play_delta = nullptr);\r
void pause(int index);\r
void play(int index);\r
void stop(int index);\r
void swap_layer(int index, int other_index);\r
void swap_layer(int index, int other_index, stage& other);\r
\r
- boost::unique_future<spl::shared_ptr<struct frame_producer>> foreground(int index);\r
- boost::unique_future<spl::shared_ptr<struct frame_producer>> background(int index);\r
+ boost::unique_future<spl::shared_ptr<class frame_producer>> foreground(int index);\r
+ boost::unique_future<spl::shared_ptr<class frame_producer>> background(int index);\r
\r
boost::unique_future<boost::property_tree::wptree> info() const;\r
boost::unique_future<boost::property_tree::wptree> info(int index) const;\r
\r
namespace caspar { namespace core { \r
\r
-struct transition_producer : public frame_producer\r
+class transition_producer : public frame_producer\r
{ \r
monitor::basic_subject event_subject_;\r
const field_mode mode_;\r
spl::shared_ptr<frame_producer> dest_producer_;\r
spl::shared_ptr<frame_producer> source_producer_;\r
\r
+public:\r
explicit transition_producer(const field_mode& mode, const spl::shared_ptr<frame_producer>& dest, const transition_info& info) \r
: mode_(mode)\r
, current_frame_(0)\r
tweener tweener;\r
};\r
\r
-spl::shared_ptr<struct frame_producer> create_transition_producer(const field_mode& mode, const spl::shared_ptr<struct frame_producer>& destination, const transition_info& info);\r
+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);\r
\r
}}
\ No newline at end of file
FORWARD2(caspar, core, class stage);\r
FORWARD2(caspar, core, class mixer);\r
FORWARD2(caspar, core, class output);\r
-FORWARD2(caspar, core, struct image_mixer);\r
+FORWARD2(caspar, core, class image_mixer);\r
FORWARD2(caspar, core, struct video_format_desc);\r
-FORWARD2(caspar, core, struct frame_factory);\r
+FORWARD2(caspar, core, class frame_factory);\r
\r
namespace caspar { namespace core {\r
\r
-typedef reactive::observable<spl::shared_ptr<const struct data_frame>> frame_observable;\r
+typedef reactive::observable<spl::shared_ptr<const class data_frame>> frame_observable;\r
\r
class video_channel sealed : public frame_observable\r
, public monitor::observable\r
\r
boost::property_tree::wptree info() const;\r
\r
- // observable<spl::shared_ptr<const struct data_frame>>\r
+ // observable<spl::shared_ptr<const class data_frame>>\r
\r
virtual void subscribe(const frame_observable::observer_ptr& o) override;\r
virtual void unsubscribe(const frame_observable::observer_ptr& o) override;\r
namespace caspar { \r
\r
namespace core {\r
- struct frame_consumer;\r
+ class frame_consumer;\r
}\r
\r
namespace bluefish {\r
namespace caspar {\r
\r
namespace core {\r
- struct frame_consumer;\r
+ class frame_consumer;\r
}\r
\r
namespace decklink {\r
namespace caspar { \r
\r
namespace core {\r
- struct frame_consumer;\r
+ class frame_consumer;\r
}\r
\r
namespace ffmpeg {\r
\r
namespace core {\r
\r
-struct frame_producer;\r
-struct frame_factory;\r
+class frame_producer;\r
+class frame_factory;\r
\r
}\r
\r
struct AVFrame;\r
\r
FORWARD2(caspar, core, struct pixel_format_desc);\r
-FORWARD2(caspar, core, struct write_frame);\r
-FORWARD2(caspar, core, struct frame_factory);\r
+FORWARD2(caspar, core, class write_frame);\r
+FORWARD2(caspar, core, class frame_factory);\r
FORWARD2(caspar, core, class draw_frame);\r
\r
namespace caspar { namespace ffmpeg {\r
struct AVCodecContext;\r
\r
FORWARD2(caspar, core, struct pixel_format_desc);\r
-FORWARD2(caspar, core, struct write_frame);\r
-FORWARD2(caspar, core, struct data_frame);\r
-FORWARD2(caspar, core, struct frame_factory);\r
+FORWARD2(caspar, core, class write_frame);\r
+FORWARD2(caspar, core, class data_frame);\r
+FORWARD2(caspar, core, class frame_factory);\r
\r
namespace caspar { namespace ffmpeg {\r
\r
struct AVFrame;\r
struct AVPacket;\r
\r
-FORWARD2(caspar, core, struct write_frame);\r
-FORWARD2(caspar, core, struct frame_factory);\r
+FORWARD2(caspar, core, class write_frame);\r
+FORWARD2(caspar, core, class frame_factory);\r
\r
namespace caspar { namespace ffmpeg {\r
\r
namespace caspar { \r
\r
namespace core {\r
- struct frame_consumer;\r
+ class frame_consumer;\r
}\r
\r
namespace image {\r
namespace caspar { \r
\r
namespace core {\r
- struct frame_consumer;\r
+ class frame_consumer;\r
} \r
\r
namespace oal {\r
namespace caspar { \r
\r
namespace core {\r
- struct frame_consumer;\r
+ class frame_consumer;\r
}\r
\r
namespace screen {\r