diff --git a/media/engine/webrtc_voice_engine.cc b/media/engine/webrtc_voice_engine.cc index 38dc3462ac..016c00fbcc 100644 --- a/media/engine/webrtc_voice_engine.cc +++ b/media/engine/webrtc_voice_engine.cc @@ -11,7 +11,6 @@ #include "media/engine/webrtc_voice_engine.h" #include -#include #include #include #include @@ -43,6 +42,7 @@ #include "rtc_base/race_checker.h" #include "rtc_base/strings/audio_format_to_string.h" #include "rtc_base/strings/string_builder.h" +#include "rtc_base/strings/string_format.h" #include "rtc_base/third_party/base64/base64.h" #include "rtc_base/trace_event.h" #include "system_wrappers/include/field_trial.h" @@ -2051,14 +2051,19 @@ bool WebRtcVoiceMediaChannel::SetLocalSource(uint32_t ssrc, bool WebRtcVoiceMediaChannel::SetOutputVolume(uint32_t ssrc, double volume) { RTC_DCHECK(worker_thread_checker_.IsCurrent()); + RTC_LOG(LS_INFO) << rtc::StringFormat("WRVMC::%s({ssrc=%u}, {volume=%.2f})", + __func__, ssrc, volume); const auto it = recv_streams_.find(ssrc); if (it == recv_streams_.end()) { - RTC_LOG(LS_WARNING) << "SetOutputVolume: no recv stream " << ssrc; + RTC_LOG(LS_WARNING) << rtc::StringFormat( + "WRVMC::%s => (WARNING: no receive stream for SSRC %u)", __func__, + ssrc); return false; } it->second->SetOutputVolume(volume); - RTC_LOG(LS_INFO) << "SetOutputVolume() to " << volume - << " for recv stream with ssrc " << ssrc; + RTC_LOG(LS_INFO) << rtc::StringFormat( + "WRVMC::%s => (stream with SSRC %u now uses volume %.2f)", __func__, ssrc, + volume); return true; } diff --git a/pc/remote_audio_source.cc b/pc/remote_audio_source.cc index 301cd3fb5b..18a4ed25c8 100644 --- a/pc/remote_audio_source.cc +++ b/pc/remote_audio_source.cc @@ -22,6 +22,7 @@ #include "rtc_base/location.h" #include "rtc_base/logging.h" #include "rtc_base/numerics/safe_conversions.h" +#include "rtc_base/strings/string_format.h" #include "rtc_base/thread.h" #include "rtc_base/thread_checker.h" @@ -102,6 +103,8 @@ bool RemoteAudioSource::remote() const { void RemoteAudioSource::SetVolume(double volume) { RTC_DCHECK_GE(volume, 0); RTC_DCHECK_LE(volume, 10); + RTC_LOG(LS_INFO) << rtc::StringFormat("RAS::%s({volume=%.2f})", __func__, + volume); for (auto* observer : audio_observers_) { observer->OnSetVolume(volume); }