summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerparcelmedia.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2009-11-24 23:21:57 -0600
committerDave Parks <davep@lindenlab.com>2009-11-24 23:21:57 -0600
commite264f00c833805e1f813bc1d0b2cfd7a1bf7b272 (patch)
tree1a64a520502d2ed2c7dadc2316e543ae9e9a91d2 /indra/newview/llviewerparcelmedia.cpp
parentc9e153c182dae9472a2b87cddfec8c47b30b06b9 (diff)
parent5b5354c933aa7b1ceeb307853c24fba28d4e31bf (diff)
Merge
Diffstat (limited to 'indra/newview/llviewerparcelmedia.cpp')
-rw-r--r--indra/newview/llviewerparcelmedia.cpp31
1 files changed, 28 insertions, 3 deletions
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index 336d7f684e..f61dbb1b39 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -218,7 +218,7 @@ void LLViewerParcelMedia::play(LLParcel* parcel)
LL_DEBUGS("Media") << "new media impl with mime type " << mime_type << ", url " << media_url << LL_ENDL;
// Delete the old one first so they don't fight over the texture.
- sMediaImpl->stop();
+ sMediaImpl = NULL;
sMediaImpl = LLViewerMedia::newMediaImpl(
placeholder_texture_id,
@@ -261,8 +261,7 @@ void LLViewerParcelMedia::stop()
// We need to remove the media HUD if it is up.
LLViewerMediaFocus::getInstance()->clearFocus();
- // This will kill the media instance.
- sMediaImpl->stop();
+ // This will unload & kill the media instance.
sMediaImpl = NULL;
}
@@ -324,10 +323,36 @@ std::string LLViewerParcelMedia::getMimeType()
{
return sMediaImpl.notNull() ? sMediaImpl->getMimeType() : "none/none";
}
+
+//static
+std::string LLViewerParcelMedia::getURL()
+{
+ std::string url;
+ if(sMediaImpl.notNull())
+ url = sMediaImpl->getMediaURL();
+
+ if (url.empty())
+ url = LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaCurrentURL();
+
+ if (url.empty())
+ url = LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaURL();
+
+ return url;
+}
+
+//static
+std::string LLViewerParcelMedia::getName()
+{
+ if(sMediaImpl.notNull())
+ return sMediaImpl->getName();
+ return "";
+}
+
viewer_media_t LLViewerParcelMedia::getParcelMedia()
{
return sMediaImpl;
}
+
//////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerParcelMedia::processParcelMediaCommandMessage( LLMessageSystem *msg, void ** )