]> 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 897a21706aa578fd0ac7da2018d683246bcc8271..4a1b3b8d3d268a34318d681c5ac37fa63989715c 100644 (file)
@@ -1,35 +1,77 @@
+/*\r
+* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
+*\r
+*  This file is part of CasparCG.\r
+*\r
+*    CasparCG is free software: you can redistribute it and/or modify\r
+*    it under the terms of the GNU General Public License as published by\r
+*    the Free Software Foundation, either version 3 of the License, or\r
+*    (at your option) any later version.\r
+*\r
+*    CasparCG is distributed in the hope that it will be useful,\r
+*    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+*    GNU General Public License for more details.\r
+\r
+*    You should have received a copy of the GNU General Public License\r
+*    along with CasparCG.  If not, see <http://www.gnu.org/licenses/>.\r
+*\r
+*/\r
+\r
 #pragma once\r
 \r
 #include <common/memory/safe_ptr.h>\r
 \r
 #include <boost/noncopyable.hpp>\r
 \r
+#include <string>\r
+#include <utility>\r
+\r
 namespace caspar { namespace core {\r
 \r
-class frame_producer;\r
-class draw_frame;\r
+struct frame_producer;\r
+class basic_frame;\r
+\r
+struct layer_status\r
+{\r
+       std::wstring    foreground;\r
+       std::wstring    background;\r
+       bool                    is_paused;\r
+       int64_t                 total_frames;\r
+       int64_t                 current_frame;\r
+};\r
 \r
 class layer : boost::noncopyable\r
 {\r
 public:\r
-       layer(int index = -1); // nothrow\r
+       layer(); // nothrow\r
        layer(layer&& other); // nothrow\r
        layer& operator=(layer&& other); // nothrow\r
+       layer(const layer&);\r
+       layer& operator=(const layer&);\r
+\r
+       void swap(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 load(const safe_ptr<frame_producer>& producer, bool preview, int auto_play_delta); // nothrow\r
        void play(); // nothrow\r
        void pause(); // nothrow\r
        void stop(); // nothrow\r
-       void clear(); // nothrow\r
+       void param(const std::wstring& param);\r
+\r
+       bool is_paused() const;\r
+       int64_t frame_number() const;\r
+\r
+       layer_status status() const;\r
+\r
+       bool empty() const;\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
+       safe_ptr<basic_frame> receive(); // nothrow\r
 private:\r
        struct implementation;\r
-       std::shared_ptr<implementation> impl_;\r
+       safe_ptr<implementation> impl_;\r
 };\r
 \r
 }}
\ No newline at end of file