]> git.sesse.net Git - casparcg/blobdiff - core/producer/layer.h
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
[casparcg] / core / producer / layer.h
index 0837044820b9339d36565af409a89a5564bbf4af..a31aaba8bc33ae99424880eb6457e382888efc8f 100644 (file)
@@ -1,43 +1,37 @@
 #pragma once\r
 \r
-#include "../producer/frame_producer.h"\r
+#include <common/memory/safe_ptr.h>\r
+\r
+#include <boost/noncopyable.hpp>\r
 \r
 namespace caspar { namespace core {\r
 \r
-struct load_option\r
-{\r
-       enum type\r
-       {\r
-               none,\r
-               preview,\r
-               auto_play\r
-       };\r
-};\r
+class frame_producer;\r
+class draw_frame;\r
 \r
-class layer\r
+class layer : boost::noncopyable\r
 {\r
-       layer(const layer& other);\r
-       layer& operator=(const layer& other);\r
 public:\r
-       layer();\r
-       layer(layer&& other);\r
-       layer& operator=(layer&& other);\r
-\r
-       void load(const frame_producer_ptr& producer, load_option::type option = load_option::none);    \r
-       void play();\r
-       void pause();\r
-       void stop();\r
-       void clear();\r
+       layer(int index = -1); // nothrow\r
+       layer(layer&& other); // nothrow\r
+       layer& operator=(layer&& other); // nothrow\r
+       \r
+       void load(const safe_ptr<frame_producer>& producer, bool play_on_load = false); // nothrow\r
+       void preview(const safe_ptr<frame_producer>& producer); // nothrow\r
+       void play(); // nothrow\r
+       void pause(); // nothrow\r
+       void stop(); // nothrow\r
+       void clear(); // nothrow\r
+\r
+       bool empty() const; // nothrow\r
                \r
-       frame_producer_ptr foreground() const;\r
-       frame_producer_ptr background() const;\r
+       safe_ptr<frame_producer> foreground() const; // nothrow\r
+       safe_ptr<frame_producer> background() const; // nothrow\r
 \r
-       frame_ptr render_frame();\r
+       safe_ptr<draw_frame> receive(); // nothrow\r
 private:\r
        struct implementation;\r
        std::shared_ptr<implementation> impl_;\r
 };\r
-typedef std::shared_ptr<layer> layer_ptr;\r
-typedef std::unique_ptr<layer> layer_uptr;\r
 \r
 }}
\ No newline at end of file