]> git.sesse.net Git - casparcg/blobdiff - core/frame/frame_factory.h
2.1.0: Restructured "frame" folder.
[casparcg] / core / frame / frame_factory.h
index ee0c55bdf62d569e887976a73a68282d68e6479c..40f501d4a795167f8d81aedb7e5aa0069e7cec23 100644 (file)
@@ -1,22 +1,40 @@
+/*\r
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
+*\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
+*\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 "gpu_frame.h"\r
-#include "frame_format.h"\r
+#include <common/memory/safe_ptr.h>\r
 \r
-#include <memory>\r
+#include <core/video_format.h>\r
 \r
-namespace caspar { namespace core { \r
+#include <boost/noncopyable.hpp>\r
 \r
-struct frame_factory\r
+namespace caspar { namespace core {\r
+                       \r
+struct frame_factory : boost::noncopyable\r
 {\r
-       virtual ~frame_factory(){}\r
-       virtual gpu_frame_ptr create_frame(size_t width, size_t height) = 0;\r
-       gpu_frame_ptr create_frame(const frame_format_desc format_desc)\r
-       {\r
-               return create_frame(format_desc.width, format_desc.height);\r
-       }\r
-};\r
+       frame_factory(){}\r
 \r
-typedef std::shared_ptr<frame_factory> frame_factory_ptr;\r
+       virtual safe_ptr<class write_frame> create_frame(const void* video_stream_tag, const struct pixel_format_desc& desc, field_mode mode = field_mode::progressive) = 0;            \r
+       virtual struct video_format_desc get_video_format_desc() const = 0; // nothrow\r
+};\r
 \r
 }}
\ No newline at end of file