write_frame::write_frame(const void* tag) : impl_(new implementation(tag)){}\r
write_frame::write_frame(const safe_ptr<ogl_device>& ogl, const void* tag, const core::pixel_format_desc& desc) \r
: impl_(new implementation(ogl, tag, desc)){}\r
+write_frame::write_frame(const write_frame& other) : impl_(new implementation(*other.impl_)){}\r
write_frame::write_frame(write_frame&& other) : impl_(std::move(other.impl_)){}\r
-\r
+write_frame& write_frame::operator=(const write_frame& other)\r
+{\r
+ basic_frame temp(other);\r
+ temp.swap(*this);\r
+ return *this;\r
+}\r
write_frame& write_frame::operator=(write_frame&& other)\r
{\r
write_frame temp(std::move(other));\r
struct pixel_format_desc;\r
class ogl_device; \r
\r
-class write_frame : public core::basic_frame\r
+class write_frame : public core::basic_frame, boost::noncopyable\r
{\r
- write_frame(const write_frame&);\r
- write_frame& operator=(const write_frame&);\r
public: \r
explicit write_frame(const void* tag);\r
explicit write_frame(const safe_ptr<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
- write_frame& operator=(write_frame&& other);\r
\r
- void swap(write_frame& other);\r
+ write_frame& operator=(const write_frame& other);\r
+ write_frame& operator=(write_frame&& other);\r
\r
// basic_frame\r
\r
virtual void accept(frame_visitor& visitor) override;\r
\r
// write _frame\r
- \r
+\r
+ void swap(write_frame& other);\r
+ \r
boost::iterator_range<uint8_t*> image_data(size_t plane_index = 0); \r
audio_buffer& audio_data();\r
\r
}\r
case display_mode::duplicate: \r
{\r
- boost::range::push_back(frame1->audio_data(), pop_audio());\r
+ auto frame2 = make_safe<core::write_frame>(*frame1);\r
+ frame2->audio_data() = pop_audio();\r
\r
frame_buffer_.push(frame1);\r
- frame_buffer_.push(frame1);\r
+ frame_buffer_.push(frame2);\r
break;\r
}\r
case display_mode::half: \r