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 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 | 1257 |
1258 void RTPSender::AddPacketToTransportFeedback(uint16_t packet_id, | 1258 void RTPSender::AddPacketToTransportFeedback(uint16_t packet_id, |
1259 const RtpPacketToSend& packet, | 1259 const RtpPacketToSend& packet, |
1260 int probe_cluster_id) { | 1260 int probe_cluster_id) { |
1261 size_t packet_size = packet.payload_size() + packet.padding_size(); | 1261 size_t packet_size = packet.payload_size() + packet.padding_size(); |
1262 if (send_side_bwe_with_overhead_) { | 1262 if (send_side_bwe_with_overhead_) { |
1263 packet_size = packet.size(); | 1263 packet_size = packet.size(); |
1264 } | 1264 } |
1265 | 1265 |
1266 if (transport_feedback_observer_) { | 1266 if (transport_feedback_observer_) { |
1267 transport_feedback_observer_->AddPacket(packet_id, packet_size, | 1267 uint32_t ssrc; |
| 1268 { |
| 1269 rtc::CritScope lock(&send_critsect_); |
| 1270 ssrc = ssrc_; |
| 1271 } |
| 1272 transport_feedback_observer_->AddPacket(ssrc, packet_id, packet_size, |
1268 probe_cluster_id); | 1273 probe_cluster_id); |
1269 } | 1274 } |
1270 } | 1275 } |
1271 | 1276 |
1272 void RTPSender::UpdateRtpOverhead(const RtpPacketToSend& packet) { | 1277 void RTPSender::UpdateRtpOverhead(const RtpPacketToSend& packet) { |
1273 if (!overhead_observer_) | 1278 if (!overhead_observer_) |
1274 return; | 1279 return; |
1275 size_t overhead_bytes_per_packet; | 1280 size_t overhead_bytes_per_packet; |
1276 { | 1281 { |
1277 rtc::CritScope lock(&send_critsect_); | 1282 rtc::CritScope lock(&send_critsect_); |
1278 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) { | 1283 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) { |
1279 return; | 1284 return; |
1280 } | 1285 } |
1281 rtp_overhead_bytes_per_packet_ = packet.headers_size(); | 1286 rtp_overhead_bytes_per_packet_ = packet.headers_size(); |
1282 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_; | 1287 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_; |
1283 } | 1288 } |
1284 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); | 1289 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); |
1285 } | 1290 } |
1286 | 1291 |
1287 } // namespace webrtc | 1292 } // namespace webrtc |
OLD | NEW |