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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 ModuleRtpRtcpImpl* dummy_rtp_rtcp_impl_; | 74 ModuleRtpRtcpImpl* dummy_rtp_rtcp_impl_; |
75 rtc::scoped_ptr<ReceiveStatistics> receive_statistics_; | 75 rtc::scoped_ptr<ReceiveStatistics> receive_statistics_; |
76 RTCPSender* rtcp_sender_; | 76 RTCPSender* rtcp_sender_; |
77 RTCPReceiver* rtcp_receiver_; | 77 RTCPReceiver* rtcp_receiver_; |
78 TestTransport* test_transport_; | 78 TestTransport* test_transport_; |
79 MockRemoteBitrateObserver remote_bitrate_observer_; | 79 MockRemoteBitrateObserver remote_bitrate_observer_; |
80 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; | 80 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; |
81 }; | 81 }; |
82 | 82 |
83 void RtcpFormatRembTest::SetUp() { | 83 void RtcpFormatRembTest::SetUp() { |
84 rtcp_receiver_ = new RTCPReceiver(system_clock_, false, nullptr, nullptr, | |
85 nullptr, dummy_rtp_rtcp_impl_); | |
86 test_transport_ = new TestTransport(rtcp_receiver_); | |
84 RtpRtcp::Configuration configuration; | 87 RtpRtcp::Configuration configuration; |
85 configuration.audio = false; | 88 configuration.audio = false; |
86 configuration.clock = system_clock_; | 89 configuration.clock = system_clock_; |
87 configuration.remote_bitrate_estimator = remote_bitrate_estimator_.get(); | 90 configuration.remote_bitrate_estimator = remote_bitrate_estimator_.get(); |
91 configuration.outgoing_transport = test_transport_; | |
88 dummy_rtp_rtcp_impl_ = new ModuleRtpRtcpImpl(configuration); | 92 dummy_rtp_rtcp_impl_ = new ModuleRtpRtcpImpl(configuration); |
89 rtcp_sender_ = | 93 rtcp_sender_ = new RTCPSender(false, system_clock_, receive_statistics_.get(), |
90 new RTCPSender(false, system_clock_, receive_statistics_.get(), NULL); | 94 nullptr, test_transport_); |
pbos-webrtc
2015/09/24 11:52:02
Since this isn't using configuration or dummy_...,
sprang_webrtc
2015/09/24 12:08:10
Done.
| |
91 rtcp_receiver_ = new RTCPReceiver(system_clock_, false, NULL, NULL, NULL, | |
92 dummy_rtp_rtcp_impl_); | |
93 test_transport_ = new TestTransport(rtcp_receiver_); | |
94 | |
95 EXPECT_EQ(0, rtcp_sender_->RegisterSendTransport(test_transport_)); | |
96 } | 95 } |
97 | 96 |
98 void RtcpFormatRembTest::TearDown() { | 97 void RtcpFormatRembTest::TearDown() { |
99 delete rtcp_sender_; | 98 delete rtcp_sender_; |
100 delete rtcp_receiver_; | 99 delete rtcp_receiver_; |
101 delete dummy_rtp_rtcp_impl_; | 100 delete dummy_rtp_rtcp_impl_; |
102 delete test_transport_; | 101 delete test_transport_; |
103 } | 102 } |
104 | 103 |
105 TEST_F(RtcpFormatRembTest, TestRembStatus) { | 104 TEST_F(RtcpFormatRembTest, TestRembStatus) { |
(...skipping 15 matching lines...) Expand all Loading... | |
121 | 120 |
122 TEST_F(RtcpFormatRembTest, TestCompund) { | 121 TEST_F(RtcpFormatRembTest, TestCompund) { |
123 uint32_t SSRCs[2] = {456789, 98765}; | 122 uint32_t SSRCs[2] = {456789, 98765}; |
124 rtcp_sender_->SetRTCPStatus(kRtcpCompound); | 123 rtcp_sender_->SetRTCPStatus(kRtcpCompound); |
125 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2)); | 124 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2)); |
126 RTCPSender::FeedbackState feedback_state = | 125 RTCPSender::FeedbackState feedback_state = |
127 dummy_rtp_rtcp_impl_->GetFeedbackState(); | 126 dummy_rtp_rtcp_impl_->GetFeedbackState(); |
128 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb)); | 127 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb)); |
129 } | 128 } |
130 } // namespace | 129 } // namespace |
OLD | NEW |