diff options
author | Eric M. Tulla (BigPapi) <tulla@lindenlab.com> | 2009-11-02 11:29:37 -0500 |
---|---|---|
committer | Eric M. Tulla (BigPapi) <tulla@lindenlab.com> | 2009-11-02 11:29:37 -0500 |
commit | 7e086d46743d8cc3b51e494f0ca1d18829ab78ee (patch) | |
tree | 1f3e37516303910c32d3c10b8e5b2100c5e2b440 /indra | |
parent | 5d64b6f15510aa74cc8e8bd31c1d16a4eec76746 (diff) | |
parent | 9fb250e34430c356852f6a3109d04e4c904dfc96 (diff) |
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llcurrencyuimanager.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llface.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llfloaterabout.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloatersearch.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 37 | ||||
-rw-r--r-- | indra/newview/llviewertexture.h | 9 | ||||
-rw-r--r-- | indra/newview/llvoiceclient.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llvoiceclient.h | 5 | ||||
-rw-r--r-- | indra/newview/llvopartgroup.cpp | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_about.xml | 1 |
10 files changed, 73 insertions, 53 deletions
diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index 979a1a9a60..c4bfd71999 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -35,6 +35,8 @@ #include "lluictrlfactory.h" #include "lltextbox.h" #include "lllineeditor.h" +#include "llviewercontrol.h" +#include "llversionviewer.h" #include "llcurrencyuimanager.h" @@ -156,6 +158,11 @@ void LLCurrencyUIManager::Impl::updateCurrencyInfo() "secureSessionId", gAgent.getSecureSessionID().asString()); keywordArgs.appendInt("currencyBuy", mUserCurrencyBuy); + keywordArgs.appendString("viewerChannel", gSavedSettings.getString("VersionChannelName")); + keywordArgs.appendInt("viewerMajorVersion", LL_VERSION_MAJOR); + keywordArgs.appendInt("viewerMinorVersion", LL_VERSION_MINOR); + keywordArgs.appendInt("viewerPatchVersion", LL_VERSION_PATCH); + keywordArgs.appendInt("viewerBuildVersion", LL_VERSION_BUILD); LLXMLRPCValue params = LLXMLRPCValue::createArray(); params.append(keywordArgs); @@ -209,7 +216,12 @@ void LLCurrencyUIManager::Impl::startCurrencyBuy(const std::string& password) { keywordArgs.appendString("password", password); } - + keywordArgs.appendString("viewerChannel", gSavedSettings.getString("VersionChannelName")); + keywordArgs.appendInt("viewerMajorVersion", LL_VERSION_MAJOR); + keywordArgs.appendInt("viewerMinorVersion", LL_VERSION_MINOR); + keywordArgs.appendInt("viewerPatchVersion", LL_VERSION_PATCH); + keywordArgs.appendInt("viewerBuildVersion", LL_VERSION_BUILD); + LLXMLRPCValue params = LLXMLRPCValue::createArray(); params.append(keywordArgs); diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 0276cd9a24..09b3ce1e86 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -278,16 +278,6 @@ void LLFace::setTexture(LLViewerTexture* tex) } mTexture = tex ; - - //check if this texture is replaced by a parcel media texture. - if(mTexture.notNull() && mTexture->hasParcelMedia()) - { - LLViewerMediaTexture* mediap = LLViewerTextureManager::findMediaTexture(mTexture->getID()) ; - if(mediap) - { - mediap->addMediaToFace(this) ; - } - } } void LLFace::dirtyTexture() diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 63ea990d14..88658f7b9f 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -39,6 +39,7 @@ #include "llagent.h"
#include "llappviewer.h"
#include "llsecondlifeurls.h"
+#include "llvoiceclient.h"
#include "lluictrlfactory.h"
#include "llviewertexteditor.h"
#include "llviewercontrol.h"
@@ -268,6 +269,7 @@ LLSD LLFloaterAbout::getInfo() info["J2C_VERSION"] = LLImageJ2C::getEngineInfo();
bool want_fullname = true;
info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : LLSD();
+ info["VIVOX_VERSION"] = gVoiceClient ? gVoiceClient->getAPIVersion() : "Unknown";
// TODO: Implement media plugin version query
info["QT_WEBKIT_VERSION"] = "4.5.2";
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 4c83530f43..bd9798c18e 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -34,6 +34,7 @@ #include "llviewerprecompiledheaders.h" #include "llfloatersearch.h" #include "llmediactrl.h" +#include "llagent.h" LLFloaterSearch::LLFloaterSearch(const LLSD& key) : @@ -117,6 +118,14 @@ void LLFloaterSearch::search(const LLSD &key) std::string search_text = key.has("id") ? key["id"].asString() : ""; url += std::string("?q=") + search_text; + // append the maturity and teen capabilities for this agent + BOOL godlike = gAgent.isGodlike(); + bool mature_enabled = gAgent.canAccessMature() || godlike; + bool adult_enabled = gAgent.canAccessAdult() || godlike; + std::string mature = (mature_enabled) ? "True" : "False"; + std::string teen = (!adult_enabled) ? "True" : "False"; + url += "&t=" + teen + "&m=" + mature; + // and load the URL in the web view mBrowser->navigateTo(url); } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 28ef128265..758bf8c1aa 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -416,7 +416,7 @@ void LLViewerTexture::init(bool firstinit) mDontDiscard = FALSE; mMaxVirtualSize = 0.f; mNeedsResetMaxVirtualSize = FALSE ; - mHasParcelMedia = FALSE ; + mParcelMedia = NULL ; } //virtual @@ -2148,6 +2148,12 @@ void LLViewerMediaTexture::updateClass() { static const F32 MAX_INACTIVE_TIME = 30.f ; +#if 0 + //force to play media. + gSavedSettings.setBOOL("AudioSteamingMedia", true) ; + gSavedSettings.setBOOL("AudioStreamingVideo", true) ; +#endif + for(media_map_t::iterator iter = sMediaMap.begin() ; iter != sMediaMap.end(); ) { LLViewerMediaTexture* mediap = iter->second; @@ -2221,17 +2227,17 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL LLViewerTexture* tex = gTextureList.findImage(mID) ; if(tex) //this media is a parcel media for tex. { - tex->setParcelMedia(TRUE) ; - mParcelTexture = tex ; + tex->setParcelMedia(this) ; } } //virtual LLViewerMediaTexture::~LLViewerMediaTexture() { - if(mParcelTexture.notNull()) + LLViewerTexture* tex = gTextureList.findImage(mID) ; + if(tex) //this media is a parcel media for tex. { - mParcelTexture->setParcelMedia(FALSE) ; + tex->setParcelMedia(NULL) ; } } @@ -2283,21 +2289,11 @@ BOOL LLViewerMediaTexture::findFaces() mMediaFaceList.clear() ; BOOL ret = TRUE ; - - //for parcel media - if(mParcelTexture.isNull()) - { - LLViewerTexture* tex = gTextureList.findImage(mID) ; - if(tex) - { - tex->setParcelMedia(TRUE) ; - mParcelTexture = tex ; - } - } - if(mParcelTexture.notNull()) + LLViewerTexture* tex = gTextureList.findImage(mID) ; + if(tex) //this media is a parcel media for tex. { - const ll_face_list_t* face_list = mParcelTexture->getFaceList() ; + const ll_face_list_t* face_list = tex->getFaceList() ; for(ll_face_list_t::const_iterator iter = face_list->begin(); iter != face_list->end(); ++iter) { mMediaFaceList.push_back(*iter) ; @@ -2404,11 +2400,6 @@ void LLViewerMediaTexture::addFace(LLFace* facep) if(facep->getTexture() && facep->getTexture() != this && facep->getTexture()->getID() == mID) { mTextureList.push_back(facep->getTexture()) ; //a parcel media. - if(mParcelTexture.isNull()) - { - mParcelTexture = facep->getTexture() ; - mParcelTexture->setParcelMedia(TRUE) ; - } return ; } diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index ce8c47b878..020478beef 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -221,8 +221,9 @@ public: BOOL getDontDiscard() const { return mDontDiscard; } //----------------- - void setParcelMedia(BOOL has_media) {mHasParcelMedia = has_media;} - BOOL hasParcelMedia() const { return mHasParcelMedia ;} + void setParcelMedia(LLViewerMediaTexture* media) {mParcelMedia = media;} + BOOL hasParcelMedia() const { return mParcelMedia != NULL;} + LLViewerMediaTexture* getParcelMedia() const { return mParcelMedia;} /*virtual*/ void updateBindStatsForTester() ; protected: @@ -250,7 +251,8 @@ protected: LLPointer<LLImageGL> mGLTexturep ; S8 mDontDiscard; // Keep full res version of this image (for UI, etc) - BOOL mHasParcelMedia ; + //do not use LLPointer here. + LLViewerMediaTexture* mParcelMedia ; protected: typedef enum @@ -552,7 +554,6 @@ private: LLViewerMediaImpl* mMediaImplp ; BOOL mIsPlaying ; U32 mUpdateVirtualSizeTime ; - LLPointer< LLViewerTexture > mParcelTexture ; //the texture replaces this media texure when it is a parcel media texture. public: static void updateClass() ; diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 2834284a9b..df5481c874 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -254,6 +254,7 @@ protected: std::string nameString; std::string audioMediaString; std::string displayNameString; + std::string deviceString; int participantType; bool isLocallyMuted; bool isModeratorMuted; @@ -485,6 +486,14 @@ void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr) { gVoiceClient->clearRenderDevices(); } + else if (!stricmp("CaptureDevice", tag)) + { + deviceString.clear(); + } + else if (!stricmp("RenderDevice", tag)) + { + deviceString.clear(); + } else if (!stricmp("Buddies", tag)) { gVoiceClient->deleteAllBuddies(); @@ -508,7 +517,6 @@ void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr) void LLVivoxProtocolParser::EndTag(const char *tag) { const std::string& string = textBuffer; - bool clearbuffer = true; responseDepth--; @@ -580,6 +588,8 @@ void LLVivoxProtocolParser::EndTag(const char *tag) nameString = string; else if (!stricmp("DisplayName", tag)) displayNameString = string; + else if (!stricmp("Device", tag)) + deviceString = string; else if (!stricmp("AccountName", tag)) nameString = string; else if (!stricmp("ParticipantType", tag)) @@ -596,18 +606,13 @@ void LLVivoxProtocolParser::EndTag(const char *tag) uriString = string; else if (!stricmp("Presence", tag)) statusString = string; - else if (!stricmp("Device", tag)) - { - // This closing tag shouldn't clear the accumulated text. - clearbuffer = false; - } else if (!stricmp("CaptureDevice", tag)) { - gVoiceClient->addCaptureDevice(textBuffer); + gVoiceClient->addCaptureDevice(deviceString); } else if (!stricmp("RenderDevice", tag)) { - gVoiceClient->addRenderDevice(textBuffer); + gVoiceClient->addRenderDevice(deviceString); } else if (!stricmp("Buddy", tag)) { @@ -648,12 +653,8 @@ void LLVivoxProtocolParser::EndTag(const char *tag) else if (!stricmp("SubscriptionType", tag)) subscriptionType = string; - - if(clearbuffer) - { - textBuffer.clear(); - accumulateText= false; - } + textBuffer.clear(); + accumulateText= false; if (responseDepth == 0) { @@ -1160,7 +1161,8 @@ LLVoiceClient::LLVoiceClient() : mVoiceEnabled(false), mWriteInProgress(false), - mLipSyncEnabled(false) + mLipSyncEnabled(false), + mAPIVersion("Unknown") { gVoiceClient = this; @@ -3749,6 +3751,7 @@ void LLVoiceClient::connectorCreateResponse(int statusCode, std::string &statusS { // Connector created, move forward. LL_INFOS("Voice") << "Connector.Create succeeded, Vivox SDK version is " << versionID << LL_ENDL; + mAPIVersion = versionID; mConnectorHandle = connectorHandle; if(getState() == stateConnectorStarting) { diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index bddd18dee8..9df96d9a52 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -204,6 +204,9 @@ static void updatePosition(void); void keyDown(KEY key, MASK mask); void keyUp(KEY key, MASK mask); void middleMouseState(bool down); + + // Return the version of the Vivox library + std::string getAPIVersion() const { return mAPIVersion; } ///////////////////////////// // Accessors for data related to nearby speakers @@ -739,6 +742,8 @@ static std::string nameFromsipURI(const std::string &uri); BOOL mLipSyncEnabled; + std::string mAPIVersion; + typedef std::set<LLVoiceClientParticipantObserver*> observer_set_t; observer_set_t mParticipantObservers; diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 7585842623..143cd2d9c6 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -249,6 +249,12 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) facep->mCenterLocal = part->mPosAgent; facep->setFaceColor(part->mColor); facep->setTexture(part->mImagep); + + //check if this particle texture is replaced by a parcel media texture. + if(part->mImagep.notNull() && part->mImagep->hasParcelMedia()) + { + part->mImagep->getParcelMedia()->addMediaToFace(facep) ; + } mPixelArea = tot_area * pixel_meter_ratio; const F32 area_scale = 10.f; // scale area to increase priority a bit diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 02c6ed1b20..3f2636ae52 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -49,6 +49,7 @@ libcurl Version: [LIBCURL_VERSION] J2C Decoder Version: [J2C_VERSION] Audio Driver Version: [AUDIO_DRIVER_VERSION] Qt Webkit Version: [QT_WEBKIT_VERSION] +Vivox Version: [VIVOX_VERSION] </floater.string> <floater.string name="none"> |