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:

committed by
WebRTC LUCI CQ

parent
917ebd40c9
commit
3eedc90052
@ -23,13 +23,11 @@ RtcpTransceiverConfig& RtcpTransceiverConfig::operator=(
|
|||||||
RtcpTransceiverConfig::~RtcpTransceiverConfig() = default;
|
RtcpTransceiverConfig::~RtcpTransceiverConfig() = default;
|
||||||
|
|
||||||
bool RtcpTransceiverConfig::Validate() const {
|
bool RtcpTransceiverConfig::Validate() const {
|
||||||
if (feedback_ssrc == 0)
|
if (feedback_ssrc == 0) {
|
||||||
RTC_LOG(LS_WARNING)
|
RTC_LOG(LS_WARNING)
|
||||||
<< debug_id
|
<< debug_id
|
||||||
<< "Ssrc 0 may be treated by some implementation as invalid.";
|
<< "Ssrc 0 may be treated by some implementation as invalid.";
|
||||||
if (cname.empty())
|
}
|
||||||
RTC_LOG(LS_WARNING) << debug_id << "missing cname for ssrc "
|
|
||||||
<< feedback_ssrc;
|
|
||||||
if (cname.size() > 255) {
|
if (cname.size() > 255) {
|
||||||
RTC_LOG(LS_ERROR) << debug_id << "cname can be maximum 255 characters.";
|
RTC_LOG(LS_ERROR) << debug_id << "cname can be maximum 255 characters.";
|
||||||
return false;
|
return false;
|
||||||
@ -71,16 +69,11 @@ bool RtcpTransceiverConfig::Validate() const {
|
|||||||
RTC_LOG(LS_ERROR) << debug_id << "unsupported rtcp mode";
|
RTC_LOG(LS_ERROR) << debug_id << "unsupported rtcp mode";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (non_sender_rtt_measurement && !network_link_observer)
|
if (non_sender_rtt_measurement && !network_link_observer) {
|
||||||
RTC_LOG(LS_WARNING) << debug_id
|
RTC_LOG(LS_WARNING) << debug_id
|
||||||
<< "Enabled special feature to calculate rtt, but no "
|
<< "Enabled special feature to calculate rtt, but no "
|
||||||
"rtt observer is provided.";
|
"rtt observer is provided.";
|
||||||
// TODO(danilchap): Remove or update the warning when RtcpTransceiver supports
|
}
|
||||||
// send-only sessions.
|
|
||||||
if (receive_statistics == nullptr)
|
|
||||||
RTC_LOG(LS_WARNING)
|
|
||||||
<< debug_id
|
|
||||||
<< "receive statistic should be set to generate rtcp report blocks.";
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,6 +112,11 @@ RtcpTransceiverImpl::~RtcpTransceiverImpl() = default;
|
|||||||
void RtcpTransceiverImpl::AddMediaReceiverRtcpObserver(
|
void RtcpTransceiverImpl::AddMediaReceiverRtcpObserver(
|
||||||
uint32_t remote_ssrc,
|
uint32_t remote_ssrc,
|
||||||
MediaReceiverRtcpObserver* observer) {
|
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;
|
auto& stored = remote_senders_[remote_ssrc].observers;
|
||||||
RTC_DCHECK(!absl::c_linear_search(stored, observer));
|
RTC_DCHECK(!absl::c_linear_search(stored, observer));
|
||||||
stored.push_back(observer);
|
stored.push_back(observer);
|
||||||
|
Reference in New Issue
Block a user