X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=core%2Fproducer%2Flayer.h;h=4a1b3b8d3d268a34318d681c5ac37fa63989715c;hb=6158d8cd73c7c53c9b5d933d7527381cceaf493c;hp=dae8b399d3942d335f9bb94c74e714de81cb07ac;hpb=89f021676db05c7a87e550dacb1d4ee3039e4440;p=casparcg diff --git a/core/producer/layer.h b/core/producer/layer.h index dae8b399d..4a1b3b8d3 100644 --- a/core/producer/layer.h +++ b/core/producer/layer.h @@ -1,43 +1,77 @@ +/* +* 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 +#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 clear(); // 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