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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 void SetUp() override { | 99 void SetUp() override { |
100 RtpRtcp::Configuration configuration; | 100 RtpRtcp::Configuration configuration; |
101 configuration.audio = true; | 101 configuration.audio = true; |
102 configuration.clock = &fake_clock_; | 102 configuration.clock = &fake_clock_; |
103 configuration.outgoing_transport = &null_transport_; | 103 configuration.outgoing_transport = &null_transport_; |
104 configuration.retransmission_rate_limiter = &retransmission_rate_limiter_; | 104 configuration.retransmission_rate_limiter = &retransmission_rate_limiter_; |
105 module_.reset(RtpRtcp::CreateRtpRtcp(configuration)); | 105 module_.reset(RtpRtcp::CreateRtpRtcp(configuration)); |
106 module_->SetSSRC(initial_ssrc); | 106 module_->SetSSRC(initial_ssrc); |
107 rtp_payload_registry_.reset(new RTPPayloadRegistry()); | 107 rtp_payload_registry_.reset(new RTPPayloadRegistry()); |
108 rtp_receiver_.reset(RtpReceiver::CreateAudioReceiver( | 108 rtp_receiver_.reset(RtpReceiver::CreateAudioReceiver( |
109 &fake_clock_, NULL, NULL, rtp_payload_registry_.get())); | 109 &fake_clock_, &null_rtp_data_, NULL, rtp_payload_registry_.get())); |
110 } | 110 } |
111 | 111 |
112 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_; | 112 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_; |
| 113 NullRtpData null_rtp_data_; |
113 std::unique_ptr<RtpReceiver> rtp_receiver_; | 114 std::unique_ptr<RtpReceiver> rtp_receiver_; |
114 std::unique_ptr<RtpRtcp> module_; | 115 std::unique_ptr<RtpRtcp> module_; |
115 uint32_t test_ssrc_; | 116 uint32_t test_ssrc_; |
116 uint32_t test_timestamp_; | 117 uint32_t test_timestamp_; |
117 uint16_t test_sequence_number_; | 118 uint16_t test_sequence_number_; |
118 std::vector<uint32_t> test_csrcs_; | 119 std::vector<uint32_t> test_csrcs_; |
119 SimulatedClock fake_clock_; | 120 SimulatedClock fake_clock_; |
120 test::NullTransport null_transport_; | 121 test::NullTransport null_transport_; |
121 RateLimiter retransmission_rate_limiter_; | 122 RateLimiter retransmission_rate_limiter_; |
122 }; | 123 }; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 rtx_header.payloadType = kRtxPayloadType; | 182 rtx_header.payloadType = kRtxPayloadType; |
182 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | 183 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
183 rtx_header.ssrc = 0; | 184 rtx_header.ssrc = 0; |
184 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); | 185 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); |
185 rtx_header.ssrc = kRtxSsrc; | 186 rtx_header.ssrc = kRtxSsrc; |
186 rtx_header.payloadType = 0; | 187 rtx_header.payloadType = 0; |
187 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | 188 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
188 } | 189 } |
189 | 190 |
190 } // namespace webrtc | 191 } // namespace webrtc |
OLD | NEW |