summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xetc/message.xml19
-rw-r--r--indra/llmath/llquaternion.h2
-rw-r--r--indra/newview/llimview.cpp113
-rw-r--r--indra/newview/llimview.h8
-rw-r--r--indra/newview/llpanelvoicedevicesettings.cpp76
-rw-r--r--indra/newview/llvieweraudio.cpp4
-rwxr-xr-xindra/newview/llviewerregion.cpp2
-rw-r--r--indra/newview/llvoavatar.cpp2
-rw-r--r--indra/newview/llvoavatar.h6
-rw-r--r--indra/newview/llvoicechannel.cpp262
-rw-r--r--indra/newview/llvoicechannel.h50
-rw-r--r--indra/newview/llvoiceclient.cpp169
-rw-r--r--indra/newview/llvoiceclient.h16
13 files changed, 363 insertions, 366 deletions
diff --git a/etc/message.xml b/etc/message.xml
index 7d524b5eb8..dee3fd72dd 100755
--- a/etc/message.xml
+++ b/etc/message.xml
@@ -506,14 +506,13 @@
<boolean>false</boolean>
</map>
- <key>VoiceSignalingRequest</key>
- <map>
- <key>flavor</key>
- <string>llsd</string>
- <key>trusted-sender</key>
- <boolean>false</boolean>
- </map>
-
+ <key>VoiceSignalingRequest</key>
+ <map>
+ <key>flavor</key>
+ <string>llsd</string>
+ <key>trusted-sender</key>
+ <boolean>false</boolean>
+ </map>
<!-- Server to client -->
<key>RequiredVoiceVersion</key>
<map>
@@ -697,8 +696,8 @@
<key>ProvisionVoiceAccountRequest</key>
<boolean>false</boolean>
- <key>VoiceSignalingRequest</key>
- <boolean>false</boolean>
+ <key>VoiceSignalingRequest</key>
+ <boolean>false</boolean>
<key>RemoteParcelRequest</key>
<boolean>false</boolean>
diff --git a/indra/llmath/llquaternion.h b/indra/llmath/llquaternion.h
index 609d75a095..aaa868352a 100644
--- a/indra/llmath/llquaternion.h
+++ b/indra/llmath/llquaternion.h
@@ -132,7 +132,7 @@ public:
friend LLQuaternion operator~(const LLQuaternion &a); // Returns a* (Conjugate of a)
bool operator==(const LLQuaternion &b) const; // Returns a == b
bool operator!=(const LLQuaternion &b) const; // Returns a != b
- F64 operator[](int idx) const { return mQ[idx]; }
+ F64 operator[](int idx) const { return mQ[idx]; }
friend const LLQuaternion& operator*=(LLQuaternion &a, const LLQuaternion &b); // Returns a * b
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index b2769e9bab..921e757b58 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -722,20 +722,20 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id,
if (IM_NOTHING_SPECIAL == mType || IM_SESSION_P2P_INVITE == mType)
{
- LLVoiceP2POutgoingCallInterface *outgoingInterface =
- LLVoiceClient::getInstance()->getOutgoingCallInterface(voiceChannelInfo);
+ LLVoiceP2POutgoingCallInterface *outgoingInterface =
+ LLVoiceClient::getInstance()->getOutgoingCallInterface(voiceChannelInfo);
- if (outgoingInterface)
- {
- // only use LLVoiceChannelP2P if the provider can handle the special P2P interface,
- // which uses the voice server to relay calls and invites. Otherwise,
- // we use the group voice provider.
- mVoiceChannel = new LLVoiceChannelP2P(session_id, name, other_participant_id, outgoingInterface);
- }
+ if (outgoingInterface)
+ {
+ // only use LLVoiceChannelP2P if the provider can handle the special P2P interface,
+ // which uses the voice server to relay calls and invites. Otherwise,
+ // we use the group voice provider.
+ mVoiceChannel = new LLVoiceChannelP2P(session_id, name, other_participant_id, outgoingInterface);
+ }
else
{
- p2pAsAdhocCall = true;
- mVoiceChannel = new LLVoiceChannelGroup(session_id, name, true);
+ p2pAsAdhocCall = true;
+ mVoiceChannel = new LLVoiceChannelGroup(session_id, name, true);
}
}
else
@@ -744,17 +744,17 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id,
if (gAgent.isInGroup(mSessionID))
{
mSessionType = GROUP_SESSION;
- mVoiceChannel = new LLVoiceChannelGroup(session_id, name, false);
+ mVoiceChannel = new LLVoiceChannelGroup(session_id, name, false);
}
else
{
mSessionType = ADHOC_SESSION;
- mVoiceChannel = new LLVoiceChannelGroup(session_id, name, false);
+ mVoiceChannel = new LLVoiceChannelGroup(session_id, name, false);
}
}
mVoiceChannelStateChangeConnection = mVoiceChannel->setStateChangedCallback(boost::bind(&LLIMSession::onVoiceChannelStateChanged, this, _1, _2, _3));
- mVoiceChannel->setChannelInfo(voiceChannelInfo);
+ mVoiceChannel->setChannelInfo(voiceChannelInfo);
mSpeakers = new LLIMSpeakerMgr(mVoiceChannel);
@@ -2069,7 +2069,7 @@ bool LLIMModel::sendStartSession(
const LLUUID& other_participant_id,
const uuid_vec_t& ids,
EInstantMessage dialog,
- bool p2p_as_adhoc_call)
+ bool p2p_as_adhoc_call)
{
if ( dialog == IM_SESSION_GROUP_START )
{
@@ -2118,13 +2118,13 @@ bool LLIMModel::sendStartSession(
}
else if ((dialog == IM_SESSION_P2P_INVITE) || (dialog == IM_NOTHING_SPECIAL))
{
- LLViewerRegion *region = gAgent.getRegion();
- if (region)
- {
- std::string url = region->getCapability("ChatSessionRequest");
- LLCoros::instance().launch("startP2P", boost::bind(&startP2PCoro, url, temp_session_id, gAgent.getID(), other_participant_id));
- }
- return true;
+ LLViewerRegion *region = gAgent.getRegion();
+ if (region)
+ {
+ std::string url = region->getCapability("ChatSessionRequest");
+ LLCoros::instance().launch("startP2P", boost::bind(&startP2PCoro, url, temp_session_id, gAgent.getID(), other_participant_id));
+ }
+ return true;
}
return false;
}
@@ -2368,11 +2368,12 @@ void LLCallDialogManager::onVoiceChannelStateChangedInt(const LLVoiceChannel::ES
return;
}
break;
- case LLVoiceChannel::STATE_NO_CHANNEL_INFO :
+
+ case LLVoiceChannel::STATE_NO_CHANNEL_INFO :
// This will happen in p2p calls using the adhoc
// infrastructure, which marks the channel as no channel info
// after the call is closed, which forces a dialogue.
- return;
+ return;
case LLVoiceChannel::STATE_HUNG_UP:
// this state is coming before session is changed
@@ -2716,28 +2717,28 @@ bool is_voice_call_type(const std::string &value)
}
LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) :
-LLCallDialog(payload),
-mAvatarNameCacheConnection()
+ LLCallDialog(payload),
+ mAvatarNameCacheConnection()
{
}
void LLIncomingCallDialog::onLifetimeExpired()
{
- LLVoiceP2PIncomingCallInterfacePtr call = LLVoiceClient::getInstance()->getIncomingCallInterface(mPayload["voice_session_info"]);
- if (call)
- {
- // restart notification's timer if call is still valid
- mLifetimeTimer.start();
- }
- else
- {
- // close invitation if call is already not valid
- mLifetimeTimer.stop();
- LLUUID session_id = mPayload["session_id"].asUUID();
- gIMMgr->clearPendingAgentListUpdates(session_id);
- gIMMgr->clearPendingInvitation(session_id);
- closeFloater();
- }
+ LLVoiceP2PIncomingCallInterfacePtr call = LLVoiceClient::getInstance()->getIncomingCallInterface(mPayload["voice_session_info"]);
+ if (call)
+ {
+ // restart notification's timer if call is still valid
+ mLifetimeTimer.start();
+ }
+ else
+ {
+ // close invitation if call is already not valid
+ mLifetimeTimer.stop();
+ LLUUID session_id = mPayload["session_id"].asUUID();
+ gIMMgr->clearPendingAgentListUpdates(session_id);
+ gIMMgr->clearPendingInvitation(session_id);
+ closeFloater();
+ }
}
BOOL LLIncomingCallDialog::postBuild()
@@ -2752,7 +2753,7 @@ BOOL LLIncomingCallDialog::postBuild()
LLUUID session_id = mPayload["session_id"].asUUID();
LLSD caller_id = mPayload["caller_id"];
- std::string caller_name = mPayload["caller_name"].asString();
+ std::string caller_name = mPayload["caller_name"].asString();
if (session_id.isNull() && caller_id.asUUID().isNull())
{
@@ -2903,7 +2904,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload
std::string session_name = payload["session_name"].asString();
if (session_name.empty())
{
- session_name = payload["caller_name"].asString();
+ session_name = payload["caller_name"].asString();
}
EInstantMessage type = (EInstantMessage)payload["type"].asInteger();
LLIMMgr::EInvitationType inv_type = (LLIMMgr::EInvitationType)payload["inv_type"].asInteger();
@@ -3001,11 +3002,11 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload
{
if (type == IM_SESSION_P2P_INVITE)
{
- LLVoiceP2PIncomingCallInterfacePtr call = LLVoiceClient::getInstance()->getIncomingCallInterface(payload["voice_session_info"]);
- if (call)
- {
- call->declineInvite();
- }
+ LLVoiceP2PIncomingCallInterfacePtr call = LLVoiceClient::getInstance()->getIncomingCallInterface(payload["voice_session_info"]);
+ if (call)
+ {
+ call->declineInvite();
+ }
}
else
{
@@ -3098,7 +3099,7 @@ void LLIMMgr::addMessage(
{
fixed_session_name = av_name.getDisplayName();
}
- LLIMModel::getInstance()->newSession(new_session_id, fixed_session_name, dialog, other_participant_id, LLSD(), is_offline_msg);
+ LLIMModel::getInstance()->newSession(new_session_id, fixed_session_name, dialog, other_participant_id, LLSD(), is_offline_msg);
LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(new_session_id);
if (session)
@@ -3261,7 +3262,7 @@ LLUUID LLIMMgr::addP2PSession(const std::string& name,
const LLUUID& other_participant_id,
const LLSD& voice_channel_info)
{
- LL_WARNS("Voice") << "ADD P2P VOICE CHANNEL INFO: " << voice_channel_info << LL_ENDL;
+ LL_DEBUGS("Voice") << "Add p2p voice channel info: " << voice_channel_info << LL_ENDL;
return addSession(name, IM_NOTHING_SPECIAL, other_participant_id, voice_channel_info);
}
@@ -3273,7 +3274,7 @@ LLUUID LLIMMgr::addSession(
const std::string& name,
EInstantMessage dialog,
const LLUUID& other_participant_id,
- const LLSD& voiceChannelInfo)
+ const LLSD& voiceChannelInfo)
{
std::vector<LLUUID> ids;
ids.push_back(other_participant_id);
@@ -3288,7 +3289,7 @@ LLUUID LLIMMgr::addSession(
EInstantMessage dialog,
const LLUUID& other_participant_id,
const std::vector<LLUUID>& ids,
- const LLSD& voiceChannelInfo,
+ const LLSD& voiceChannelInfo,
const LLUUID& floater_id)
{
if (ids.empty())
@@ -3397,7 +3398,7 @@ void LLIMMgr::inviteToSession(
const std::string& caller_name,
EInstantMessage type,
EInvitationType inv_type,
- const LLSD& voice_channel_info)
+ const LLSD& voice_channel_info)
{
if (caller_id == gAgentID)
@@ -3446,7 +3447,7 @@ void LLIMMgr::inviteToSession(
payload["caller_name"] = caller_name;
payload["type"] = type;
payload["inv_type"] = inv_type;
- payload["voice_channel_info"] = voice_channel_info;
+ payload["voice_channel_info"] = voice_channel_info;
payload["notify_box_type"] = notify_box_type;
payload["question_type"] = question_type;
@@ -3500,7 +3501,7 @@ void LLIMMgr::inviteToSession(
fixed_session_name = av_name.getDisplayName();
}
}
- LLIMModel::getInstance()->newSession(session_id, fixed_session_name, IM_NOTHING_SPECIAL, caller_id, LLSD(), false);
+ LLIMModel::getInstance()->newSession(session_id, fixed_session_name, IM_NOTHING_SPECIAL, caller_id, LLSD(), false);
}
LLSD args;
@@ -4126,7 +4127,7 @@ public:
}
BOOL session_type_p2p = input["body"]["voice"].get("invitation_type").asInteger() == EMultiAgentChatSessionType::P2P_CHAT_SESSION;
- LL_WARNS("Voice") << "VOICE DATA: " << input["body"]<< LL_ENDL;
+ LL_DEBUGS("Voice") << "Received P2P voice information from the server: " << input["body"]<< LL_ENDL;
gIMMgr->inviteToSession(
input["body"]["session_id"].asUUID(),
input["body"]["session_name"].asString(),
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 2f084d1392..93a1a95b23 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -380,7 +380,7 @@ public:
LLUUID addSession(const std::string& name,
EInstantMessage dialog,
const LLUUID& other_participant_id,
- const LLSD& voiceChannelInfo = LLSD());
+ const LLSD& voiceChannelInfo = LLSD());
// Adds a session using a specific group of starting agents
// the dialog type is assumed correct. Returns the uuid of the session.
@@ -388,8 +388,8 @@ public:
LLUUID addSession(const std::string& name,
EInstantMessage dialog,
const LLUUID& other_participant_id,
- const std::vector<LLUUID> &ids,
- const LLSD& voiceChannelInfo = LLSD(),
+ const std::vector<LLUUID> &ids,
+ const LLSD& voiceChannelInfo = LLSD(),
const LLUUID& floater_id = LLUUID::null);
/**
@@ -415,7 +415,7 @@ public:
const std::string& caller_name,
EInstantMessage type,
EInvitationType inv_type,
- const LLSD &voice_channel_info = LLSD()
+ const LLSD &voice_channel_info = LLSD()
);
void processIMTypingStart(const LLUUID& from_id, const EInstantMessage im_type);
diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp
index 48c90d6856..1ecf670179 100644
--- a/indra/newview/llpanelvoicedevicesettings.cpp
+++ b/indra/newview/llpanelvoicedevicesettings.cpp
@@ -236,47 +236,47 @@ void LLPanelVoiceDeviceSettings::refresh()
if(mCtrlInputDevices)
{
- LLVoiceDeviceList devices = LLVoiceClient::getInstance()->getCaptureDevices();
- if (devices.size() > 0) // if zero, we've not received our devices yet
- {
- mCtrlInputDevices->removeall();
- mCtrlInputDevices->add(getLocalizedDeviceName(DEFAULT_DEVICE), DEFAULT_DEVICE, ADD_BOTTOM);
- for (auto& device : devices)
- {
- mCtrlInputDevices->add(getLocalizedDeviceName(device.display_name), device.full_name, ADD_BOTTOM);
- }
-
- // Fix invalid input audio device preference.
- if (!mCtrlInputDevices->setSelectedByValue(mInputDevice, TRUE))
- {
- mCtrlInputDevices->setValue(DEFAULT_DEVICE);
- gSavedSettings.setString("VoiceInputAudioDevice", DEFAULT_DEVICE);
- mInputDevice = DEFAULT_DEVICE;
- }
- }
+ LLVoiceDeviceList devices = LLVoiceClient::getInstance()->getCaptureDevices();
+ if (devices.size() > 0) // if zero, we've not received our devices yet
+ {
+ mCtrlInputDevices->removeall();
+ mCtrlInputDevices->add(getLocalizedDeviceName(DEFAULT_DEVICE), DEFAULT_DEVICE, ADD_BOTTOM);
+ for (auto& device : devices)
+ {
+ mCtrlInputDevices->add(getLocalizedDeviceName(device.display_name), device.full_name, ADD_BOTTOM);
+ }
+
+ // Fix invalid input audio device preference.
+ if (!mCtrlInputDevices->setSelectedByValue(mInputDevice, TRUE))
+ {
+ mCtrlInputDevices->setValue(DEFAULT_DEVICE);
+ gSavedSettings.setString("VoiceInputAudioDevice", DEFAULT_DEVICE);
+ mInputDevice = DEFAULT_DEVICE;
+ }
+ }
}
if(mCtrlOutputDevices)
{
- LLVoiceDeviceList devices = LLVoiceClient::getInstance()->getRenderDevices();
- if (devices.size() > 0) // if zero, we've not received our devices yet
- {
- mCtrlOutputDevices->removeall();
- mCtrlOutputDevices->add(getLocalizedDeviceName(DEFAULT_DEVICE), DEFAULT_DEVICE, ADD_BOTTOM);
-
- for (auto& device : devices)
- {
- mCtrlOutputDevices->add(getLocalizedDeviceName(device.display_name), device.full_name, ADD_BOTTOM);
- }
-
- // Fix invalid output audio device preference.
- if (!mCtrlOutputDevices->setSelectedByValue(mOutputDevice, TRUE))
- {
- mCtrlOutputDevices->setValue(DEFAULT_DEVICE);
- gSavedSettings.setString("VoiceOutputAudioDevice", DEFAULT_DEVICE);
- mOutputDevice = DEFAULT_DEVICE;
- }
- }
+ LLVoiceDeviceList devices = LLVoiceClient::getInstance()->getRenderDevices();
+ if (devices.size() > 0) // if zero, we've not received our devices yet
+ {
+ mCtrlOutputDevices->removeall();
+ mCtrlOutputDevices->add(getLocalizedDeviceName(DEFAULT_DEVICE), DEFAULT_DEVICE, ADD_BOTTOM);
+
+ for (auto& device : devices)
+ {
+ mCtrlOutputDevices->add(getLocalizedDeviceName(device.display_name), device.full_name, ADD_BOTTOM);
+ }
+
+ // Fix invalid output audio device preference.
+ if (!mCtrlOutputDevices->setSelectedByValue(mOutputDevice, TRUE))
+ {
+ mCtrlOutputDevices->setValue(DEFAULT_DEVICE);
+ gSavedSettings.setString("VoiceOutputAudioDevice", DEFAULT_DEVICE);
+ mOutputDevice = DEFAULT_DEVICE;
+ }
+ }
}
}
}
@@ -323,7 +323,7 @@ void LLPanelVoiceDeviceSettings::onCommitInputDevice()
}
// the preferences floater stuff is a mess, hence apply will never
// be called when 'ok' is pressed, so just force it for now.
- apply();
+ apply();
}
void LLPanelVoiceDeviceSettings::onCommitOutputDevice()
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index 184b6d8e93..6a0edbecb1 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -480,11 +480,11 @@ void audio_update_volume(bool force_update)
if (!gViewerWindow->getActive() && (gSavedSettings.getBOOL("MuteWhenMinimized")))
{
- //voice_inst->setMuteMic(true);
+ voice_inst->setMuteMic(true);
}
else
{
- //voice_inst->setMuteMic(false);
+ voice_inst->setMuteMic(false);
}
}
}
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 84b007eaa4..39aaac57c1 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -3136,7 +3136,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("ParcelVoiceInfoRequest");
capabilityNames.append("ProductInfoRequest");
capabilityNames.append("ProvisionVoiceAccountRequest");
- capabilityNames.append("VoiceSignalingRequest");
+ capabilityNames.append("VoiceSignalingRequest");
capabilityNames.append("ReadOfflineMsgs"); // Requires to respond reliably: AcceptFriendship, AcceptGroupInvite, DeclineFriendship, DeclineGroupInvite
capabilityNames.append("RegionObjects");
capabilityNames.append("RemoteParcelRequest");
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 5d7adb9613..a600482d5b 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1166,7 +1166,7 @@ void LLVOAvatar::cleanupClass()
bool LLVOAvatar::handleVOAvatarPrefsChanged(const LLSD &newvalue)
{
- sLipSyncEnabled = gSavedSettings.getBOOL("LipSyncEnabled");
+ sLipSyncEnabled = gSavedSettings.getBOOL("LipSyncEnabled");
return true;
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index a19476153c..47526707dd 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -106,10 +106,10 @@ public:
virtual void markDead();
static void initClass(); // Initialize data that's only init'd once per class.
static void cleanupClass(); // Cleanup data that's only init'd once per class.
- virtual void initInstance(); // Called after construction to initialize the class.
+ virtual void initInstance(); // Called after construction to initialize the class.
protected:
virtual ~LLVOAvatar();
- static bool handleVOAvatarPrefsChanged(const LLSD &newvalue);
+ static bool handleVOAvatarPrefsChanged(const LLSD &newvalue);
/** Initialization
** **
@@ -366,7 +366,7 @@ public:
static F32 sLODFactor; // user-settable LOD factor
static F32 sPhysicsLODFactor; // user-settable physics LOD factor
static BOOL sJointDebug; // output total number of joints being touched for each avatar
- static BOOL sLipSyncEnabled;
+ static BOOL sLipSyncEnabled;
static LLPointer<LLViewerTexture> sCloudTexture;
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index 4d85f160c2..28e895584b 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -92,7 +92,7 @@ LLVoiceChannel::~LLVoiceChannel()
void LLVoiceChannel::setChannelInfo(const LLSD &channelInfo)
{
- mChannelInfo = channelInfo;
+ mChannelInfo = channelInfo;
if (mState == STATE_NO_CHANNEL_INFO)
{
@@ -120,15 +120,15 @@ void LLVoiceChannel::setChannelInfo(const LLSD &channelInfo)
void LLVoiceChannel::onChange(EStatusType type, const LLSD& channelInfo, bool proximal)
{
- LL_WARNS("Voice") << channelInfo << LL_ENDL;
- LL_WARNS("Voice") << mChannelInfo << LL_ENDL;
+ LL_DEBUGS("Voice") << "Incoming channel info: " << channelInfo << LL_ENDL;
+ LL_DEBUGS("Voice") << "Current channel info: " << mChannelInfo << LL_ENDL;
if (mChannelInfo.isUndefined())
{
- mChannelInfo = channelInfo;
+ mChannelInfo = channelInfo;
}
- if (!LLVoiceClient::getInstance()->compareChannels(mChannelInfo, channelInfo))
+ if (!LLVoiceClient::getInstance()->compareChannels(mChannelInfo, channelInfo))
{
- return;
+ return;
}
if (type < BEGIN_ERROR_STATUS)
@@ -147,7 +147,7 @@ void LLVoiceChannel::handleStatusChange(EStatusType type)
switch(type)
{
case STATUS_LOGIN_RETRY:
- // no user notice
+ // no user notice
break;
case STATUS_LOGGED_IN:
break;
@@ -382,10 +382,10 @@ boost::signals2::connection LLVoiceChannel::setCurrentVoiceChannelChangedCallbac
//
LLVoiceChannelGroup::LLVoiceChannelGroup(const LLUUID &session_id,
- const std::string &session_name,
- bool is_p2p) :
- LLVoiceChannel(session_id, session_name),
- mIsP2P(is_p2p)
+ const std::string &session_name,
+ bool is_p2p) :
+ LLVoiceChannel(session_id, session_name),
+ mIsP2P(is_p2p)
{
mRetries = DEFAULT_RETRIES_COUNT;
mIsRetrying = FALSE;
@@ -399,13 +399,13 @@ void LLVoiceChannelGroup::deactivate()
}
LLVoiceChannel::deactivate();
- if (mIsP2P)
- {
+ if (mIsP2P)
+ {
// void the channel info for p2p adhoc channels
// so we request it again, hence throwing up the
// connect dialogue on the other side.
- setState(STATE_NO_CHANNEL_INFO);
- }
+ setState(STATE_NO_CHANNEL_INFO);
+ }
}
void LLVoiceChannelGroup::activate()
@@ -417,38 +417,38 @@ void LLVoiceChannelGroup::activate()
if (callStarted())
{
// we have the channel info, just need to use it now
- LLVoiceClient::getInstance()->setNonSpatialChannel(mChannelInfo,
- mCallDirection == OUTGOING_CALL,
- mIsP2P);
+ LLVoiceClient::getInstance()->setNonSpatialChannel(mChannelInfo,
+ mCallDirection == OUTGOING_CALL,
+ mIsP2P);
if (mIsP2P)
- {
- LLIMModel::addSpeakersToRecent(mSessionID);
- }
- else
- {
- if (!gAgent.isInGroup(mSessionID)) // ad-hoc channel
- {
- LLIMModel::LLIMSession *session = LLIMModel::getInstance()->findIMSession(mSessionID);
- // Adding ad-hoc call participants to Recent People List.
- // If it's an outgoing ad-hoc, we can use mInitialTargetIDs that holds IDs of people we
- // called(both online and offline) as source to get people for recent (STORM-210).
- if (session->isOutgoingAdHoc())
- {
- for (uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); it != session->mInitialTargetIDs.end(); ++it)
- {
- const LLUUID id = *it;
- LLRecentPeople::instance().add(id);
- }
- }
- // If this ad-hoc is incoming then trying to get ids of people from mInitialTargetIDs
- // would lead to EXT-8246. So in this case we get them from speakers list.
- else
- {
- LLIMModel::addSpeakersToRecent(mSessionID);
- }
- }
- }
+ {
+ LLIMModel::addSpeakersToRecent(mSessionID);
+ }
+ else
+ {
+ if (!gAgent.isInGroup(mSessionID)) // ad-hoc channel
+ {
+ LLIMModel::LLIMSession *session = LLIMModel::getInstance()->findIMSession(mSessionID);
+ // Adding ad-hoc call participants to Recent People List.
+ // If it's an outgoing ad-hoc, we can use mInitialTargetIDs that holds IDs of people we
+ // called(both online and offline) as source to get people for recent (STORM-210).
+ if (session->isOutgoingAdHoc())
+ {
+ for (uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); it != session->mInitialTargetIDs.end(); ++it)
+ {
+ const LLUUID id = *it;
+ LLRecentPeople::instance().add(id);
+ }
+ }
+ // If this ad-hoc is incoming then trying to get ids of people from mInitialTargetIDs
+ // would lead to EXT-8246. So in this case we get them from speakers list.
+ else
+ {
+ LLIMModel::addSpeakersToRecent(mSessionID);
+ }
+ }
+ }
// Mic default state is OFF on initiating/joining Ad-Hoc/Group calls. It's on for P2P using the AdHoc infra.
@@ -463,14 +463,14 @@ void LLVoiceChannelGroup::requestChannelInfo()
{
std::string url = region->getCapability("ChatSessionRequest");
- LLCoros::instance().launch("LLVoiceChannelGroup::voiceCallCapCoro",
- boost::bind(&LLVoiceChannelGroup::voiceCallCapCoro, this, url));
+ LLCoros::instance().launch("LLVoiceChannelGroup::voiceCallCapCoro",
+ boost::bind(&LLVoiceChannelGroup::voiceCallCapCoro, this, url));
}
}
void LLVoiceChannelGroup::setChannelInfo(const LLSD& channelInfo)
{
- mChannelInfo = channelInfo;
+ mChannelInfo = channelInfo;
if (mState == STATE_NO_CHANNEL_INFO)
{
@@ -498,7 +498,7 @@ void LLVoiceChannelGroup::setChannelInfo(const LLSD& channelInfo)
{
// we have the channel info, just need to use it now
LLVoiceClient::getInstance()->setNonSpatialChannel(channelInfo,
- mCallDirection == OUTGOING_CALL,
+ mCallDirection == OUTGOING_CALL,
mIsP2P);
}
}
@@ -585,62 +585,62 @@ void LLVoiceChannelGroup::setState(EState state)
void LLVoiceChannelGroup::voiceCallCapCoro(std::string url)
{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("voiceCallCapCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
-
- LLSD postData;
- postData["method"] = "call";
- postData["session-id"] = mSessionID;
- LLSD altParams;
- altParams["preferred_voice_server_type"] = gSavedSettings.getString("VoiceServerType");
- postData["alt_params"] = altParams;
-
- LL_INFOS("Voice", "voiceCallCapCoro") << "Generic POST for " << url << LL_ENDL;
-
- LLSD result = httpAdapter->postAndSuspend(httpRequest, url, postData);
-
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mSessionID);
- if (!channelp)
- {
- LL_WARNS("Voice") << "Unable to retrieve channel with Id = " << mSessionID << LL_ENDL;
- return;
- }
-
- if (!status)
- {
- if (status == LLCore::HttpStatus(HTTP_FORBIDDEN))
- {
- //403 == no ability
- LLNotificationsUtil::add(
- "VoiceNotAllowed",
- channelp->getNotifyArgs());
- }
- else
- {
- LLNotificationsUtil::add(
- "VoiceCallGenericError",
- channelp->getNotifyArgs());
- }
- channelp->deactivate();
- return;
- }
-
- result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
-
- LLSD::map_const_iterator iter;
- for (iter = result.beginMap(); iter != result.endMap(); ++iter)
- {
- LL_DEBUGS("Voice") << "LLVoiceChannelGroup::voiceCallCapCoro got "
- << iter->first << LL_ENDL;
- }
- LL_INFOS("Voice") << "LLVoiceChannelGroup::voiceCallCapCoro got " << result << LL_ENDL;
-
- channelp->setChannelInfo(result["voice_credentials"]);
+ LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
+ httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("voiceCallCapCoro", httpPolicy));
+ LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+
+ LLSD postData;
+ postData["method"] = "call";
+ postData["session-id"] = mSessionID;
+ LLSD altParams;
+ altParams["preferred_voice_server_type"] = gSavedSettings.getString("VoiceServerType");
+ postData["alt_params"] = altParams;
+
+ LL_INFOS("Voice", "voiceCallCapCoro") << "Generic POST for " << url << LL_ENDL;
+
+ LLSD result = httpAdapter->postAndSuspend(httpRequest, url, postData);
+
+ LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
+ LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
+
+ LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mSessionID);
+ if (!channelp)
+ {
+ LL_WARNS("Voice") << "Unable to retrieve channel with Id = " << mSessionID << LL_ENDL;
+ return;
+ }
+
+ if (!status)
+ {
+ if (status == LLCore::HttpStatus(HTTP_FORBIDDEN))
+ {
+ //403 == no ability
+ LLNotificationsUtil::add(
+ "VoiceNotAllowed",
+ channelp->getNotifyArgs());
+ }
+ else
+ {
+ LLNotificationsUtil::add(
+ "VoiceCallGenericError",
+ channelp->getNotifyArgs());
+ }
+ channelp->deactivate();
+ return;
+ }
+
+ result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
+
+ LLSD::map_const_iterator iter;
+ for (iter = result.beginMap(); iter != result.endMap(); ++iter)
+ {
+ LL_DEBUGS("Voice") << "LLVoiceChannelGroup::voiceCallCapCoro got "
+ << iter->first << LL_ENDL;
+ }
+ LL_INFOS("Voice") << "LLVoiceChannelGroup::voiceCallCapCoro got " << result << LL_ENDL;
+
+ channelp->setChannelInfo(result["voice_credentials"]);
}
@@ -666,7 +666,7 @@ void LLVoiceChannelProximal::activate()
// we're connected to a non-spatial channel, so disconnect.
LLVoiceClient::getInstance()->leaveNonSpatialChannel();
}
- LLVoiceClient::getInstance()->activateSpatialChannel(true);
+ LLVoiceClient::getInstance()->activateSpatialChannel(true);
LLVoiceChannel::activate();
}
@@ -741,7 +741,7 @@ void LLVoiceChannelProximal::deactivate()
{
setState(STATE_HUNG_UP);
}
- LLVoiceClient::getInstance()->activateSpatialChannel(false);
+ LLVoiceClient::getInstance()->activateSpatialChannel(false);
}
@@ -749,13 +749,13 @@ void LLVoiceChannelProximal::deactivate()
// LLVoiceChannelP2P
//
LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID &session_id,
- const std::string &session_name,
- const LLUUID &other_user_id,
- LLVoiceP2POutgoingCallInterface* outgoing_call_interface) :
- LLVoiceChannelGroup(session_id, session_name, true),
- mOtherUserID(other_user_id),
- mReceivedCall(FALSE),
- mOutgoingCallInterface(outgoing_call_interface)
+ const std::string &session_name,
+ const LLUUID &other_user_id,
+ LLVoiceP2POutgoingCallInterface* outgoing_call_interface) :
+ LLVoiceChannelGroup(session_id, session_name, true),
+ mOtherUserID(other_user_id),
+ mReceivedCall(FALSE),
+ mOutgoingCallInterface(outgoing_call_interface)
{
}
@@ -823,7 +823,7 @@ void LLVoiceChannelP2P::activate()
if (callStarted())
{
// no session handle yet, we're starting the call
- if (mIncomingCallInterface == nullptr)
+ if (mIncomingCallInterface == nullptr)
{
mReceivedCall = FALSE;
mOutgoingCallInterface->callUser(mOtherUserID);
@@ -831,15 +831,15 @@ void LLVoiceChannelP2P::activate()
// otherwise answering the call
else
{
- if (!mIncomingCallInterface->answerInvite())
+ if (!mIncomingCallInterface->answerInvite())
{
mCallEndedByAgent = false;
- mIncomingCallInterface.reset();
+ mIncomingCallInterface.reset();
handleError(ERROR_UNKNOWN);
return;
}
// using the incoming call interface invalidates it. Clear it out here so we can't reuse it by accident.
- mIncomingCallInterface.reset();
+ mIncomingCallInterface.reset();
}
// Add the party to the list of people with which we've recently interacted.
@@ -855,11 +855,11 @@ void LLVoiceChannelP2P::activate()
void LLVoiceChannelP2P::deactivate()
{
- if (callStarted())
- {
- mOutgoingCallInterface->hangup();
- }
- LLVoiceChannel::deactivate();
+ if (callStarted())
+ {
+ mOutgoingCallInterface->hangup();
+ }
+ LLVoiceChannel::deactivate();
}
@@ -875,7 +875,7 @@ void LLVoiceChannelP2P::requestChannelInfo()
// receiving session from other user who initiated call
void LLVoiceChannelP2P::setChannelInfo(const LLSD& channel_info)
{
- mChannelInfo = channel_info;
+ mChannelInfo = channel_info;
BOOL needs_activate = FALSE;
if (callStarted())
{
@@ -890,16 +890,16 @@ void LLVoiceChannelP2P::setChannelInfo(const LLSD& channel_info)
{
// we are active and have priority, invite the other user again
// under the assumption they will join this new session
- mOutgoingCallInterface->callUser(mOtherUserID);
+ mOutgoingCallInterface->callUser(mOtherUserID);
return;
}
}
-
+
mReceivedCall = TRUE;
- if (!channel_info.isUndefined())
- {
- mIncomingCallInterface = LLVoiceClient::getInstance()->getIncomingCallInterface(channel_info);
- }
+ if (!channel_info.isUndefined())
+ {
+ mIncomingCallInterface = LLVoiceClient::getInstance()->getIncomingCallInterface(channel_info);
+ }
if (needs_activate)
{
activate();
@@ -917,7 +917,7 @@ void LLVoiceChannelP2P::setState(EState state)
if (mReceivedCall && state == STATE_RINGING)
{
//TODO: remove or redirect this call status notification
-// LLCallInfoDialog::show("answering", mNotifyArgs);
+ // LLCallInfoDialog::show("answering", mNotifyArgs);
doSetState(state);
return;
}
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index 5725e7ec5c..bc22bf0df6 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -72,7 +72,7 @@ public:
virtual void handleError(EStatusType status);
virtual void deactivate();
virtual void activate();
- virtual void setChannelInfo(const LLSD &channelInfo);
+ virtual void setChannelInfo(const LLSD &channelInfo);
virtual void requestChannelInfo();
virtual BOOL isActive();
virtual BOOL callStarted();
@@ -95,13 +95,13 @@ public:
static LLVoiceChannel* getChannelByID(const LLUUID& session_id);
static LLVoiceChannel* getCurrentVoiceChannel();
-
+
static void initClass();
-
+
static void suspend();
static void resume();
-protected:
+ protected:
virtual void setState(EState state);
/**
* Use this method if you want mStateChangedCallback to be executed while state is changed
@@ -115,7 +115,7 @@ protected:
EState mState;
std::string mSessionName;
LLSD mNotifyArgs;
- LLSD mChannelInfo;
+ LLSD mChannelInfo;
// true if call was ended by agent
bool mCallEndedByAgent;
bool mIgnoreNextSessionLeave;
@@ -144,7 +144,7 @@ public:
void handleError(EStatusType status) override;
void activate() override;
void deactivate() override;
- void setChannelInfo(const LLSD &channelInfo) override;
+ void setChannelInfo(const LLSD &channelInfo) override;
void requestChannelInfo() override;
protected:
@@ -163,28 +163,28 @@ class LLVoiceChannelProximal : public LLVoiceChannel, public LLSingleton<LLVoice
LLSINGLETON_C11(LLVoiceChannelProximal);
public:
- void onChange(EStatusType status, const LLSD &channelInfo, bool proximal) override;
- void handleStatusChange(EStatusType status) override;
- void handleError(EStatusType status) override;
- BOOL isActive() override;
- void activate() override;
- void deactivate() override;
+ void onChange(EStatusType status, const LLSD &channelInfo, bool proximal) override;
+ void handleStatusChange(EStatusType status) override;
+ void handleError(EStatusType status) override;
+ BOOL isActive() override;
+ void activate() override;
+ void deactivate() override;
};
class LLVoiceChannelP2P : public LLVoiceChannelGroup
{
public:
- LLVoiceChannelP2P(const LLUUID &session_id,
- const std::string &session_name,
- const LLUUID &other_user_id,
- LLVoiceP2POutgoingCallInterface * outgoing_call_interface);
-
- void handleStatusChange(EStatusType status) override;
- void handleError(EStatusType status) override;
- void activate() override;
- void requestChannelInfo() override;
- void deactivate() override;
- void setChannelInfo(const LLSD& channel_info) override;
+ LLVoiceChannelP2P(const LLUUID &session_id,
+ const std::string &session_name,
+ const LLUUID &other_user_id,
+ LLVoiceP2POutgoingCallInterface * outgoing_call_interface);
+
+ void handleStatusChange(EStatusType status) override;
+ void handleError(EStatusType status) override;
+ void activate() override;
+ void requestChannelInfo() override;
+ void deactivate() override;
+ void setChannelInfo(const LLSD& channel_info) override;
protected:
void setState(EState state) override;
@@ -198,8 +198,8 @@ private:
void addToTheRecentPeopleList();
LLUUID mOtherUserID;
BOOL mReceivedCall;
- LLVoiceP2POutgoingCallInterface *mOutgoingCallInterface;
- LLVoiceP2PIncomingCallInterfacePtr mIncomingCallInterface;
+ LLVoiceP2POutgoingCallInterface *mOutgoingCallInterface;
+ LLVoiceP2PIncomingCallInterfacePtr mIncomingCallInterface;
};
#endif // LL_VOICECHANNEL_H
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 33e76c14ae..1f5dbe3b97 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -176,69 +176,69 @@ void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &age
void LLVoiceClient::onRegionChanged()
{
- LLViewerRegion *region = gAgent.getRegion();
- if (region && region->simulatorFeaturesReceived())
- {
- LLSD simulatorFeatures;
- region->getSimulatorFeatures(simulatorFeatures);
- setSpatialVoiceModule(simulatorFeatures["VoiceServerType"].asString());
- }
- else if (region)
- {
+ LLViewerRegion *region = gAgent.getRegion();
+ if (region && region->simulatorFeaturesReceived())
+ {
+ LLSD simulatorFeatures;
+ region->getSimulatorFeatures(simulatorFeatures);
+ setSpatialVoiceModule(simulatorFeatures["VoiceServerType"].asString());
+ }
+ else if (region)
+ {
if (mSimulatorFeaturesReceivedSlot.connected())
{
mSimulatorFeaturesReceivedSlot.disconnect();
}
mSimulatorFeaturesReceivedSlot =
- region->setSimulatorFeaturesReceivedCallback(
- boost::bind(&LLVoiceClient::onSimulatorFeaturesReceived, this, _1));
- }
+ region->setSimulatorFeaturesReceivedCallback(
+ boost::bind(&LLVoiceClient::onSimulatorFeaturesReceived, this, _1));
+ }
}
void LLVoiceClient::onSimulatorFeaturesReceived(const LLUUID& region_id)
{
- LLViewerRegion *region = gAgent.getRegion();
- if (region && (region->getRegionID() == region_id))
- {
- LLSD simulatorFeatures;
- region->getSimulatorFeatures(simulatorFeatures);
- setSpatialVoiceModule(simulatorFeatures["VoiceServerType"].asString());
- }
+ LLViewerRegion *region = gAgent.getRegion();
+ if (region && (region->getRegionID() == region_id))
+ {
+ LLSD simulatorFeatures;
+ region->getSimulatorFeatures(simulatorFeatures);
+ setSpatialVoiceModule(simulatorFeatures["VoiceServerType"].asString());
+ }
}
void LLVoiceClient::setSpatialVoiceModule(const std::string &voice_server_type)
{
- LLVoiceModuleInterface *module = getVoiceModule(voice_server_type);
- if (!module)
+ LLVoiceModuleInterface *module = getVoiceModule(voice_server_type);
+ if (!module)
{
- return;
+ return;
}
- if (module != mSpatialVoiceModule)
- {
+ if (module != mSpatialVoiceModule)
+ {
if (inProximalChannel())
{
- mSpatialVoiceModule->processChannels(false);
+ mSpatialVoiceModule->processChannels(false);
}
- module->processChannels(true);
- mSpatialVoiceModule = module;
- mSpatialVoiceModule->updateSettings();
- }
+ module->processChannels(true);
+ mSpatialVoiceModule = module;
+ mSpatialVoiceModule->updateSettings();
+ }
}
void LLVoiceClient::setNonSpatialVoiceModule(const std::string &voice_server_type)
{
- mNonSpatialVoiceModule = getVoiceModule(voice_server_type);
- if (!mNonSpatialVoiceModule)
- {
+ mNonSpatialVoiceModule = getVoiceModule(voice_server_type);
+ if (!mNonSpatialVoiceModule)
+ {
// we don't have a non-spatial voice module,
// so revert to spatial.
if (mSpatialVoiceModule)
{
- mSpatialVoiceModule->processChannels(true);
+ mSpatialVoiceModule->processChannels(true);
}
- return;
- }
- mNonSpatialVoiceModule->updateSettings();
+ return;
+ }
+ mNonSpatialVoiceModule->updateSettings();
}
void LLVoiceClient::setHidden(bool hidden)
@@ -296,14 +296,13 @@ void LLVoiceClient::updateSettings()
void LLVoiceClient::tuningStart()
{
LLWebRTCVoiceClient::getInstance()->tuningStart();
- LLVivoxVoiceClient::getInstance()->tuningStart();
+ LLVivoxVoiceClient::getInstance()->tuningStart();
}
void LLVoiceClient::tuningStop()
{
LLWebRTCVoiceClient::getInstance()->tuningStop();
- LLVivoxVoiceClient::getInstance()->tuningStop();
-
+ LLVivoxVoiceClient::getInstance()->tuningStop();
}
bool LLVoiceClient::inTuningMode()
@@ -347,13 +346,13 @@ void LLVoiceClient::refreshDeviceLists(bool clearCurrentList)
void LLVoiceClient::setCaptureDevice(const std::string& name)
{
LLWebRTCVoiceClient::getInstance()->setCaptureDevice(name);
- LLVivoxVoiceClient::getInstance()->setCaptureDevice(name);
+ LLVivoxVoiceClient::getInstance()->setCaptureDevice(name);
}
void LLVoiceClient::setRenderDevice(const std::string& name)
{
LLWebRTCVoiceClient::getInstance()->setRenderDevice(name);
- LLVivoxVoiceClient::getInstance()->setRenderDevice(name);
+ LLVivoxVoiceClient::getInstance()->setRenderDevice(name);
}
const LLVoiceDeviceList& LLVoiceClient::getCaptureDevices()
@@ -373,13 +372,13 @@ const LLVoiceDeviceList& LLVoiceClient::getRenderDevices()
void LLVoiceClient::getParticipantList(std::set<LLUUID> &participants)
{
- LLWebRTCVoiceClient::getInstance()->getParticipantList(participants);
- LLVivoxVoiceClient::getInstance()->getParticipantList(participants);
+ LLWebRTCVoiceClient::getInstance()->getParticipantList(participants);
+ LLVivoxVoiceClient::getInstance()->getParticipantList(participants);
}
bool LLVoiceClient::isParticipant(const LLUUID &speaker_id)
{
- return LLWebRTCVoiceClient::getInstance()->isParticipant(speaker_id) ||
+ return LLWebRTCVoiceClient::getInstance()->isParticipant(speaker_id) ||
LLVivoxVoiceClient::getInstance()->isParticipant(speaker_id);
}
@@ -390,13 +389,13 @@ bool LLVoiceClient::isParticipant(const LLUUID &speaker_id)
BOOL LLVoiceClient::isSessionTextIMPossible(const LLUUID& id)
{
// all sessions can do TextIM, as we no longer support PSTN
- return TRUE;
+ return TRUE;
}
BOOL LLVoiceClient::isSessionCallBackPossible(const LLUUID& id)
{
// we don't support PSTN calls anymore. (did we ever?)
- return TRUE;
+ return TRUE;
}
//----------------------------------------------
@@ -419,17 +418,17 @@ void LLVoiceClient::setNonSpatialChannel(
bool notify_on_first_join,
bool hangup_on_last_leave)
{
- setNonSpatialVoiceModule(channelInfo["voice_server_type"].asString());
+ setNonSpatialVoiceModule(channelInfo["voice_server_type"].asString());
if (mSpatialVoiceModule)
- {
- mSpatialVoiceModule->processChannels(false);
- }
+ {
+ mSpatialVoiceModule->processChannels(false);
+ }
if (mNonSpatialVoiceModule)
{
- mNonSpatialVoiceModule->setNonSpatialChannel(channelInfo, notify_on_first_join, hangup_on_last_leave);
- mNonSpatialVoiceModule->processChannels(true);
+ mNonSpatialVoiceModule->setNonSpatialChannel(channelInfo, notify_on_first_join, hangup_on_last_leave);
+ mNonSpatialVoiceModule->processChannels(true);
+ }
}
-}
void LLVoiceClient::setSpatialChannel(const LLSD &channelInfo)
{
@@ -784,48 +783,46 @@ class LLViewerRequiredVoiceVersion : public LLHTTPNode
const LLSD& context,
const LLSD& input) const
{
-
-
- std::string voice_server_type = "vivox";
+ std::string voice_server_type = "vivox";
if (input.has("body") && input["body"].has("voice_server_type"))
{
- voice_server_type = input["body"]["voice_server_type"].asString();
+ voice_server_type = input["body"]["voice_server_type"].asString();
}
- LLVoiceModuleInterface *voiceModule = NULL;
+ LLVoiceModuleInterface *voiceModule = NULL;
- if (voice_server_type == "vivox" || voice_server_type.empty())
- {
- voiceModule = (LLVoiceModuleInterface *) LLVivoxVoiceClient::getInstance();
- }
- else if (voice_server_type == "webrtc")
- {
- voiceModule = (LLVoiceModuleInterface *) LLWebRTCVoiceClient::getInstance();
- }
- else
- {
- LL_WARNS("Voice") << "Unknown voice server type " << voice_server_type << LL_ENDL;
- if (!sAlertedUser)
- {
- // sAlertedUser = true;
- LLNotificationsUtil::add("VoiceVersionMismatch");
- }
- return;
- }
+ if (voice_server_type == "vivox" || voice_server_type.empty())
+ {
+ voiceModule = (LLVoiceModuleInterface *) LLVivoxVoiceClient::getInstance();
+ }
+ else if (voice_server_type == "webrtc")
+ {
+ voiceModule = (LLVoiceModuleInterface *) LLWebRTCVoiceClient::getInstance();
+ }
+ else
+ {
+ LL_WARNS("Voice") << "Unknown voice server type " << voice_server_type << LL_ENDL;
+ if (!sAlertedUser)
+ {
+ // sAlertedUser = true;
+ LLNotificationsUtil::add("VoiceVersionMismatch");
+ }
+ return;
+ }
LLVoiceVersionInfo versionInfo = voiceModule->getVersion();
- if (input.has("body") && input["body"].has("major_version") &&
+ if (input.has("body") && input["body"].has("major_version") &&
input["body"]["major_version"].asInteger() > versionInfo.majorVersion)
{
- if (!sAlertedUser)
- {
- // sAlertedUser = true;
- LLNotificationsUtil::add("VoiceVersionMismatch");
- LL_WARNS("Voice") << "Voice server version mismatch " << input["body"]["major_version"].asInteger() << "/"
- << versionInfo.majorVersion
- << LL_ENDL;
- }
- return;
+ if (!sAlertedUser)
+ {
+ // sAlertedUser = true;
+ LLNotificationsUtil::add("VoiceVersionMismatch");
+ LL_WARNS("Voice") << "Voice server version mismatch " << input["body"]["major_version"].asInteger() << "/"
+ << versionInfo.majorVersion
+ << LL_ENDL;
+ }
+ return;
}
}
};
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index 46dd325e21..02f73cde7a 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -96,10 +96,10 @@ public:
struct LLVoiceVersionInfo
{
std::string voiceServerType;
- std::string internalVoiceServerType;
- int majorVersion;
- int minorVersion;
- std::string serverVersion;
+ std::string internalVoiceServerType;
+ int majorVersion;
+ int minorVersion;
+ std::string serverVersion;
std::string mBuildVersion;
};
@@ -205,7 +205,7 @@ public:
virtual bool inProximalChannel()=0;
virtual void setNonSpatialChannel(const LLSD& channelInfo,
- bool notify_on_first_join,
+ bool notify_on_first_join,
bool hangup_on_last_leave)=0;
virtual bool setSpatialChannel(const LLSD& channelInfo)=0;
@@ -474,13 +474,13 @@ public:
//@}
void setSpatialVoiceModule(const std::string& voice_server_type);
- void setNonSpatialVoiceModule(const std::string &voice_server_type);
+ void setNonSpatialVoiceModule(const std::string &voice_server_type);
void userAuthorized(const std::string& user_id,
const LLUUID &agentID);
- void onRegionChanged();
- void onSimulatorFeaturesReceived(const LLUUID &region_id);
+ void onRegionChanged();
+ void onSimulatorFeaturesReceived(const LLUUID &region_id);
void addObserver(LLVoiceClientStatusObserver* observer);
void removeObserver(LLVoiceClientStatusObserver* observer);