Review RtcpTransciverConfig warnings

Move warning about missing receive_statistics to AddReceiver to avoid
producing it for rtp send only endpoints.
Remove warning about missing cname as unimportant.

Bug: webrtc:8239
Change-Id: I8a90aa4b378284b9c68f67678b2392b9461c95b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264825
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37093}
This commit is contained in:
Danil Chapovalov
2022-06-02 12:59:53 +02:00
committed by WebRTC LUCI CQ
parent 917ebd40c9
commit 3eedc90052
2 changed files with 9 additions and 11 deletions

View File

@ -112,6 +112,11 @@ RtcpTransceiverImpl::~RtcpTransceiverImpl() = default;
void RtcpTransceiverImpl::AddMediaReceiverRtcpObserver(
uint32_t remote_ssrc,
MediaReceiverRtcpObserver* observer) {
if (config_.receive_statistics == nullptr && remote_senders_.empty()) {
RTC_LOG(LS_WARNING) << config_.debug_id
<< "receive statistic is not set. RTCP report blocks "
"will not be generated.";
}
auto& stored = remote_senders_[remote_ssrc].observers;
RTC_DCHECK(!absl::c_linear_search(stored, observer));
stored.push_back(observer);