#undef BOOST_PARAMETER_MAX_ARITY
#define BOOST_PARAMETER_MAX_ARITY 7
-#include "../video_format.h"
+#include "../fwd.h"
#include <common/memory.h>
#include <common/forward.h>
#include <common/array.h>
-
-#include <boost/range.hpp>
-#include <boost/any.hpp>
-
-#include <tbb/cache_aligned_allocator.h>
+#include <common/future_fwd.h>
+#include <common/cache_aligned_vector.h>
+#include <common/timer.h>
#include <cstddef>
#include <cstdint>
FORWARD1(boost, template<typename> class shared_future);
namespace caspar { namespace core {
-
-typedef std::vector<int32_t, tbb::cache_aligned_allocator<int32_t>> audio_buffer;
+
+typedef caspar::array<const int32_t> audio_buffer;
+typedef cache_aligned_vector<int32_t> mutable_audio_buffer;
class frame_geometry;
-class mutable_frame sealed
+class mutable_frame final
{
mutable_frame(const mutable_frame&);
mutable_frame& operator=(const mutable_frame&);
-public:
+public:
// Static Members
// Constructors
- explicit mutable_frame(std::vector<array<std::uint8_t>> image_buffers,
- audio_buffer audio_buffer,
- const void* tag,
- const struct pixel_format_desc& desc);
+ explicit mutable_frame(std::vector<array<std::uint8_t>> image_buffers,
+ mutable_audio_buffer audio_data,
+ const void* tag,
+ const pixel_format_desc& desc,
+ const audio_channel_layout& channel_layout);
~mutable_frame();
// Methods
mutable_frame& operator=(mutable_frame&& other);
void swap(mutable_frame& other);
-
+
// Properties
-
- const struct pixel_format_desc& pixel_format_desc() const;
+
+ const core::pixel_format_desc& pixel_format_desc() const;
+ const core::audio_channel_layout& audio_channel_layout() const;
const array<std::uint8_t>& image_data(std::size_t index = 0) const;
- const core::audio_buffer& audio_data() const;
+ const core::mutable_audio_buffer& audio_data() const;
array<std::uint8_t>& image_data(std::size_t index = 0);
- core::audio_buffer& audio_data();
-
+ core::mutable_audio_buffer& audio_data();
+
std::size_t width() const;
std::size_t height() const;
-
+
const void* stream_tag() const;
- const void* data_tag() const;
const core::frame_geometry& geometry() const;
void set_geometry(const frame_geometry& g);
-
+
+ caspar::timer since_created() const;
+
private:
struct impl;
spl::unique_ptr<impl> impl_;
};
-class const_frame sealed
+class const_frame final
{
-public:
+ struct impl;
+public:
// Static Members
// Constructors
explicit const_frame(const void* tag = nullptr);
- explicit const_frame(boost::shared_future<array<const std::uint8_t>> image,
- audio_buffer audio_buffer,
- const void* tag,
- const struct pixel_format_desc& desc);
+ explicit const_frame(std::shared_future<array<const std::uint8_t>> image,
+ audio_buffer audio_data,
+ const void* tag,
+ const pixel_format_desc& desc,
+ const audio_channel_layout& channel_layout);
const_frame(mutable_frame&& other);
~const_frame();
const_frame(const_frame&& other);
const_frame& operator=(const_frame&& other);
const_frame(const const_frame&);
+ const_frame(const const_frame::impl&);
const_frame& operator=(const const_frame& other);
-
+
+ const_frame key_only() const;
+
// Properties
-
- const struct pixel_format_desc& pixel_format_desc() const;
+
+ const core::pixel_format_desc& pixel_format_desc() const;
+ const core::audio_channel_layout& audio_channel_layout() const;
array<const std::uint8_t> image_data(int index = 0) const;
const core::audio_buffer& audio_data() const;
-
+
std::size_t width() const;
std::size_t height() const;
std::size_t size() const;
-
+
const void* stream_tag() const;
- const void* data_tag() const;
const core::frame_geometry& geometry() const;
- void set_geometry(const frame_geometry& g);
+ const_frame with_geometry(const frame_geometry& g) const;
+ int64_t get_age_millis() const;
bool operator==(const const_frame& other);
bool operator!=(const const_frame& other);
bool operator<(const const_frame& other);
bool operator>(const const_frame& other);
-
+
private:
- struct impl;
spl::shared_ptr<impl> impl_;
};
-}}
\ No newline at end of file
+}}