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

Unified Diff: webrtc/stats/rtcstats_objects.cc

Issue 2456463002: RTCOutboundRTPStreamStats added. (Closed)
Patch Set: Rebase and TODO for target_bitrate 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
« no previous file with comments | « webrtc/stats/rtcstats.cc ('k') | webrtc/stats/rtcstatsreport.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/stats/rtcstats_objects.cc
diff --git a/webrtc/stats/rtcstats_objects.cc b/webrtc/stats/rtcstats_objects.cc
index 6a4203ed0eb1682478351fa02d26d5610ecca4a8..3d1d369407811e48a1fb3d6887fea63781f2f4cd 100644
--- a/webrtc/stats/rtcstats_objects.cc
+++ b/webrtc/stats/rtcstats_objects.cc
@@ -293,6 +293,92 @@ RTCPeerConnectionStats::RTCPeerConnectionStats(
RTCPeerConnectionStats::~RTCPeerConnectionStats() {
}
+WEBRTC_RTCSTATS_IMPL(RTCRTPStreamStats, RTCStats, "rtp",
+ &ssrc,
+ &associate_stats_id,
+ &is_remote,
+ &media_type,
+ &media_track_id,
+ &transport_id,
+ &codec_id,
+ &fir_count,
+ &pli_count,
+ &nack_count,
+ &sli_count);
+
+RTCRTPStreamStats::RTCRTPStreamStats(
+ const std::string& id, int64_t timestamp_us)
+ : RTCRTPStreamStats(std::string(id), timestamp_us) {
+}
+
+RTCRTPStreamStats::RTCRTPStreamStats(
+ std::string&& id, int64_t timestamp_us)
+ : RTCStats(std::move(id), timestamp_us),
+ ssrc("ssrc"),
+ associate_stats_id("associateStatsId"),
+ is_remote("isRemote", false),
+ media_type("mediaType"),
+ media_track_id("mediaTrackId"),
+ transport_id("transportId"),
+ codec_id("codecId"),
+ fir_count("firCount"),
+ pli_count("pliCount"),
+ nack_count("nackCount"),
+ sli_count("sliCount") {
+}
+
+RTCRTPStreamStats::RTCRTPStreamStats(
+ const RTCRTPStreamStats& other)
+ : RTCStats(other.id(), other.timestamp_us()),
+ ssrc(other.ssrc),
+ associate_stats_id(other.associate_stats_id),
+ is_remote(other.is_remote),
+ media_type(other.media_type),
+ media_track_id(other.media_track_id),
+ transport_id(other.transport_id),
+ codec_id(other.codec_id),
+ fir_count(other.fir_count),
+ pli_count(other.pli_count),
+ nack_count(other.nack_count),
+ sli_count(other.sli_count) {
+}
+
+RTCRTPStreamStats::~RTCRTPStreamStats() {
+}
+
+WEBRTC_RTCSTATS_IMPL(
+ RTCOutboundRTPStreamStats, RTCRTPStreamStats, "outbound-rtp",
+ &packets_sent,
+ &bytes_sent,
+ &target_bitrate,
+ &round_trip_time);
+
+RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
+ const std::string& id, int64_t timestamp_us)
+ : RTCOutboundRTPStreamStats(std::string(id), timestamp_us) {
+}
+
+RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
+ std::string&& id, int64_t timestamp_us)
+ : RTCRTPStreamStats(std::move(id), timestamp_us),
+ packets_sent("packetsSent"),
+ bytes_sent("bytesSent"),
+ target_bitrate("targetBitrate"),
+ round_trip_time("roundTripTime") {
+}
+
+RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
+ const RTCOutboundRTPStreamStats& other)
+ : RTCRTPStreamStats(other),
+ packets_sent(other.packets_sent),
+ bytes_sent(other.bytes_sent),
+ target_bitrate(other.target_bitrate),
+ round_trip_time(other.round_trip_time) {
+}
+
+RTCOutboundRTPStreamStats::~RTCOutboundRTPStreamStats() {
+}
+
WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport",
&bytes_sent,
&bytes_received,
« no previous file with comments | « webrtc/stats/rtcstats.cc ('k') | webrtc/stats/rtcstatsreport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698