#include "producer/cg_producer.h"\r
#include "producer/flash_producer.h"\r
\r
+#include <core/producer/frame/frame_factory.h>\r
+#include <core/mixer/write_frame.h>\r
+\r
#include <common/env.h>\r
\r
+#include <boost/regex.hpp>\r
+\r
+#include <string>\r
+#include <vector>\r
+\r
namespace caspar { namespace flash {\r
\r
void init()\r
\r
std::wstring get_cg_version()\r
{\r
+ struct dummy_factory : public core::frame_factory\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
+\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
+ \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
return L"Unknown";\r
}\r
\r
desc.planes.push_back(core::pixel_format_desc::plane(width_, height_, 4));\r
auto frame = frame_factory_->create_frame(this, desc);\r
\r
- fast_memcpy(frame->image_data().begin(), bmp_.data(), width_*height_*4);\r
- frame->commit();\r
- head_ = frame;\r
+ if(frame->image_data().size() == static_cast<int>(width_*height_*4))\r
+ {\r
+ fast_memcpy(frame->image_data().begin(), bmp_.data(), width_*height_*4);\r
+ frame->commit();\r
+ head_ = frame;\r
+ }\r
} \r
\r
MSG msg;\r
#include <core/producer/stage.h>\r
#include <core/producer/layer.h>\r
#include <core/mixer/mixer.h>\r
+#include <core/mixer/gpu/ogl_device.h>\r
#include <core/consumer/output.h>\r
\r
#include <modules/bluefish/bluefish.h>\r
info.add(L"system.cpu", caspar::get_cpu_info());\r
\r
BOOST_FOREACH(auto device, caspar::decklink::get_device_list())\r
- info.add(L"system.decklink.device", device);\r
+ info.add(L"system.caspar.decklink.device", device);\r
\r
BOOST_FOREACH(auto device, caspar::bluefish::get_device_list())\r
- info.add(L"system.bluefish.device", device);\r
+ info.add(L"system.caspar.bluefish.device", device);\r
\r
- info.add(L"system.flash", caspar::flash::get_version());\r
- info.add(L"system.free-image", caspar::image::get_version());\r
- info.add(L"system.ffmpeg.avcodec", caspar::ffmpeg::get_avcodec_version());\r
- info.add(L"system.ffmpeg.avformat", caspar::ffmpeg::get_avformat_version());\r
- info.add(L"system.ffmpeg.avfilter", caspar::ffmpeg::get_avfilter_version());\r
- info.add(L"system.ffmpeg.avutil", caspar::ffmpeg::get_avutil_version());\r
- info.add(L"system.ffmpeg.swscale", caspar::ffmpeg::get_swscale_version());\r
- \r
+ info.add(L"system.caspar.flash", caspar::flash::get_version());\r
+ info.add(L"system.caspar.template-host", caspar::flash::get_cg_version());\r
+ info.add(L"system.caspar.free-image", caspar::image::get_version());\r
+ info.add(L"system.caspar.ffmpeg.avcodec", caspar::ffmpeg::get_avcodec_version());\r
+ info.add(L"system.caspar.ffmpeg.avformat", caspar::ffmpeg::get_avformat_version());\r
+ info.add(L"system.caspar.ffmpeg.avfilter", caspar::ffmpeg::get_avfilter_version());\r
+ info.add(L"system.caspar.ffmpeg.avutil", caspar::ffmpeg::get_avutil_version());\r
+ info.add(L"system.caspar.ffmpeg.swscale", caspar::ffmpeg::get_swscale_version());\r
+ \r
boost::property_tree::write_xml(replyString, info, w);\r
}\r
else if(_parameters.size() >= 1 && _parameters[0] == L"SERVER")\r
{\r
- replyString << L"201 INFO SYSTEM OK\r\n";\r
+ replyString << L"201 INFO SERVER OK\r\n";\r
\r
boost::property_tree::wptree info;\r
\r
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
</ImportGroup>\r
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <IncludePath>../;..\dependencies/tbb/include;..\dependencies\boost;$(IncludePath)</IncludePath>\r
+ <IncludePath>../;..\dependencies/tbb/include;..\dependencies\boost;..\dependencies\glew-1.6.0\include;..\dependencies\SFML-1.6\include;$(IncludePath)</IncludePath>\r
<OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<IntDir>$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
</PropertyGroup>\r
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <IncludePath>../;..\dependencies/tbb/include;..\dependencies\boost;$(IncludePath)</IncludePath>\r
+ <IncludePath>../;..\dependencies/tbb/include;..\dependencies\boost;..\dependencies\glew-1.6.0\include;..\dependencies\SFML-1.6\include;$(IncludePath)</IncludePath>\r
<OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<IntDir>$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
</PropertyGroup>\r
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">\r
- <IncludePath>../;..\dependencies/tbb/include;..\dependencies\boost;$(IncludePath)</IncludePath>\r
+ <IncludePath>../;..\dependencies/tbb/include;..\dependencies\boost;..\dependencies\glew-1.6.0\include;..\dependencies\SFML-1.6\include;$(IncludePath)</IncludePath>\r
<OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<IntDir>$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
</PropertyGroup>\r
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">\r
- <IncludePath>../;..\dependencies/tbb/include;..\dependencies\boost;$(IncludePath)</IncludePath>\r
+ <IncludePath>../;..\dependencies/tbb/include;..\dependencies\boost;..\dependencies\glew-1.6.0\include;..\dependencies\SFML-1.6\include;$(IncludePath)</IncludePath>\r
<OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<IntDir>$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
</PropertyGroup>\r
BOOST_FOREACH(auto device, caspar::bluefish::get_device_list())\r
CASPAR_LOG(info) << L" - " << device; \r
\r
- CASPAR_LOG(info) << L"Flash " << caspar::flash::get_version();\r
CASPAR_LOG(info) << L"FreeImage " << caspar::image::get_version();\r
CASPAR_LOG(info) << L"FFMPEG-avcodec " << caspar::ffmpeg::get_avcodec_version();\r
CASPAR_LOG(info) << L"FFMPEG-avformat " << caspar::ffmpeg::get_avformat_version();\r
CASPAR_LOG(info) << L"FFMPEG-avfilter " << caspar::ffmpeg::get_avfilter_version();\r
CASPAR_LOG(info) << L"FFMPEG-avutil " << caspar::ffmpeg::get_avutil_version();\r
CASPAR_LOG(info) << L"FFMPEG-swscale " << caspar::ffmpeg::get_swscale_version();\r
+ CASPAR_LOG(info) << L"Flash " << caspar::flash::get_version();\r
+ CASPAR_LOG(info) << L"Template-Host " << caspar::flash::get_cg_version();\r
}\r
\r
LONG WINAPI UserUnhandledExceptionFilter(EXCEPTION_POINTERS* info)\r