]> git.sesse.net Git - casparcg/blobdiff - modules/flash/producer/cg_producer.h
2.0. Updated namespaces.
[casparcg] / modules / flash / producer / cg_producer.h
index 2fb67db134aefa651157e07c64c77e2af838cfdd..e631a6475dbc92aff13249c108b0c30254702091 100644 (file)
@@ -1,23 +1,47 @@
+/*\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
 #pragma once\r
 \r
 #include <core/producer/frame_producer.h>\r
-#include <core/producer/frame_producer_device.h>\r
+#include <core/producer/stage.h>\r
 #include <core/video_format.h>\r
-#include <core/channel.h>\r
+#include <core/video_channel.h>\r
 \r
 #include <string>\r
 \r
-namespace caspar {\r
+namespace caspar { namespace flash {\r
                \r
 class cg_producer : public core::frame_producer\r
 {\r
 public:\r
        static const unsigned int DEFAULT_LAYER = 9999;\r
 \r
-       explicit cg_producer();\r
+       explicit cg_producer(const safe_ptr<core::frame_producer>& producer);\r
        cg_producer(cg_producer&& other);\r
        \r
-       void clear();\r
+       // frame_producer\r
+       virtual safe_ptr<core::basic_frame> receive(int);\r
+       virtual safe_ptr<core::basic_frame> last_frame() const;\r
+       virtual std::wstring print() const;\r
+\r
+       //cg_producer\r
        void add(int layer, const std::wstring& template_name,  bool play_on_load, const std::wstring& start_from_label = TEXT(""), const std::wstring& data = TEXT(""));\r
        void remove(int layer);\r
        void play(int layer);\r
@@ -25,18 +49,13 @@ public:
        void next(int layer);\r
        void update(int layer, const std::wstring& data);\r
        void invoke(int layer, const std::wstring& label);\r
-       \r
-       // frame_producer\r
-       virtual safe_ptr<core::basic_frame> receive();\r
-       virtual void set_frame_factory(const safe_ptr<core::frame_factory>& frame_factory);\r
-       virtual std::wstring print() const;\r
 \r
 private:\r
        struct implementation;\r
        std::shared_ptr<implementation> impl_;\r
 };\r
-safe_ptr<cg_producer> get_default_cg_producer(const safe_ptr<core::channel>& channel, int layer_index = cg_producer::DEFAULT_LAYER);\r
+safe_ptr<cg_producer> get_default_cg_producer(const safe_ptr<core::video_channel>& video_channel, int layer_index = cg_producer::DEFAULT_LAYER);\r
 \r
-safe_ptr<core::frame_producer> create_ct_producer(const std::vector<std::wstring>& params);\r
+safe_ptr<core::frame_producer> create_ct_producer(const safe_ptr<core::frame_factory> frame_factory, const std::vector<std::wstring>& params);\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file