3 #include "../gpu/host_buffer.h"
\r
5 #include "../../video_format.h"
\r
7 #include <boost/tuple/tuple.hpp>
\r
8 #include <boost/thread/future.hpp>
\r
9 #include <boost/noncopyable.hpp>
\r
14 namespace caspar { namespace core {
\r
16 struct pixel_format_desc;
\r
18 class image_transform
\r
23 void set_opacity(double value);
\r
24 double get_opacity() const;
\r
26 void set_gain(double value);
\r
27 double get_gain() const;
\r
29 void set_position(double x, double y);
\r
30 std::array<double, 2> get_position() const;
\r
32 void set_size(double x, double ys);
\r
33 std::array<double, 2> get_size() const;
\r
35 void set_uv(double left, double top, double right, double bottom);
\r
36 std::array<double, 4> get_uv() const;
\r
38 void set_mode(video_mode::type mode);
\r
39 video_mode::type get_mode() const;
\r
41 image_transform& operator*=(const image_transform &other);
\r
42 const image_transform operator*(const image_transform &other) const;
\r
46 std::array<double, 2> pos_;
\r
47 std::array<double, 2> size_;
\r
48 std::array<double, 4> uv_;
\r
49 video_mode::type mode_;
\r
52 class image_mixer : boost::noncopyable
\r
55 image_mixer(const video_format_desc& format_desc);
\r
57 void begin(const image_transform& transform);
\r
58 void process(const pixel_format_desc& desc, std::vector<safe_ptr<host_buffer>>& buffers);
\r
61 boost::unique_future<safe_ptr<const host_buffer>> begin_pass();
\r
64 std::vector<safe_ptr<host_buffer>> create_buffers(const pixel_format_desc& format);
\r
67 struct implementation;
\r
68 std::shared_ptr<implementation> impl_;
\r