diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs index aef0ada..a88fd26 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs | |||
@@ -31,6 +31,7 @@ using OpenMetaverse; | |||
31 | using OpenMetaverse.Imaging; | 31 | using OpenMetaverse.Imaging; |
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Region.Framework.Interfaces; | 33 | using OpenSim.Region.Framework.Interfaces; |
34 | using OpenSim.Services.Interfaces; | ||
34 | using log4net; | 35 | using log4net; |
35 | using System.Reflection; | 36 | using System.Reflection; |
36 | 37 | ||
@@ -50,7 +51,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
50 | public sbyte m_requestedDiscardLevel; | 51 | public sbyte m_requestedDiscardLevel; |
51 | public UUID m_requestedUUID; | 52 | public UUID m_requestedUUID; |
52 | public IJ2KDecoder m_j2kDecodeModule; | 53 | public IJ2KDecoder m_j2kDecodeModule; |
53 | public IAssetCache m_assetCache; | 54 | public IAssetService m_assetCache; |
54 | public OpenJPEG.J2KLayerInfo[] Layers = new OpenJPEG.J2KLayerInfo[0]; | 55 | public OpenJPEG.J2KLayerInfo[] Layers = new OpenJPEG.J2KLayerInfo[0]; |
55 | public AssetBase m_MissingSubstitute = null; | 56 | public AssetBase m_MissingSubstitute = null; |
56 | public bool m_decoded = false; | 57 | public bool m_decoded = false; |
@@ -131,6 +132,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
131 | RunUpdate(); | 132 | RunUpdate(); |
132 | } | 133 | } |
133 | 134 | ||
135 | protected void AssetReceived(string id, Object sender, AssetBase asset) | ||
136 | { | ||
137 | if (asset != null) | ||
138 | AssetDataCallback(asset.FullID, asset); | ||
139 | } | ||
140 | |||
134 | private int GetPacketForBytePosition(int bytePosition) | 141 | private int GetPacketForBytePosition(int bytePosition) |
135 | { | 142 | { |
136 | return ((bytePosition - cFirstPacketSize + cImagePacketSize - 1) / cImagePacketSize) + 1; | 143 | return ((bytePosition - cFirstPacketSize + cImagePacketSize - 1) / cImagePacketSize) + 1; |
@@ -301,7 +308,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
301 | if (!m_asset_requested) | 308 | if (!m_asset_requested) |
302 | { | 309 | { |
303 | m_asset_requested = true; | 310 | m_asset_requested = true; |
304 | m_assetCache.GetAsset(m_requestedUUID, AssetDataCallback, true); | 311 | m_assetCache.Get(m_requestedUUID.ToString(), this, AssetReceived); |
305 | 312 | ||
306 | } | 313 | } |
307 | 314 | ||