- virtual safe_ptr<basic_frame> receive(int){return basic_frame::empty();}\r
- virtual safe_ptr<basic_frame> last_frame() const{return basic_frame::empty();}\r
- virtual void set_frame_factory(const safe_ptr<frame_factory>&){}\r
- virtual int64_t nb_frames() const {return 0;}\r
- virtual std::wstring print() const { return L"empty";}\r
+ return draw_frame::still(last_frame_);\r
+ }\r
+};\r
+\r
+frame_producer_base::frame_producer_base() : impl_(new impl(*this))\r
+{\r
+}\r
+\r
+frame_producer_base::frame_producer_base(frame_producer_base& self) : impl_(new impl(self))\r
+{\r
+}\r
+\r
+draw_frame frame_producer_base::receive()\r
+{\r
+ return impl_->receive();\r
+}\r
+\r
+void frame_producer_base::paused(bool value)\r
+{\r
+ impl_->paused(value);\r
+}\r
+\r
+draw_frame frame_producer_base::last_frame() const\r
+{\r
+ return impl_->last_frame();\r
+}\r
+\r
+boost::unique_future<std::wstring> frame_producer_base::call(const std::wstring&) \r
+{\r
+ BOOST_THROW_EXCEPTION(not_supported());\r
+}\r
+\r
+uint32_t frame_producer_base::nb_frames() const\r
+{\r
+ return std::numeric_limits<uint32_t>::max();\r
+}\r
+\r
+uint32_t frame_producer_base::frame_number() const\r
+{\r
+ return impl_->frame_number_;\r
+}\r
+\r
+const spl::shared_ptr<frame_producer>& frame_producer::empty() \r
+{\r
+ class empty_frame_producer : public frame_producer\r
+ {\r
+ public:\r
+ empty_frame_producer(){}\r
+ draw_frame receive() override{return draw_frame::empty();}\r
+ void paused(bool value) override{}\r
+ uint32_t nb_frames() const override {return 0;}\r
+ std::wstring print() const override { return L"empty";}\r
+ void subscribe(const monitor::observable::observer_ptr& o) override{}\r
+ void unsubscribe(const monitor::observable::observer_ptr& o) override{} \r
+ std::wstring name() const override {return L"empty";}\r
+ uint32_t frame_number() const override {return 0;}\r
+ boost::unique_future<std::wstring> call(const std::wstring& params) override{BOOST_THROW_EXCEPTION(not_supported());}\r
+ draw_frame last_frame() const {return draw_frame::empty();}\r
+ \r
+ boost::property_tree::wptree info() const override\r
+ {\r
+ boost::property_tree::wptree info;\r
+ info.add(L"type", L"empty-producer");\r
+ return info;\r
+ }\r