]> git.sesse.net Git - casparcg/blobdiff - core/consumer/frame_consumer.h
2.1.0: Refactoring.
[casparcg] / core / consumer / frame_consumer.h
index e199abba757aeaf3ca1c08735bdc3161e53d2777..be4215349d95d4f9ba24e00080f87cec9dff9527 100644 (file)
@@ -1,22 +1,24 @@
 /*\r
-* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
 *\r
-*  This file is part of CasparCG.\r
+* This file is part of CasparCG (www.casparcg.com).\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
+* 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
+* 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
+* Author: Robert Nagy, ronag89@gmail.com\r
 */\r
+\r
 #pragma once\r
 \r
 #include <common/memory/safe_ptr.h>\r
 \r
 namespace caspar { namespace core {\r
        \r
-class read_frame;\r
-struct video_format_desc;\r
-\r
 struct frame_consumer : boost::noncopyable\r
 {\r
+       frame_consumer(){}\r
        virtual ~frame_consumer() {}\r
        \r
-       virtual bool send(const safe_ptr<read_frame>& frame) = 0;\r
-       virtual void initialize(const video_format_desc& format_desc, int channel_index) = 0;\r
+       virtual bool send(const safe_ptr<const struct data_frame>& frame) = 0;\r
+       virtual void initialize(const struct video_format_desc& format_desc, int channel_index) = 0;\r
        virtual std::wstring print() const = 0;\r
        virtual boost::property_tree::wptree info() const = 0;\r
        virtual bool has_synchronization_clock() const {return true;}\r
-       virtual size_t buffer_depth() const = 0;\r
+       virtual int buffer_depth() const = 0;\r
        virtual int index() const = 0;\r
 \r
        static const safe_ptr<frame_consumer>& empty();\r
 };\r
 \r
-safe_ptr<frame_consumer> create_consumer_cadence_guard(const safe_ptr<frame_consumer>& consumer);\r
-\r
-typedef std::function<safe_ptr<core::frame_consumer>(const std::vector<std::wstring>&)> consumer_factory_t;\r
+typedef std::function<safe_ptr<frame_consumer>(const std::vector<std::wstring>&)> consumer_factory_t;\r
 \r
 void register_consumer_factory(const consumer_factory_t& factory);\r
-safe_ptr<core::frame_consumer> create_consumer(const std::vector<std::wstring>& params);\r
+safe_ptr<frame_consumer> create_consumer(const std::vector<std::wstring>& params);\r
 \r
 }}
\ No newline at end of file