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