aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
diff options
context:
space:
mode:
authordiva2009-05-15 05:00:25 +0000
committerdiva2009-05-15 05:00:25 +0000
commit5e4fc6e91e5edffd1dc23af4f583d6294f394a3d (patch)
tree497076db68193be2d14fc3788c1d80c74d8c977d /OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
parentsome sculpted prim geometry accuracy and meshing speed improvements (diff)
downloadopensim-SC_OLD-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.zip
opensim-SC_OLD-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.gz
opensim-SC_OLD-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.bz2
opensim-SC_OLD-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.xz
Heart surgery on asset service code bits. Affects OpenSim.ini configuration -- please see the example. Affects region servers only.
This may break a lot of things, but it needs to go in. It was tested in standalone and the UCI grid, but it needs a lot more testing. Known problems: * HG asset transfers are borked for now * missing texture is missing * 3 unit tests commented out for now
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs11
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;
31using OpenMetaverse.Imaging; 31using OpenMetaverse.Imaging;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Framework.Interfaces; 33using OpenSim.Region.Framework.Interfaces;
34using OpenSim.Services.Interfaces;
34using log4net; 35using log4net;
35using System.Reflection; 36using 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