]> git.sesse.net Git - casparcg/blobdiff - core/producer/layer.h
2.0.0.2: Display flash version in main window.
[casparcg] / core / producer / layer.h
index 584ad574c30be87b834fb3bfcf80d0476ee73a1c..9e70ae583e79f451f7f9ccd9c0b39c4d3ffbd3c5 100644 (file)
@@ -1,43 +1,43 @@
 #pragma once\r
 \r
-#include "../producer/frame_producer.h"\r
+#include <common/memory/safe_ptr.h>\r
+#include <common/utility/printer.h>\r
 \r
 #include <boost/noncopyable.hpp>\r
 \r
+#include <tbb/atomic.h>\r
+\r
+#include <memory>\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 : boost::noncopyable\r
 {\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 = -101, const printer& parent_printer = nullptr); // nothrow\r
+       layer(layer&& other); // nothrow\r
+       layer& operator=(layer&& other); // nothrow\r
+\r
+       void swap(layer& other); // nothrow \r
                \r
-       frame_producer_ptr foreground() const;\r
-       frame_producer_ptr background() const;\r
+       void load(const safe_ptr<frame_producer>& producer, bool play_on_load, bool preview); // nothrow\r
+       void play(); // nothrow\r
+       void pause(); // nothrow\r
+       void stop(); // nothrow\r
+       void clear(); // nothrow\r
+\r
+       safe_ptr<frame_producer> foreground() const; // nothrow\r
+       safe_ptr<frame_producer> background() const; // nothrow\r
+\r
+       safe_ptr<draw_frame> receive(); // nothrow\r
 \r
-       producer_frame receive();\r
+       std::wstring print() const;\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