\r
#include "frame_producer.h"\r
\r
+#include "../monitor/monitor.h"\r
+\r
#include <common/forward.h>\r
-#include <common/memory/safe_ptr.h>\r
+#include <common/future_fwd.h>\r
+#include <common/memory.h>\r
\r
#include <boost/property_tree/ptree_fwd.hpp>\r
\r
#include <string>\r
\r
-FORWARD1(boost, template<typename T> class unique_future);\r
FORWARD1(boost, template<typename T> class optional);\r
\r
namespace caspar { namespace core {\r
\r
-class layer sealed\r
+class layer sealed : public monitor::observable\r
{\r
-public:\r
- layer(); // nothrow\r
layer(const layer&);\r
- layer(layer&& other); // nothrow\r
- layer& operator=(layer other); // nothrow\r
+ layer& operator=(const layer&);\r
+public:\r
+ // Static Members\r
+\r
+ // Constructors\r
+\r
+ explicit layer(int index = -1); \r
+ layer(layer&& other); \r
+\r
+ // Methods\r
\r
- void swap(layer& other); // nothrow \r
+ layer& operator=(layer&& other); \r
+\r
+ void swap(layer& other); \r
\r
- void load(safe_ptr<struct 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
+ void load(spl::shared_ptr<class frame_producer> producer, bool preview, const boost::optional<int32_t>& auto_play_delta = nullptr); \r
+ void play(); \r
+ void pause(); \r
+ void stop(); \r
+ \r
+ class draw_frame receive(const struct video_format_desc& format_desc); \r
+ \r
+ // monitor::observable\r
+\r
+ void subscribe(const monitor::observable::observer_ptr& o) override;\r
+ void unsubscribe(const monitor::observable::observer_ptr& o) override;\r
+\r
+ // Properties\r
\r
- safe_ptr<struct frame_producer> foreground() const; // nothrow\r
- safe_ptr<struct frame_producer> background() const; // nothrow\r
+ spl::shared_ptr<class frame_producer> foreground() const; \r
+ spl::shared_ptr<class frame_producer> background() const; \r
\r
- safe_ptr<class draw_frame> receive(frame_producer::flags flags); // nothrow\r
+ boost::property_tree::wptree info() const;\r
\r
- boost::property_tree::wptree info() const;\r
private:\r
struct impl;\r
- safe_ptr<impl> impl_;\r
+ spl::shared_ptr<impl> impl_;\r
};\r
\r
}}
\ No newline at end of file