);\r
\r
file_sink->set_filter(boost::log::filters::attr<severity_level>(boost::log::sources::aux::severity_attribute_name<wchar_t>::get()) >= info);\r
-\r
- std::wcout << L"Logging [info] or higher severity to " << folder << std::endl << std::endl;\r
-\r
+ \r
boost::log::wcore::get()->add_sink(file_sink);\r
+\r
+ CASPAR_LOG(info) << L"Logging [info] or higher severity to " << folder << std::endl << std::endl;\r
}\r
catch(...)\r
{\r
void cg_producer::initialize(const safe_ptr<frame_factory>& frame_factory){impl_->initialize(frame_factory);}\r
void cg_producer::set_parent_printer(const printer& parent_printer) { impl_->set_parent_printer(parent_printer);}\r
std::wstring cg_producer::print() const{return impl_->print();}\r
+std::wstring cg_producer::version() \r
+{\r
+ return L"Unknown";\r
+}\r
}}}
\ No newline at end of file
\r
virtual std::wstring print() const;\r
\r
+ static std::wstring version();\r
+\r
private:\r
struct implementation;\r
std::shared_ptr<implementation> impl_;\r
\r
bool VersionCommand::DoExecute()\r
{\r
- std::wstringstream replyString;\r
- replyString << TEXT("201 VERSION OK\r\n") << env::version() << TEXT("\r\n");\r
+ std::wstring replyString = TEXT("201 VERSION OK\r\n SERVER: ") + env::version() + TEXT("\r\n");\r
\r
- SetReplyString(replyString.str());\r
+ if(_parameters.size() > 0)\r
+ {\r
+ if(_parameters[0] == L"FLASH")\r
+ replyString = TEXT("201 VERSION OK\r\n FLASH: ") + flash::flash_producer::version() + TEXT("\r\n");\r
+ else if(_parameters[0] == L"TEMPLATEHOST")\r
+ replyString = TEXT("201 VERSION OK\r\n TEMPLATEHOST: ") + flash::cg_producer::version() + TEXT("\r\n");\r
+ else if(_parameters[0] != L"SERVER")\r
+ replyString = TEXT("403 VERSION ERROR\r\n");\r
+ }\r
+\r
+ SetReplyString(replyString);\r
return true;\r
}\r
\r
\r
#include <memory>\r
#include <string>\r
+#include <iostream>\r
\r
namespace caspar { namespace IO {\r
\r
};\r
typedef std::shared_ptr<ClientInfo> ClientInfoPtr;\r
\r
-struct DummyClientInfo : public caspar::IO::ClientInfo \r
+struct ConsoleClientInfo : public caspar::IO::ClientInfo \r
{\r
- void Send(const std::wstring& /*data*/){}\r
+ void Send(const std::wstring& data)\r
+ {\r
+ std::wcout << data << std::endl;\r
+ }\r
void Disconnect(){}\r
};\r
\r
#include "bootstrapper.h"\r
\r
#include <core/producer/flash/flash_producer.h>\r
+#include <core/producer/flash/cg_producer.h>\r
\r
#include <common/exception/win32_exception.h>\r
#include <common/exception/exceptions.h>\r
std::wstringstream str;\r
str << "CasparCG Server " << env::version() << L" Flash " << flash::flash_producer::version();\r
SetConsoleTitle(str.str().c_str());\r
-\r
- std::wcout << L"Copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\n" << std::endl;\r
- std::wcout << L"Starting CasparCG Video Playout Server Ver: " << env::version() << std::endl;\r
}\r
\r
int main(int argc, wchar_t* argv[])\r
MessageBox(nullptr, TEXT("Now is the time to connect for remote debugging..."), TEXT("Debug"), MB_OK | MB_TOPMOST);\r
#endif\r
\r
+ CASPAR_LOG(info) << L"Copyright (c) 2010 Sveriges Television AB, www.casparcg.com, <info@casparcg.com>";\r
+ CASPAR_LOG(info) << L"Starting CasparCG Video Playout Server.";\r
+ CASPAR_LOG(info) << L"Server Version: " << env::version();\r
+ CASPAR_LOG(info) << L"Flash Version: " << flash::flash_producer::version();\r
+ CASPAR_LOG(info) << L"Template-Host Version: " << flash::cg_producer::version();\r
+ \r
log::add_file_sink(env::log_folder());\r
\r
bootstrapper caspar_device;\r
\r
- auto dummy = std::make_shared<IO::DummyClientInfo>();\r
+ auto dummy = std::make_shared<IO::ConsoleClientInfo>();\r
amcp::AMCPProtocolStrategy amcp(caspar_device.get_channels());\r
bool is_running = true;\r
while(is_running)\r