]> git.sesse.net Git - casparcg/blobdiff - modules/image/image.cpp
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
[casparcg] / modules / image / image.cpp
index 4ede95b6d3dd3585ec87bcb47d729e0e6511939a..7115e270a5504674e8455ccbd5284067eb4d59f7 100644 (file)
@@ -1,22 +1,24 @@
 /*\r
-* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
 *\r
-*  This file is part of CasparCG.\r
+* This file is part of CasparCG (www.casparcg.com).\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
+* 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
+* 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
+* Author: Robert Nagy, ronag89@gmail.com\r
 */\r
+\r
 #include "image.h"\r
 \r
 #include "producer/image_producer.h"\r
 #include <core/producer/frame_producer.h>\r
 #include <core/consumer/frame_consumer.h>\r
 \r
-#include <common/utility/string.h>\r
+#include <common/utf.h>\r
 \r
 #include <FreeImage.h>\r
 \r
-namespace caspar {\r
+namespace caspar { namespace image {\r
 \r
-void init_image()\r
+void init()\r
 {\r
-       core::register_producer_factory(create_image_scroll_producer);\r
-       core::register_producer_factory(create_image_producer);\r
-       core::register_consumer_factory([](const std::vector<std::wstring>& params){return create_image_consumer(params);});\r
+       FreeImage_Initialise();\r
+       core::register_producer_factory(create_scroll_producer);\r
+       core::register_producer_factory(create_producer);\r
+       core::register_consumer_factory([](const std::vector<std::wstring>& params){return create_consumer(params);});\r
 }\r
 \r
-std::wstring get_image_version()\r
+void uninit()\r
+{\r
+       FreeImage_DeInitialise();\r
+       core::register_producer_factory(create_scroll_producer);\r
+       core::register_producer_factory(create_producer);\r
+       core::register_consumer_factory([](const std::vector<std::wstring>& params){return create_consumer(params);});\r
+}\r
+\r
+\r
+std::wstring get_version()\r
 {\r
-       return widen(std::string(FreeImage_GetVersion()));\r
+       return u16(FreeImage_GetVersion());\r
 }\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file