//  // // # # ### # # -= Nuclex Project =-  // // ## # # # ## ## NCXImage.cpp - Nuclex image extension module  // // ### # # ###  // // # ### # ### Registers the extension module  // // # ## # # ## ##  // // # # ### # # R4 (C)2003 Markus Ewald -> License.txt  // //  // #include "CoronaPlugin/CoronaPlugin.h" #include "CoronaPlugin/Video/CoronaImageCodec.h" #include "Nuclex/Kernel.h" #include "Nuclex/Video/VideoServer.h" using namespace Nuclex; // ############################################################################################# // // # NuclexVersion() # // // ############################################################################################# // /** Retrieve the version number of the nuclex framework the plugin was compiled against @return The framework version against which the plugin was compiled */ extern "C" CORONAPLUGIN_API int nuclexPluginVersion() { return NUCLEX_VERSION; } // ############################################################################################# // // # NuclexRegister() # // // ############################################################################################# // /** Register the plugin to a nuclex kernel instance @param pKernel Kernel to register to */ extern "C" CORONAPLUGIN_API void nuclexPluginRegister(Kernel *pKernel) { pKernel->getVideoServer()->addImageCodec( "Corona", shared_ptr(new Video::CoronaImageCodec() )); } // ############################################################################################# // // # NuclexUnregister() # // // ############################################################################################# // /** Unregister the plugin from a nuclex kernel instance @param pKernel Kernel to unregister from */ extern "C" CORONAPLUGIN_API void nuclexPluginUnregister(Kernel *pKernel) { try { pKernel->getVideoServer()->removeImageCodec("Corona"); } catch(...) { Kernel::logMessage( Kernel::MT_ERROR, "An exception occured while removing the corona codec" ); } }