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

Side by Side Diff: webrtc/api/rtcstats_integrationtest.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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/api/rtcstatscollector.cc » ('j') | webrtc/api/stats/rtcstats_objects.h » ('J')
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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 return verifier.ExpectAllMembersSuccessfullyTested(); 422 return verifier.ExpectAllMembersSuccessfullyTested();
423 } 423 }
424 424
425 bool VerifyRTCMediaStreamTrackStats( 425 bool VerifyRTCMediaStreamTrackStats(
426 const RTCMediaStreamTrackStats& media_stream_track) { 426 const RTCMediaStreamTrackStats& media_stream_track) {
427 RTCStatsVerifier verifier(report_, &media_stream_track); 427 RTCStatsVerifier verifier(report_, &media_stream_track);
428 verifier.TestMemberIsDefined(media_stream_track.track_identifier); 428 verifier.TestMemberIsDefined(media_stream_track.track_identifier);
429 verifier.TestMemberIsDefined(media_stream_track.remote_source); 429 verifier.TestMemberIsDefined(media_stream_track.remote_source);
430 verifier.TestMemberIsDefined(media_stream_track.ended); 430 verifier.TestMemberIsDefined(media_stream_track.ended);
431 verifier.TestMemberIsDefined(media_stream_track.detached); 431 verifier.TestMemberIsDefined(media_stream_track.detached);
432 verifier.TestMemberIsDefined(media_stream_track.kind);
432 verifier.TestMemberIsUndefined(media_stream_track.ssrc_ids); 433 verifier.TestMemberIsUndefined(media_stream_track.ssrc_ids);
433 // Video or audio media stream track? 434 // Video or audio media stream track?
434 if (media_stream_track.frame_width.is_defined()) { 435 if (*media_stream_track.kind == RTCMediaStreamTrackKind::kVideo) {
435 // Video-only members 436 // Video-only members
436 verifier.TestMemberIsNonNegative<uint32_t>( 437 verifier.TestMemberIsNonNegative<uint32_t>(
437 media_stream_track.frame_width); 438 media_stream_track.frame_width);
438 verifier.TestMemberIsNonNegative<uint32_t>( 439 verifier.TestMemberIsNonNegative<uint32_t>(
439 media_stream_track.frame_height); 440 media_stream_track.frame_height);
440 verifier.TestMemberIsUndefined(media_stream_track.frames_per_second); 441 verifier.TestMemberIsUndefined(media_stream_track.frames_per_second);
441 verifier.TestMemberIsUndefined(media_stream_track.frames_sent); 442 verifier.TestMemberIsUndefined(media_stream_track.frames_sent);
442 verifier.TestMemberIsUndefined(media_stream_track.frames_received); 443 verifier.TestMemberIsUndefined(media_stream_track.frames_received);
443 verifier.TestMemberIsUndefined(media_stream_track.frames_decoded); 444 verifier.TestMemberIsUndefined(media_stream_track.frames_decoded);
444 verifier.TestMemberIsUndefined(media_stream_track.frames_dropped); 445 verifier.TestMemberIsUndefined(media_stream_track.frames_dropped);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 caller_ = nullptr; 612 caller_ = nullptr;
612 // Any pending stats requests should have completed in the act of destroying 613 // Any pending stats requests should have completed in the act of destroying
613 // the peer connection. 614 // the peer connection.
614 EXPECT_TRUE(stats_obtainer->report()); 615 EXPECT_TRUE(stats_obtainer->report());
615 } 616 }
616 #endif // HAVE_SCTP 617 #endif // HAVE_SCTP
617 618
618 } // namespace 619 } // namespace
619 620
620 } // namespace webrtc 621 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/rtcstatscollector.cc » ('j') | webrtc/api/stats/rtcstats_objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698