]> git.sesse.net Git - casparcg/blob - core/producer/layer.h
2.0.0.2: Moved safe_ptr from utility to memory folder.
[casparcg] / core / producer / layer.h
1 #pragma once\r
2 \r
3 #include <common/memory/safe_ptr.h>\r
4 \r
5 #include <boost/noncopyable.hpp>\r
6 \r
7 namespace caspar { namespace core {\r
8 \r
9 class frame_producer;\r
10 class draw_frame;\r
11 \r
12 class layer : boost::noncopyable\r
13 {\r
14 public:\r
15         layer(int index = -1); // nothrow\r
16         layer(layer&& other); // nothrow\r
17         layer& operator=(layer&& other); // nothrow\r
18         \r
19         void load(const safe_ptr<frame_producer>& producer, bool autoplay = false); // nothrow\r
20         void preview(const safe_ptr<frame_producer>& producer); // nothrow\r
21         void play(); // nothrow\r
22         void pause(); // nothrow\r
23         void stop(); // nothrow\r
24         void clear(); // nothrow\r
25 \r
26         bool empty() const; // nothrow\r
27                 \r
28         safe_ptr<frame_producer> foreground() const; // nothrow\r
29         safe_ptr<frame_producer> background() const; // nothrow\r
30 \r
31         safe_ptr<draw_frame> receive(); // nothrow\r
32 private:\r
33         struct implementation;\r
34         std::shared_ptr<implementation> impl_;\r
35 };\r
36 \r
37 }}