diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index ff87493..7ac8bed 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | |||
@@ -32,7 +32,6 @@ using System.Reflection; | |||
32 | using System.Text; | 32 | using System.Text; |
33 | using System.Threading; | 33 | using System.Threading; |
34 | using log4net; | 34 | using log4net; |
35 | using Mono.Addins; | ||
36 | using Nini.Config; | 35 | using Nini.Config; |
37 | using OpenMetaverse; | 36 | using OpenMetaverse; |
38 | using OpenMetaverse.Imaging; | 37 | using OpenMetaverse.Imaging; |
@@ -46,8 +45,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
46 | { | 45 | { |
47 | public delegate void J2KDecodeDelegate(UUID assetID); | 46 | public delegate void J2KDecodeDelegate(UUID assetID); |
48 | 47 | ||
49 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 48 | public class J2KDecoderModule : IRegionModule, IJ2KDecoder |
50 | public class J2KDecoderModule : ISharedRegionModule, IJ2KDecoder | ||
51 | { | 49 | { |
52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
53 | 51 | ||
@@ -60,19 +58,16 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
60 | /// <summary>Reference to a scene (doesn't matter which one as long as it can load the cache module)</summary> | 58 | /// <summary>Reference to a scene (doesn't matter which one as long as it can load the cache module)</summary> |
61 | private Scene m_scene; | 59 | private Scene m_scene; |
62 | 60 | ||
63 | #region ISharedRegionModule | 61 | #region IRegionModule |
64 | 62 | ||
65 | public string Name { get { return "J2KDecoderModule"; } } | 63 | public string Name { get { return "J2KDecoderModule"; } } |
66 | 64 | public bool IsSharedModule { get { return true; } } | |
67 | public J2KDecoderModule() | ||
68 | { | ||
69 | } | ||
70 | 65 | ||
71 | public void Initialise(IConfigSource source) | 66 | public J2KDecoderModule() |
72 | { | 67 | { |
73 | } | 68 | } |
74 | 69 | ||
75 | public void AddRegion(Scene scene) | 70 | public void Initialise(Scene scene, IConfigSource source) |
76 | { | 71 | { |
77 | if (m_scene == null) | 72 | if (m_scene == null) |
78 | m_scene = scene; | 73 | m_scene = scene; |
@@ -80,30 +75,16 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
80 | scene.RegisterModuleInterface<IJ2KDecoder>(this); | 75 | scene.RegisterModuleInterface<IJ2KDecoder>(this); |
81 | } | 76 | } |
82 | 77 | ||
83 | public Type ReplaceableInterface | ||
84 | { | ||
85 | get { return null; } | ||
86 | } | ||
87 | |||
88 | public void RegionLoaded(Scene scene) | ||
89 | { | ||
90 | m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>(); | ||
91 | } | ||
92 | |||
93 | public void RemoveRegion(Scene scene) | ||
94 | { | ||
95 | scene.UnregisterModuleInterface<IJ2KDecoder>(this); | ||
96 | } | ||
97 | |||
98 | public void PostInitialise() | 78 | public void PostInitialise() |
99 | { | 79 | { |
80 | m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>(); | ||
100 | } | 81 | } |
101 | 82 | ||
102 | public void Close() | 83 | public void Close() |
103 | { | 84 | { |
104 | } | 85 | } |
105 | 86 | ||
106 | #endregion | 87 | #endregion IRegionModule |
107 | 88 | ||
108 | #region IJ2KDecoder | 89 | #region IJ2KDecoder |
109 | 90 | ||