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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 RtpRtcpAPITest() | 87 RtpRtcpAPITest() |
88 : fake_clock_(123456), retransmission_rate_limiter_(&fake_clock_, 1000) { | 88 : fake_clock_(123456), retransmission_rate_limiter_(&fake_clock_, 1000) { |
89 test_csrcs_.push_back(1234); | 89 test_csrcs_.push_back(1234); |
90 test_csrcs_.push_back(2345); | 90 test_csrcs_.push_back(2345); |
91 test_ssrc_ = 3456; | 91 test_ssrc_ = 3456; |
92 test_timestamp_ = 4567; | 92 test_timestamp_ = 4567; |
93 test_sequence_number_ = 2345; | 93 test_sequence_number_ = 2345; |
94 } | 94 } |
95 ~RtpRtcpAPITest() {} | 95 ~RtpRtcpAPITest() {} |
96 | 96 |
| 97 const uint32_t initial_ssrc = 8888; |
| 98 |
97 void SetUp() override { | 99 void SetUp() override { |
98 RtpRtcp::Configuration configuration; | 100 RtpRtcp::Configuration configuration; |
99 configuration.audio = true; | 101 configuration.audio = true; |
100 configuration.clock = &fake_clock_; | 102 configuration.clock = &fake_clock_; |
101 configuration.outgoing_transport = &null_transport_; | 103 configuration.outgoing_transport = &null_transport_; |
102 configuration.retransmission_rate_limiter = &retransmission_rate_limiter_; | 104 configuration.retransmission_rate_limiter = &retransmission_rate_limiter_; |
103 module_.reset(RtpRtcp::CreateRtpRtcp(configuration)); | 105 module_.reset(RtpRtcp::CreateRtpRtcp(configuration)); |
| 106 module_->SetSSRC(initial_ssrc); |
104 rtp_payload_registry_.reset(new RTPPayloadRegistry()); | 107 rtp_payload_registry_.reset(new RTPPayloadRegistry()); |
105 rtp_receiver_.reset(RtpReceiver::CreateAudioReceiver( | 108 rtp_receiver_.reset(RtpReceiver::CreateAudioReceiver( |
106 &fake_clock_, NULL, NULL, rtp_payload_registry_.get())); | 109 &fake_clock_, NULL, NULL, rtp_payload_registry_.get())); |
107 } | 110 } |
108 | 111 |
109 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_; | 112 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_; |
110 std::unique_ptr<RtpReceiver> rtp_receiver_; | 113 std::unique_ptr<RtpReceiver> rtp_receiver_; |
111 std::unique_ptr<RtpRtcp> module_; | 114 std::unique_ptr<RtpRtcp> module_; |
112 uint32_t test_ssrc_; | 115 uint32_t test_ssrc_; |
113 uint32_t test_timestamp_; | 116 uint32_t test_timestamp_; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 rtx_header.payloadType = kRtxPayloadType; | 182 rtx_header.payloadType = kRtxPayloadType; |
180 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | 183 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
181 rtx_header.ssrc = 0; | 184 rtx_header.ssrc = 0; |
182 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); | 185 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); |
183 rtx_header.ssrc = kRtxSsrc; | 186 rtx_header.ssrc = kRtxSsrc; |
184 rtx_header.payloadType = 0; | 187 rtx_header.payloadType = 0; |
185 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | 188 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
186 } | 189 } |
187 | 190 |
188 } // namespace webrtc | 191 } // namespace webrtc |
OLD | NEW |