| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 const WebRtcRTPHeader* rtpHeader) override { | 59 const WebRtcRTPHeader* rtpHeader) override { |
| 60 ADD_FAILURE(); | 60 ADD_FAILURE(); |
| 61 return 0; | 61 return 0; |
| 62 } | 62 } |
| 63 RTCPReceiver* rtcp_receiver_; | 63 RTCPReceiver* rtcp_receiver_; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 class RtcpReceiverTest : public ::testing::Test { | 66 class RtcpReceiverTest : public ::testing::Test { |
| 67 protected: | 67 protected: |
| 68 RtcpReceiverTest() | 68 RtcpReceiverTest() |
| 69 : over_use_detector_options_(), | 69 : system_clock_(1335900000), |
| 70 system_clock_(1335900000), | |
| 71 remote_bitrate_observer_(), | 70 remote_bitrate_observer_(), |
| 72 remote_bitrate_estimator_( | 71 remote_bitrate_estimator_( |
| 73 new RemoteBitrateEstimatorSingleStream(&remote_bitrate_observer_, | 72 new RemoteBitrateEstimatorSingleStream(&remote_bitrate_observer_, |
| 74 &system_clock_)) { | 73 &system_clock_)) { |
| 75 test_transport_ = new TestTransport(); | 74 test_transport_ = new TestTransport(); |
| 76 | 75 |
| 77 RtpRtcp::Configuration configuration; | 76 RtpRtcp::Configuration configuration; |
| 78 configuration.audio = false; | 77 configuration.audio = false; |
| 79 configuration.clock = &system_clock_; | 78 configuration.clock = &system_clock_; |
| 80 configuration.outgoing_transport = test_transport_; | 79 configuration.outgoing_transport = test_transport_; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 rtcp_packet_info_.ntp_frac = rtcpPacketInformation.ntp_frac; | 123 rtcp_packet_info_.ntp_frac = rtcpPacketInformation.ntp_frac; |
| 125 rtcp_packet_info_.rtp_timestamp = rtcpPacketInformation.rtp_timestamp; | 124 rtcp_packet_info_.rtp_timestamp = rtcpPacketInformation.rtp_timestamp; |
| 126 rtcp_packet_info_.xr_dlrr_item = rtcpPacketInformation.xr_dlrr_item; | 125 rtcp_packet_info_.xr_dlrr_item = rtcpPacketInformation.xr_dlrr_item; |
| 127 if (rtcpPacketInformation.VoIPMetric) | 126 if (rtcpPacketInformation.VoIPMetric) |
| 128 rtcp_packet_info_.AddVoIPMetric(rtcpPacketInformation.VoIPMetric); | 127 rtcp_packet_info_.AddVoIPMetric(rtcpPacketInformation.VoIPMetric); |
| 129 rtcp_packet_info_.transport_feedback_.reset( | 128 rtcp_packet_info_.transport_feedback_.reset( |
| 130 rtcpPacketInformation.transport_feedback_.release()); | 129 rtcpPacketInformation.transport_feedback_.release()); |
| 131 return 0; | 130 return 0; |
| 132 } | 131 } |
| 133 | 132 |
| 134 OverUseDetectorOptions over_use_detector_options_; | |
| 135 SimulatedClock system_clock_; | 133 SimulatedClock system_clock_; |
| 136 ModuleRtpRtcpImpl* rtp_rtcp_impl_; | 134 ModuleRtpRtcpImpl* rtp_rtcp_impl_; |
| 137 RTCPReceiver* rtcp_receiver_; | 135 RTCPReceiver* rtcp_receiver_; |
| 138 TestTransport* test_transport_; | 136 TestTransport* test_transport_; |
| 139 RTCPHelp::RTCPPacketInformation rtcp_packet_info_; | 137 RTCPHelp::RTCPPacketInformation rtcp_packet_info_; |
| 140 MockRemoteBitrateObserver remote_bitrate_observer_; | 138 MockRemoteBitrateObserver remote_bitrate_observer_; |
| 141 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; | 139 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; |
| 142 }; | 140 }; |
| 143 | 141 |
| 144 | 142 |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1091 | 1089 |
| 1092 // Transport feedback should be ignored, but next packet should work. | 1090 // Transport feedback should be ignored, but next packet should work. |
| 1093 EXPECT_EQ(0u, rtcp_packet_info_.rtcpPacketTypeFlags & kRtcpTransportFeedback); | 1091 EXPECT_EQ(0u, rtcp_packet_info_.rtcpPacketTypeFlags & kRtcpTransportFeedback); |
| 1094 EXPECT_NE(0u, rtcp_packet_info_.rtcpPacketTypeFlags & kRtcpRemb); | 1092 EXPECT_NE(0u, rtcp_packet_info_.rtcpPacketTypeFlags & kRtcpRemb); |
| 1095 EXPECT_EQ(kBitrateBps, rtcp_packet_info_.receiverEstimatedMaxBitrate); | 1093 EXPECT_EQ(kBitrateBps, rtcp_packet_info_.receiverEstimatedMaxBitrate); |
| 1096 } | 1094 } |
| 1097 | 1095 |
| 1098 } // Anonymous namespace | 1096 } // Anonymous namespace |
| 1099 | 1097 |
| 1100 } // namespace webrtc | 1098 } // namespace webrtc |
| OLD | NEW |