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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 channel_group_->SetBweBitrates(bitrate_config.min_bitrate_bps, | 389 channel_group_->SetBweBitrates(bitrate_config.min_bitrate_bps, |
390 bitrate_config.start_bitrate_bps, | 390 bitrate_config.start_bitrate_bps, |
391 bitrate_config.max_bitrate_bps); | 391 bitrate_config.max_bitrate_bps); |
392 } | 392 } |
393 | 393 |
394 void Call::SignalNetworkState(NetworkState state) { | 394 void Call::SignalNetworkState(NetworkState state) { |
395 // Take crit for entire function, it needs to be held while updating streams | 395 // Take crit for entire function, it needs to be held while updating streams |
396 // to guarantee a consistent state across streams. | 396 // to guarantee a consistent state across streams. |
397 rtc::CritScope lock(&network_enabled_crit_); | 397 rtc::CritScope lock(&network_enabled_crit_); |
398 network_enabled_ = state == kNetworkUp; | 398 network_enabled_ = state == kNetworkUp; |
| 399 channel_group_->SignalNetworkState(state); |
399 { | 400 { |
400 ReadLockScoped write_lock(*send_crit_); | 401 ReadLockScoped write_lock(*send_crit_); |
401 for (auto& kv : video_send_ssrcs_) { | 402 for (auto& kv : video_send_ssrcs_) { |
402 kv.second->SignalNetworkState(state); | 403 kv.second->SignalNetworkState(state); |
403 } | 404 } |
404 } | 405 } |
405 { | 406 { |
406 ReadLockScoped write_lock(*receive_crit_); | 407 ReadLockScoped write_lock(*receive_crit_); |
407 for (auto& kv : video_receive_ssrcs_) { | 408 for (auto& kv : video_receive_ssrcs_) { |
408 kv.second->SignalNetworkState(state); | 409 kv.second->SignalNetworkState(state); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 size_t length, | 532 size_t length, |
532 const PacketTime& packet_time) { | 533 const PacketTime& packet_time) { |
533 if (RtpHeaderParser::IsRtcp(packet, length)) | 534 if (RtpHeaderParser::IsRtcp(packet, length)) |
534 return DeliverRtcp(media_type, packet, length); | 535 return DeliverRtcp(media_type, packet, length); |
535 | 536 |
536 return DeliverRtp(media_type, packet, length, packet_time); | 537 return DeliverRtp(media_type, packet, length, packet_time); |
537 } | 538 } |
538 | 539 |
539 } // namespace internal | 540 } // namespace internal |
540 } // namespace webrtc | 541 } // namespace webrtc |
OLD | NEW |