From 043d2d1f9dbdacff46e24f73b184dac8532d2db6 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 30 Oct 2009 12:33:25 -0700 Subject: Hooks for the "nearby media" UI. Added LLViewerMediaImpl::set/getDisabled(), which will prevent a media instance from loading. Added LLViewerMedia::set/getInWorldMediaDisabled(), which will disable all inworld media fom loading. Added LLViewerMedia::getPriorityList() and made the priority comparitor public. --- indra/newview/llviewermedia.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'indra/newview/llviewermedia.h') diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 5444abf854..043259a235 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -66,10 +66,15 @@ private: observerListType mObservers; }; +class LLViewerMediaImpl; + class LLViewerMedia { LOG_CLASS(LLViewerMedia); public: + + typedef std::vector impl_list; + // Special case early init for just web browser component // so we can show login screen. See .cpp file for details. JC @@ -97,6 +102,14 @@ class LLViewerMedia static void mediaStop(void*); static F32 getVolume(); static void muteListChanged(); + static void setInWorldMediaDisabled(bool disabled); + static bool getInWorldMediaDisabled(); + + // Returns the priority-sorted list of all media impls. + static const impl_list &getPriorityList(); + + // This is the comparitor used to sort the list. + static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2) }; // Implementation functions not exported into header file @@ -179,6 +192,12 @@ public: bool hasMedia(); bool isMediaFailed() { return mMediaSourceFailed; }; void resetPreviousMediaState(); + + void setDisabled(bool disabled) { mIsDisabled = disabled; }; + bool isMediaDisabled() { return mIsDisabled; }; + + // returns true if this instance should not be loaded (disabled, muted object, crashed, etc.) + bool isForcedUnloaded(); ECursorType getLastSetCursor() { return mLastSetCursor; }; @@ -301,6 +320,7 @@ public: bool mNeedsMuteCheck; int mPreviousMediaState; F64 mPreviousMediaTime; + bool mIsDisabled; private: BOOL mIsUpdated ; -- cgit v1.2.3 From b6df544fc0842464235646293e1ccbd7d2941324 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 30 Oct 2009 12:38:07 -0700 Subject: Fix for typo in my last commit. --- 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 043259a235..9d814b85b3 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -109,7 +109,7 @@ class LLViewerMedia static const impl_list &getPriorityList(); // This is the comparitor used to sort the list. - static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2) + static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2); }; // Implementation functions not exported into header file -- cgit v1.2.3 From 130fe8184d4fbf451d7f8e586eeceb02692fa6ef Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 30 Oct 2009 12:48:44 -0700 Subject: Fix a couple other build issues with my previous commit. --- 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 9d814b85b3..f997dc8c0e 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -197,7 +197,7 @@ public: bool isMediaDisabled() { return mIsDisabled; }; // returns true if this instance should not be loaded (disabled, muted object, crashed, etc.) - bool isForcedUnloaded(); + bool isForcedUnloaded() const; ECursorType getLastSetCursor() { return mLastSetCursor; }; -- cgit v1.2.3 From d6363c6c7ad32ecd12ca0bae849505a6181fb9e2 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 30 Oct 2009 14:07:23 -0700 Subject: Fixed a couple problems with getPriorityList(). --- 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 f997dc8c0e..1a4d2cd3c6 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -106,7 +106,7 @@ class LLViewerMedia static bool getInWorldMediaDisabled(); // Returns the priority-sorted list of all media impls. - static const impl_list &getPriorityList(); + static impl_list &getPriorityList(); // This is the comparitor used to sort the list. static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2); -- cgit v1.2.3 From 1fbacbaa9ac002f7f5ae9a0a18ef985a8ec934c7 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 30 Oct 2009 14:52:33 -0700 Subject: Partial implementation of LLFloaterNearbyMedia::refreshList(), with many TODO sections and a bit of ifdef-ed out pseudocode. Initial pass at LLViewerMediaImpl::getProximity(). Currently it just returns the position in the priority list, but that will change. --- indra/newview/llviewermedia.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llviewermedia.h') diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 1a4d2cd3c6..ee7f84b4cd 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -257,6 +257,7 @@ public: void calculateInterest(); F64 getInterest() const { return mInterest; }; F64 getApproximateTextureInterest(); + S32 getProximity() { return mProximity; }; // Mark this object as being used in a UI panel instead of on a prim // This will be used as part of the interest sorting algorithm. @@ -321,6 +322,7 @@ public: int mPreviousMediaState; F64 mPreviousMediaTime; bool mIsDisabled; + S32 mProximity; private: BOOL mIsUpdated ; -- cgit v1.2.3 From 9abcf6684e86b0b8c2d343ccd4864b2e854be3d7 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Fri, 30 Oct 2009 16:08:49 -0700 Subject: Add implementation for adding and removing items to and from the nearby media list scroll control --- indra/newview/llviewermedia.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewermedia.h') diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index ee7f84b4cd..b04432730a 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -172,7 +172,7 @@ public: bool handleUnicodeCharHere(llwchar uni_char); bool canNavigateForward(); bool canNavigateBack(); - std::string getMediaURL() { return mMediaURL; } + std::string getMediaURL() const { return mMediaURL; } std::string getCurrentMediaURL(); std::string getHomeURL() { return mHomeURL; } void setHomeURL(const std::string& home_url) { mHomeURL = home_url; }; @@ -181,7 +181,7 @@ public: void update(); void updateImagesMediaStreams(); - LLUUID getMediaTextureID(); + LLUUID getMediaTextureID() const; void suspendUpdates(bool suspend) { mSuspendUpdates = suspend; }; void setVisible(bool visible); -- cgit v1.2.3 From 9e602de33ae85bc78d6aa3c6bf45e29af7727796 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 30 Oct 2009 17:46:48 -0700 Subject: On a double-click in the nearby media list, try to focus/zoom in on the prim holding the media. --- indra/newview/llviewermedia.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewermedia.h') diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index b04432730a..dac0482078 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -250,6 +250,7 @@ public: void addObject(LLVOVolume* obj) ; void removeObject(LLVOVolume* obj) ; const std::list< LLVOVolume* >* getObjectList() const ; + LLVOVolume *getSomeObject(); void setUpdated(BOOL updated) ; BOOL isUpdated() ; -- cgit v1.2.3