3 #undef BOOST_PARAMETER_MAX_ARITY
4 #define BOOST_PARAMETER_MAX_ARITY 7
8 #include <common/memory.h>
9 #include <common/forward.h>
10 #include <common/array.h>
11 #include <common/future_fwd.h>
12 #include <common/cache_aligned_vector.h>
17 FORWARD1(boost, template<typename> class shared_future);
19 namespace caspar { namespace core {
21 typedef cache_aligned_vector<int32_t> audio_buffer;
24 class mutable_frame final
26 mutable_frame(const mutable_frame&);
27 mutable_frame& operator=(const mutable_frame&);
34 explicit mutable_frame(std::vector<array<std::uint8_t>> image_buffers,
35 audio_buffer audio_buffer,
37 const pixel_format_desc& desc);
42 mutable_frame(mutable_frame&& other);
43 mutable_frame& operator=(mutable_frame&& other);
45 void swap(mutable_frame& other);
49 const core::pixel_format_desc& pixel_format_desc() const;
51 const array<std::uint8_t>& image_data(std::size_t index = 0) const;
52 const core::audio_buffer& audio_data() const;
54 array<std::uint8_t>& image_data(std::size_t index = 0);
55 core::audio_buffer& audio_data();
57 std::size_t width() const;
58 std::size_t height() const;
60 const void* stream_tag() const;
61 const void* data_tag() const;
63 const core::frame_geometry& geometry() const;
64 void set_geometry(const frame_geometry& g);
68 spl::unique_ptr<impl> impl_;
71 class const_frame final
77 static const const_frame& empty();
81 explicit const_frame(const void* tag = nullptr);
82 explicit const_frame(std::shared_future<array<const std::uint8_t>> image,
83 audio_buffer audio_buffer,
85 const pixel_format_desc& desc);
86 const_frame(mutable_frame&& other);
91 const_frame(const_frame&& other);
92 const_frame& operator=(const_frame&& other);
93 const_frame(const const_frame&);
94 const_frame& operator=(const const_frame& other);
98 const core::pixel_format_desc& pixel_format_desc() const;
100 array<const std::uint8_t> image_data(int index = 0) const;
101 const core::audio_buffer& audio_data() const;
103 std::size_t width() const;
104 std::size_t height() const;
105 std::size_t size() const;
107 const void* stream_tag() const;
108 const void* data_tag() const;
110 const core::frame_geometry& geometry() const;
111 void set_geometry(const frame_geometry& g);
113 bool operator==(const const_frame& other);
114 bool operator!=(const const_frame& other);
115 bool operator<(const const_frame& other);
116 bool operator>(const const_frame& other);
120 spl::shared_ptr<impl> impl_;