X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=core%2Fproducer%2Flayer.h;h=e7991d1f310ad7b39c78fe473735a92bda6540c8;hb=5bad7c1c1348fe338b748cff8dbc448155d3ae85;hp=cf66e1ea38d83d040f142be136130410ad3ecfce;hpb=394d6e5ee7418c982bebde6e60531caebfb42527;p=casparcg diff --git a/core/producer/layer.h b/core/producer/layer.h index cf66e1ea3..e7991d1f3 100644 --- a/core/producer/layer.h +++ b/core/producer/layer.h @@ -1,42 +1,74 @@ +/* +* copyright (c) 2010 Sveriges Television AB +* +* This file is part of CasparCG. +* +* CasparCG is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* CasparCG is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. + +* You should have received a copy of the GNU General Public License +* along with CasparCG. If not, see . +* +*/ + #pragma once #include -#include #include -#include - -#include - namespace caspar { namespace core { -class frame_producer; -class draw_frame; +struct frame_producer; +class basic_frame; + +struct layer_status +{ + std::wstring foreground; + std::wstring background; + bool is_paused; + int64_t total_frames; + int64_t current_frame; +}; class layer : boost::noncopyable { public: - layer(int index = std::numeric_limits::min(), const printer& parent_printer = nullptr); // nothrow + layer(); // nothrow layer(layer&& other); // nothrow layer& operator=(layer&& other); // nothrow + layer(const layer&); + layer& operator=(const layer&); void swap(layer& other); // nothrow - void load(const safe_ptr& producer, bool play_on_load, bool preview); // nothrow + void load(const safe_ptr& producer, bool preview, int auto_play_delta); // nothrow void play(); // nothrow void pause(); // nothrow void stop(); // nothrow + void param(const std::wstring& param); + + bool is_paused() const; + int64_t frame_number() const; + + layer_status status() const; + + bool empty() const; safe_ptr foreground() const; // nothrow safe_ptr background() const; // nothrow - safe_ptr receive(); // nothrow - - std::wstring print() const; + safe_ptr receive(); // nothrow private: struct implementation; - std::shared_ptr impl_; + safe_ptr impl_; }; }} \ No newline at end of file