Merge branch 'DRTVWR-580-maint-T' of https://github.com/secondlife/viewer

# Conflicts:
#	autobuild.xml
#	indra/newview/llvoicevivox.cpp
master
Ansariel 2023-04-21 19:43:30 +02:00
commit cffd703135
6 changed files with 78 additions and 56 deletions

View File

@ -672,9 +672,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>7b4aceaed511d44c4d1354b2162b59c7</string>
<string>02b569ac2bd71f201e3dd86ade7b3eeb</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/107398/936936/bugsplat-1.0.7.576560-darwin64-576560.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/113876/983684/bugsplat-1.0.7.579696-darwin64-579696.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@ -684,9 +684,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>53918c7c74b943cdc0bb90caf9657a84</string>
<string>5b32c47ae8e8cf0d4106f08e8db18044</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/107400/936949/bugsplat-4.0.3.0.576560-windows-576560.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/113878/983697/bugsplat-4.0.3.0.579696-windows-579696.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -696,16 +696,16 @@
<key>archive</key>
<map>
<key>hash</key>
<string>19d6a55db101f02e7eb531daf3e8cfd1</string>
<string>79c005fd8a660f8551b3c9ede64fa4ef</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/107401/936948/bugsplat-.576560-windows64-576560.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/113879/983696/bugsplat-4.0.3.0.579696-windows64-579696.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
<string>4.0.3.0.576560</string>
<string>4.0.3.0.579696</string>
</map>
<key>colladadom</key>
<map>
@ -3013,16 +3013,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>name</key>
<string>windows64</string>
</map>
<key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>46edf0f55417f8ef0d33a5c007bc3644</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89310/815451/threejs-0.132.2-windows64-564843.tar.bz2</string>
</map>
</map>
</map>
<key>version</key>
<string>0.132.2</string>

View File

@ -1402,6 +1402,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
// get number of joint motions
//-------------------------------------------------------------------------
U32 num_motions = 0;
S32 rotation_dupplicates = 0;
S32 position_dupplicates = 0;
if (!dp.unpackU32(num_motions, "num_joints"))
{
LL_WARNS() << "can't read number of joints"
@ -1632,6 +1634,12 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
rCurve->mKeys[time] = rot_key;
}
if (joint_motion->mRotationCurve.mNumKeys > joint_motion->mRotationCurve.mKeys.size())
{
rotation_dupplicates++;
LL_INFOS() << "Motion: " << asset_id << " had dupplicate rotation keys that were removed" << LL_ENDL;
}
//---------------------------------------------------------------------
// scan position curve header
//---------------------------------------------------------------------
@ -1734,9 +1742,24 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
}
}
if (joint_motion->mPositionCurve.mNumKeys > joint_motion->mPositionCurve.mKeys.size())
{
position_dupplicates++;
}
joint_motion->mUsage = joint_state->getUsage();
}
if (rotation_dupplicates > 0)
{
LL_INFOS() << "Motion: " << asset_id << " had " << rotation_dupplicates << " dupplicate rotation keys that were removed" << LL_ENDL;
}
if (position_dupplicates > 0)
{
LL_INFOS() << "Motion: " << asset_id << " had " << position_dupplicates << " dupplicate position keys that were removed" << LL_ENDL;
}
//-------------------------------------------------------------------------
// get number of constraints
//-------------------------------------------------------------------------
@ -2016,9 +2039,12 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const
JointMotion* joint_motionp = mJointMotionList->getJointMotion(i);
success &= dp.packString(joint_motionp->mJointName, "joint_name");
success &= dp.packS32(joint_motionp->mPriority, "joint_priority");
success &= dp.packS32(joint_motionp->mRotationCurve.mNumKeys, "num_rot_keys");
success &= dp.packS32(joint_motionp->mRotationCurve.mKeys.size(), "num_rot_keys");
LL_DEBUGS("BVH") << "Joint " << joint_motionp->mJointName << LL_ENDL;
LL_DEBUGS("BVH") << "Joint " << i
<< " name: " << joint_motionp->mJointName
<< " Rotation keys: " << joint_motionp->mRotationCurve.mKeys.size()
<< " Position keys: " << joint_motionp->mPositionCurve.mKeys.size() << LL_ENDL;
for (RotationCurve::key_map_t::iterator iter = joint_motionp->mRotationCurve.mKeys.begin();
iter != joint_motionp->mRotationCurve.mKeys.end(); ++iter)
{
@ -2040,7 +2066,7 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const
LL_DEBUGS("BVH") << " rot: t " << rot_key.mTime << " angles " << rot_angles.mV[VX] <<","<< rot_angles.mV[VY] <<","<< rot_angles.mV[VZ] << LL_ENDL;
}
success &= dp.packS32(joint_motionp->mPositionCurve.mNumKeys, "num_pos_keys");
success &= dp.packS32(joint_motionp->mPositionCurve.mKeys.size(), "num_pos_keys");
for (PositionCurve::key_map_t::iterator iter = joint_motionp->mPositionCurve.mKeys.begin();
iter != joint_motionp->mPositionCurve.mKeys.end(); ++iter)
{

View File

@ -2657,6 +2657,7 @@ bool idle_startup()
LLNotificationsUtil::add("InventoryUnusable");
}
LLInventoryModelBackgroundFetch::instance().start();
gInventory.createCommonSystemCategories();
// It's debatable whether this flag is a good idea - sets all

