diff options
author | angela <angela@lindenlab.com> | 2009-10-29 18:07:46 +0800 |
---|---|---|
committer | angela <angela@lindenlab.com> | 2009-10-29 18:07:46 +0800 |
commit | 53d48741b8b595665d3f9a7f717bd9f8fa3f7601 (patch) | |
tree | 7abafe6164e10a5295514e69c8f26ad8bc40f62c /indra/llplugin/llpluginclassmedia.cpp | |
parent | 07749af3871420b9f4542e288da4372cdf2d2513 (diff) | |
parent | 64c2cb6ba1c089c15df6c8ef5ec5313ed5f1897f (diff) |
merge
Diffstat (limited to 'indra/llplugin/llpluginclassmedia.cpp')
-rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 26802bbd1c..457c074ef1 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -552,6 +552,23 @@ void LLPluginClassMedia::loadURI(const std::string &uri) sendMessage(message); } +const char* LLPluginClassMedia::priorityToString(EPriority priority) +{ + const char* result = "UNKNOWN"; + switch(priority) + { + case PRIORITY_UNLOADED: result = "unloaded"; break; + case PRIORITY_STOPPED: result = "stopped"; break; + case PRIORITY_HIDDEN: result = "hidden"; break; + case PRIORITY_SLIDESHOW: result = "slideshow"; break; + case PRIORITY_LOW: result = "low"; break; + case PRIORITY_NORMAL: result = "normal"; break; + case PRIORITY_HIGH: result = "high"; break; + } + + return result; +} + void LLPluginClassMedia::setPriority(EPriority priority) { if(mPriority != priority) @@ -560,35 +577,28 @@ void LLPluginClassMedia::setPriority(EPriority priority) LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_priority"); - std::string priority_string; + std::string priority_string = priorityToString(priority); switch(priority) { case PRIORITY_UNLOADED: - priority_string = "unloaded"; mSleepTime = 1.0f; break; case PRIORITY_STOPPED: - priority_string = "stopped"; mSleepTime = 1.0f; break; case PRIORITY_HIDDEN: - priority_string = "hidden"; mSleepTime = 1.0f; break; case PRIORITY_SLIDESHOW: - priority_string = "slideshow"; mSleepTime = 1.0f; break; case PRIORITY_LOW: - priority_string = "low"; mSleepTime = 1.0f / 50.0f; break; case PRIORITY_NORMAL: - priority_string = "normal"; mSleepTime = 1.0f / 100.0f; break; case PRIORITY_HIGH: - priority_string = "high"; mSleepTime = 1.0f / 100.0f; break; } @@ -794,6 +804,10 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message) { mStatus = LLPluginClassMediaOwner::MEDIA_PAUSED; } + else if(status == "done") + { + mStatus = LLPluginClassMediaOwner::MEDIA_DONE; + } else { // empty string or any unknown string |