summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.h
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2010-02-11 14:05:44 -0800
committerRick Pasetto <rick@lindenlab.com>2010-02-11 14:05:44 -0800
commit53d827781eb17100ae4784e19a4d59e23c59bf6d (patch)
tree801c3c509ebc6f5b58c9b9ee3898f178e2f922a7 /indra/newview/llviewermedia.h
parentdc61885aa6d0894c913f3ce7ede410d1c18ce089 (diff)
parent234f5a48a70d92e00aded1003814b2b883fa5ef4 (diff)
Merge from viewer-2-0
Diffstat (limited to 'indra/newview/llviewermedia.h')
-rw-r--r--indra/newview/llviewermedia.h42
1 files changed, 33 insertions, 9 deletions
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index daad70f14f..b90f64adc0 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -48,7 +48,7 @@ class LLViewerMediaImpl;
class LLUUID;
class LLViewerMediaTexture;
class LLMediaEntry;
-class LLVOVolume ;
+class LLVOVolume;
class LLMimeDiscoveryResponder;
typedef LLPointer<LLViewerMediaImpl> viewer_media_t;
@@ -76,7 +76,10 @@ class LLViewerMedia
public:
// String to get/set media autoplay in gSavedSettings
- static const char *AUTO_PLAY_MEDIA_SETTING;
+ static const char* AUTO_PLAY_MEDIA_SETTING;
+ static const char* SHOW_MEDIA_ON_OTHERS_SETTING;
+ static const char* SHOW_MEDIA_WITHIN_PARCEL_SETTING;
+ static const char* SHOW_MEDIA_OUTSIDE_PARCEL_SETTING;
typedef std::vector<LLViewerMediaImpl*> impl_list;
@@ -99,6 +102,11 @@ class LLViewerMedia
static bool textureHasMedia(const LLUUID& texture_id);
static void setVolume(F32 volume);
+ // Is any media currently "showing"? Includes Parcel Media. Does not include media in the UI.
+ static bool isAnyMediaShowing();
+ // Set all media enabled or disabled, depending on val. Does not include media in the UI.
+ static void setAllMediaEnabled(bool val);
+
static void updateMedia(void* dummy_arg = NULL);
static void initClass();
@@ -116,7 +124,9 @@ class LLViewerMedia
// This is the comparitor used to sort the list.
static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2);
-
+
+ private:
+ static void onTeleportFinished();
};
// Implementation functions not exported into header file
@@ -199,14 +209,16 @@ public:
void updateImagesMediaStreams();
LLUUID getMediaTextureID() const;
- void suspendUpdates(bool suspend) { mSuspendUpdates = suspend; };
+ void suspendUpdates(bool suspend) { mSuspendUpdates = suspend; }
void setVisible(bool visible);
- bool getVisible() const { return mVisible; };
+ bool getVisible() const { return mVisible; }
+ bool isVisible() const { return mVisible; }
+ bool isMediaTimeBased();
bool isMediaPlaying();
bool isMediaPaused();
bool hasMedia() const;
- bool isMediaFailed() const { return mMediaSourceFailed; };
+ bool isMediaFailed() const { return mMediaSourceFailed; }
void setMediaFailed(bool val) { mMediaSourceFailed = val; }
void resetPreviousMediaState();
@@ -222,10 +234,10 @@ public:
// returns true if this instance could be playable based on autoplay setting, current load state, etc.
bool isPlayable() const;
- void setIsParcelMedia(bool is_parcel_media) { mIsParcelMedia = is_parcel_media; };
- bool isParcelMedia() const { return mIsParcelMedia; };
+ void setIsParcelMedia(bool is_parcel_media) { mIsParcelMedia = is_parcel_media; }
+ bool isParcelMedia() const { return mIsParcelMedia; }
- ECursorType getLastSetCursor() { return mLastSetCursor; };
+ ECursorType getLastSetCursor() { return mLastSetCursor; }
// utility function to create a ready-to-use media instance from a desired media type.
static LLPluginClassMedia* newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height);
@@ -326,6 +338,18 @@ public:
void cancelMimeTypeProbe();
+ // Is this media attached to an avatar *not* self
+ bool isAttachedToAnotherAvatar() const;
+
+ // Is this media in the agent's parcel?
+ bool isInAgentParcel() const;
+
+private:
+ bool isAutoPlayable() const;
+ bool shouldShowBasedOnClass() const;
+ static bool isObjectAttachedToAnotherAvatar(LLVOVolume *obj);
+ static bool isObjectInAgentParcel(LLVOVolume *obj);
+
private:
// a single media url with some data and an impl.
LLPluginClassMedia* mMediaSource;