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

Side by Side Diff: webrtc/stats/rtcstats_objects.cc

Issue 2467873005: RTCMediaStream[Track]Stats added. (Closed)
Patch Set: Addressed comments Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « webrtc/api/test/mock_peerconnection.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats( 261 RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(
262 std::string&& id, int64_t timestamp_us) 262 std::string&& id, int64_t timestamp_us)
263 : RTCIceCandidateStats(std::move(id), timestamp_us) { 263 : RTCIceCandidateStats(std::move(id), timestamp_us) {
264 } 264 }
265 265
266 const char* RTCRemoteIceCandidateStats::type() const { 266 const char* RTCRemoteIceCandidateStats::type() const {
267 return kType; 267 return kType;
268 } 268 }
269 269
270 WEBRTC_RTCSTATS_IMPL(RTCMediaStreamStats, RTCStats, "stream",
271 &stream_identifier,
272 &track_ids);
273
274 RTCMediaStreamStats::RTCMediaStreamStats(
275 const std::string& id, int64_t timestamp_us)
276 : RTCMediaStreamStats(std::string(id), timestamp_us) {
277 }
278
279 RTCMediaStreamStats::RTCMediaStreamStats(
280 std::string&& id, int64_t timestamp_us)
281 : RTCStats(std::move(id), timestamp_us),
282 stream_identifier("streamIdentifier"),
283 track_ids("trackIds") {
284 }
285
286 RTCMediaStreamStats::RTCMediaStreamStats(
287 const RTCMediaStreamStats& other)
288 : RTCStats(other.id(), other.timestamp_us()),
289 stream_identifier(other.stream_identifier),
290 track_ids(other.track_ids) {
291 }
292
293 RTCMediaStreamStats::~RTCMediaStreamStats() {
294 }
295
296 WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track",
297 &track_identifier,
298 &remote_source,
299 &ended,
300 &detached,
301 &ssrc_ids,
302 &frame_width,
303 &frame_height,
304 &frames_per_second,
305 &frames_sent,
306 &frames_received,
307 &frames_decoded,
308 &frames_dropped,
309 &frames_corrupted,
310 &partial_frames_lost,
311 &full_frames_lost,
312 &audio_level,
313 &echo_return_loss,
314 &echo_return_loss_enhancement);
315
316 RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
317 const std::string& id, int64_t timestamp_us)
318 : RTCMediaStreamTrackStats(std::string(id), timestamp_us) {
319 }
320
321 RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
322 std::string&& id, int64_t timestamp_us)
323 : RTCStats(std::move(id), timestamp_us),
324 track_identifier("trackIdentifier"),
325 remote_source("remoteSource"),
326 ended("ended"),
327 detached("detached"),
328 ssrc_ids("ssrcIds"),
329 frame_width("frameWidth"),
330 frame_height("frameHeight"),
331 frames_per_second("framesPerSecond"),
332 frames_sent("framesSent"),
333 frames_received("framesReceived"),
334 frames_decoded("framesDecoded"),
335 frames_dropped("framesDropped"),
336 frames_corrupted("framesCorrupted"),
337 partial_frames_lost("partialFramesLost"),
338 full_frames_lost("fullFramesLost"),
339 audio_level("audioLevel"),
340 echo_return_loss("echoReturnLoss"),
341 echo_return_loss_enhancement("echoReturnLossEnhancement") {
342 }
343
344 RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
345 const RTCMediaStreamTrackStats& other)
346 : RTCStats(other.id(), other.timestamp_us()),
347 track_identifier(other.track_identifier),
348 remote_source(other.remote_source),
349 ended(other.ended),
350 detached(other.detached),
351 ssrc_ids(other.ssrc_ids),
352 frame_width(other.frame_width),
353 frame_height(other.frame_height),
354 frames_per_second(other.frames_per_second),
355 frames_sent(other.frames_sent),
356 frames_received(other.frames_received),
357 frames_decoded(other.frames_decoded),
358 frames_dropped(other.frames_dropped),
359 frames_corrupted(other.frames_corrupted),
360 partial_frames_lost(other.partial_frames_lost),
361 full_frames_lost(other.full_frames_lost),
362 audio_level(other.audio_level),
363 echo_return_loss(other.echo_return_loss),
364 echo_return_loss_enhancement(other.echo_return_loss_enhancement) {
365 }
366
367 RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() {
368 }
369
270 WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection", 370 WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection",
271 &data_channels_opened, 371 &data_channels_opened,
272 &data_channels_closed); 372 &data_channels_closed);
273 373
274 RTCPeerConnectionStats::RTCPeerConnectionStats( 374 RTCPeerConnectionStats::RTCPeerConnectionStats(
275 const std::string& id, int64_t timestamp_us) 375 const std::string& id, int64_t timestamp_us)
276 : RTCPeerConnectionStats(std::string(id), timestamp_us) { 376 : RTCPeerConnectionStats(std::string(id), timestamp_us) {
277 } 377 }
278 378
279 RTCPeerConnectionStats::RTCPeerConnectionStats( 379 RTCPeerConnectionStats::RTCPeerConnectionStats(
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 active_connection(other.active_connection), 580 active_connection(other.active_connection),
481 selected_candidate_pair_id(other.selected_candidate_pair_id), 581 selected_candidate_pair_id(other.selected_candidate_pair_id),
482 local_certificate_id(other.local_certificate_id), 582 local_certificate_id(other.local_certificate_id),
483 remote_certificate_id(other.remote_certificate_id) { 583 remote_certificate_id(other.remote_certificate_id) {
484 } 584 }
485 585
486 RTCTransportStats::~RTCTransportStats() { 586 RTCTransportStats::~RTCTransportStats() {
487 } 587 }
488 588
489 } // namespace webrtc 589 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/test/mock_peerconnection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698