#include "color_producer.h"\r
\r
#include <core/producer/frame_producer.h>\r
+#include <core/frame/data_frame.h>\r
#include <core/frame/draw_frame.h>\r
#include <core/frame/frame_factory.h>\r
#include <core/frame/pixel_format.h>\r
-#include <core/frame/write_frame.h>\r
\r
#include <common/except.h>\r
\r
{\r
return frame_;\r
} \r
-\r
- virtual spl::shared_ptr<draw_frame> last_frame() const override\r
- {\r
- return frame_; \r
- } \r
-\r
+ \r
virtual std::wstring print() const override\r
{\r
return L"color[" + color_str_ + L"]";\r
return L"color";\r
}\r
\r
+ virtual spl::shared_ptr<draw_frame> last_frame() const override\r
+ {\r
+ return frame_;\r
+ }\r
+\r
boost::property_tree::wptree info() const override\r
{\r
boost::property_tree::wptree info;\r
\r
return core::wrap_producer(spl::make_shared<color_producer>(frame_factory, color2));\r
}\r
-spl::shared_ptr<write_frame> create_color_frame(void* tag, const spl::shared_ptr<frame_factory>& frame_factory, const std::wstring& color)\r
+spl::shared_ptr<draw_frame> create_color_frame(void* tag, const spl::shared_ptr<frame_factory>& frame_factory, const std::wstring& color)\r
{\r
auto color2 = get_hex_color(color);\r
if(color2.length() != 9 || color2[0] != '#')\r
if(!(str >> std::hex >> value) || !str.eof())\r
BOOST_THROW_EXCEPTION(invalid_argument() << arg_name_info("color") << arg_value_info(color2) << msg_info("Invalid color."));\r
\r
- return frame;\r
+ return spl::make_shared<draw_frame>(frame);\r
}\r
\r
}}
\ No newline at end of file