OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 const rtc::NetworkRoute& network_route) { | 671 const rtc::NetworkRoute& network_route) { |
672 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 672 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
673 // Check if the network route is connected. | 673 // Check if the network route is connected. |
674 if (!network_route.connected) { | 674 if (!network_route.connected) { |
675 LOG(LS_INFO) << "Transport " << transport_name << " is disconnected"; | 675 LOG(LS_INFO) << "Transport " << transport_name << " is disconnected"; |
676 // TODO(honghaiz): Perhaps handle this in SignalChannelNetworkState and | 676 // TODO(honghaiz): Perhaps handle this in SignalChannelNetworkState and |
677 // consider merging these two methods. | 677 // consider merging these two methods. |
678 return; | 678 return; |
679 } | 679 } |
680 | 680 |
| 681 { |
| 682 ReadLockScoped read_lock(*send_crit_); |
| 683 for (auto& kv : audio_send_ssrcs_) { |
| 684 kv.second->SetTransportOverhead( |
| 685 network_route.transport_overhead_per_packet); |
| 686 } |
| 687 |
| 688 for (auto& kv : video_send_ssrcs_) { |
| 689 kv.second->SetTransportOverhead( |
| 690 network_route.transport_overhead_per_packet); |
| 691 } |
| 692 } |
| 693 |
681 // Check whether the network route has changed on each transport. | 694 // Check whether the network route has changed on each transport. |
682 auto result = | 695 auto result = |
683 network_routes_.insert(std::make_pair(transport_name, network_route)); | 696 network_routes_.insert(std::make_pair(transport_name, network_route)); |
684 auto kv = result.first; | 697 auto kv = result.first; |
685 bool inserted = result.second; | 698 bool inserted = result.second; |
686 if (inserted) { | 699 if (inserted) { |
687 // No need to reset BWE if this is the first time the network connects. | 700 // No need to reset BWE if this is the first time the network connects. |
688 return; | 701 return; |
689 } | 702 } |
690 if (kv->second != network_route) { | 703 if (kv->second != network_route) { |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]); | 965 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]); |
953 ReadLockScoped read_lock(*receive_crit_); | 966 ReadLockScoped read_lock(*receive_crit_); |
954 auto it = video_receive_ssrcs_.find(ssrc); | 967 auto it = video_receive_ssrcs_.find(ssrc); |
955 if (it == video_receive_ssrcs_.end()) | 968 if (it == video_receive_ssrcs_.end()) |
956 return false; | 969 return false; |
957 return it->second->OnRecoveredPacket(packet, length); | 970 return it->second->OnRecoveredPacket(packet, length); |
958 } | 971 } |
959 | 972 |
960 } // namespace internal | 973 } // namespace internal |
961 } // namespace webrtc | 974 } // namespace webrtc |
OLD | NEW |