#pragma once\r
\r
#include <common/memory/safe_ptr.h>\r
-#include <core/producer/frame/basic_frame.h>\r
-#include <core/producer/frame/frame_visitor.h>\r
-#include <core/producer/frame/pixel_format.h>\r
\r
-#include "gpu/host_buffer.h"\r
-#include "gpu/device_buffer.h"\r
+#include <core/producer/frame/basic_frame.h>\r
+#include <core/video_format.h>\r
+#include <core/mixer/audio/audio_mixer.h>\r
\r
#include <boost/noncopyable.hpp>\r
#include <boost/range/iterator_range.hpp>\r
\r
-#include <memory>\r
+#include <cstdint>\r
#include <vector>\r
\r
namespace caspar { namespace core {\r
- \r
+\r
+class device_buffer;\r
+struct frame_visitor;\r
+struct pixel_format_desc;\r
+class ogl_device; \r
+\r
class write_frame : public core::basic_frame, boost::noncopyable\r
{\r
public: \r
- explicit write_frame(int tag, const core::pixel_format_desc& desc, const std::vector<safe_ptr<host_buffer>>& buffers, const std::vector<safe_ptr<device_buffer>>& textures);\r
+ explicit write_frame(const void* tag);\r
+ explicit write_frame(ogl_device& ogl, const void* tag, const core::pixel_format_desc& desc);\r
+\r
+ write_frame(const write_frame& other);\r
+ write_frame(write_frame&& other);\r
+\r
+ write_frame& operator=(const write_frame& other);\r
+ write_frame& operator=(write_frame&& other);\r
+ \r
+ void swap(write_frame& other);\r
\r
- // core::write_frame\r
- virtual boost::iterator_range<uint8_t*> image_data(size_t plane_index = 0); \r
- virtual std::vector<int16_t>& audio_data();\r
- \r
- virtual const boost::iterator_range<const uint8_t*> image_data(size_t plane_index = 0) const;\r
- virtual const boost::iterator_range<const int16_t*> audio_data() const;\r
+ boost::iterator_range<uint8_t*> image_data(size_t plane_index = 0); \r
+ const boost::iterator_range<const uint8_t*> image_data(size_t plane_index = 0) const;\r
\r
+ audio_buffer& audio_data();\r
+ const boost::iterator_range<const int32_t*> audio_data() const;\r
+ \r
void commit(uint32_t plane_index);\r
void commit();\r
+ \r
+ void set_type(const core::field_mode::type& mode);\r
+ core::field_mode::type get_type() const;\r
+ \r
+ const void* tag() const;\r
+\r
+ const core::pixel_format_desc& get_pixel_format_desc() const;\r
+ \r
+ // basic_frame\r
\r
virtual void accept(core::frame_visitor& visitor);\r
\r
- virtual int tag() const;\r
+ virtual std::wstring print() const;\r
\r
private:\r
friend class image_mixer;\r
-\r
- const core::pixel_format_desc& get_pixel_format_desc() const;\r
+ \r
const std::vector<safe_ptr<device_buffer>>& get_textures() const;\r
- const std::vector<safe_ptr<host_buffer>>& get_buffers() const;\r
\r
struct implementation;\r
- std::shared_ptr<implementation> impl_;\r
+ safe_ptr<implementation> impl_;\r
};\r
-typedef std::shared_ptr<write_frame> write_frame_impl_ptr;\r
\r
\r
}}
\ No newline at end of file