diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2010-02-02 14:53:01 -0800 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2010-02-02 14:53:01 -0800 |
commit | d14ecbace5c2d041fe4717c7d346083535267e24 (patch) | |
tree | ae95d038763d50cd5fc2f962f144c028059b6c4f /indra/newview/llviewermedia.h | |
parent | 58f813a136a5a889e01b39e96714af91402321ba (diff) | |
parent | 2c0418dfe0a3e903210516a70fd947870c340bf8 (diff) |
merge
Diffstat (limited to 'indra/newview/llviewermedia.h')
-rw-r--r-- | indra/newview/llviewermedia.h | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 28fb379960..ff18ed605a 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -42,6 +42,7 @@ #include "llviewermediaobserver.h" #include "llpluginclassmedia.h" +#include "v4color.h" class LLViewerMediaImpl; class LLUUID; @@ -99,14 +100,10 @@ class LLViewerMedia static void setVolume(F32 volume); static void updateMedia(void* dummy_arg = NULL); - static bool isMusicPlaying(); static void initClass(); static void cleanupClass(); - static void toggleMusicPlay(void*); - static void toggleMediaPlay(void*); - static void mediaStop(void*); static F32 getVolume(); static void muteListChanged(); static void setInWorldMediaDisabled(bool disabled); @@ -119,6 +116,12 @@ class LLViewerMedia // This is the comparitor used to sort the list. static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2); + + // For displaying the media first-run dialog. + static bool needsMediaFirstRun(); + static void displayMediaFirstRun(); + static bool firstRunCallback(const LLSD& notification, const LLSD& response); + }; // Implementation functions not exported into header file @@ -127,7 +130,10 @@ class LLViewerMediaImpl { LOG_CLASS(LLViewerMediaImpl); public: - + + friend class LLViewerMedia; + friend class LLMimeDiscoveryResponder; + LLViewerMediaImpl( const LLUUID& texture_id, S32 media_width, @@ -187,6 +193,7 @@ public: std::string getMediaURL() const { return mMediaURL; } std::string getCurrentMediaURL(); std::string getHomeURL() { return mHomeURL; } + std::string getMediaEntryURL() { return mMediaEntryURL; } void setHomeURL(const std::string& home_url) { mHomeURL = home_url; }; void clearCache(); std::string getMimeType() { return mMimeType; } @@ -205,11 +212,15 @@ public: bool isMediaPaused(); bool hasMedia() const; bool isMediaFailed() const { return mMediaSourceFailed; }; + void setMediaFailed(bool val) { mMediaSourceFailed = val; } void resetPreviousMediaState(); void setDisabled(bool disabled); bool isMediaDisabled() const { return mIsDisabled; }; - + + void setInNearbyMediaList(bool in_list) { mInNearbyMediaList = in_list; } + bool getInNearbyMediaList() { return mInNearbyMediaList; } + // returns true if this instance should not be loaded (disabled, muted object, crashed, etc.) bool isForcedUnloaded() const; @@ -285,6 +296,8 @@ public: // This will be used as part of the interest sorting algorithm. void setUsedInUI(bool used_in_ui); bool getUsedInUI() const { return mUsedInUI; }; + + void setBackgroundColor(LLColor4 color); F64 getCPUUsage() const; @@ -313,8 +326,12 @@ public: EMediaNavState getNavState() { return mMediaNavState; } void setNavState(EMediaNavState state); + void setNavigateSuspended(bool suspend); + bool isNavigateSuspended() { return mNavigateSuspended; }; + void cancelMimeTypeProbe(); -public: + +private: // a single media url with some data and an impl. LLPluginClassMedia* mMediaSource; LLUUID mTextureId; @@ -323,6 +340,7 @@ public: std::string mHomeURL; std::string mMimeType; std::string mCurrentMediaURL; // The most current media url from the plugin (via the "location changed" or "navigate complete" events). + std::string mCurrentMimeType; // The MIME type that caused the currently loaded plugin to be loaded. S32 mLastMouseX; // save the last mouse coord we get, so when we lose capture we can simulate a mouseup at that point. S32 mLastMouseY; S32 mMediaWidth; @@ -357,6 +375,9 @@ public: std::string mMediaEntryURL; bool mInNearbyMediaList; // used by LLFloaterNearbyMedia::refreshList() for performance reasons bool mClearCache; + LLColor4 mBackgroundColor; + bool mNavigateSuspended; + bool mNavigateSuspendedDeferred; private: BOOL mIsUpdated ; |