Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: webrtc/api/stats/rtcstats_objects.h

Issue 2408363002: RTCTransportStats added. (Closed)
Patch Set: Addressed comments, RTP and RTCP Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/api/stats/rtcstats_objects.h
diff --git a/webrtc/api/stats/rtcstats_objects.h b/webrtc/api/stats/rtcstats_objects.h
index 4738fe89a89793e7f3993c843693927fc05ad7ba..bb3462395fe1b6d9ab8b028029791741ce0787b1 100644
--- a/webrtc/api/stats/rtcstats_objects.h
+++ b/webrtc/api/stats/rtcstats_objects.h
@@ -35,6 +35,24 @@ struct RTCIceCandidateType {
static const char* kRelay;
};
+// https://w3c.github.io/webrtc-stats/#certificatestats-dict*
+class RTCCertificateStats final : public RTCStats {
+ public:
+ WEBRTC_RTCSTATS_DECL();
+
+ RTCCertificateStats(const std::string& id, int64_t timestamp_us);
+ RTCCertificateStats(std::string&& id, int64_t timestamp_us);
+ RTCCertificateStats(const RTCCertificateStats& other);
+ ~RTCCertificateStats() override;
+
+ RTCStatsMember<std::string> fingerprint;
+ RTCStatsMember<std::string> fingerprint_algorithm;
+ RTCStatsMember<std::string> base64_certificate;
+ RTCStatsMember<std::string> issuer_certificate_id;
+};
+
+// https://w3c.github.io/webrtc-stats/#candidatepair-dict*
+// TODO(hbos): Finish implementation. Tracking bug crbug.com/633550
class RTCIceCandidatePairStats : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();
@@ -73,6 +91,7 @@ class RTCIceCandidatePairStats : public RTCStats {
};
// https://w3c.github.io/webrtc-stats/#icecandidate-dict*
+// TODO(hbos): Finish implementation. Tracking bug crbug.com/632723
class RTCIceCandidateStats : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();
@@ -113,24 +132,8 @@ class RTCRemoteIceCandidateStats final : public RTCIceCandidateStats {
const char* type() const override;
};
-// https://w3c.github.io/webrtc-stats/#certificatestats-dict*
-class RTCCertificateStats final : public RTCStats {
- public:
- WEBRTC_RTCSTATS_DECL();
-
- RTCCertificateStats(const std::string& id, int64_t timestamp_us);
- RTCCertificateStats(std::string&& id, int64_t timestamp_us);
- RTCCertificateStats(const RTCCertificateStats& other);
- ~RTCCertificateStats() override;
-
- RTCStatsMember<std::string> fingerprint;
- RTCStatsMember<std::string> fingerprint_algorithm;
- RTCStatsMember<std::string> base64_certificate;
- RTCStatsMember<std::string> issuer_certificate_id;
-};
-
// https://w3c.github.io/webrtc-stats/#pcstats-dict*
-// TODO(hbos): Tracking bug crbug.com/636818
+// TODO(hbos): Finish implementation. Tracking bug crbug.com/636818
class RTCPeerConnectionStats final : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();
@@ -144,6 +147,25 @@ class RTCPeerConnectionStats final : public RTCStats {
RTCStatsMember<uint32_t> data_channels_closed;
};
+// https://w3c.github.io/webrtc-stats/#transportstats-dict*
+class RTCTransportStats final : public RTCStats {
+ public:
+ WEBRTC_RTCSTATS_DECL();
+
+ RTCTransportStats(const std::string& id, int64_t timestamp_us);
+ RTCTransportStats(std::string&& id, int64_t timestamp_us);
+ RTCTransportStats(const RTCTransportStats& other);
+ ~RTCTransportStats() override;
+
+ RTCStatsMember<uint64_t> bytes_sent;
+ RTCStatsMember<uint64_t> bytes_received;
+ RTCStatsMember<std::string> rtcp_transport_stats_id;
+ RTCStatsMember<bool> active_connection;
+ RTCStatsMember<std::string> selected_candidate_pair_id;
+ RTCStatsMember<std::string> local_certificate_id;
+ RTCStatsMember<std::string> remote_certificate_id;
+};
+
} // namespace webrtc
#endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_

Powered by Google App Engine
This is Rietveld 408576698