]> git.sesse.net Git - casparcg/blobdiff - modules/flash/flash.cpp
2.0. Updated namespaces.
[casparcg] / modules / flash / flash.cpp
index 7ed22fb9f0e6fe18389e7170261579ad827a035d..9378a073d09a3fa7682baf37064d6db0d2b3c744 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 "flash.h"\r
@@ -7,9 +26,9 @@
 \r
 #include <common/env.h>\r
 \r
-namespace caspar{\r
+namespace caspar { namespace flash {\r
 \r
-void init_flash()\r
+void init()\r
 {\r
        core::register_producer_factory(create_ct_producer);\r
 }\r
@@ -19,9 +38,9 @@ std::wstring get_cg_version()
        return L"Unknown";\r
 }\r
 \r
-std::wstring g_version = L"Not found";\r
-void setup_version()\r
-{ \r
+std::wstring get_version()\r
+{              \r
+       std::wstring version = L"Not found";\r
 #ifdef WIN32\r
        HKEY   hkey;\r
  \r
@@ -34,19 +53,12 @@ void setup_version()
                dwSize = sizeof(ver_str);\r
                RegQueryValueEx(hkey, TEXT("Version"), NULL, &dwType, (PBYTE)&ver_str, &dwSize);\r
  \r
-               g_version = ver_str;\r
+               version = ver_str;\r
 \r
                RegCloseKey(hkey);\r
        }\r
 #endif\r
+       return version;\r
 }\r
 \r
-std::wstring get_flash_version()\r
-{              \r
-       boost::once_flag flag = BOOST_ONCE_INIT;\r
-       boost::call_once(setup_version, flag);\r
-\r
-       return g_version;\r
-}\r
-\r
-}\r
+}}\r