OLD | NEW |
---|---|
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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1526 CreateFakeTrack(cricket::MEDIA_TYPE_VIDEO, "RemoteVideoTrackID3", | 1526 CreateFakeTrack(cricket::MEDIA_TYPE_VIDEO, "RemoteVideoTrackID3", |
1527 MediaStreamTrackInterface::kEnded); | 1527 MediaStreamTrackInterface::kEnded); |
1528 remote_stream->AddTrack(static_cast<VideoTrackInterface*>( | 1528 remote_stream->AddTrack(static_cast<VideoTrackInterface*>( |
1529 remote_video_track_ssrc3.get())); | 1529 remote_video_track_ssrc3.get())); |
1530 | 1530 |
1531 cricket::VideoReceiverInfo video_receiver_info_ssrc3; | 1531 cricket::VideoReceiverInfo video_receiver_info_ssrc3; |
1532 video_receiver_info_ssrc3.local_stats.push_back(cricket::SsrcReceiverInfo()); | 1532 video_receiver_info_ssrc3.local_stats.push_back(cricket::SsrcReceiverInfo()); |
1533 video_receiver_info_ssrc3.local_stats[0].ssrc = 3; | 1533 video_receiver_info_ssrc3.local_stats[0].ssrc = 3; |
1534 video_receiver_info_ssrc3.frame_width = 6789; | 1534 video_receiver_info_ssrc3.frame_width = 6789; |
1535 video_receiver_info_ssrc3.frame_height = 9876; | 1535 video_receiver_info_ssrc3.frame_height = 9876; |
1536 video_receiver_info_ssrc3.frames_decoded = 1234; | |
1536 | 1537 |
1537 // Remote audio track with undefined (default) values | 1538 // Remote audio track with undefined (default) values |
1538 rtc::scoped_refptr<MediaStreamTrackInterface> remote_video_track_ssrc4 = | 1539 rtc::scoped_refptr<MediaStreamTrackInterface> remote_video_track_ssrc4 = |
1539 CreateFakeTrack(cricket::MEDIA_TYPE_VIDEO, "RemoteVideoTrackID4", | 1540 CreateFakeTrack(cricket::MEDIA_TYPE_VIDEO, "RemoteVideoTrackID4", |
1540 MediaStreamTrackInterface::kLive); | 1541 MediaStreamTrackInterface::kLive); |
1541 remote_stream->AddTrack(static_cast<VideoTrackInterface*>( | 1542 remote_stream->AddTrack(static_cast<VideoTrackInterface*>( |
1542 remote_video_track_ssrc4.get())); | 1543 remote_video_track_ssrc4.get())); |
1543 | 1544 |
1544 cricket::VideoReceiverInfo video_receiver_info_ssrc4; | 1545 cricket::VideoReceiverInfo video_receiver_info_ssrc4; |
1545 video_receiver_info_ssrc4.local_stats.push_back(cricket::SsrcReceiverInfo()); | 1546 video_receiver_info_ssrc4.local_stats.push_back(cricket::SsrcReceiverInfo()); |
1546 video_receiver_info_ssrc4.local_stats[0].ssrc = 4; | 1547 video_receiver_info_ssrc4.local_stats[0].ssrc = 4; |
1547 video_receiver_info_ssrc4.frame_width = 0; | 1548 video_receiver_info_ssrc4.frame_width = 0; |
1548 video_receiver_info_ssrc4.frame_height = 0; | 1549 video_receiver_info_ssrc4.frame_height = 0; |
1550 video_receiver_info_ssrc4.frames_decoded = 0; | |
1549 | 1551 |
1550 test_->CreateMockRtpSendersReceiversAndChannels( | 1552 test_->CreateMockRtpSendersReceiversAndChannels( |
1551 {}, {}, | 1553 {}, {}, |
1552 { std::make_pair(local_video_track.get(), video_sender_info_ssrc1), | 1554 { std::make_pair(local_video_track.get(), video_sender_info_ssrc1), |
1553 std::make_pair(local_video_track.get(), video_sender_info_ssrc2) }, | 1555 std::make_pair(local_video_track.get(), video_sender_info_ssrc2) }, |
1554 { std::make_pair(remote_video_track_ssrc3.get(), | 1556 { std::make_pair(remote_video_track_ssrc3.get(), |
1555 video_receiver_info_ssrc3), | 1557 video_receiver_info_ssrc3), |
1556 std::make_pair(remote_video_track_ssrc4.get(), | 1558 std::make_pair(remote_video_track_ssrc4.get(), |
1557 video_receiver_info_ssrc4) }); | 1559 video_receiver_info_ssrc4) }); |
1558 | 1560 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1611 RTCMediaStreamTrackStats expected_remote_video_track_ssrc3( | 1613 RTCMediaStreamTrackStats expected_remote_video_track_ssrc3( |
1612 "RTCMediaStreamTrack_remote_video_RemoteVideoTrackID3_3", | 1614 "RTCMediaStreamTrack_remote_video_RemoteVideoTrackID3_3", |
1613 report->timestamp_us(), RTCMediaStreamTrackKind::kVideo); | 1615 report->timestamp_us(), RTCMediaStreamTrackKind::kVideo); |
1614 expected_remote_video_track_ssrc3.track_identifier = | 1616 expected_remote_video_track_ssrc3.track_identifier = |
1615 remote_video_track_ssrc3->id(); | 1617 remote_video_track_ssrc3->id(); |
1616 expected_remote_video_track_ssrc3.remote_source = true; | 1618 expected_remote_video_track_ssrc3.remote_source = true; |
1617 expected_remote_video_track_ssrc3.ended = true; | 1619 expected_remote_video_track_ssrc3.ended = true; |
1618 expected_remote_video_track_ssrc3.detached = false; | 1620 expected_remote_video_track_ssrc3.detached = false; |
1619 expected_remote_video_track_ssrc3.frame_width = 6789; | 1621 expected_remote_video_track_ssrc3.frame_width = 6789; |
1620 expected_remote_video_track_ssrc3.frame_height = 9876; | 1622 expected_remote_video_track_ssrc3.frame_height = 9876; |
1623 expected_remote_video_track_ssrc3.frames_decoded = 1234; | |
1621 ASSERT_TRUE(report->Get(expected_remote_video_track_ssrc3.id())); | 1624 ASSERT_TRUE(report->Get(expected_remote_video_track_ssrc3.id())); |
1622 EXPECT_EQ(expected_remote_video_track_ssrc3, | 1625 EXPECT_EQ(expected_remote_video_track_ssrc3, |
1623 report->Get(expected_remote_video_track_ssrc3.id())->cast_to< | 1626 report->Get(expected_remote_video_track_ssrc3.id())->cast_to< |
1624 RTCMediaStreamTrackStats>()); | 1627 RTCMediaStreamTrackStats>()); |
1625 | 1628 |
1626 RTCMediaStreamTrackStats expected_remote_video_track_ssrc4( | 1629 RTCMediaStreamTrackStats expected_remote_video_track_ssrc4( |
1627 "RTCMediaStreamTrack_remote_video_RemoteVideoTrackID4_4", | 1630 "RTCMediaStreamTrack_remote_video_RemoteVideoTrackID4_4", |
1628 report->timestamp_us(), RTCMediaStreamTrackKind::kVideo); | 1631 report->timestamp_us(), RTCMediaStreamTrackKind::kVideo); |
1629 expected_remote_video_track_ssrc4.track_identifier = | 1632 expected_remote_video_track_ssrc4.track_identifier = |
1630 remote_video_track_ssrc4->id(); | 1633 remote_video_track_ssrc4->id(); |
1631 expected_remote_video_track_ssrc4.remote_source = true; | 1634 expected_remote_video_track_ssrc4.remote_source = true; |
1632 expected_remote_video_track_ssrc4.ended = false; | 1635 expected_remote_video_track_ssrc4.ended = false; |
1633 expected_remote_video_track_ssrc4.detached = false; | 1636 expected_remote_video_track_ssrc4.detached = false; |
1637 expected_remote_video_track_ssrc4.frames_decoded = 0; | |
hta-webrtc
2017/01/20 09:41:36
If we expect in the future that two SSRCs may be a
hbos
2017/01/20 14:45:48
Can't do it now, the assumption about only having
| |
1634 // Should be undefined: |expected_remote_video_track_ssrc4.frame_width| and | 1638 // Should be undefined: |expected_remote_video_track_ssrc4.frame_width| and |
1635 // |expected_remote_video_track_ssrc4.frame_height|. | 1639 // |expected_remote_video_track_ssrc4.frame_height|. |
1636 ASSERT_TRUE(report->Get(expected_remote_video_track_ssrc4.id())); | 1640 ASSERT_TRUE(report->Get(expected_remote_video_track_ssrc4.id())); |
1637 EXPECT_EQ(expected_remote_video_track_ssrc4, | 1641 EXPECT_EQ(expected_remote_video_track_ssrc4, |
1638 report->Get(expected_remote_video_track_ssrc4.id())->cast_to< | 1642 report->Get(expected_remote_video_track_ssrc4.id())->cast_to< |
1639 RTCMediaStreamTrackStats>()); | 1643 RTCMediaStreamTrackStats>()); |
1640 } | 1644 } |
1641 | 1645 |
1642 TEST_F(RTCStatsCollectorTest, CollectRTCInboundRTPStreamStats_Audio) { | 1646 TEST_F(RTCStatsCollectorTest, CollectRTCInboundRTPStreamStats_Audio) { |
1643 MockVoiceMediaChannel* voice_media_channel = new MockVoiceMediaChannel(); | 1647 MockVoiceMediaChannel* voice_media_channel = new MockVoiceMediaChannel(); |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2234 rtc::scoped_refptr<FakeRTCStatsCollector> collector_; | 2238 rtc::scoped_refptr<FakeRTCStatsCollector> collector_; |
2235 }; | 2239 }; |
2236 | 2240 |
2237 TEST_F(RTCStatsCollectorTestWithFakeCollector, ThreadUsageAndResultsMerging) { | 2241 TEST_F(RTCStatsCollectorTestWithFakeCollector, ThreadUsageAndResultsMerging) { |
2238 collector_->VerifyThreadUsageAndResultsMerging(); | 2242 collector_->VerifyThreadUsageAndResultsMerging(); |
2239 } | 2243 } |
2240 | 2244 |
2241 } // namespace | 2245 } // namespace |
2242 | 2246 |
2243 } // namespace webrtc | 2247 } // namespace webrtc |
OLD | NEW |