diff options
author | diva | 2009-05-15 05:00:25 +0000 |
---|---|---|
committer | diva | 2009-05-15 05:00:25 +0000 |
commit | 5e4fc6e91e5edffd1dc23af4f583d6294f394a3d (patch) | |
tree | 497076db68193be2d14fc3788c1d80c74d8c977d /OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs | |
parent | some sculpted prim geometry accuracy and meshing speed improvements (diff) | |
download | opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.zip opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.gz opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.bz2 opensim-SC-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 '')
-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 | ||