\r
std::wstring get_cg_version()\r
{\r
- struct dummy_factory : public core::frame_factory\r
+ try\r
{\r
- \r
- virtual safe_ptr<core::write_frame> create_frame(const void* video_stream_tag, const core::pixel_format_desc& desc) \r
+ struct dummy_factory : public core::frame_factory\r
{\r
- return make_safe<core::write_frame>(nullptr);\r
- }\r
+ \r
+ virtual safe_ptr<core::write_frame> create_frame(const void* video_stream_tag, const core::pixel_format_desc& desc) \r
+ {\r
+ return make_safe<core::write_frame>(nullptr);\r
+ }\r
\r
- virtual core::video_format_desc get_video_format_desc() const\r
- {\r
- return core::video_format_desc::get(L"PAL");\r
- }\r
- };\r
+ virtual core::video_format_desc get_video_format_desc() const\r
+ {\r
+ return core::video_format_desc::get(L"PAL");\r
+ }\r
+ };\r
\r
- std::vector<std::wstring> params;\r
- auto producer = make_safe<cg_producer>(flash::create_producer(make_safe<dummy_factory>(), params));\r
+ std::vector<std::wstring> params;\r
+ auto producer = make_safe<cg_producer>(flash::create_producer(make_safe<dummy_factory>(), params));\r
\r
- auto info = producer->template_host_info();\r
+ auto info = producer->template_host_info();\r
\r
- boost::wregex ver_exp(L"version="(?<VERSION>[^&]*)");\r
- boost::wsmatch what;\r
- if(boost::regex_search(info, what, ver_exp))\r
- return what[L"VERSION"];\r
+ boost::wregex ver_exp(L"version="(?<VERSION>[^&]*)");\r
+ boost::wsmatch what;\r
+ if(boost::regex_search(info, what, ver_exp))\r
+ return what[L"VERSION"];\r
+ }\r
+ catch(...)\r
+ {\r
+\r
+ }\r
\r
return L"Unknown";\r
}\r