Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc

Issue 1376423002: Make overuse estimator one dimensional. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Further cleanups. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 const WebRtcRTPHeader* rtpHeader) override { 54 const WebRtcRTPHeader* rtpHeader) override {
55 ADD_FAILURE(); 55 ADD_FAILURE();
56 return 0; 56 return 0;
57 } 57 }
58 RTCPReceiver* rtcp_receiver_; 58 RTCPReceiver* rtcp_receiver_;
59 }; 59 };
60 60
61 class RtcpReceiverTest : public ::testing::Test { 61 class RtcpReceiverTest : public ::testing::Test {
62 protected: 62 protected:
63 RtcpReceiverTest() 63 RtcpReceiverTest()
64 : over_use_detector_options_(), 64 : system_clock_(1335900000),
65 system_clock_(1335900000),
66 remote_bitrate_observer_(), 65 remote_bitrate_observer_(),
67 remote_bitrate_estimator_( 66 remote_bitrate_estimator_(
68 new RemoteBitrateEstimatorSingleStream(&remote_bitrate_observer_, 67 new RemoteBitrateEstimatorSingleStream(&remote_bitrate_observer_,
69 &system_clock_)) { 68 &system_clock_)) {
70 test_transport_ = new TestTransport(); 69 test_transport_ = new TestTransport();
71 70
72 RtpRtcp::Configuration configuration; 71 RtpRtcp::Configuration configuration;
73 configuration.audio = false; 72 configuration.audio = false;
74 configuration.clock = &system_clock_; 73 configuration.clock = &system_clock_;
75 configuration.outgoing_transport = test_transport_; 74 configuration.outgoing_transport = test_transport_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 rtcp_packet_info_.ntp_frac = rtcpPacketInformation.ntp_frac; 118 rtcp_packet_info_.ntp_frac = rtcpPacketInformation.ntp_frac;
120 rtcp_packet_info_.rtp_timestamp = rtcpPacketInformation.rtp_timestamp; 119 rtcp_packet_info_.rtp_timestamp = rtcpPacketInformation.rtp_timestamp;
121 rtcp_packet_info_.xr_dlrr_item = rtcpPacketInformation.xr_dlrr_item; 120 rtcp_packet_info_.xr_dlrr_item = rtcpPacketInformation.xr_dlrr_item;
122 if (rtcpPacketInformation.VoIPMetric) 121 if (rtcpPacketInformation.VoIPMetric)
123 rtcp_packet_info_.AddVoIPMetric(rtcpPacketInformation.VoIPMetric); 122 rtcp_packet_info_.AddVoIPMetric(rtcpPacketInformation.VoIPMetric);
124 rtcp_packet_info_.transport_feedback_.reset( 123 rtcp_packet_info_.transport_feedback_.reset(
125 rtcpPacketInformation.transport_feedback_.release()); 124 rtcpPacketInformation.transport_feedback_.release());
126 return 0; 125 return 0;
127 } 126 }
128 127
129 OverUseDetectorOptions over_use_detector_options_;
130 SimulatedClock system_clock_; 128 SimulatedClock system_clock_;
131 ModuleRtpRtcpImpl* rtp_rtcp_impl_; 129 ModuleRtpRtcpImpl* rtp_rtcp_impl_;
132 RTCPReceiver* rtcp_receiver_; 130 RTCPReceiver* rtcp_receiver_;
133 TestTransport* test_transport_; 131 TestTransport* test_transport_;
134 RTCPHelp::RTCPPacketInformation rtcp_packet_info_; 132 RTCPHelp::RTCPPacketInformation rtcp_packet_info_;
135 MockRemoteBitrateObserver remote_bitrate_observer_; 133 MockRemoteBitrateObserver remote_bitrate_observer_;
136 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; 134 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
137 }; 135 };
138 136
139 137
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 1084
1087 // Transport feedback should be ignored, but next packet should work. 1085 // Transport feedback should be ignored, but next packet should work.
1088 EXPECT_EQ(0u, rtcp_packet_info_.rtcpPacketTypeFlags & kRtcpTransportFeedback); 1086 EXPECT_EQ(0u, rtcp_packet_info_.rtcpPacketTypeFlags & kRtcpTransportFeedback);
1089 EXPECT_NE(0u, rtcp_packet_info_.rtcpPacketTypeFlags & kRtcpRemb); 1087 EXPECT_NE(0u, rtcp_packet_info_.rtcpPacketTypeFlags & kRtcpRemb);
1090 EXPECT_EQ(kBitrateBps, rtcp_packet_info_.receiverEstimatedMaxBitrate); 1088 EXPECT_EQ(kBitrateBps, rtcp_packet_info_.receiverEstimatedMaxBitrate);
1091 } 1089 }
1092 1090
1093 } // Anonymous namespace 1091 } // Anonymous namespace
1094 1092
1095 } // namespace webrtc 1093 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698