+/*\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 "data_frame.h"\r
+\r
+#include <common/spl/memory.h>\r
\r
-#include <memory>\r
-#include <array>\r
+#include <core/video_format.h>\r
\r
-namespace caspar { namespace core { \r
- \r
-struct frame_factory\r
+namespace caspar { namespace core {\r
+ \r
+class frame_factory : boost::noncopyable\r
{\r
+ frame_factory(const frame_factory&);\r
+ frame_factory& operator=(const frame_factory&);\r
+public:\r
+ /// Static Members\r
+\r
+ //Constructors\r
+\r
+ frame_factory(){}\r
virtual ~frame_factory(){}\r
- virtual void release_frames(void* tag) = 0;\r
- virtual gpu_frame_ptr create_frame(size_t width, size_t height, void* tag) = 0;\r
- virtual gpu_frame_ptr create_frame(const planar_frame_dimension& data_size, void* tag) = 0;\r
- gpu_frame_ptr create_frame(const frame_format_desc format_desc, void* tag)\r
+\r
+ /// Methods\r
+\r
+ virtual spl::unique_ptr<class data_frame> create_frame(const void* video_stream_tag, const struct pixel_format_desc& desc, double frame_rate, core::field_mode field_mode) = 0; \r
+ spl::unique_ptr<class data_frame> create_frame(const void* video_stream_tag, const struct pixel_format_desc& desc)\r
{\r
- return create_frame(format_desc.width, format_desc.height, tag);\r
+ auto format_desc = video_format_desc();\r
+ return create_frame(video_stream_tag, desc, format_desc.fps, format_desc.field_mode);\r
}\r
-};\r
\r
-typedef std::shared_ptr<frame_factory> frame_factory_ptr;\r
+ /// Properties\r
+\r
+ virtual struct video_format_desc video_format_desc() const = 0; \r
+};\r
\r
}}
\ No newline at end of file