CR suggestions

master
Roxie Linden 2024-04-07 19:23:00 -07:00
parent 4be63d8c1f
commit 648741470f
3 changed files with 30 additions and 44 deletions

View File

@ -515,16 +515,6 @@ void LLWebRTCImpl::updateDevices()
char name[webrtc::kAdmMaxDeviceNameSize]; char name[webrtc::kAdmMaxDeviceNameSize];
char guid[webrtc::kAdmMaxGuidSize]; char guid[webrtc::kAdmMaxGuidSize];
mTuningDeviceModule->PlayoutDeviceName(index, name, guid); mTuningDeviceModule->PlayoutDeviceName(index, name, guid);
#if WEBRTC_LINUX
// Linux audio implementation (pulse and alsa)
// return empty strings for the guid, so
// use the name for the guid
if (!strcmp(guid, ""))
{
strcpy(guid, name);
}
#endif // WEBRTC_LINUX
mPlayoutDeviceList.emplace_back(name, guid); mPlayoutDeviceList.emplace_back(name, guid);
} }
@ -543,15 +533,6 @@ void LLWebRTCImpl::updateDevices()
char name[webrtc::kAdmMaxDeviceNameSize]; char name[webrtc::kAdmMaxDeviceNameSize];
char guid[webrtc::kAdmMaxGuidSize]; char guid[webrtc::kAdmMaxGuidSize];
mTuningDeviceModule->RecordingDeviceName(index, name, guid); mTuningDeviceModule->RecordingDeviceName(index, name, guid);
#if WEBRTC_LINUX
// Linux audio implementation (pulse and alsa)
// return empty strings for the guid, so
// use the name for the guid
if (!strcmp(guid, ""))
{
strcpy(guid, name);
}
#endif // WEBRTC_LINUX
mRecordingDeviceList.emplace_back(name, guid); mRecordingDeviceList.emplace_back(name, guid);
} }

View File

@ -78,7 +78,12 @@ class LLWebRTCVoiceDevice
LLWebRTCVoiceDevice(const std::string &display_name, const std::string &id) : LLWebRTCVoiceDevice(const std::string &display_name, const std::string &id) :
mDisplayName(display_name), mDisplayName(display_name),
mID(id) mID(id)
{}; {
if (mID.empty())
{
mID = display_name;
}
};
}; };
typedef std::vector<LLWebRTCVoiceDevice> LLWebRTCVoiceDeviceList; typedef std::vector<LLWebRTCVoiceDevice> LLWebRTCVoiceDeviceList;

View File

@ -3005,42 +3005,42 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload
{ {
if (type == IM_SESSION_P2P_INVITE) if (type == IM_SESSION_P2P_INVITE)
{ {
// decline p2p voice, either via the vivox-style call mechanism // decline p2p voice, either via the vivox-style call mechanism
// or via the webrtc-style "decline p2p" mechanism. // or via the webrtc-style "decline p2p" mechanism.
LLVoiceP2PIncomingCallInterfacePtr call = LLVoiceClient::getInstance()->getIncomingCallInterface(payload["voice_channel_info"]); LLVoiceP2PIncomingCallInterfacePtr call = LLVoiceClient::getInstance()->getIncomingCallInterface(payload["voice_channel_info"]);
if (call) if (call)
{ {
call->declineInvite(); call->declineInvite();
} }
else else
{ {
// webrtc-style decline. // webrtc-style decline.
LLViewerRegion *region = gAgent.getRegion(); LLViewerRegion *region = gAgent.getRegion();
if (region) if (region)
{ {
std::string url = region->getCapability("ChatSessionRequest"); std::string url = region->getCapability("ChatSessionRequest");
LLSD data; LLSD data;
data["method"] = "decline p2p voice"; data["method"] = "decline p2p voice";
data["session-id"] = session_id; data["session-id"] = session_id;
LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(url, data, "P2P declined", "P2P decline failed."); LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(url, data, "P2P declined", "P2P decline failed.");
} }
} }
} }
else else
{ {
LLViewerRegion *region = gAgent.getRegion(); LLViewerRegion *region = gAgent.getRegion();
if (region) if (region)
{ {
std::string url = region->getCapability("ChatSessionRequest"); std::string url = region->getCapability("ChatSessionRequest");
LLSD data; LLSD data;
data["method"] = "decline invitation"; data["method"] = "decline invitation";
data["session-id"] = session_id; data["session-id"] = session_id;
LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(url, data, "Invitation declined", "Invitation decline failed."); LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(url, data, "Invitation declined", "Invitation decline failed.");
} }
} }
} }