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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 return true; | 52 return true; |
53 } | 53 } |
54 private: | 54 private: |
55 RTCPReceiver* rtcp_receiver_; | 55 RTCPReceiver* rtcp_receiver_; |
56 }; | 56 }; |
57 | 57 |
58 | 58 |
59 class RtcpFormatRembTest : public ::testing::Test { | 59 class RtcpFormatRembTest : public ::testing::Test { |
60 protected: | 60 protected: |
61 RtcpFormatRembTest() | 61 RtcpFormatRembTest() |
62 : over_use_detector_options_(), | 62 : system_clock_(Clock::GetRealTimeClock()), |
63 system_clock_(Clock::GetRealTimeClock()), | |
64 dummy_rtp_rtcp_impl_(nullptr), | 63 dummy_rtp_rtcp_impl_(nullptr), |
65 receive_statistics_(ReceiveStatistics::Create(system_clock_)), | 64 receive_statistics_(ReceiveStatistics::Create(system_clock_)), |
66 rtcp_sender_(nullptr), | 65 rtcp_sender_(nullptr), |
67 rtcp_receiver_(nullptr), | 66 rtcp_receiver_(nullptr), |
68 test_transport_(nullptr), | 67 test_transport_(nullptr), |
69 remote_bitrate_observer_(), | 68 remote_bitrate_observer_(), |
70 remote_bitrate_estimator_( | 69 remote_bitrate_estimator_( |
71 new RemoteBitrateEstimatorSingleStream(&remote_bitrate_observer_, | 70 new RemoteBitrateEstimatorSingleStream(&remote_bitrate_observer_, |
72 system_clock_)) {} | 71 system_clock_)) {} |
73 void SetUp() override; | 72 void SetUp() override; |
74 void TearDown() override; | 73 void TearDown() override; |
75 | 74 |
76 OverUseDetectorOptions over_use_detector_options_; | |
77 Clock* system_clock_; | 75 Clock* system_clock_; |
78 ModuleRtpRtcpImpl* dummy_rtp_rtcp_impl_; | 76 ModuleRtpRtcpImpl* dummy_rtp_rtcp_impl_; |
79 rtc::scoped_ptr<ReceiveStatistics> receive_statistics_; | 77 rtc::scoped_ptr<ReceiveStatistics> receive_statistics_; |
80 RTCPSender* rtcp_sender_; | 78 RTCPSender* rtcp_sender_; |
81 RTCPReceiver* rtcp_receiver_; | 79 RTCPReceiver* rtcp_receiver_; |
82 TestTransport* test_transport_; | 80 TestTransport* test_transport_; |
83 test::NullTransport null_transport_; | 81 test::NullTransport null_transport_; |
84 MockRemoteBitrateObserver remote_bitrate_observer_; | 82 MockRemoteBitrateObserver remote_bitrate_observer_; |
85 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; | 83 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; |
86 }; | 84 }; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 123 |
126 TEST_F(RtcpFormatRembTest, TestCompund) { | 124 TEST_F(RtcpFormatRembTest, TestCompund) { |
127 uint32_t SSRCs[2] = {456789, 98765}; | 125 uint32_t SSRCs[2] = {456789, 98765}; |
128 rtcp_sender_->SetRTCPStatus(kRtcpCompound); | 126 rtcp_sender_->SetRTCPStatus(kRtcpCompound); |
129 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2)); | 127 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2)); |
130 RTCPSender::FeedbackState feedback_state = | 128 RTCPSender::FeedbackState feedback_state = |
131 dummy_rtp_rtcp_impl_->GetFeedbackState(); | 129 dummy_rtp_rtcp_impl_->GetFeedbackState(); |
132 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb)); | 130 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb)); |
133 } | 131 } |
134 } // namespace | 132 } // namespace |
OLD | NEW |