/*\r
-* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
*\r
-* This file is part of CasparCG.\r
+* This file is part of CasparCG (www.casparcg.com).\r
*\r
-* CasparCG is free software: you can redistribute it and/or modify\r
-* it under the terms of the GNU General Public License as published by\r
-* the Free Software Foundation, either version 3 of the License, or\r
-* (at your option) any later version.\r
+* CasparCG is free software: you can redistribute it and/or modify\r
+* it under the terms of the GNU General Public License as published by\r
+* the Free Software Foundation, either version 3 of the License, or\r
+* (at your option) any later version.\r
*\r
-* CasparCG is distributed in the hope that it will be useful,\r
-* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-* GNU General Public License for more details.\r
-\r
-* You should have received a copy of the GNU General Public License\r
-* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
+* CasparCG is distributed in the hope that it will be useful,\r
+* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+* GNU General Public License for more details.\r
+*\r
+* You should have received a copy of the GNU General Public License\r
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
*\r
+* Author: Robert Nagy, ronag89@gmail.com\r
*/\r
\r
#include "../StdAfx.h"\r
}, high_priority);\r
}\r
}\r
-\r
- boost::unique_future<layer_status> get_status(int index)\r
- { \r
- return executor_.begin_invoke([=]\r
- {\r
- return layers_[index].status();\r
- }, high_priority );\r
- }\r
- \r
+ \r
boost::unique_future<safe_ptr<frame_producer>> foreground(int index)\r
{\r
return executor_.begin_invoke([=]\r
return std::move(executor_.begin_invoke([&]() -> boost::property_tree::wptree\r
{\r
boost::property_tree::wptree info;\r
- auto& layers_node = info.add(L"stage.layers", L"");\r
- BOOST_FOREACH(auto& layer, layers_)\r
- {\r
- auto layer_info = layer.second.info();\r
- layer_info.add(L"layer.index", layer.first);\r
- BOOST_FOREACH(auto& update, layer_info) \r
- layers_node.add_child(update.first, update.second);\r
- }\r
+ BOOST_FOREACH(auto& layer, layers_) \r
+ info.add_child(L"layers.layer", layer.second.info())\r
+ .add(L"index", layer.first); \r
return info;\r
}, high_priority));\r
}\r
+\r
+ boost::unique_future<boost::property_tree::wptree> info(int index)\r
+ {\r
+ return std::move(executor_.begin_invoke([&]() -> boost::property_tree::wptree\r
+ {\r
+ return layers_[index].info();\r
+ }, high_priority));\r
+ }\r
};\r
\r
stage::stage(const safe_ptr<diagnostics::graph>& graph, const safe_ptr<target_t>& target, const video_format_desc& format_desc) : impl_(new implementation(graph, target, format_desc)){}\r
void stage::swap_layers(const safe_ptr<stage>& other){impl_->swap_layers(other);}\r
void stage::swap_layer(int index, size_t other_index){impl_->swap_layer(index, other_index);}\r
void stage::swap_layer(int index, size_t other_index, const safe_ptr<stage>& other){impl_->swap_layer(index, other_index, other);}\r
-boost::unique_future<layer_status> stage::get_status(int index){return impl_->get_status(index);}\r
-boost::unique_future<safe_ptr<frame_producer>> stage::foreground(size_t index) {return impl_->foreground(index);}\r
-boost::unique_future<safe_ptr<frame_producer>> stage::background(size_t index) {return impl_->background(index);}\r
+boost::unique_future<safe_ptr<frame_producer>> stage::foreground(int index) {return impl_->foreground(index);}\r
+boost::unique_future<safe_ptr<frame_producer>> stage::background(int index) {return impl_->background(index);}\r
boost::unique_future<std::wstring> stage::call(int index, bool foreground, const std::wstring& param){return impl_->call(index, foreground, param);}\r
void stage::set_video_format_desc(const video_format_desc& format_desc){impl_->set_video_format_desc(format_desc);}\r
boost::unique_future<boost::property_tree::wptree> stage::info() const{return impl_->info();}\r
+boost::unique_future<boost::property_tree::wptree> stage::info(int index) const{return impl_->info(index);}\r
}}
\ No newline at end of file