X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=core%2Fproducer%2Flayer.h;h=9e70ae583e79f451f7f9ccd9c0b39c4d3ffbd3c5;hb=8235f79e4987959f39780fe0356cba5f9de97d41;hp=6a021a97440a61612da64cd4d6b1ef5663415e5d;hpb=0d2a803ebd6889429f1a13982bc3222a4250e225;p=casparcg diff --git a/core/producer/layer.h b/core/producer/layer.h index 6a021a974..9e70ae583 100644 --- a/core/producer/layer.h +++ b/core/producer/layer.h @@ -1,45 +1,43 @@ #pragma once -#include "../producer/frame_producer.h" +#include +#include #include +#include + +#include + namespace caspar { namespace core { -struct load_option -{ - enum type - { - none, - preview, - auto_play - }; -}; +class frame_producer; +class draw_frame; class layer : boost::noncopyable { public: - layer(size_t index = -1); - layer(layer&& other); - layer& operator=(layer&& other); + layer(int index = -101, const printer& parent_printer = nullptr); // nothrow + layer(layer&& other); // nothrow + layer& operator=(layer&& other); // nothrow - void load(const safe_ptr& producer, load_option::type option = load_option::none); - void play(); - void pause(); - void stop(); - void clear(); - - bool empty() const; + void swap(layer& other); // nothrow - safe_ptr foreground() const; - safe_ptr background() const; + void load(const safe_ptr& producer, bool play_on_load, bool preview); // nothrow + void play(); // nothrow + void pause(); // nothrow + void stop(); // nothrow + void clear(); // nothrow + + safe_ptr foreground() const; // nothrow + safe_ptr background() const; // nothrow + + safe_ptr receive(); // nothrow - safe_ptr receive(); + std::wstring print() const; private: struct implementation; std::shared_ptr impl_; }; -typedef std::shared_ptr layer_ptr; -typedef std::unique_ptr layer_uptr; }} \ No newline at end of file