stats: add dtlsRole to transport

https://w3c.github.io/webrtc-stats/#dom-rtctransportstats-dtlsrole

BUG=webrtc:13978

Change-Id: Ib158427d2df0307884381bdd46c411f60f56a371
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259761
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#36730}
This commit is contained in:
Philipp Hancke
2022-04-22 15:46:24 +02:00
committed by WebRTC LUCI CQ
parent 8c354882f8
commit 69c1df2f44
7 changed files with 35 additions and 0 deletions

View File

@ -62,6 +62,11 @@ const char* const RTCQualityLimitationReason::kOther = "other";
const char* const RTCContentType::kUnspecified = "unspecified";
const char* const RTCContentType::kScreenshare = "screenshare";
// https://w3c.github.io/webrtc-stats/#dom-rtcdtlsrole
const char* const RTCDtlsRole::kUnknown = "unknown";
const char* const RTCDtlsRole::kClient = "client";
const char* const RTCDtlsRole::kServer = "server";
// clang-format off
WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate",
&fingerprint,
@ -1082,6 +1087,7 @@ WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport",
&remote_certificate_id,
&tls_version,
&dtls_cipher,
&dtls_role,
&srtp_cipher,
&selected_candidate_pair_changes)
// clang-format on
@ -1103,6 +1109,7 @@ RTCTransportStats::RTCTransportStats(std::string&& id, int64_t timestamp_us)
remote_certificate_id("remoteCertificateId"),
tls_version("tlsVersion"),
dtls_cipher("dtlsCipher"),
dtls_role("dtlsRole"),
srtp_cipher("srtpCipher"),
selected_candidate_pair_changes("selectedCandidatePairChanges") {}
@ -1119,6 +1126,7 @@ RTCTransportStats::RTCTransportStats(const RTCTransportStats& other)
remote_certificate_id(other.remote_certificate_id),
tls_version(other.tls_version),
dtls_cipher(other.dtls_cipher),
dtls_role(other.dtls_role),
srtp_cipher(other.srtp_cipher),
selected_candidate_pair_changes(other.selected_candidate_pair_changes) {}