View File

@ -276,13 +276,13 @@ static void killGateway()
///////////////////////////////////////////////////////////////////////////////////////////////
bool LLVivoxVoiceClient::sShuttingDown = false;
bool LLVivoxVoiceClient::sConnected = false;
LLPumpIO *LLVivoxVoiceClient::sPump = nullptr;
LLVivoxVoiceClient::LLVivoxVoiceClient() :
mSessionTerminateRequested(false),
mRelogRequested(false),
mConnected(false),
mTerminateDaemon(false),
mPump(NULL),
mSpatialJoiningNum(0),
mTuningMode(false),
@ -351,7 +351,11 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
mIsProcessingChannels(false),
mIsCoroutineActive(false),
mVivoxPump("vivoxClientPump")
{
{
sShuttingDown = false;
sConnected = false;
sPump = nullptr;
mSpeakerVolume = scale_speaker_volume(0);
mVoiceVersion.serverVersion = "";
@ -393,7 +397,7 @@ LLVivoxVoiceClient::~LLVivoxVoiceClient()
void LLVivoxVoiceClient::init(LLPumpIO *pump)
{
// constructor will set up LLVoiceClient::getInstance()
mPump = pump;
sPump = pump;
// LLCoros::instance().launch("LLVivoxVoiceClient::voiceControlCoro",
// boost::bind(&LLVivoxVoiceClient::voiceControlCoro, LLVivoxVoiceClient::getInstance()));
@ -414,10 +418,10 @@ void LLVivoxVoiceClient::terminate()
logoutOfVivox(false);
}
if(mConnected)
if(sConnected)
{
breakVoiceConnection(false);
mConnected = false;
sConnected = false;
}
else
{
@ -426,7 +430,7 @@ void LLVivoxVoiceClient::terminate()
}
sShuttingDown = true;
mPump = NULL;
sPump = NULL;
// <FS:Ansariel> Delete useless Vivox logs on logout
if (gSavedSettings.getString("VivoxDebugLevel") == "0")
@ -482,7 +486,7 @@ bool LLVivoxVoiceClient::writeString(const std::string &str)
bool result = false;
LL_DEBUGS("LowVoice") << "sending:\n" << str << LL_ENDL;
if(mConnected)
if(sConnected)
{
apr_status_t err;
apr_size_t size = (apr_size_t)str.size();
@ -1167,7 +1171,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
int retryCount(0);
LLVoiceVivoxStats::getInstance()->reset();
while (!mConnected && !sShuttingDown && retryCount++ <= DAEMON_CONNECT_RETRY_MAX)
while (!sConnected && !sShuttingDown && retryCount++ <= DAEMON_CONNECT_RETRY_MAX)
{
LLVoiceVivoxStats::getInstance()->connectionAttemptStart();
LL_DEBUGS("Voice") << "Attempting to connect to vivox daemon: " << mDaemonHost << LL_ENDL;
@ -1177,23 +1181,23 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
mSocket = LLSocket::create(gAPRPoolp, LLSocket::STREAM_TCP);
}
mConnected = mSocket->blockingConnect(mDaemonHost);
LLVoiceVivoxStats::getInstance()->connectionAttemptEnd(mConnected);
if (!mConnected)
sConnected = mSocket->blockingConnect(mDaemonHost);
LLVoiceVivoxStats::getInstance()->connectionAttemptEnd(sConnected);
if (!sConnected)
{
llcoro::suspendUntilTimeout(DAEMON_CONNECT_THROTTLE_SECONDS);
}
}
//---------------------------------------------------------------------
if (sShuttingDown && !mConnected)
if (sShuttingDown && !sConnected)
{
return false;
}
llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS);
while (!mPump && !sShuttingDown)
while (!sPump && !sShuttingDown)
{ // Can't use the pump until we have it available.
llcoro::suspend();
}
@ -1215,7 +1219,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
readChain.push_back(LLIOPipe::ptr_t(new LLVivoxProtocolParser()));
mPump->addChain(readChain, NEVER_CHAIN_EXPIRY_SECS);
sPump->addChain(readChain, NEVER_CHAIN_EXPIRY_SECS);
//---------------------------------------------------------------------
@ -1437,9 +1441,9 @@ bool LLVivoxVoiceClient::breakVoiceConnection(bool corowait)
// the message, yet we need to receive "connector shutdown response".
// Either wait a bit and emulate it or check gMessageSystem for specific message
_sleep(1000);
if (mConnected)
if (sConnected)
{
mConnected = false;
sConnected = false;
LLSD vivoxevent(LLSDMap("connector", LLSD::Boolean(false)));
mVivoxPump.post(vivoxevent);
}
@ -1451,7 +1455,7 @@ bool LLVivoxVoiceClient::breakVoiceConnection(bool corowait)
LL_DEBUGS("Voice") << "closing SLVoice socket" << LL_ENDL;
closeSocket(); // Need to do this now -- bad things happen if the destructor does it later.
cleanUp();
mConnected = false;
sConnected = false;
return retval;
}
@ -2637,7 +2641,7 @@ bool LLVivoxVoiceClient::performMicTuning()
void LLVivoxVoiceClient::closeSocket(void)
{
mSocket.reset();
mConnected = false;
sConnected = false;
mConnectorEstablished = false;
mAccountLoggedIn = false;
}
@ -3144,7 +3148,7 @@ bool LLVivoxVoiceClient::deviceSettingsAvailable()
{
bool result = true;
if(!mConnected)
if(!sConnected)
result = false;
if(mRenderDevices.empty())
@ -3973,7 +3977,7 @@ void LLVivoxVoiceClient::connectorShutdownResponse(int statusCode, std::string &
// Should this ever fail? do we care if it does?
}
mConnected = false;
sConnected = false;
mShutdownComplete = true;
LLSD vivoxevent(LLSDMap("connector", LLSD::Boolean(false)));
@ -7568,7 +7572,7 @@ LLIOPipe::EStatus LLVivoxProtocolParser::process_impl(
LL_DEBUGS("VivoxProtocolParser") << "at end, mInput is: " << mInput << LL_ENDL;
if(!LLVivoxVoiceClient::getInstance()->mConnected)
if(!LLVivoxVoiceClient::sConnected)
{
// If voice has been disabled, we just want to close the socket. This does so.
LL_INFOS("Voice") << "returning STATUS_STOP" << LL_ENDL;

View File

@ -676,12 +676,10 @@ private:
LLHost mDaemonHost;
LLSocket::ptr_t mSocket;
bool mConnected;
// We should kill the voice daemon in case of connection alert
bool mTerminateDaemon;
LLPumpIO *mPump;
friend class LLVivoxProtocolParser;
std::string mAccountName;
@ -930,7 +928,10 @@ private:
bool mIsProcessingChannels;
bool mIsCoroutineActive;
static bool sShuttingDown; // corutines can last longer than vivox so we need a static variable as a shutdown flag
// This variables can last longer than vivox in coroutines so we need them as static
static bool sShuttingDown;
static bool sConnected;
static LLPumpIO* sPump;
LLEventMailDrop mVivoxPump;
};

View File

@ -224,15 +224,6 @@
top_delta="-4"
name="azure_api_key"
width="210" />
<button
follows="left|top"
height="23"
label="Verify"
layout="topleft"
left_pad="10"
name="verify_azure_api_key_btn"
top_delta="-2"
width="90" />
<text
type="string"
length="1"
@ -241,7 +232,7 @@
layout="topleft"
left="70"
name="azure_api_region_label"
top_pad="10"
top_pad="11"
width="85">
Region:
</text>
@ -255,6 +246,15 @@
top_delta="-4"
name="azure_api_region"
width="210" />
<button
follows="left|top"
height="23"
label="Verify"
layout="topleft"
left_pad="10"
name="verify_azure_api_key_btn"
top_delta="-2"
width="90" />
<text
follows="top|right"
@ -263,7 +263,7 @@
left="70"
length="1"
name="google_api_key_label"
top_pad="55"
top_pad="53"
type="string"
width="85">
Google [http://code.google.com/apis/language/translate/v2/getting_started.html#auth API key]: