public void Initialize(Scene scene, IConfigSource source)
        {
            if (m_scene == null)
            {
                m_scene = scene;
            }

            bool    useFileCache = false;
            IConfig myConfig     = source.Configs["J2KDecoder"];

            if (myConfig != null)
            {
                if (myConfig.GetString("J2KDecoderModule", Name) != Name)
                {
                    return;
                }

                useFileCache = myConfig.GetBoolean("J2KDecoderFileCacheEnabled", false);
            }
            else
            {
                m_log.DebugFormat("[J2K DECODER MODULE] No decoder specified, Using defaults");
            }


            m_log.DebugFormat("[J2K DECODER MODULE] Using {0} decoder. File Cache is {1}",
                              Name, (useFileCache ? "enabled" : "disabled"));

            fCache = new J2KDecodeFileCache(useFileCache, J2KDecodeFileCache.CacheFolder);
            scene.RegisterModuleInterface <IJ2KDecoder>(this);
        }
Beispiel #2
0
        public void Initialise(Scene scene, IConfigSource source)
        {
            bool useFileCache = true;
            IConfig myConfig = source.Configs["J2KDecoder"];

            if (myConfig == null)
                return;

            if (myConfig.GetString("J2KDecoderModule", String.Empty) != Name)
                return;

            useFileCache = myConfig.GetBoolean("J2KDecoderFileCacheEnabled", true);

            m_log.DebugFormat("[J2K DECODER MODULE] Using {0} decoder. File Cache is {1}",
                Name, (useFileCache ? "enabled" : "disabled"));

            fCache = new J2KDecodeFileCache(useFileCache, J2KDecodeFileCache.CacheFolder);
			scene.RegisterModuleInterface<IJ2KDecoder>(this);
        }
        public void Initialize(Scene scene, IConfigSource source)
        {
            bool    useFileCache = true;
            IConfig myConfig     = source.Configs["J2KDecoder"];

            if (myConfig == null)
            {
                return;
            }

            if (myConfig.GetString("J2KDecoderModule", String.Empty) != Name)
            {
                return;
            }

            useFileCache = myConfig.GetBoolean("J2KDecoderFileCacheEnabled", true);

            m_log.DebugFormat("[J2K DECODER MODULE] Using {0} decoder. File Cache is {1}",
                              Name, (useFileCache ? "enabled" : "disabled"));

            fCache = new J2KDecodeFileCache(useFileCache, J2KDecodeFileCache.CacheFolder);
            scene.RegisterModuleInterface <IJ2KDecoder>(this);
        }
        public void Initialise(Scene scene, IConfigSource source)
        {
            if (m_scene == null)
                m_scene = scene;

            bool useFileCache = false; 
            IConfig myConfig = source.Configs["J2KDecoder"]; 

            if (myConfig != null)
            {
                if (myConfig.GetString("J2KDecoderModule", Name) != Name)
                    return;

                useFileCache = myConfig.GetBoolean("J2KDecoderFileCacheEnabled", false);
            }
            else
            {
                m_log.DebugFormat("[J2K DECODER MODULE] No decoder specified, Using defaults");
            }


            m_log.DebugFormat("[J2K DECODER MODULE] Using {0} decoder. File Cache is {1}",
                Name, (useFileCache ? "enabled" : "disabled"));

            fCache = new J2KDecodeFileCache(useFileCache, J2KDecodeFileCache.CacheFolder);
            scene.RegisterModuleInterface<IJ2KDecoder>(this);
        }
        public void Initialise(Scene scene, IConfigSource source)
        {
            if (m_Scene == null)
                m_Scene = scene;

            IConfig j2kConfig = source.Configs["J2KDecoder"];
            if (j2kConfig != null)
            {
                CacheFolder = j2kConfig.GetString("CacheDir", CacheFolder);
                CacheTimeout = j2kConfig.GetInt("CacheTimeout", CacheTimeout);
            }

            if (fCache == null)
                fCache = new J2KDecodeFileCache(CacheFolder, CacheTimeout);

            scene.RegisterModuleInterface<IJ2KDecoder>(this);

            if (CleanerThread == null && CacheTimeout != 0)
            {
                CleanerThread = new Thread(CleanCache);
                CleanerThread.Name = "J2KCleanerThread";
                CleanerThread.IsBackground = true;
                CleanerThread.Start();
            }
        }
Beispiel #6
0
 public J2KDecoderModule()
 {
     fCache = new J2KDecodeFileCache(CacheFolder);
 }
Beispiel #7
0
 public J2KDecoderModule()
 {
     fCache = new J2KDecodeFileCache(CacheFolder);
 }