/*\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
#include <common/diagnostics/graph.h>\r
#include <common/env.h>\r
\r
+#include <boost/property_tree/ptree.hpp>\r
+\r
#include <string>\r
\r
namespace caspar { namespace core {\r
graph_->set_text(print());\r
diagnostics::register_graph(graph_);\r
\r
- for(int n = 0; n < std::max(1, env::properties().get("configuration.pipeline-tokens", 2)); ++n)\r
+ for(int n = 0; n < std::max(1, env::properties().get(L"configuration.pipeline-tokens", 2)); ++n)\r
stage_->spawn_token();\r
\r
CASPAR_LOG(info) << print() << " Successfully Initialized.";\r
{\r
return L"video_channel[" + boost::lexical_cast<std::wstring>(index_) + L"|" + format_desc_.name + L"]";\r
}\r
+\r
+ boost::property_tree::wptree info() const\r
+ {\r
+ boost::property_tree::wptree info;\r
+\r
+ auto stage_info = stage_->info();\r
+ auto mixer_info = mixer_->info();\r
+ auto output_info = output_->info();\r
+\r
+ stage_info.timed_wait(boost::posix_time::seconds(2));\r
+ mixer_info.timed_wait(boost::posix_time::seconds(2));\r
+ output_info.timed_wait(boost::posix_time::seconds(2));\r
+ \r
+ info.add(L"video-mode", format_desc_.name);\r
+ info.add_child(L"stage", stage_info.get());\r
+ info.add_child(L"mixer", mixer_info.get());\r
+ info.add_child(L"output", output_info.get());\r
+ \r
+ return info; \r
+ }\r
};\r
\r
video_channel::video_channel(int index, const video_format_desc& format_desc, const safe_ptr<ogl_device>& ogl) : impl_(new implementation(index, format_desc, ogl)){}\r
safe_ptr<output> video_channel::output() { return impl_->output_;} \r
video_format_desc video_channel::get_video_format_desc() const{return impl_->format_desc_;}\r
void video_channel::set_video_format_desc(const video_format_desc& format_desc){impl_->set_video_format_desc(format_desc);}\r
+boost::property_tree::wptree video_channel::info() const{return impl_->info();}\r
\r
}}
\ No newline at end of file