diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs | 10 |
2 files changed, 19 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 4d3a30c..a097ec9 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -306,6 +306,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
306 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 306 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
307 | protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients | 307 | protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients |
308 | 308 | ||
309 | /// <summary> | ||
310 | /// Handles UDP texture download. | ||
311 | /// </summary> | ||
312 | public LLImageManager ImageManager { get; private set; } | ||
313 | |||
309 | private readonly LLUDPServer m_udpServer; | 314 | private readonly LLUDPServer m_udpServer; |
310 | private readonly LLUDPClient m_udpClient; | 315 | private readonly LLUDPClient m_udpClient; |
311 | private readonly UUID m_sessionId; | 316 | private readonly UUID m_sessionId; |
@@ -351,7 +356,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
351 | protected Dictionary<PacketType, PacketProcessor> m_packetHandlers = new Dictionary<PacketType, PacketProcessor>(); | 356 | protected Dictionary<PacketType, PacketProcessor> m_packetHandlers = new Dictionary<PacketType, PacketProcessor>(); |
352 | protected Dictionary<string, GenericMessage> m_genericPacketHandlers = new Dictionary<string, GenericMessage>(); //PauPaw:Local Generic Message handlers | 357 | protected Dictionary<string, GenericMessage> m_genericPacketHandlers = new Dictionary<string, GenericMessage>(); //PauPaw:Local Generic Message handlers |
353 | protected Scene m_scene; | 358 | protected Scene m_scene; |
354 | private LLImageManager m_imageManager; | ||
355 | protected string m_firstName; | 359 | protected string m_firstName; |
356 | protected string m_lastName; | 360 | protected string m_lastName; |
357 | protected Thread m_clientThread; | 361 | protected Thread m_clientThread; |
@@ -470,7 +474,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
470 | 474 | ||
471 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); | 475 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); |
472 | m_GroupsModule = scene.RequestModuleInterface<IGroupsModule>(); | 476 | m_GroupsModule = scene.RequestModuleInterface<IGroupsModule>(); |
473 | m_imageManager = new LLImageManager(this, m_assetService, Scene.RequestModuleInterface<IJ2KDecoder>()); | 477 | ImageManager = new LLImageManager(this, m_assetService, Scene.RequestModuleInterface<IJ2KDecoder>()); |
474 | m_channelVersion = Util.StringToBytes256(scene.GetSimulatorVersion()); | 478 | m_channelVersion = Util.StringToBytes256(scene.GetSimulatorVersion()); |
475 | m_agentId = agentId; | 479 | m_agentId = agentId; |
476 | m_sessionId = sessionId; | 480 | m_sessionId = sessionId; |
@@ -522,7 +526,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
522 | IsActive = false; | 526 | IsActive = false; |
523 | 527 | ||
524 | // Shutdown the image manager | 528 | // Shutdown the image manager |
525 | m_imageManager.Close(); | 529 | ImageManager.Close(); |
526 | 530 | ||
527 | // Fire the callback for this connection closing | 531 | // Fire the callback for this connection closing |
528 | if (OnConnectionClosed != null) | 532 | if (OnConnectionClosed != null) |
@@ -3983,7 +3987,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3983 | } | 3987 | } |
3984 | 3988 | ||
3985 | if ((categories & ThrottleOutPacketTypeFlags.Texture) != 0) | 3989 | if ((categories & ThrottleOutPacketTypeFlags.Texture) != 0) |
3986 | m_imageManager.ProcessImageQueue(m_udpServer.TextureSendLimit); | 3990 | ImageManager.ProcessImageQueue(m_udpServer.TextureSendLimit); |
3987 | } | 3991 | } |
3988 | 3992 | ||
3989 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) | 3993 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) |
@@ -7531,7 +7535,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7531 | if ((ImageType)block.Type == ImageType.Baked) | 7535 | if ((ImageType)block.Type == ImageType.Baked) |
7532 | args.Priority *= 2.0f; | 7536 | args.Priority *= 2.0f; |
7533 | 7537 | ||
7534 | m_imageManager.EnqueueReq(args); | 7538 | ImageManager.EnqueueReq(args); |
7535 | } | 7539 | } |
7536 | 7540 | ||
7537 | return true; | 7541 | return true; |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs index 3e31b7d..db428f1 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs | |||
@@ -245,6 +245,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
245 | m_shuttingdown = true; | 245 | m_shuttingdown = true; |
246 | } | 246 | } |
247 | 247 | ||
248 | /// <summary> | ||
249 | /// Returns an array containing all the images in the queue. | ||
250 | /// </summary> | ||
251 | /// <returns></returns> | ||
252 | public J2KImage[] GetImages() | ||
253 | { | ||
254 | lock (m_priorityQueue) | ||
255 | return m_priorityQueue.ToArray(); | ||
256 | } | ||
257 | |||
248 | #region Priority Queue Helpers | 258 | #region Priority Queue Helpers |
249 | 259 | ||
250 | private J2KImage GetHighestPriorityImage() | 260 | private J2KImage GetHighestPriorityImage() |