OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2009 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 bool AddStream1(int id) { | 261 bool AddStream1(int id) { |
262 return channel1_->AddRecvStream(cricket::StreamParams::CreateLegacy(id)); | 262 return channel1_->AddRecvStream(cricket::StreamParams::CreateLegacy(id)); |
263 } | 263 } |
264 bool RemoveStream1(int id) { | 264 bool RemoveStream1(int id) { |
265 return channel1_->RemoveRecvStream(id); | 265 return channel1_->RemoveRecvStream(id); |
266 } | 266 } |
267 | 267 |
268 cricket::FakeTransport* GetTransport1() { | 268 cricket::FakeTransport* GetTransport1() { |
269 std::string name = channel1_->content_name(); | 269 std::string name = channel1_->content_name(); |
270 return network_thread_->Invoke<cricket::FakeTransport*>( | 270 return network_thread_->Invoke<cricket::FakeTransport*>( |
271 [this, name] { return transport_controller1_->GetTransport_w(name); }); | 271 [this, name] { return transport_controller1_->GetTransport_n(name); }); |
272 } | 272 } |
273 cricket::FakeTransport* GetTransport2() { | 273 cricket::FakeTransport* GetTransport2() { |
274 std::string name = channel2_->content_name(); | 274 std::string name = channel2_->content_name(); |
275 return network_thread_->Invoke<cricket::FakeTransport*>( | 275 return network_thread_->Invoke<cricket::FakeTransport*>( |
276 [this, name] { return transport_controller2_->GetTransport_w(name); }); | 276 [this, name] { return transport_controller2_->GetTransport_n(name); }); |
277 } | 277 } |
278 | 278 |
279 void SendRtp1() { | 279 void SendRtp1() { |
280 media_channel1_->SendRtp(rtp_packet_.data(), rtp_packet_.size(), | 280 media_channel1_->SendRtp(rtp_packet_.data(), rtp_packet_.size(), |
281 rtc::PacketOptions()); | 281 rtc::PacketOptions()); |
282 } | 282 } |
283 void SendRtp2() { | 283 void SendRtp2() { |
284 media_channel2_->SendRtp(rtp_packet_.data(), rtp_packet_.size(), | 284 media_channel2_->SendRtp(rtp_packet_.data(), rtp_packet_.size(), |
285 rtc::PacketOptions()); | 285 rtc::PacketOptions()); |
286 } | 286 } |
(...skipping 3262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3549 }; | 3549 }; |
3550 rtc::CopyOnWriteBuffer payload(data, 3); | 3550 rtc::CopyOnWriteBuffer payload(data, 3); |
3551 cricket::SendDataResult result; | 3551 cricket::SendDataResult result; |
3552 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 3552 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
3553 EXPECT_EQ(params.ssrc, | 3553 EXPECT_EQ(params.ssrc, |
3554 media_channel1_->last_sent_data_params().ssrc); | 3554 media_channel1_->last_sent_data_params().ssrc); |
3555 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 3555 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
3556 } | 3556 } |
3557 | 3557 |
3558 // TODO(pthatcher): TestSetReceiver? | 3558 // TODO(pthatcher): TestSetReceiver? |
OLD | NEW |