| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 // Implements RecoveredPacketReceiver. | 196 // Implements RecoveredPacketReceiver. |
| 197 void OnRecoveredPacket(const uint8_t* packet, size_t length) override; | 197 void OnRecoveredPacket(const uint8_t* packet, size_t length) override; |
| 198 | 198 |
| 199 void SetBitrateConfig( | 199 void SetBitrateConfig( |
| 200 const webrtc::Call::Config::BitrateConfig& bitrate_config) override; | 200 const webrtc::Call::Config::BitrateConfig& bitrate_config) override; |
| 201 | 201 |
| 202 void SetBitrateConfigMask( | 202 void SetBitrateConfigMask( |
| 203 const webrtc::Call::Config::BitrateConfigMask& bitrate_config) override; | 203 const webrtc::Call::Config::BitrateConfigMask& bitrate_config) override; |
| 204 | 204 |
| 205 void SetBitrateAllocationStrategy( |
| 206 rtc::scoped_refptr<rtc::BitrateAllocationStrategy> |
| 207 bitrate_allocation_strategy) override; |
| 208 |
| 205 void SignalChannelNetworkState(MediaType media, NetworkState state) override; | 209 void SignalChannelNetworkState(MediaType media, NetworkState state) override; |
| 206 | 210 |
| 207 void OnTransportOverheadChanged(MediaType media, | 211 void OnTransportOverheadChanged(MediaType media, |
| 208 int transport_overhead_per_packet) override; | 212 int transport_overhead_per_packet) override; |
| 209 | 213 |
| 210 void OnNetworkRouteChanged(const std::string& transport_name, | 214 void OnNetworkRouteChanged(const std::string& transport_name, |
| 211 const rtc::NetworkRoute& network_route) override; | 215 const rtc::NetworkRoute& network_route) override; |
| 212 | 216 |
| 213 void OnSentPacket(const rtc::SentPacket& sent_packet) override; | 217 void OnSentPacket(const rtc::SentPacket& sent_packet) override; |
| 214 | 218 |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 << updated.max_bitrate_bps << ")"; | 1008 << updated.max_bitrate_bps << ")"; |
| 1005 transport_send_->send_side_cc()->SetBweBitrates(updated.min_bitrate_bps, | 1009 transport_send_->send_side_cc()->SetBweBitrates(updated.min_bitrate_bps, |
| 1006 updated.start_bitrate_bps, | 1010 updated.start_bitrate_bps, |
| 1007 updated.max_bitrate_bps); | 1011 updated.max_bitrate_bps); |
| 1008 if (!new_start) { | 1012 if (!new_start) { |
| 1009 updated.start_bitrate_bps = config_.bitrate_config.start_bitrate_bps; | 1013 updated.start_bitrate_bps = config_.bitrate_config.start_bitrate_bps; |
| 1010 } | 1014 } |
| 1011 config_.bitrate_config = updated; | 1015 config_.bitrate_config = updated; |
| 1012 } | 1016 } |
| 1013 | 1017 |
| 1018 void Call::SetBitrateAllocationStrategy( |
| 1019 rtc::scoped_refptr<rtc::BitrateAllocationStrategy> |
| 1020 bitrate_allocation_strategy) { |
| 1021 if (!worker_queue_.IsCurrent()) { |
| 1022 worker_queue_.PostTask([this, bitrate_allocation_strategy] { |
| 1023 SetBitrateAllocationStrategy(std::move(bitrate_allocation_strategy)); |
| 1024 }); |
| 1025 return; |
| 1026 } |
| 1027 RTC_DCHECK_RUN_ON(&worker_queue_); |
| 1028 bitrate_allocator_->SetBitrateAllocationStrategy(bitrate_allocation_strategy); |
| 1029 } |
| 1030 |
| 1014 void Call::SignalChannelNetworkState(MediaType media, NetworkState state) { | 1031 void Call::SignalChannelNetworkState(MediaType media, NetworkState state) { |
| 1015 RTC_DCHECK_RUN_ON(&configuration_thread_checker_); | 1032 RTC_DCHECK_RUN_ON(&configuration_thread_checker_); |
| 1016 switch (media) { | 1033 switch (media) { |
| 1017 case MediaType::AUDIO: | 1034 case MediaType::AUDIO: |
| 1018 audio_network_state_ = state; | 1035 audio_network_state_ = state; |
| 1019 break; | 1036 break; |
| 1020 case MediaType::VIDEO: | 1037 case MediaType::VIDEO: |
| 1021 video_network_state_ = state; | 1038 video_network_state_ = state; |
| 1022 break; | 1039 break; |
| 1023 case MediaType::ANY: | 1040 case MediaType::ANY: |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1422 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { | 1439 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { |
| 1423 receive_side_cc_.OnReceivedPacket( | 1440 receive_side_cc_.OnReceivedPacket( |
| 1424 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), | 1441 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), |
| 1425 header); | 1442 header); |
| 1426 } | 1443 } |
| 1427 } | 1444 } |
| 1428 | 1445 |
| 1429 } // namespace internal | 1446 } // namespace internal |
| 1430 | 1447 |
| 1431 } // namespace webrtc | 1448 } // namespace webrtc |
| OLD | NEW |