Count key protocol for all media sections
This will give accurate stats for the number of calls that use video that are using SDES. Bug: chromium:804275 Change-Id: I35b045a2301fb5267b656b424b9b3482b1b72f9a Reviewed-on: https://webrtc-review.googlesource.com/60481 Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22324}
This commit is contained in:
committed by
Commit Bot
parent
db4fa4b944
commit
2e18061033
@ -430,6 +430,11 @@ RTCError VerifyCrypto(const SessionDescription* desc,
|
||||
if (content_info.rejected) {
|
||||
continue;
|
||||
}
|
||||
// Note what media is used with each crypto protocol, for all sections.
|
||||
NoteKeyProtocolAndMedia(dtls_enabled ? webrtc::kEnumCounterKeyProtocolDtls
|
||||
: webrtc::kEnumCounterKeyProtocolSdes,
|
||||
content_info.media_description()->type(),
|
||||
uma_observer);
|
||||
const std::string& mid = content_info.name;
|
||||
if (bundle && bundle->HasContentName(mid) &&
|
||||
mid != *(bundle->FirstContentName())) {
|
||||
@ -455,16 +460,12 @@ RTCError VerifyCrypto(const SessionDescription* desc,
|
||||
return RTCError(RTCErrorType::INVALID_PARAMETER,
|
||||
kSdpWithoutDtlsFingerprint);
|
||||
}
|
||||
NoteKeyProtocolAndMedia(webrtc::kEnumCounterKeyProtocolDtls,
|
||||
media->type(), uma_observer);
|
||||
} else {
|
||||
if (media->cryptos().empty()) {
|
||||
RTC_LOG(LS_WARNING)
|
||||
<< "Session description must have SDES when DTLS disabled.";
|
||||
return RTCError(RTCErrorType::INVALID_PARAMETER, kSdpWithoutSdesCrypto);
|
||||
}
|
||||
NoteKeyProtocolAndMedia(webrtc::kEnumCounterKeyProtocolSdes,
|
||||
media->type(), uma_observer);
|
||||
}
|
||||
}
|
||||
return RTCError::OK();
|
||||
|
||||
Reference in New Issue
Block a user