| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 } | 237 } |
| 238 | 238 |
| 239 bool RTCPSender::REMB() const { | 239 bool RTCPSender::REMB() const { |
| 240 rtc::CritScope lock(&critical_section_rtcp_sender_); | 240 rtc::CritScope lock(&critical_section_rtcp_sender_); |
| 241 return remb_enabled_; | 241 return remb_enabled_; |
| 242 } | 242 } |
| 243 | 243 |
| 244 void RTCPSender::SetREMBStatus(bool enable) { | 244 void RTCPSender::SetREMBStatus(bool enable) { |
| 245 rtc::CritScope lock(&critical_section_rtcp_sender_); | 245 rtc::CritScope lock(&critical_section_rtcp_sender_); |
| 246 remb_enabled_ = enable; | 246 remb_enabled_ = enable; |
| 247 if (!enable) { |
| 248 // Stop sending remb each report until it is reenabled and remb data set. |
| 249 ConsumeFlag(kRtcpRemb, true); |
| 250 } |
| 247 } | 251 } |
| 248 | 252 |
| 249 void RTCPSender::SetREMBData(uint32_t bitrate, | 253 void RTCPSender::SetREMBData(uint32_t bitrate, |
| 250 const std::vector<uint32_t>& ssrcs) { | 254 const std::vector<uint32_t>& ssrcs) { |
| 251 rtc::CritScope lock(&critical_section_rtcp_sender_); | 255 rtc::CritScope lock(&critical_section_rtcp_sender_); |
| 252 remb_bitrate_ = bitrate; | 256 remb_bitrate_ = bitrate; |
| 253 remb_ssrcs_ = ssrcs; | 257 remb_ssrcs_ = ssrcs; |
| 254 | 258 |
| 255 if (remb_enabled_) | 259 if (remb_enabled_) |
| 256 SetFlag(kRtcpRemb, false); | 260 SetFlag(kRtcpRemb, false); |
| (...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 max_packet_size = max_packet_size_; | 1011 max_packet_size = max_packet_size_; |
| 1008 } | 1012 } |
| 1009 | 1013 |
| 1010 RTC_DCHECK_LE(max_packet_size, IP_PACKET_SIZE); | 1014 RTC_DCHECK_LE(max_packet_size, IP_PACKET_SIZE); |
| 1011 uint8_t buffer[IP_PACKET_SIZE]; | 1015 uint8_t buffer[IP_PACKET_SIZE]; |
| 1012 return packet.BuildExternalBuffer(buffer, max_packet_size, &sender) && | 1016 return packet.BuildExternalBuffer(buffer, max_packet_size, &sender) && |
| 1013 !sender.send_failure_; | 1017 !sender.send_failure_; |
| 1014 } | 1018 } |
| 1015 | 1019 |
| 1016 } // namespace webrtc | 1020 } // namespace webrtc |
| OLD | NEW |