OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2014 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 transport_stats.channel_stats.push_back(channel_stats); | 538 transport_stats.channel_stats.push_back(channel_stats); |
539 | 539 |
540 session_stats_.transport_stats[kTransportName] = transport_stats; | 540 session_stats_.transport_stats[kTransportName] = transport_stats; |
541 session_stats_.proxy_to_transport[vc_name] = kTransportName; | 541 session_stats_.proxy_to_transport[vc_name] = kTransportName; |
542 } | 542 } |
543 | 543 |
544 // Adds a outgoing video track with a given SSRC into the stats. | 544 // Adds a outgoing video track with a given SSRC into the stats. |
545 void AddOutgoingVideoTrackStats() { | 545 void AddOutgoingVideoTrackStats() { |
546 stream_ = webrtc::MediaStream::Create("streamlabel"); | 546 stream_ = webrtc::MediaStream::Create("streamlabel"); |
547 track_ = webrtc::VideoTrack::Create(kLocalTrackId, | 547 track_ = webrtc::VideoTrack::Create(kLocalTrackId, |
548 webrtc::FakeVideoTrackSource::Create(), | 548 webrtc::FakeVideoTrackSource::Create()); |
549 rtc::Thread::Current()); | |
550 stream_->AddTrack(track_); | 549 stream_->AddTrack(track_); |
551 EXPECT_CALL(session_, GetLocalTrackIdBySsrc(kSsrcOfTrack, _)) | 550 EXPECT_CALL(session_, GetLocalTrackIdBySsrc(kSsrcOfTrack, _)) |
552 .WillRepeatedly(DoAll(SetArgPointee<1>(kLocalTrackId), Return(true))); | 551 .WillRepeatedly(DoAll(SetArgPointee<1>(kLocalTrackId), Return(true))); |
553 } | 552 } |
554 | 553 |
555 // Adds a incoming video track with a given SSRC into the stats. | 554 // Adds a incoming video track with a given SSRC into the stats. |
556 void AddIncomingVideoTrackStats() { | 555 void AddIncomingVideoTrackStats() { |
557 stream_ = webrtc::MediaStream::Create("streamlabel"); | 556 stream_ = webrtc::MediaStream::Create("streamlabel"); |
558 track_ = webrtc::VideoTrack::Create(kRemoteTrackId, | 557 track_ = webrtc::VideoTrack::Create(kRemoteTrackId, |
559 webrtc::FakeVideoTrackSource::Create(), | 558 webrtc::FakeVideoTrackSource::Create()); |
560 rtc::Thread::Current()); | |
561 stream_->AddTrack(track_); | 559 stream_->AddTrack(track_); |
562 EXPECT_CALL(session_, GetRemoteTrackIdBySsrc(kSsrcOfTrack, _)) | 560 EXPECT_CALL(session_, GetRemoteTrackIdBySsrc(kSsrcOfTrack, _)) |
563 .WillRepeatedly(DoAll(SetArgPointee<1>(kRemoteTrackId), Return(true))); | 561 .WillRepeatedly(DoAll(SetArgPointee<1>(kRemoteTrackId), Return(true))); |
564 } | 562 } |
565 | 563 |
566 // Adds a outgoing audio track with a given SSRC into the stats. | 564 // Adds a outgoing audio track with a given SSRC into the stats. |
567 void AddOutgoingAudioTrackStats() { | 565 void AddOutgoingAudioTrackStats() { |
568 if (stream_ == NULL) | 566 if (stream_ == NULL) |
569 stream_ = webrtc::MediaStream::Create("streamlabel"); | 567 stream_ = webrtc::MediaStream::Create("streamlabel"); |
570 | 568 |
(...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2036 stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard); | 2034 stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard); |
2037 stats.GetStats(NULL, &reports); | 2035 stats.GetStats(NULL, &reports); |
2038 EXPECT_EQ(rtc::ToString(video_receiver_info.frames_decoded), | 2036 EXPECT_EQ(rtc::ToString(video_receiver_info.frames_decoded), |
2039 ExtractSsrcStatsValue(reports, | 2037 ExtractSsrcStatsValue(reports, |
2040 StatsReport::kStatsValueNameFramesDecoded)); | 2038 StatsReport::kStatsValueNameFramesDecoded)); |
2041 EXPECT_EQ(rtc::ToString(*video_receiver_info.qp_sum), | 2039 EXPECT_EQ(rtc::ToString(*video_receiver_info.qp_sum), |
2042 ExtractSsrcStatsValue(reports, StatsReport::kStatsValueNameQpSum)); | 2040 ExtractSsrcStatsValue(reports, StatsReport::kStatsValueNameQpSum)); |
2043 } | 2041 } |
2044 | 2042 |
2045 } // namespace webrtc | 2043 } // namespace webrtc |
OLD | NEW |