| 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()); |
| 549 stream_->AddTrack(track_); | 550 stream_->AddTrack(track_); |
| 550 EXPECT_CALL(session_, GetLocalTrackIdBySsrc(kSsrcOfTrack, _)) | 551 EXPECT_CALL(session_, GetLocalTrackIdBySsrc(kSsrcOfTrack, _)) |
| 551 .WillRepeatedly(DoAll(SetArgPointee<1>(kLocalTrackId), Return(true))); | 552 .WillRepeatedly(DoAll(SetArgPointee<1>(kLocalTrackId), Return(true))); |
| 552 } | 553 } |
| 553 | 554 |
| 554 // Adds a incoming video track with a given SSRC into the stats. | 555 // Adds a incoming video track with a given SSRC into the stats. |
| 555 void AddIncomingVideoTrackStats() { | 556 void AddIncomingVideoTrackStats() { |
| 556 stream_ = webrtc::MediaStream::Create("streamlabel"); | 557 stream_ = webrtc::MediaStream::Create("streamlabel"); |
| 557 track_ = webrtc::VideoTrack::Create(kRemoteTrackId, | 558 track_ = webrtc::VideoTrack::Create(kRemoteTrackId, |
| 558 webrtc::FakeVideoTrackSource::Create()); | 559 webrtc::FakeVideoTrackSource::Create(), |
| 560 rtc::Thread::Current()); |
| 559 stream_->AddTrack(track_); | 561 stream_->AddTrack(track_); |
| 560 EXPECT_CALL(session_, GetRemoteTrackIdBySsrc(kSsrcOfTrack, _)) | 562 EXPECT_CALL(session_, GetRemoteTrackIdBySsrc(kSsrcOfTrack, _)) |
| 561 .WillRepeatedly(DoAll(SetArgPointee<1>(kRemoteTrackId), Return(true))); | 563 .WillRepeatedly(DoAll(SetArgPointee<1>(kRemoteTrackId), Return(true))); |
| 562 } | 564 } |
| 563 | 565 |
| 564 // Adds a outgoing audio track with a given SSRC into the stats. | 566 // Adds a outgoing audio track with a given SSRC into the stats. |
| 565 void AddOutgoingAudioTrackStats() { | 567 void AddOutgoingAudioTrackStats() { |
| 566 if (stream_ == NULL) | 568 if (stream_ == NULL) |
| 567 stream_ = webrtc::MediaStream::Create("streamlabel"); | 569 stream_ = webrtc::MediaStream::Create("streamlabel"); |
| 568 | 570 |
| (...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2034 stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard); | 2036 stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard); |
| 2035 stats.GetStats(NULL, &reports); | 2037 stats.GetStats(NULL, &reports); |
| 2036 EXPECT_EQ(rtc::ToString(video_receiver_info.frames_decoded), | 2038 EXPECT_EQ(rtc::ToString(video_receiver_info.frames_decoded), |
| 2037 ExtractSsrcStatsValue(reports, | 2039 ExtractSsrcStatsValue(reports, |
| 2038 StatsReport::kStatsValueNameFramesDecoded)); | 2040 StatsReport::kStatsValueNameFramesDecoded)); |
| 2039 EXPECT_EQ(rtc::ToString(*video_receiver_info.qp_sum), | 2041 EXPECT_EQ(rtc::ToString(*video_receiver_info.qp_sum), |
| 2040 ExtractSsrcStatsValue(reports, StatsReport::kStatsValueNameQpSum)); | 2042 ExtractSsrcStatsValue(reports, StatsReport::kStatsValueNameQpSum)); |
| 2041 } | 2043 } |
| 2042 | 2044 |
| 2043 } // namespace webrtc | 2045 } // namespace webrtc |
| OLD | NEW |