diff options
| author | Erik Kundiman <erik@megapahit.org> | 2025-07-08 10:29:03 +0800 | 
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2025-07-08 10:29:03 +0800 | 
| commit | a8dfeed4632aad0233ff08d1efd950b620fd1be7 (patch) | |
| tree | 7caf71866ac4cad1cdcc552ecd055beb0830e7a1 /indra/newview | |
| parent | 145e76276190b295a3a2416182964542aa6baf1b (diff) | |
LL_WEBRTC for marking WebRTC supporting platforms
so we don't have to keep adding unsupporting ones to the preprocessors
in llvoiceclient.
Note that CM_WEBRTC is complementary to LL_WEBRTC, which means its
purpose is not to be XOR-ed.
Any WebRTC supporting (either using LL's or CM's build) will have
LL_WEBRTC set to ON, but *only* ones that use CM builds will have
CM_WEBRTC set to ON *too*.
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llvoiceclient.cpp | 82 | 
1 files changed, 41 insertions, 41 deletions
| diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 9b1f54437e..b42e0b375a 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -26,7 +26,7 @@  #include "llvoiceclient.h"  #include "llvoicevivox.h" -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC  #include "llvoicewebrtc.h"  #endif  #include "llviewernetwork.h" @@ -122,7 +122,7 @@ LLVoiceModuleInterface *getVoiceModule(const std::string &voice_server_type)      {          return (LLVoiceModuleInterface *) LLVivoxVoiceClient::getInstance();      } -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      else if (voice_server_type == WEBRTC_VOICE_SERVER_TYPE)      {          return (LLVoiceModuleInterface *) LLWebRTCVoiceClient::getInstance(); @@ -169,7 +169,7 @@ void LLVoiceClient::init(LLPumpIO *pump)  {      // Initialize all of the voice modules      m_servicePump = pump; -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->init(pump);  #endif      LLVivoxVoiceClient::getInstance()->init(pump); @@ -182,7 +182,7 @@ void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &age          mRegionChangedCallbackSlot.disconnect();      }      mRegionChangedCallbackSlot = gAgent.addRegionChangedCallback(boost::bind(&LLVoiceClient::onRegionChanged, this)); -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->userAuthorized(user_id, agentID);  #endif      LLVivoxVoiceClient::getInstance()->userAuthorized(user_id, agentID); @@ -294,7 +294,7 @@ void LLVoiceClient::setNonSpatialVoiceModule(const std::string &voice_server_typ  void LLVoiceClient::setHidden(bool hidden)  {      LL_INFOS("Voice") << "( " << (hidden ? "true" : "false") << " )" << LL_ENDL; -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->setHidden(hidden);  #endif      LLVivoxVoiceClient::getInstance()->setHidden(hidden); @@ -337,7 +337,7 @@ void LLVoiceClient::updateSettings()      updateMicMuteLogic(); -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->updateSettings();  #endif      LLVivoxVoiceClient::getInstance()->updateSettings(); @@ -348,7 +348,7 @@ void LLVoiceClient::updateSettings()  void LLVoiceClient::tuningStart()  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->tuningStart();  #endif      LLVivoxVoiceClient::getInstance()->tuningStart(); @@ -356,7 +356,7 @@ void LLVoiceClient::tuningStart()  void LLVoiceClient::tuningStop()  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->tuningStop();  #endif      LLVivoxVoiceClient::getInstance()->tuningStop(); @@ -364,7 +364,7 @@ void LLVoiceClient::tuningStop()  bool LLVoiceClient::inTuningMode()  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return LLWebRTCVoiceClient::getInstance()->inTuningMode();  #else      return LLVivoxVoiceClient::getInstance()->inTuningMode(); @@ -373,7 +373,7 @@ bool LLVoiceClient::inTuningMode()  void LLVoiceClient::tuningSetMicVolume(float volume)  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->tuningSetMicVolume(volume);  #else      LLVivoxVoiceClient::getInstance()->tuningSetMicVolume(volume); @@ -382,7 +382,7 @@ void LLVoiceClient::tuningSetMicVolume(float volume)  void LLVoiceClient::tuningSetSpeakerVolume(float volume)  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->tuningSetSpeakerVolume(volume);  #else      LLVivoxVoiceClient::getInstance()->tuningSetSpeakerVolume(volume); @@ -391,7 +391,7 @@ void LLVoiceClient::tuningSetSpeakerVolume(float volume)  float LLVoiceClient::tuningGetEnergy(void)  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return LLWebRTCVoiceClient::getInstance()->tuningGetEnergy();  #else      return LLVivoxVoiceClient::getInstance()->tuningGetEnergy(); @@ -403,7 +403,7 @@ float LLVoiceClient::tuningGetEnergy(void)  bool LLVoiceClient::deviceSettingsAvailable()  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return LLWebRTCVoiceClient::getInstance()->deviceSettingsAvailable();  #else      return LLVivoxVoiceClient::getInstance()->deviceSettingsAvailable(); @@ -412,7 +412,7 @@ bool LLVoiceClient::deviceSettingsAvailable()  bool LLVoiceClient::deviceSettingsUpdated()  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return LLWebRTCVoiceClient::getInstance()->deviceSettingsUpdated();  #else      return LLVivoxVoiceClient::getInstance()->deviceSettingsUpdated(); @@ -421,7 +421,7 @@ bool LLVoiceClient::deviceSettingsUpdated()  void LLVoiceClient::refreshDeviceLists(bool clearCurrentList)  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->refreshDeviceLists(clearCurrentList);  #else      LLVivoxVoiceClient::getInstance()->refreshDeviceLists(clearCurrentList); @@ -431,7 +431,7 @@ void LLVoiceClient::refreshDeviceLists(bool clearCurrentList)  void LLVoiceClient::setCaptureDevice(const std::string& name)  {      LLVivoxVoiceClient::getInstance()->setCaptureDevice(name); -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->setCaptureDevice(name);  #endif  } @@ -439,14 +439,14 @@ void LLVoiceClient::setCaptureDevice(const std::string& name)  void LLVoiceClient::setRenderDevice(const std::string& name)  {      LLVivoxVoiceClient::getInstance()->setRenderDevice(name); -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->setRenderDevice(name);  #endif  }  const LLVoiceDeviceList& LLVoiceClient::getCaptureDevices()  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return LLWebRTCVoiceClient::getInstance()->getCaptureDevices();  #else      return LLVivoxVoiceClient::getInstance()->getCaptureDevices(); @@ -456,7 +456,7 @@ const LLVoiceDeviceList& LLVoiceClient::getCaptureDevices()  const LLVoiceDeviceList& LLVoiceClient::getRenderDevices()  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return LLWebRTCVoiceClient::getInstance()->getRenderDevices();  #else      return LLVivoxVoiceClient::getInstance()->getRenderDevices(); @@ -469,7 +469,7 @@ const LLVoiceDeviceList& LLVoiceClient::getRenderDevices()  void LLVoiceClient::getParticipantList(std::set<LLUUID> &participants) const  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->getParticipantList(participants);  #endif      LLVivoxVoiceClient::getInstance()->getParticipantList(participants); @@ -477,7 +477,7 @@ void LLVoiceClient::getParticipantList(std::set<LLUUID> &participants) const  bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) const  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return LLWebRTCVoiceClient::getInstance()->isParticipant(speaker_id) ||  #else      return @@ -574,7 +574,7 @@ void LLVoiceClient::activateSpatialChannel(bool activate)  bool LLVoiceClient::isCurrentChannel(const LLSD& channelInfo)  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return LLWebRTCVoiceClient::getInstance()->isCurrentChannel(channelInfo) ||  #else      return @@ -584,7 +584,7 @@ bool LLVoiceClient::isCurrentChannel(const LLSD& channelInfo)  bool LLVoiceClient::compareChannels(const LLSD &channelInfo1, const LLSD &channelInfo2)  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return LLWebRTCVoiceClient::getInstance()->compareChannels(channelInfo1, channelInfo2) ||  #else      return @@ -630,7 +630,7 @@ LLVoiceP2POutgoingCallInterface *LLVoiceClient::getOutgoingCallInterface(const L  void LLVoiceClient::setVoiceVolume(F32 volume)  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->setVoiceVolume(volume);  #endif      LLVivoxVoiceClient::getInstance()->setVoiceVolume(volume); @@ -638,7 +638,7 @@ void LLVoiceClient::setVoiceVolume(F32 volume)  void LLVoiceClient::setMicGain(F32 gain)  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->setMicGain(gain);  #endif      LLVivoxVoiceClient::getInstance()->setMicGain(gain); @@ -687,7 +687,7 @@ bool LLVoiceClient::voiceEnabled()  void LLVoiceClient::setVoiceEnabled(bool enabled)  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      if (LLWebRTCVoiceClient::instanceExists())      {          LLWebRTCVoiceClient::getInstance()->setVoiceEnabled(enabled); @@ -715,7 +715,7 @@ void LLVoiceClient::updateMicMuteLogic()          // Either of these always overrides any other PTT setting.          new_mic_mute = true;      } -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->setMuteMic(new_mic_mute);  #endif      LLVivoxVoiceClient::getInstance()->setMuteMic(new_mic_mute); @@ -812,7 +812,7 @@ bool LLVoiceClient::getVoiceEnabled(const LLUUID& id) const  std::string LLVoiceClient::getDisplayName(const LLUUID& id) const  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      std::string result = LLWebRTCVoiceClient::getInstance()->getDisplayName(id);      if (result.empty())      { @@ -826,7 +826,7 @@ std::string LLVoiceClient::getDisplayName(const LLUUID& id) const  bool LLVoiceClient::isVoiceWorking() const  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return LLVivoxVoiceClient::getInstance()->isVoiceWorking() ||             LLWebRTCVoiceClient::getInstance()->isVoiceWorking();  #else @@ -846,7 +846,7 @@ bool LLVoiceClient::isOnlineSIP(const LLUUID& id)  bool LLVoiceClient::getIsSpeaking(const LLUUID& id)  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return LLWebRTCVoiceClient::getInstance()->getIsSpeaking(id) ||  #else      return @@ -858,7 +858,7 @@ bool LLVoiceClient::getIsModeratorMuted(const LLUUID& id)  {      // don't bother worrying about p2p calls, as      // p2p calls don't have mute. -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return LLWebRTCVoiceClient::getInstance()->getIsModeratorMuted(id) ||  #else      return @@ -868,7 +868,7 @@ bool LLVoiceClient::getIsModeratorMuted(const LLUUID& id)  F32 LLVoiceClient::getCurrentPower(const LLUUID& id)  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return std::fmax(LLVivoxVoiceClient::getInstance()->getCurrentPower(id),                       LLWebRTCVoiceClient::getInstance()->getCurrentPower(id));  #else @@ -885,7 +885,7 @@ bool LLVoiceClient::getOnMuteList(const LLUUID& id)  F32 LLVoiceClient::getUserVolume(const LLUUID& id)  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      return std::fmax(LLVivoxVoiceClient::getInstance()->getUserVolume(id), LLWebRTCVoiceClient::getInstance()->getUserVolume(id));  #else      return LLVivoxVoiceClient::getInstance()->getUserVolume(id); @@ -894,7 +894,7 @@ F32 LLVoiceClient::getUserVolume(const LLUUID& id)  void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume)  { -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->setUserVolume(id, volume);  #endif      LLVivoxVoiceClient::getInstance()->setUserVolume(id, volume); @@ -906,7 +906,7 @@ void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume)  void LLVoiceClient::addObserver(LLVoiceClientStatusObserver* observer)  {      LLVivoxVoiceClient::getInstance()->addObserver(observer); -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->addObserver(observer);  #endif  } @@ -917,7 +917,7 @@ void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer)      {          LLVivoxVoiceClient::getInstance()->removeObserver(observer);      } -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      if (LLWebRTCVoiceClient::instanceExists())      {          LLWebRTCVoiceClient::getInstance()->removeObserver(observer); @@ -928,7 +928,7 @@ void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer)  void LLVoiceClient::addObserver(LLFriendObserver* observer)  {      LLVivoxVoiceClient::getInstance()->addObserver(observer); -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->addObserver(observer);  #endif  } @@ -939,7 +939,7 @@ void LLVoiceClient::removeObserver(LLFriendObserver* observer)      {          LLVivoxVoiceClient::getInstance()->removeObserver(observer);      } -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      if (LLWebRTCVoiceClient::instanceExists())      {          LLWebRTCVoiceClient::getInstance()->removeObserver(observer); @@ -950,7 +950,7 @@ void LLVoiceClient::removeObserver(LLFriendObserver* observer)  void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer)  {      LLVivoxVoiceClient::getInstance()->addObserver(observer); -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      LLWebRTCVoiceClient::getInstance()->addObserver(observer);  #endif  } @@ -961,7 +961,7 @@ void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer)      {          LLVivoxVoiceClient::getInstance()->removeObserver(observer);      } -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC      if (LLWebRTCVoiceClient::instanceExists())      {          LLWebRTCVoiceClient::getInstance()->removeObserver(observer); @@ -1029,7 +1029,7 @@ class LLViewerRequiredVoiceVersion : public LLHTTPNode          {              voiceModule = (LLVoiceModuleInterface *) LLVivoxVoiceClient::getInstance();          } -#if !__FreeBSD__ && !_M_ARM64 +#if LL_WEBRTC          else if (voice_server_type == "webrtc")          {              voiceModule = (LLVoiceModuleInterface *) LLWebRTCVoiceClient::getInstance(); | 
