fix variable naming in ReportSdpFormatReceived

it no longer reports just offers.

BUG=chromium:857004

Change-Id: Idf35b6fa98f3ee6637aeef6b11553947fea3ee25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202249
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#33024}
This commit is contained in:
Philipp Hancke
2021-01-18 11:25:31 +01:00
committed by Commit Bot
parent ee95c1c8c7
commit 844c759766
2 changed files with 8 additions and 6 deletions

View File

@ -2269,12 +2269,13 @@ bool PeerConnection::ValidateBundleSettings(const SessionDescription* desc) {
}
void PeerConnection::ReportSdpFormatReceived(
const SessionDescriptionInterface& remote_offer) {
const SessionDescriptionInterface& remote_description) {
int num_audio_mlines = 0;
int num_video_mlines = 0;
int num_audio_tracks = 0;
int num_video_tracks = 0;
for (const ContentInfo& content : remote_offer.description()->contents()) {
for (const ContentInfo& content :
remote_description.description()->contents()) {
cricket::MediaType media_type = content.media_description()->type();
int num_tracks = std::max(
1, static_cast<int>(content.media_description()->streams().size()));
@ -2294,7 +2295,7 @@ void PeerConnection::ReportSdpFormatReceived(
} else if (num_audio_tracks > 0 || num_video_tracks > 0) {
format = kSdpFormatReceivedSimple;
}
switch (remote_offer.GetType()) {
switch (remote_description.GetType()) {
case SdpType::kOffer:
// Historically only offers were counted.
RTC_HISTOGRAM_ENUMERATION("WebRTC.PeerConnection.SdpFormatReceived",
@ -2306,7 +2307,7 @@ void PeerConnection::ReportSdpFormatReceived(
break;
default:
RTC_LOG(LS_ERROR) << "Can not report SdpFormatReceived for "
<< SdpTypeToString(remote_offer.GetType());
<< SdpTypeToString(remote_description.GetType());
break;
}
}

View File

@ -379,8 +379,9 @@ class PeerConnection : public PeerConnectionInternal,
void SetIceConnectionState(IceConnectionState new_state);
void NoteUsageEvent(UsageEvent event);
// Report the UMA metric SdpFormatReceived for the given remote offer.
void ReportSdpFormatReceived(const SessionDescriptionInterface& remote_offer);
// Report the UMA metric SdpFormatReceived for the given remote description.
void ReportSdpFormatReceived(
const SessionDescriptionInterface& remote_description);
// Returns true if the PeerConnection is configured to use Unified Plan
// semantics for creating offers/answers and setting local/remote