summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-11-24 12:10:10 -0500
committerLoren Shih <seraph@lindenlab.com>2009-11-24 12:10:10 -0500
commita22bb00530bb779d8e5bb40b68e55767604d88dc (patch)
tree520019b0c1e8c9cf475d19a60a0322a3c1caea6e /indra/newview/llvovolume.cpp
parent0904cbe4846192c9897267c9a60175f84881f9ed (diff)
parent76be5ddc7022508e7d3fcb04165b4a6f64f1d58d (diff)
merge
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp39
1 files changed, 32 insertions, 7 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 1f49cd30c7..48bd387022 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -140,6 +140,9 @@ public:
virtual std::string getCapabilityUrl(const std::string &name) const
{ return mObject->getRegion()->getCapability(name); }
+ virtual bool isDead() const
+ { return mObject->isDead(); }
+
private:
LLPointer<LLVOVolume> mObject;
};
@@ -183,6 +186,22 @@ LLVOVolume::~LLVOVolume()
}
}
+void LLVOVolume::markDead()
+{
+ if (!mDead)
+ {
+ // TODO: tell LLMediaDataClient to remove this object from its queue
+
+ // Detach all media impls from this object
+ for(U32 i = 0 ; i < mMediaImplList.size() ; i++)
+ {
+ removeMediaImpl(i);
+ }
+ }
+
+ LLViewerObject::markDead();
+}
+
// static
void LLVOVolume::initClass()
@@ -1708,10 +1727,16 @@ void LLVOVolume::updateObjectMediaData(const LLSD &media_data_array)
void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool merge, bool ignore_agent)
{
+ if(mDead)
+ {
+ // If the object has been marked dead, don't process media updates.
+ return;
+ }
+
LLTextureEntry *te = getTE(texture_index);
- //llinfos << "BEFORE: texture_index = " << texture_index
- // << " hasMedia = " << te->hasMedia() << " : "
- // << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl;
+ LL_DEBUGS("MediaOnAPrim") << "BEFORE: texture_index = " << texture_index
+ << " hasMedia = " << te->hasMedia() << " : "
+ << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl;
std::string previous_url;
LLMediaEntry* mep = te->getMediaData();
@@ -1751,9 +1776,9 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m
removeMediaImpl(texture_index);
}
- //llinfos << "AFTER: texture_index = " << texture_index
- // << " hasMedia = " << te->hasMedia() << " : "
- // << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl;
+ LL_DEBUGS("MediaOnAPrim") << "AFTER: texture_index = " << texture_index
+ << " hasMedia = " << te->hasMedia() << " : "
+ << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl;
}
void LLVOVolume::mediaNavigateBounceBack(U8 texture_index)
@@ -1776,7 +1801,7 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index)
}
if (! url.empty())
{
- LL_INFOS("LLMediaDataClient") << "bouncing back to URL: " << url << LL_ENDL;
+ LL_INFOS("MediaOnAPrim") << "bouncing back to URL: " << url << LL_ENDL;
impl->navigateTo(url, "", false, true);
}
}