aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-01-04 21:40:15 +0000
committerJustin Clark-Casey (justincc)2012-01-04 21:40:15 +0000
commit3a64522267352d1c68ef99ac76c65bd3c4f9eaf1 (patch)
tree1b6579a38d6deffb4fe06b4fd64b1986ddf1ebb3 /OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-3a64522267352d1c68ef99ac76c65bd3c4f9eaf1.zip
opensim-SC_OLD-3a64522267352d1c68ef99ac76c65bd3c4f9eaf1.tar.gz
opensim-SC_OLD-3a64522267352d1c68ef99ac76c65bd3c4f9eaf1.tar.bz2
opensim-SC_OLD-3a64522267352d1c68ef99ac76c65bd3c4f9eaf1.tar.xz
Minor formatting changes and commented out log lines for future debugging of image manager (udp texture fetch). No significant functional changes.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs24
1 files changed, 15 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
index cb9692a..185a909 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
@@ -102,7 +102,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
102 { 102 {
103 m_currentPacket = 2; 103 m_currentPacket = 2;
104 } 104 }
105 105
106 while (sendMore && packetsSent < packetsToSend && m_currentPacket <= m_stopPacket) 106 while (sendMore && packetsSent < packetsToSend && m_currentPacket <= m_stopPacket)
107 { 107 {
108 sendMore = SendPacket(client); 108 sendMore = SendPacket(client);
@@ -114,17 +114,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
114 return (m_currentPacket > m_stopPacket); 114 return (m_currentPacket > m_stopPacket);
115 } 115 }
116 116
117 /// <summary>
118 /// This is where we decide what we need to update
119 /// and assign the real discardLevel and packetNumber
120 /// assuming of course that the connected client might be bonkers
121 /// </summary>
117 public void RunUpdate() 122 public void RunUpdate()
118 { 123 {
119 //This is where we decide what we need to update
120 //and assign the real discardLevel and packetNumber
121 //assuming of course that the connected client might be bonkers
122
123 if (!HasAsset) 124 if (!HasAsset)
124 { 125 {
125 if (!m_assetRequested) 126 if (!m_assetRequested)
126 { 127 {
127 m_assetRequested = true; 128 m_assetRequested = true;
129// m_log.DebugFormat("[J2KIMAGE]: Requesting asset {0}", TextureID);
128 AssetService.Get(TextureID.ToString(), this, AssetReceived); 130 AssetService.Get(TextureID.ToString(), this, AssetReceived);
129 } 131 }
130 } 132 }
@@ -137,6 +139,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
137 { 139 {
138 //Request decode 140 //Request decode
139 m_decodeRequested = true; 141 m_decodeRequested = true;
142
143// m_log.DebugFormat("[J2KIMAGE]: Requesting decode of asset {0}", TextureID);
144
140 // Do we have a jpeg decoder? 145 // Do we have a jpeg decoder?
141 if (J2KDecoder != null) 146 if (J2KDecoder != null)
142 { 147 {
@@ -149,7 +154,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
149 // Send it off to the jpeg decoder 154 // Send it off to the jpeg decoder
150 J2KDecoder.BeginDecode(TextureID, m_asset, J2KDecodedCallback); 155 J2KDecoder.BeginDecode(TextureID, m_asset, J2KDecodedCallback);
151 } 156 }
152
153 } 157 }
154 else 158 else
155 { 159 {
@@ -328,14 +332,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
328 { 332 {
329 if (m_currentPacket == 0) 333 if (m_currentPacket == 0)
330 return 0; 334 return 0;
335
331 if (m_currentPacket == 1) 336 if (m_currentPacket == 1)
332 return FIRST_PACKET_SIZE; 337 return FIRST_PACKET_SIZE;
333 338
334 int result = FIRST_PACKET_SIZE + ((int)m_currentPacket - 2) * IMAGE_PACKET_SIZE; 339 int result = FIRST_PACKET_SIZE + ((int)m_currentPacket - 2) * IMAGE_PACKET_SIZE;
340
335 if (result < 0) 341 if (result < 0)
336 {
337 result = FIRST_PACKET_SIZE; 342 result = FIRST_PACKET_SIZE;
338 } 343
339 return result; 344 return result;
340 } 345 }
341 346
@@ -374,7 +379,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
374 { 379 {
375 UUID assetID = UUID.Zero; 380 UUID assetID = UUID.Zero;
376 if (asset != null) 381 if (asset != null)
382 {
377 assetID = asset.FullID; 383 assetID = asset.FullID;
384 }
378 else if ((InventoryAccessModule != null) && (sender != InventoryAccessModule)) 385 else if ((InventoryAccessModule != null) && (sender != InventoryAccessModule))
379 { 386 {
380 // Unfortunately we need this here, there's no other way. 387 // Unfortunately we need this here, there's no other way.
@@ -395,7 +402,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
395 } 402 }
396 403
397 AssetDataCallback(assetID, asset); 404 AssetDataCallback(assetID, asset);
398
399 } 405 }
400 } 406 }
401} 407}