summaryrefslogtreecommitdiff
path: root/indra/newview/tests/llmediadataclient_test.cpp
AgeCommit message (Collapse)Author
2016-04-04merge with 4.0.3-releaseOz Linden
2016-01-15merge changes for 4.0.1-releaseOz Linden
2015-12-18MergeRider Linden
2015-11-10Added code to initiate controlled shutdown of plugins with timeouts for ↵Rider Linden
misbeahving plugin.
2015-11-10remove execute permission from many files that should not have itOz Linden
2015-04-28Convert some elements to STLRider Linden
2013-08-16merge with viewer-releaseNyx Linden
2013-05-21mergeBrad Payne (Vir Linden)
2013-05-01Merge vwr-dev-matGraham Madarasz
2013-04-30Merge 3.5.1 into MaterialsGraham Madarasz
2013-04-19merge changes for DRTVWR-294Oz Linden
2013-03-29Update Mac and Windows breakpad builds to latestGraham Madarasz
2013-03-13Large changes to the LLCurl::Responder API, as well as pulling in some ↵Don Kjer
changes to common libraries from the server codebase: * Additional error checking in http handlers. * Uniform log spam for http errors. * Switch to using constants for http heads and status codes. * Fixed bugs in incorrectly checking if parsing LLSD xml resulted in an error. * Reduced spam regarding LLSD parsing errors in the default completedRaw http handler. It should not longer be necessary to short-circuit completedRaw to avoid spam. * Ported over a few bug fixes from the server code. * Switch mode http status codes to use S32 instead of U32. * Ported LLSD::asStringRef from server code; avoids copying strings all over the place. * Ported server change to LLSD::asBinary; this always returns a reference now instead of copying the entire binary blob. * Ported server pretty notation format (and pretty binary format) to llsd serialization. * The new LLCurl::Responder API no longer has two error handlers to choose from. Overriding the following methods have been deprecated: ** error - use httpFailure ** errorWithContent - use httpFailure ** result - use httpSuccess ** completed - use httpCompleted ** completedHeader - no longer necessary; call getResponseHeaders() from a completion method to obtain these headers. * In order to 'catch' a completed http request, override one of these methods: ** httpSuccess - Called for any 2xx status code. ** httpFailure - Called for any non-2xx status code. ** httpComplete - Called for all status codes. Default implementation is to call either httpSuccess or httpFailure. * It is recommended to keep these methods protected/private in order to avoid triggering of these methods without using a 'push' method (see below). * Uniform error handling should followed whenever possible by calling a variant of this during httpFailure: ** llwarns << dumpResponse() << llendl; * Be sure to include LOG_CLASS(your_class_name) in your class in order for the log entry to give more context. * In order to 'push' a result into the responder, you should no longer call error, errorWithContent, result, or completed. * Nor should you directly call httpSuccess/Failure/Completed (unless passing a message up to a parent class). * Instead, you can set the internal content of a responder and trigger a corresponding method using the following methods: ** successResult - Sets results and calls httpSuccess ** failureResult - Sets results and calls httpFailure ** completedResult - Sets results and calls httpCompleted * To obtain information about a the response from a reponder method, use the following getters: ** getStatus - HTTP status code ** getReason - Reason string ** getContent - Content (Parsed body LLSD) ** getResponseHeaders - Response Headers (LLSD map) ** getHTTPMethod - HTTP method of the request ** getURL - URL of the request * It is still possible to override completeRaw if you want to manipulate data directly out of LLPumpIO. * See indra/llmessage/llcurl.h for more information.
2013-03-05Fixing issues with not detecting when LLSD XML parsing fails. Changing most ↵Don Kjer
http error handlers to understand LLSD error responses. Fleshing out most http error handler message spam.
2012-10-09Initial pass at getting a list of viewer objects with non-null material IDs.William Todd Stinson
2010-08-30merging up from viewer-developmentAaron Terrell (Enus)
2010-08-24standardizing test suite names as class name under testAaron Terrell (Enus)
2010-08-24Backed out changeset c3d41f18ce2bTofu Linden
back-out the back-out for this branch. yay.
2010-08-24Backed out changeset a62bf7c0af21Tofu Linden
Backing out this merge that I pushed (prematurely) to the wrong place.
2010-08-24merge heads. whew.Tofu Linden
2010-08-13Change license from GPL to LGPL (version 2.1)Oz Linden
2010-07-29Yet more cleanup around llmediadataclient.Monroe Linden
In LLVOVolume, added a count of LLMediaDataClientObjectImpl objects referencing each LLVOVolume object. This allows LLVOVolume::markDead() to skip the relatively expensive calls to removeFromQueue() when the LLVOVolume is known to have no active references. Refactored LLMediaDataClient and its two child classes so that only LLObjectMediaDataClient has the round-robin queue (LLObjectMediaNavigateClient doesn't need it), and cleaned up some of the virtual function hierarchy around queue processing. In LLMediaDataClient, added tracking for requests that aren't currently in a queue (i.e. requests that are in flight or waiting for retries) so they can be found when their objects are marked dead. LLMediaDataClient::Request now directly keeps track of the object ID and face associated with the request. Removed the "markedSent" concept from requests. Requests that have been sent are no longer kept in a queue. The Retry timer now references the Request object instead of the Responder. Replaced LLMediaDataClient::findOrRemove() with separate template functions for find and remove.
2010-07-21Miscellaneous cleanup in and around llmediadataclient.Monroe Linden
Added tags to some media-related logging in LLVOVolume. Made LLMediaDataClient::Responder do most of its work in tick() instead of its destructor. Added a comment to llmediadataclient.cpp that explains the idea behind the two-queue system. Made LLMediaDataClient::sortQueue() remove requests from the queue that hold references to dead items. This should make teleporting away solve many of the pathological queueing cases. Updated llmediadataclient test cases to reflect the change in behavior in sortQueue(). Removed some unnecessary const-ness in LLMediaDataClient::enqueue, which caused it to have to use const_cast.
2009-12-10PARTIAL DEV-43869 - add "isInterestingEnough()" to the queue calculationRick Pasetto
This change bumps the queue sizes way up, because we think that the "isInterestingEnough()" call will prevent loading more media data than we think is necessary. Still need to implement it in LLVOVolume, though
2009-12-10PARTIAL DEV-43869: LLMediaDataClient now uses two queuesRick Pasetto
This is a fairly major change that addresses the issue of an object with constantly-updating media. Before, that object would be put into our single queue and sorted to a particular spot, and since it continuously updates, it would "always be there". That means that nothing "behind" it would ever get serviced. This change introduces two queues for each MDC: one is the same "sorted" queue as before, and the other is unsorted, and "round-robins". New objects go into the sorted queue, objects whose media we already know about get put into the unsorted queue. The two queues are interleaved when serviced (one then the other is serviced -- if one is empty we try the other -- until they are both drained). The round-robin queue works a little differently: after an item is fetched from that queue (remember this would be an item we already know about), that request is marked and put back at the end of the queue. If that object gets a UDP update while in the queue, that mark is "cleared". When it gets to the front of the queue again, if it still marked, it is thrown away. If it is not marked, it is fetched, and again marked and put at the end. This makes the queue self-limiting in how big it can get. I have also made some other changes: - The sorting comparator now just delegates to the object for its "interest" calculation. A higher value = more interesting. LLVOVolume now uses its PixelArea for its "interest" calculation, which seems apparently better (the prior distance calculation was wrong anyway). - The score is cached before the sort operation is performed, so that it won't be expensive to sort - Now, the media version that is fetched is saved in the LLVOVolume, and we do not update if it is not newer (this is not very useful...yet.) - I've introduced hard limits (settable by debug settings) on the size of the queues. The sorted queue will be culled (after sort) to that count. NOTE: this will probably get removed in a later checkin, as I've already gotten feedback that this is not desirable - I've reorganized LLMediaDataClient so it makes more sense. - I've made the request object a little smaller, so the queue won't take up so much memory (more work could be done here) - Added a unit test for the two-queue case (though more tests are needed!)
2009-11-24DEV-41998 - refactor mediadataclient to use a std::list, and re-sort every ↵Rick Pasetto
time an item is pulled off the queue Review #43 This change refactors mediadataclient to no longer use a PriorityQueue (which sorts only on insertion), but rather just use a std::list which is re-sorted on insert, and also when "popped" (at the time the queue timer goes off). Also implemented a unit test to make sure re-sorting occurs on timer tick.
2009-11-19Made LLMediaDataClient not send requests on behalf of objects that are ↵Monroe Linden
marked as dead. When LLMediaDataClient::QueueTimer::tick() encounters an object at the head of the queue that's dead, it will now remove that object and loop, instead of sending a request and waiting for the tick timer to fire again. Added an isDead() function to LLMediaDataClientObject, and an additional unit test that verifies the handling of dead objects.
2009-11-10FIX DEV-41991: do not allow media settings panel to come up if media data is ↵Rick Pasetto
in flight Review #33 This change marks the current selection "not editable" if any objects in the selection are currently "in flight" (i.e. their media data has not been fetched yet, or is in the process of being fetched). This involved adding API to LLMediaDataClient to query whether an object is in the process of being fetched (i.e. in the queue). I've added a unit test for this new API.
2009-10-13"Fix" unit test: you can't count on timers being scheduled to not actually ↵Rick Pasetto
also fire in the same 'pump'
2009-10-13Disable boost::lexical_cast warningRick Pasetto
2009-10-13Potential fix for unit test (though I can't run it :( )Rick Pasetto
2009-10-12merge of login-apipalange
2009-10-09Unit tests for LLMediaDataClientRick Pasetto
This required a bit of refactoring of LLMediaDataClient: - Created LLMediaDataClientObject ABC, which now has a concrete impl in LLVOVolume - Created unit test with 6 tests (for now), testing - LLObjectMediaDataClient::fetchMedia() - LLObjectMediaDataClient::updateMedia() - LLObjectMediaNavigateClient::navigate() - queue ordering - retries - nav bounce back - Also ensures that ref counting works properly (this is important, because ownership is tricky with smart pointers put into queues, peeled off into timers that fire and auto destruct, and HTTP responders that also auto-destruct) - Had to fix LLCurl::Responder's stub, which was not initializing the ref count to 0, causing the ref counting tests to fail (boy, that was hard to find!). Reviewed by Callum