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 d60d73a9e09dac3fa4508d8eddb8202614ff3536 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Mon, 8 Feb 2010 18:32:53 +0200 Subject: Fixed major bug EXT-5022 (streaming media first use dialog should be removed) --HG-- branch : product-engine --- indra/newview/llviewermedia.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'indra/newview/llviewermedia.h') diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index ff18ed605a..daad70f14f 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -117,11 +117,6 @@ 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 -- 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 From 6c5b984bf670e34fd88a8f1a0bdeb1042fa531b2 Mon Sep 17 00:00:00 2001 From: richard Date: Thu, 11 Feb 2010 18:06:25 -0800 Subject: converted llfloaternearbymedia to llpanelnearbymedia moved from LLTransientDockableFloater model to popup panel model like volume popup --- indra/newview/llviewermedia.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewermedia.h') diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index b6aaca8cfa..581a4ad2e4 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -385,7 +385,7 @@ private: LLMimeDiscoveryResponder *mMimeTypeProbe; bool mMediaAutoPlay; std::string mMediaEntryURL; - bool mInNearbyMediaList; // used by LLFloaterNearbyMedia::refreshList() for performance reasons + bool mInNearbyMediaList; // used by LLPanelNearbyMedia::refreshList() for performance reasons bool mClearCache; LLColor4 mBackgroundColor; bool mNavigateSuspended; -- cgit v1.2.3 From ffd962f3a3eafd7b65f90039a5bb04dccb0205bc Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Fri, 12 Feb 2010 13:38:17 -0800 Subject: EXT-5267 EXT-5268: Add Parcel Media and Parcel Audio items to nearby media panel Review #109 This (fairly major) change adds new "items" to the media list for Parcel Media and Parcel Audio. Since these items are special (before the items were always MoaP impls), they had to be treated special. Moreover, actions on all of "media" had to be centralized so that they would have similar behavior. --- indra/newview/llviewermedia.h | 114 ++++++++++++++++++++++-------------------- 1 file changed, 61 insertions(+), 53 deletions(-) (limited to 'indra/newview/llviewermedia.h') diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 9d21b4e9fe..ec25744fa2 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -73,60 +73,68 @@ class LLViewerMediaImpl; class LLViewerMedia { LOG_CLASS(LLViewerMedia); - public: - - // String to get/set media autoplay in gSavedSettings - 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; - - typedef std::map impl_id_map; - - // Special case early init for just web browser component - // so we can show login screen. See .cpp file for details. JC - - static viewer_media_t newMediaImpl(const LLUUID& texture_id, - S32 media_width = 0, - S32 media_height = 0, - U8 media_auto_scale = false, - U8 media_loop = false); - - static viewer_media_t updateMediaImpl(LLMediaEntry* media_entry, const std::string& previous_url, bool update_from_self); - static LLViewerMediaImpl* getMediaImplFromTextureID(const LLUUID& texture_id); - static std::string getCurrentUserAgent(); - static void updateBrowserUserAgent(); - static bool handleSkinCurrentChanged(const LLSD& /*newvalue*/); - 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(); - static void cleanupClass(); - - static F32 getVolume(); - static void muteListChanged(); - static void setInWorldMediaDisabled(bool disabled); - static bool getInWorldMediaDisabled(); - - static bool isInterestingEnough(const LLVOVolume* object, const F64 &object_interest); - - // Returns the priority-sorted list of all media impls. - static impl_list &getPriorityList(); - - // This is the comparitor used to sort the list. - static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2); +public: + + // String to get/set media autoplay in gSavedSettings + 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; + + typedef std::map impl_id_map; + + // Special case early init for just web browser component + // so we can show login screen. See .cpp file for details. JC + + static viewer_media_t newMediaImpl(const LLUUID& texture_id, + S32 media_width = 0, + S32 media_height = 0, + U8 media_auto_scale = false, + U8 media_loop = false); + + static viewer_media_t updateMediaImpl(LLMediaEntry* media_entry, const std::string& previous_url, bool update_from_self); + static LLViewerMediaImpl* getMediaImplFromTextureID(const LLUUID& texture_id); + static std::string getCurrentUserAgent(); + static void updateBrowserUserAgent(); + static bool handleSkinCurrentChanged(const LLSD& /*newvalue*/); + static bool textureHasMedia(const LLUUID& texture_id); + static void setVolume(F32 volume); - private: - static void onTeleportFinished(); + // 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(); + static void cleanupClass(); + + static F32 getVolume(); + static void muteListChanged(); + static void setInWorldMediaDisabled(bool disabled); + static bool getInWorldMediaDisabled(); + + static bool isInterestingEnough(const LLVOVolume* object, const F64 &object_interest); + + // Returns the priority-sorted list of all media impls. + static impl_list &getPriorityList(); + + // This is the comparitor used to sort the list. + static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2); + + // These are just helper functions for the convenience of others working with media + static bool hasInWorldMedia(); + static std::string getParcelAudioURL(); + static bool hasParcelMedia(); + static bool hasParcelAudio(); + static bool isParcelMediaPlaying(); + static bool isParcelAudioPlaying(); + +private: + static void onTeleportFinished(); }; // Implementation functions not exported into header file -- cgit v1.2.3 From 0e234edcc67ecf534df15f088158ef236f6de102 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Tue, 16 Feb 2010 15:42:33 -0800 Subject: EXT-5270: Implement "dynamic" controls based on the selected item in Nearby Media Review #112 This change adds controls that change state based on the selection in the nearby media panel. There are basically 3 sets: - Time-based - Web-based ("Normal") - Disabled Again, these change based on what you've got selected in the panel --- indra/newview/llviewermedia.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewermedia.h') diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index ec25744fa2..9dbffa78b3 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -230,7 +230,7 @@ public: void setMediaFailed(bool val) { mMediaSourceFailed = val; } void resetPreviousMediaState(); - void setDisabled(bool disabled); + void setDisabled(bool disabled, bool forcePlayOnEnable = false); bool isMediaDisabled() const { return mIsDisabled; }; void setInNearbyMediaList(bool in_list) { mInNearbyMediaList = in_list; } -- cgit v1.2.3