+ }\r
+\r
+ boost::unique_future<std::wstring> call(bool foreground, const std::wstring& param)\r
+ {\r
+ return (foreground ? foreground_ : background_)->call(param);\r
+ }\r
+\r
+ bool empty() const\r
+ {\r
+ return background_ == core::frame_producer::empty() && foreground_ == core::frame_producer::empty();\r
+ }\r
+\r
+ boost::property_tree::wptree info() const\r
+ {\r
+ boost::property_tree::wptree info;\r
+ info.add(L"status", is_paused_ ? L"paused" : (foreground_ == frame_producer::empty() ? L"stopped" : L"playing"));\r
+ info.add(L"auto_delta", auto_play_delta_);\r
+ info.add(L"frame-number", frame_number_);\r
+\r
+ auto nb_frames = foreground_->nb_frames();\r
+\r
+ info.add(L"nb_frames", nb_frames == std::numeric_limits<int64_t>::max() ? -1 : nb_frames);\r
+ info.add(L"frames-left", nb_frames == std::numeric_limits<int64_t>::max() ? -1 : (foreground_->nb_frames() - frame_number_ - auto_play_delta_));\r
+ info.add_child(L"foreground.producer", foreground_->info());\r
+ info.add_child(L"background.producer", background_->info());\r
+ return info;\r