3 #undef BOOST_PARAMETER_MAX_ARITY
\r
4 #define BOOST_PARAMETER_MAX_ARITY 7
\r
6 #include "../video_format.h"
\r
8 #include <common/memory.h>
\r
9 #include <common/forward.h>
\r
10 #include <common/array.h>
\r
12 #include <boost/range.hpp>
\r
13 #include <boost/any.hpp>
\r
15 #include <tbb/cache_aligned_allocator.h>
\r
20 FORWARD1(boost, template<typename> class shared_future);
\r
22 namespace caspar { namespace core {
\r
24 typedef std::vector<int32_t, tbb::cache_aligned_allocator<int32_t>> audio_buffer;
\r
26 class mutable_frame sealed
\r
28 mutable_frame(const mutable_frame&);
\r
29 mutable_frame& operator=(const mutable_frame&);
\r
36 explicit mutable_frame(std::vector<array<std::uint8_t>> image_buffers,
\r
37 audio_buffer audio_buffer,
\r
39 const struct pixel_format_desc& desc);
\r
44 mutable_frame(mutable_frame&& other);
\r
45 mutable_frame& operator=(mutable_frame&& other);
\r
47 void swap(mutable_frame& other);
\r
51 const struct pixel_format_desc& pixel_format_desc() const;
\r
53 const array<std::uint8_t>& image_data(std::size_t index = 0) const;
\r
54 const core::audio_buffer& audio_data() const;
\r
56 array<std::uint8_t>& image_data(std::size_t index = 0);
\r
57 core::audio_buffer& audio_data();
\r
59 std::size_t width() const;
\r
60 std::size_t height() const;
\r
62 const void* stream_tag() const;
\r
63 const void* data_tag() const;
\r
67 spl::unique_ptr<impl> impl_;
\r
70 class const_frame sealed
\r
76 static const const_frame& empty();
\r
80 explicit const_frame(const void* tag = nullptr);
\r
81 explicit const_frame(boost::shared_future<array<const std::uint8_t>> image,
\r
82 audio_buffer audio_buffer,
\r
84 const struct pixel_format_desc& desc);
\r
85 const_frame(mutable_frame&& other);
\r
90 const_frame(const_frame&& other);
\r
91 const_frame& operator=(const_frame&& other);
\r
92 const_frame(const const_frame&);
\r
93 const_frame& operator=(const const_frame& other);
\r
97 const struct pixel_format_desc& pixel_format_desc() const;
\r
99 array<const std::uint8_t> image_data(int index = 0) const;
\r
100 const core::audio_buffer& audio_data() const;
\r
102 std::size_t width() const;
\r
103 std::size_t height() const;
\r
104 std::size_t size() const;
\r
106 const void* stream_tag() const;
\r
107 const void* data_tag() const;
\r
109 bool operator==(const const_frame& other);
\r
110 bool operator!=(const const_frame& other);
\r
111 bool operator<(const const_frame& other);
\r
112 bool operator>(const const_frame& other);
\r
116 spl::shared_ptr<impl> impl_;
\r