X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fflash%2Fflash.cpp;h=732c4da0c49d64ba09b372df99a92e73764c083f;hb=f78d434c81a83b428ae2e24af862d5f2702c34f9;hp=84de48f5145bcb73cec6500e9a0392f63e0aff86;hpb=2f2a60a633a020c51f2f8cc4bf1ff8b0ee740d60;p=casparcg diff --git a/modules/flash/flash.cpp b/modules/flash/flash.cpp index 84de48f51..732c4da0c 100644 --- a/modules/flash/flash.cpp +++ b/modules/flash/flash.cpp @@ -1,34 +1,49 @@ +/* +* Copyright (c) 2011 Sveriges Television AB +* +* This file is part of CasparCG (www.casparcg.com). +* +* CasparCG is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* CasparCG is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with CasparCG. If not, see . +* +* Author: Robert Nagy, ronag89@gmail.com +*/ + #include "StdAfx.h" #include "flash.h" #include "producer/cg_producer.h" #include "producer/flash_producer.h" -#include "producer/flash_producer.h" #include -namespace caspar{ +namespace caspar { namespace flash { -void init_flash() +void init() { core::register_producer_factory(create_ct_producer); - - try - { - create_flash_producer(boost::assign::list_of(env::template_host())); - } - catch(...){} + core::register_producer_factory(create_cg_producer); } -std::wstring get_cg_version() +std::string get_cg_version() { - return L"Unknown"; + return "Unknown"; } -std::wstring g_version = L"Not found"; -void setup_version() -{ +std::string get_version() +{ + std::string version = "Not found"; #ifdef WIN32 HKEY hkey; @@ -41,19 +56,12 @@ void setup_version() dwSize = sizeof(ver_str); RegQueryValueEx(hkey, TEXT("Version"), NULL, &dwType, (PBYTE)&ver_str, &dwSize); - g_version = ver_str; + version = u8(ver_str); RegCloseKey(hkey); } #endif + return version; } -std::wstring get_flash_version() -{ - boost::once_flag flag = BOOST_ONCE_INIT; - boost::call_once(setup_version, flag); - - return g_version; -} - -} +}}