]> git.sesse.net Git - casparcg/blobdiff - core/frame/frame.h
set svn:eol-style native on .h and .cpp files
[casparcg] / core / frame / frame.h
index 419d71f8891aad549201370a3d99597f4e265be0..454b6e5c36222ec0a1739145048e2b2c9609bf57 100644 (file)
-#pragma once\r
-\r
-#undef BOOST_PARAMETER_MAX_ARITY\r
-#define BOOST_PARAMETER_MAX_ARITY 7\r
-\r
-#include "../video_format.h"\r
-\r
-#include <common/memory.h>\r
-#include <common/forward.h>\r
-#include <common/array.h>\r
-\r
-#include <boost/range.hpp>\r
-#include <boost/any.hpp>\r
-\r
-#include <tbb/cache_aligned_allocator.h>\r
-\r
-#include <cstddef>\r
-#include <cstdint>\r
-\r
-FORWARD1(boost, template<typename> class shared_future);\r
-\r
-namespace caspar { namespace core {\r
-       \r
-typedef std::vector<int32_t, tbb::cache_aligned_allocator<int32_t>> audio_buffer;\r
-\r
-class mutable_frame sealed\r
-{\r
-       mutable_frame(const mutable_frame&);\r
-       mutable_frame& operator=(const mutable_frame&);\r
-public:        \r
-\r
-       // Static Members\r
-\r
-       // Constructors\r
-\r
-       explicit mutable_frame(std::vector<array<std::uint8_t>> image_buffers, \r
-                                               audio_buffer audio_buffer, \r
-                                               const void* tag, \r
-                                               const struct pixel_format_desc& desc);\r
-       ~mutable_frame();\r
-\r
-       // Methods\r
-\r
-       mutable_frame(mutable_frame&& other);\r
-       mutable_frame& operator=(mutable_frame&& other);\r
-\r
-       void swap(mutable_frame& other);\r
-                       \r
-       // Properties\r
-                       \r
-       const struct pixel_format_desc& pixel_format_desc() const;\r
-\r
-       const array<std::uint8_t>& image_data(std::size_t index = 0) const;\r
-       const core::audio_buffer& audio_data() const;\r
-\r
-       array<std::uint8_t>& image_data(std::size_t index = 0);\r
-       core::audio_buffer& audio_data();\r
-       \r
-       std::size_t width() const;\r
-       std::size_t height() const;\r
-                                                               \r
-       const void* stream_tag() const;\r
-       const void* data_tag() const;\r
-                       \r
-private:\r
-       struct impl;\r
-       spl::unique_ptr<impl> impl_;\r
-};\r
-\r
-class const_frame sealed\r
-{\r
-public:        \r
-\r
-       // Static Members\r
-\r
-       static const const_frame& empty();\r
-\r
-       // Constructors\r
-\r
-       explicit const_frame(const void* tag = nullptr);\r
-       explicit const_frame(boost::shared_future<array<const std::uint8_t>> image, \r
-                                               audio_buffer audio_buffer, \r
-                                               const void* tag, \r
-                                               const struct pixel_format_desc& desc);\r
-       const_frame(mutable_frame&& other);\r
-       ~const_frame();\r
-\r
-       // Methods\r
-\r
-       const_frame(const_frame&& other);\r
-       const_frame& operator=(const_frame&& other);\r
-       const_frame(const const_frame&);\r
-       const_frame& operator=(const const_frame& other);\r
-                               \r
-       // Properties\r
-                               \r
-       const struct pixel_format_desc& pixel_format_desc() const;\r
-\r
-       array<const std::uint8_t> image_data(int index = 0) const;\r
-       const core::audio_buffer& audio_data() const;\r
-               \r
-       std::size_t width() const;\r
-       std::size_t height() const;\r
-       std::size_t size() const;\r
-                                                               \r
-       const void* stream_tag() const;\r
-       const void* data_tag() const;\r
-\r
-       bool operator==(const const_frame& other);\r
-       bool operator!=(const const_frame& other);\r
-       bool operator<(const const_frame& other);\r
-       bool operator>(const const_frame& other);\r
-                       \r
-private:\r
-       struct impl;\r
-       spl::shared_ptr<impl> impl_;\r
-};\r
-\r
+#pragma once
+
+#undef BOOST_PARAMETER_MAX_ARITY
+#define BOOST_PARAMETER_MAX_ARITY 7
+
+#include "../video_format.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 <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;
+
+class mutable_frame sealed
+{
+       mutable_frame(const mutable_frame&);
+       mutable_frame& operator=(const mutable_frame&);
+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);
+       ~mutable_frame();
+
+       // Methods
+
+       mutable_frame(mutable_frame&& other);
+       mutable_frame& operator=(mutable_frame&& other);
+
+       void swap(mutable_frame& other);
+                       
+       // Properties
+                       
+       const struct pixel_format_desc& pixel_format_desc() const;
+
+       const array<std::uint8_t>& image_data(std::size_t index = 0) const;
+       const core::audio_buffer& audio_data() const;
+
+       array<std::uint8_t>& image_data(std::size_t index = 0);
+       core::audio_buffer& audio_data();
+       
+       std::size_t width() const;
+       std::size_t height() const;
+                                                               
+       const void* stream_tag() const;
+       const void* data_tag() const;
+                       
+private:
+       struct impl;
+       spl::unique_ptr<impl> impl_;
+};
+
+class const_frame sealed
+{
+public:        
+
+       // Static Members
+
+       static const const_frame& empty();
+
+       // 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);
+       const_frame(mutable_frame&& other);
+       ~const_frame();
+
+       // Methods
+
+       const_frame(const_frame&& other);
+       const_frame& operator=(const_frame&& other);
+       const_frame(const const_frame&);
+       const_frame& operator=(const const_frame& other);
+                               
+       // Properties
+                               
+       const struct pixel_format_desc& pixel_format_desc() 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;
+
+       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