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