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