\r
namespace caspar { namespace core {\r
\r
-CBlueVelvet4* (*BlueVelvetFactory4)();\r
-BLUE_UINT32 (*encode_hanc_frame)(struct hanc_stream_info_struct * hanc_stream_ptr, void * audio_pcm_ptr,BLUE_UINT32 no_audio_ch,BLUE_UINT32 no_audio_samples,BLUE_UINT32 nTypeOfSample,BLUE_UINT32 emb_audio_flag);\r
-BLUE_UINT32 (*encode_hanc_frame_ex)(BLUE_UINT32 card_type, struct hanc_stream_info_struct * hanc_stream_ptr, void * audio_pcm_ptr, BLUE_UINT32 no_audio_ch, BLUE_UINT32 no_audio_samples, BLUE_UINT32 nTypeOfSample, BLUE_UINT32 emb_audio_flag);\r
+CBlueVelvet4* (*BlueVelvetFactory4)() = nullptr;\r
+const char* (*BlueVelvetVersion)() = nullptr;\r
+BLUE_UINT32 (*encode_hanc_frame)(struct hanc_stream_info_struct * hanc_stream_ptr, void * audio_pcm_ptr,BLUE_UINT32 no_audio_ch,BLUE_UINT32 no_audio_samples,BLUE_UINT32 nTypeOfSample,BLUE_UINT32 emb_audio_flag) = nullptr;\r
+BLUE_UINT32 (*encode_hanc_frame_ex)(BLUE_UINT32 card_type, struct hanc_stream_info_struct * hanc_stream_ptr, void * audio_pcm_ptr, BLUE_UINT32 no_audio_ch, BLUE_UINT32 no_audio_samples, BLUE_UINT32 nTypeOfSample, BLUE_UINT32 emb_audio_flag) = nullptr;\r
\r
void blue_velvet_initialize()\r
{\r
BOOST_THROW_EXCEPTION(file_not_found() << msg_info("Could not find BlueVelvet3.dll"));\r
static std::shared_ptr<void> lib(module, FreeLibrary);\r
BlueVelvetFactory4 = reinterpret_cast<decltype(BlueVelvetFactory4)>(GetProcAddress(module, "BlueVelvetFactory4"));\r
+ BlueVelvetVersion = reinterpret_cast<decltype(BlueVelvetVersion)>(GetProcAddress(module, "BlueVelvetVersion"));\r
}\r
\r
void blue_hanc_initialize()\r
{\r
return L"Not found";\r
}\r
- return L"Unknown";//widen(std::string(BlueVelvetVersion()));\r
+ if(!BlueVelvetVersion)\r
+ return L"Unknown";\r
+\r
+ return widen(std::string(BlueVelvetVersion()));\r
+}\r
+\r
+std::vector<std::wstring> get_bluefish_device_list()\r
+{\r
+ std::vector<std::wstring> devices;\r
+\r
+ try\r
+ {\r
+ blue_initialize();\r
+ \r
+ std::shared_ptr<CBlueVelvet4> blue(BlueVelvetFactory4());\r
+\r
+ for(int n = 0; BLUE_PASS(blue->device_attach(n, FALSE)); ++n)\r
+ { \r
+ devices.push_back(L"[" + boost::lexical_cast<std::wstring>(n) + L"] " + get_card_desc(blue->has_video_cardtype()));\r
+ blue->device_detach(); \r
+ }\r
+ }\r
+ catch(...){}\r
+\r
+ return devices;\r
}\r
\r
safe_ptr<frame_consumer> create_bluefish_consumer(const std::vector<std::wstring>& params)\r
\r
return get_version(pDecklinkIterator);\r
}\r
+\r
+std::vector<std::wstring> get_decklink_device_list()\r
+{\r
+ std::vector<std::wstring> devices;\r
+ ::CoInitialize(nullptr);\r
+\r
+ CComPtr<IDeckLinkIterator> pDecklinkIterator;\r
+ if(FAILED(pDecklinkIterator.CoCreateInstance(CLSID_CDeckLinkIterator)))\r
+ return devices;\r
+ \r
+ CComPtr<IDeckLink> decklink;\r
+ for(int n = 0; pDecklinkIterator->Next(&decklink) == S_OK; ++n) \r
+ {\r
+ BSTR model_name = L"Unknown";\r
+ decklink->GetModelName(&model_name);\r
+ devices.push_back(L"[" + boost::lexical_cast<std::wstring>(n) + L"] " + model_name); \r
+ }\r
+\r
+ ::CoUninitialize();\r
+\r
+ return devices;\r
+}\r
\r
safe_ptr<frame_consumer> create_decklink_consumer(const std::vector<std::wstring>& params)\r
{\r
\r
#include <GLee.h>\r
\r
+#include <boost/foreach.hpp>\r
+\r
#if defined(_MSC_VER)\r
#pragma warning (disable : 4244)\r
#endif\r
CASPAR_LOG(info) << L"Flash " << flash::get_flash_version();\r
CASPAR_LOG(info) << L"Flash-Template-Host " << flash::get_cg_version();\r
CASPAR_LOG(info) << L"FreeImage " << image::get_image_version();\r
- CASPAR_LOG(info) << L"Decklink " << get_decklink_version();\r
- CASPAR_LOG(info) << L"Bluefish " << get_bluefish_version();\r
+ \r
+ std::wstring decklink_devices;\r
+ BOOST_FOREACH(auto& device, get_decklink_device_list())\r
+ decklink_devices += L"\t" + device;\r
+ CASPAR_LOG(info) << L"Decklink " << get_decklink_version() << (decklink_devices.empty() ? L"" : L"\n\tDevices:\n" + decklink_devices);\r
+ \r
+ std::wstring bluefish_devices;\r
+ BOOST_FOREACH(auto& device, get_bluefish_device_list())\r
+ bluefish_devices += L"\t" + device;\r
+ CASPAR_LOG(info) << L"Bluefish " << get_bluefish_version() << (bluefish_devices.empty() ? L"" : L"\n\tDevices:\n" + bluefish_devices);\r
+\r
CASPAR_LOG(info) << L"FFMPEG-avcodec " << ((avcodec_version() >> 16) & 0xFF) << L"." << ((avcodec_version() >> 8) & 0xFF) << L"." << ((avcodec_version() >> 0) & 0xFF);\r
CASPAR_LOG(info) << L"FFMPEG-swscale " << ((avformat_version() >> 16) & 0xFF) << L"." << ((avformat_version() >> 8) & 0xFF) << L"." << ((avformat_version() >> 0) & 0xFF);\r
CASPAR_LOG(info) << L"FFMPEG-avformat " << ((swscale_version() >> 16) & 0xFF) << L"." << ((swscale_version() >> 8) & 0xFF) << L"." << ((swscale_version() >> 0) & 0xFF);\r