3 #include <common/memory/safe_ptr.h>
\r
5 #include <boost/noncopyable.hpp>
\r
7 #include <tbb/atomic.h>
\r
9 namespace caspar { namespace core {
\r
11 class frame_producer;
\r
14 class layer : boost::noncopyable
\r
18 layer(layer&& other); // nothrow
\r
19 ~layer(); // nothrow
\r
20 layer& operator=(layer&& other); // nothrow
\r
22 //NOTE: swap is thread-safe on "other", NOT on "this".
\r
23 void swap(layer& other); // nothrow
\r
25 void load(const safe_ptr<frame_producer>& producer, bool play_on_load = false); // nothrow
\r
26 void preview(const safe_ptr<frame_producer>& producer); // nothrow
\r
27 void play(); // nothrow
\r
28 void pause(); // nothrow
\r
29 void stop(); // nothrow
\r
30 void clear(); // nothrow
\r
32 safe_ptr<frame_producer> foreground() const; // nothrow
\r
33 safe_ptr<frame_producer> background() const; // nothrow
\r
35 safe_ptr<draw_frame> receive(); // nothrow
\r
37 struct implementation;
\r
38 tbb::atomic<implementation*> impl_;
\r