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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 void RTCPSender::SendRtcpXrReceiverReferenceTime(bool enable) { | 975 void RTCPSender::SendRtcpXrReceiverReferenceTime(bool enable) { |
976 rtc::CritScope lock(&critical_section_rtcp_sender_); | 976 rtc::CritScope lock(&critical_section_rtcp_sender_); |
977 xr_send_receiver_reference_time_enabled_ = enable; | 977 xr_send_receiver_reference_time_enabled_ = enable; |
978 } | 978 } |
979 | 979 |
980 bool RTCPSender::RtcpXrReceiverReferenceTime() const { | 980 bool RTCPSender::RtcpXrReceiverReferenceTime() const { |
981 rtc::CritScope lock(&critical_section_rtcp_sender_); | 981 rtc::CritScope lock(&critical_section_rtcp_sender_); |
982 return xr_send_receiver_reference_time_enabled_; | 982 return xr_send_receiver_reference_time_enabled_; |
983 } | 983 } |
984 | 984 |
985 // no callbacks allowed inside this function | 985 void RTCPSender::SetTmmbn(std::vector<rtcp::TmmbItem> bounding_set) { |
986 void RTCPSender::SetTMMBN(const std::vector<rtcp::TmmbItem>* bounding_set) { | |
987 rtc::CritScope lock(&critical_section_rtcp_sender_); | 986 rtc::CritScope lock(&critical_section_rtcp_sender_); |
988 if (bounding_set) { | 987 tmmbn_to_send_ = std::move(bounding_set); |
989 tmmbn_to_send_ = *bounding_set; | |
990 } else { | |
991 tmmbn_to_send_.clear(); | |
992 } | |
993 SetFlag(kRtcpTmmbn, true); | 988 SetFlag(kRtcpTmmbn, true); |
994 } | 989 } |
995 | 990 |
996 void RTCPSender::SetFlag(RTCPPacketType type, bool is_volatile) { | 991 void RTCPSender::SetFlag(RTCPPacketType type, bool is_volatile) { |
997 report_flags_.insert(ReportFlag(type, is_volatile)); | 992 report_flags_.insert(ReportFlag(type, is_volatile)); |
998 } | 993 } |
999 | 994 |
1000 void RTCPSender::SetFlags(const std::set<RTCPPacketType>& types, | 995 void RTCPSender::SetFlags(const std::set<RTCPPacketType>& types, |
1001 bool is_volatile) { | 996 bool is_volatile) { |
1002 for (RTCPPacketType type : types) | 997 for (RTCPPacketType type : types) |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 // but we can't because of an incorrect warning (C4822) in MVS 2013. | 1044 // but we can't because of an incorrect warning (C4822) in MVS 2013. |
1050 } sender(transport_, event_log_); | 1045 } sender(transport_, event_log_); |
1051 | 1046 |
1052 RTC_DCHECK_LE(max_payload_length_, static_cast<size_t>(IP_PACKET_SIZE)); | 1047 RTC_DCHECK_LE(max_payload_length_, static_cast<size_t>(IP_PACKET_SIZE)); |
1053 uint8_t buffer[IP_PACKET_SIZE]; | 1048 uint8_t buffer[IP_PACKET_SIZE]; |
1054 return packet.BuildExternalBuffer(buffer, max_payload_length_, &sender) && | 1049 return packet.BuildExternalBuffer(buffer, max_payload_length_, &sender) && |
1055 !sender.send_failure_; | 1050 !sender.send_failure_; |
1056 } | 1051 } |
1057 | 1052 |
1058 } // namespace webrtc | 1053 } // namespace webrtc |
OLD | NEW |