]> git.sesse.net Git - casparcg/blobdiff - core/frame/frame_factory.h
[image_producer] refuse too large images nicely instead of letting OpenGL tell us...
[casparcg] / core / frame / frame_factory.h
index 3c571f777f37752af979e00014b61db87f660b88..4f9d1c8d80e250efc85b2c6d5c07d87c7921628d 100644 (file)
@@ -1,21 +1,55 @@
-#pragma once\r
-\r
-#include "gpu_frame.h"\r
-#include "frame_format.h"\r
-\r
-#include <memory>\r
-\r
-namespace caspar { \r
-\r
-struct frame_factory\r
-{\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
-\r
-typedef std::shared_ptr<frame_factory> frame_factory_ptr;\r
-\r
-}
\ No newline at end of file
+/*
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
+*
+* This file is part of CasparCG (www.casparcg.com).
+*
+* CasparCG is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* CasparCG is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
+*
+* Author: Robert Nagy, ronag89@gmail.com
+*/
+
+#pragma once
+
+#include "frame.h"
+#include "../fwd.h"
+
+#include <common/memory.h>
+
+namespace caspar { namespace core {
+                       
+class frame_factory : boost::noncopyable
+{
+       frame_factory(const frame_factory&);
+       frame_factory& operator=(const frame_factory&);
+public:
+       // Static Members
+
+       // Constructors
+
+       frame_factory(){}
+       virtual ~frame_factory(){}
+
+       // Methods
+
+       virtual mutable_frame create_frame(
+                       const void* video_stream_tag,
+                       const pixel_format_desc& desc,
+                       const core::audio_channel_layout& channel_layout) = 0;
+
+       // Properties
+
+       virtual int get_max_frame_size() = 0;
+};
+
+}}
\ No newline at end of file