]> git.sesse.net Git - casparcg/blobdiff - modules/decklink/decklink.cpp
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
[casparcg] / modules / decklink / decklink.cpp
index 3a5fd91bc19f025e92fd04485fc239fd6b82cfb7..cea6d03c6f0e7ff9632f9cfca70e3013be4ab850 100644 (file)
@@ -1,3 +1,22 @@
+/*\r
+* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
+*\r
+*  This file is part of CasparCG.\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
+*\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
+*/\r
 #include "stdafx.h"\r
 \r
 #include "decklink.h"\r
@@ -25,13 +44,13 @@ namespace caspar{
 \r
 void init_decklink()\r
 {\r
-       core::register_consumer_factory(create_decklink_consumer);\r
+       core::register_consumer_factory([](const std::vector<std::wstring>& params){return create_decklink_consumer(params);});\r
        core::register_producer_factory(create_decklink_producer);\r
 }\r
 \r
 std::wstring get_decklink_version() \r
 {\r
-       std::wstring version = L"Unknown";\r
+       std::wstring version = L"Not found";\r
 \r
        ::CoInitialize(nullptr);\r
        try\r
@@ -61,7 +80,7 @@ std::vector<std::wstring> get_decklink_device_list()
                        {\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
+                               devices.push_back(std::wstring(model_name) + L" [" + boost::lexical_cast<std::wstring>(n) + L"]");      \r
                        }\r
                }\r
        }\r