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_uv(double left, double top, double right, double bottom);
\r
33 std::array<double, 4> get_uv() const;
\r
35 void set_mode(video_mode::type mode);
\r
36 video_mode::type get_mode() const;
\r
38 image_transform& operator*=(const image_transform &other);
\r
39 const image_transform operator*(const image_transform &other) const;
\r
43 std::array<double, 2> pos_;
\r
44 std::array<double, 4> uv_;
\r
45 video_mode::type mode_;
\r
48 class image_mixer : boost::noncopyable
\r
51 image_mixer(const video_format_desc& format_desc);
\r
53 void begin(const image_transform& transform);
\r
54 void process(const pixel_format_desc& desc, std::vector<safe_ptr<host_buffer>>& buffers);
\r
57 boost::unique_future<safe_ptr<const host_buffer>> begin_pass();
\r
60 std::vector<safe_ptr<host_buffer>> create_buffers(const pixel_format_desc& format);
\r
63 struct implementation;
\r
64 std::shared_ptr<implementation> impl_;
\r