]> git.sesse.net Git - casparcg/blobdiff - core/mixer/image/image_kernel.h
2.0. ffmpeg_producer: Fixed integer overflow when looping.
[casparcg] / core / mixer / image / image_kernel.h
index 523319d51819b59b785e9b642fe8a4e0ed28914d..13827e734b4c1982c5bd1a99c378b348a55c2ed2 100644 (file)
@@ -1,23 +1,59 @@
+/*\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 "../../video_format.h"\r
-#include "../frame/pixel_format.h"\r
+#include "blend_modes.h"\r
+\r
+#include <common/memory/safe_ptr.h>\r
 \r
-#include <memory>\r
+#include <core/producer/frame/pixel_format.h>\r
+#include <core/producer/frame/frame_transform.h>\r
+\r
+#include <boost/noncopyable.hpp>\r
 \r
 namespace caspar { namespace core {\r
+       \r
+class device_buffer;\r
+class ogl_device;\r
 \r
-struct image_transform;\r
+struct draw_params\r
+{\r
+       pixel_format_desc                                               pix_desc;\r
+       std::vector<safe_ptr<device_buffer>>    textures;\r
+       frame_transform                                                 transform;\r
+       blend_mode::type                                                blend_mode;\r
+       std::shared_ptr<device_buffer>                  background;\r
+       std::shared_ptr<device_buffer>                  local_key;\r
+       std::shared_ptr<device_buffer>                  layer_key;\r
 \r
-class image_kernel\r
+       draw_params() : blend_mode(blend_mode::normal){}\r
+};\r
+\r
+class image_kernel : boost::noncopyable\r
 {\r
 public:\r
        image_kernel();\r
-       void apply(pixel_format::type pix_fmt, const image_transform& mode);\r
-\r
+       void draw(ogl_device& ogl, draw_params&& params);\r
 private:\r
        struct implementation;\r
-       std::shared_ptr<implementation> impl_;\r
+       safe_ptr<implementation> impl_;\r
 };\r
 \r
 }}
\ No newline at end of file