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
14 #include <boost/signals2.hpp>
\r
16 #include <tbb/cache_aligned_allocator.h>
\r
21 FORWARD1(boost, template<typename> class shared_future);
\r
23 namespace caspar { namespace core {
\r
25 typedef std::vector<int32_t, tbb::cache_aligned_allocator<int32_t>> audio_buffer;
\r
27 class mutable_frame sealed
\r
29 mutable_frame(const mutable_frame&);
\r
30 mutable_frame& operator=(const mutable_frame&);
\r
37 explicit mutable_frame(std::vector<array<std::uint8_t>> image_buffers,
\r
38 audio_buffer audio_buffer,
\r
40 const struct pixel_format_desc& desc,
\r
42 core::field_mode field_mode);
\r
47 mutable_frame(mutable_frame&& other);
\r
48 mutable_frame& operator=(mutable_frame&& other);
\r
50 void swap(mutable_frame& other);
\r
54 const struct pixel_format_desc& pixel_format_desc() const;
\r
56 const array<std::uint8_t>& image_data(std::size_t index = 0) const;
\r
57 const core::audio_buffer& audio_data() const;
\r
59 array<std::uint8_t>& image_data(std::size_t index = 0);
\r
60 core::audio_buffer& audio_data();
\r
62 double frame_rate() const;
\r
63 core::field_mode field_mode() const;
\r
65 std::size_t width() const;
\r
66 std::size_t height() const;
\r
68 const void* stream_tag() const;
\r
69 const void* data_tag() const;
\r
73 spl::unique_ptr<impl> impl_;
\r
76 class const_frame sealed
\r
82 static const const_frame& empty();
\r
86 explicit const_frame(const void* tag = nullptr);
\r
87 explicit const_frame(boost::shared_future<array<const std::uint8_t>> image,
\r
88 audio_buffer audio_buffer,
\r
90 const struct pixel_format_desc& desc,
\r
92 core::field_mode field_mode);
\r
93 const_frame(mutable_frame&& other);
\r
98 const_frame(const_frame&& other);
\r
99 const_frame& operator=(const_frame&& other);
\r
100 const_frame(const const_frame&);
\r
101 const_frame& operator=(const const_frame& other);
\r
105 boost::signals2::signal<void()> on_released;
\r
107 const struct pixel_format_desc& pixel_format_desc() const;
\r
109 array<const std::uint8_t> image_data(int index = 0) const;
\r
110 const core::audio_buffer& audio_data() const;
\r
112 double frame_rate() const;
\r
113 core::field_mode field_mode() const;
\r
115 std::size_t width() const;
\r
116 std::size_t height() const;
\r
117 std::size_t size() const;
\r
119 const void* stream_tag() const;
\r
120 const void* data_tag() const;
\r
122 bool operator==(const const_frame& other);
\r
123 bool operator!=(const const_frame& other);
\r
124 bool operator<(const const_frame& other);
\r
125 bool operator>(const const_frame& other);
\r
129 spl::shared_ptr<impl> impl_;
\r