Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: webrtc/p2p/base/p2ptransportchannel.cc

Issue 1363573002: Wire up transport sequence number / send time callbacks to webrtc via libjingle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add missing updated_options Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 // if one is pending. 428 // if one is pending.
429 429
430 port->SetIceRole(ice_role_); 430 port->SetIceRole(ice_role_);
431 port->SetIceTiebreaker(tiebreaker_); 431 port->SetIceTiebreaker(tiebreaker_);
432 ports_.push_back(port); 432 ports_.push_back(port);
433 port->SignalUnknownAddress.connect( 433 port->SignalUnknownAddress.connect(
434 this, &P2PTransportChannel::OnUnknownAddress); 434 this, &P2PTransportChannel::OnUnknownAddress);
435 port->SignalDestroyed.connect(this, &P2PTransportChannel::OnPortDestroyed); 435 port->SignalDestroyed.connect(this, &P2PTransportChannel::OnPortDestroyed);
436 port->SignalRoleConflict.connect( 436 port->SignalRoleConflict.connect(
437 this, &P2PTransportChannel::OnRoleConflict); 437 this, &P2PTransportChannel::OnRoleConflict);
438 port->SignalSentPacket.connect(this, &P2PTransportChannel::OnSentPacket);
438 439
439 // Attempt to create a connection from this new port to all of the remote 440 // Attempt to create a connection from this new port to all of the remote
440 // candidates that we were given so far. 441 // candidates that we were given so far.
441 442
442 std::vector<RemoteCandidate>::iterator iter; 443 std::vector<RemoteCandidate>::iterator iter;
443 for (iter = remote_candidates_.begin(); iter != remote_candidates_.end(); 444 for (iter = remote_candidates_.begin(); iter != remote_candidates_.end();
444 ++iter) { 445 ++iter) {
445 CreateConnection(port, *iter, iter->origin_port()); 446 CreateConnection(port, *iter, iter->origin_port());
446 } 447 }
447 448
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 SignalReadPacket(this, data, len, packet_time, 0); 1350 SignalReadPacket(this, data, len, packet_time, 0);
1350 1351
1351 // May need to switch the sending connection based on the receiving media path 1352 // May need to switch the sending connection based on the receiving media path
1352 // if this is the controlled side. 1353 // if this is the controlled side.
1353 if (ice_role_ == ICEROLE_CONTROLLED && !best_nominated_connection() && 1354 if (ice_role_ == ICEROLE_CONTROLLED && !best_nominated_connection() &&
1354 connection->writable() && best_connection_ != connection) { 1355 connection->writable() && best_connection_ != connection) {
1355 SwitchBestConnectionTo(connection); 1356 SwitchBestConnectionTo(connection);
1356 } 1357 }
1357 } 1358 }
1358 1359
1360 void P2PTransportChannel::OnSentPacket(PortInterface* port,
1361 const rtc::SentPacket& sent_packet) {
1362 ASSERT(worker_thread_ == rtc::Thread::Current());
1363
1364 SignalSentPacket(this, sent_packet);
1365 }
1366
1359 void P2PTransportChannel::OnReadyToSend(Connection* connection) { 1367 void P2PTransportChannel::OnReadyToSend(Connection* connection) {
1360 if (connection == best_connection_ && writable()) { 1368 if (connection == best_connection_ && writable()) {
1361 SignalReadyToSend(this); 1369 SignalReadyToSend(this);
1362 } 1370 }
1363 } 1371 }
1364 1372
1365 } // namespace cricket 1373 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698