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

Unified Diff: webrtc/stats/rtcstats_objects.cc

Issue 2623513006: RTCMediaStreamTrackStats.kind added and collected. (Closed)
Patch Set: Created 3 years, 11 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
« webrtc/api/stats/rtcstats_objects.h ('K') | « webrtc/api/stats/rtcstats_objects.h ('k') | no next file » | 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 947cc32fad9dfa090e22e0f46beb0bbb68e227c3..09cea97e9b0cbae93ab835fcdd90ec84591c25e9 100644
--- a/webrtc/stats/rtcstats_objects.cc
+++ b/webrtc/stats/rtcstats_objects.cc
@@ -29,6 +29,9 @@ const char* RTCIceCandidateType::kSrflx = "srflx";
const char* RTCIceCandidateType::kPrflx = "prflx";
const char* RTCIceCandidateType::kRelay = "relay";
+const char* RTCMediaStreamTrackKind::kAudio = "audio";
+const char* RTCMediaStreamTrackKind::kVideo = "video";
+
WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate",
&fingerprint,
&fingerprint_algorithm,
@@ -344,6 +347,7 @@ WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track",
&remote_source,
&ended,
&detached,
+ &kind,
&ssrc_ids,
&frame_width,
&frame_height,
@@ -360,17 +364,18 @@ WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track",
&echo_return_loss_enhancement);
RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
- const std::string& id, int64_t timestamp_us)
- : RTCMediaStreamTrackStats(std::string(id), timestamp_us) {
+ const std::string& id, int64_t timestamp_us, const char* kind)
+ : RTCMediaStreamTrackStats(std::string(id), timestamp_us, kind) {
}
RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
- std::string&& id, int64_t timestamp_us)
+ std::string&& id, int64_t timestamp_us, const char* kind)
: RTCStats(std::move(id), timestamp_us),
track_identifier("trackIdentifier"),
remote_source("remoteSource"),
ended("ended"),
detached("detached"),
+ kind("kind", kind),
ssrc_ids("ssrcIds"),
frame_width("frameWidth"),
frame_height("frameHeight"),
@@ -385,6 +390,8 @@ RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
audio_level("audioLevel"),
echo_return_loss("echoReturnLoss"),
echo_return_loss_enhancement("echoReturnLossEnhancement") {
+ RTC_DCHECK(kind == RTCMediaStreamTrackKind::kAudio ||
+ kind == RTCMediaStreamTrackKind::kVideo);
}
RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
@@ -394,6 +401,7 @@ RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
remote_source(other.remote_source),
ended(other.ended),
detached(other.detached),
+ kind(other.kind),
ssrc_ids(other.ssrc_ids),
frame_width(other.frame_width),
frame_height(other.frame_height),
« webrtc/api/stats/rtcstats_objects.h ('K') | « webrtc/api/stats/rtcstats_objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698