From b8a46c81eefc3da66fc1a1c3ed9bfbf4418b535d Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Fri, 5 Feb 2010 12:06:57 -0800 Subject: Media classes + A step toward restructuring Nearby Media floater Several changes here: - Implemented support for "media classification": see http://docs.google.com/a/lindenlab.com/View?id=ddznhrqn_29vhnr2pg8 - Added settings for auto-playing of said classifications Nearby Media Floater: - On/Off buttons are now explicit...no more power buttons - Parcel Media and Parcel Audio are "lighter weight", with no more on/off - List now sorts with playing items at top, non-playing below - There is now a "Show" drop-down that filters the list by classification - Added checkboxes to the bottom to control auto-play settings More work is needed, so consider this a checkpoint --- indra/newview/llviewermedia.h | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'indra/newview/llviewermedia.h') diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index ff18ed605a..849e14e6c8 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 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 impl_list; @@ -204,14 +207,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(); @@ -227,10 +232,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); @@ -331,6 +336,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; -- cgit v1.2.3 From c680368e19f5be7265e2f15a1f4b626b1600e773 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 10 Feb 2010 14:28:46 -0800 Subject: EXT-5261 EXT-5263 EXT-5265 EXT-5266 EXT-5271 - Reformat NMF and enable behavior of media toggle in chrome Review #100 http://10.1.19.90:8080/go?page=ReviewDisplay&reviewid=100 This encompasses the first of the behavioral and structural changes for the Nearby Media Floater and the chrome button at the top of the UI. It includes: - Removal of the Parcel Media and Parcel Audio UI. Still not in the list yet. - New More/Less button, which doesn't quite work right (see below) - Changed icon for UI chrome - Enabled "turning on" and "turning off" media from the chrome and NMF - Added gear icon to bring up prefs - XUI changes to the structure of NMF - Implementation of the "tentative" autoplay flag This is basically a checkpoint so that Richard can help with the More/Less implementation --- indra/newview/llviewermedia.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llviewermedia.h') diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index b6aaca8cfa..c9e9017e5a 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -102,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(); -- cgit v1.2.3 From 234f5a48a70d92e00aded1003814b2b883fa5ef4 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 10 Feb 2010 17:31:46 -0800 Subject: Code review feedback: add comments, move teleport hook to a callback in llviewermedia Review #100 --- indra/newview/llviewermedia.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermedia.h') diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index c9e9017e5a..b90f64adc0 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -124,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 -- cgit v1.2.3