| 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 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1282 rtc::CritScope lock(&send_critsect_); | 1282 rtc::CritScope lock(&send_critsect_); |
| 1283 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) { | 1283 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) { |
| 1284 return; | 1284 return; |
| 1285 } | 1285 } |
| 1286 rtp_overhead_bytes_per_packet_ = packet.headers_size(); | 1286 rtp_overhead_bytes_per_packet_ = packet.headers_size(); |
| 1287 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_; | 1287 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_; |
| 1288 } | 1288 } |
| 1289 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); | 1289 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); |
| 1290 } | 1290 } |
| 1291 | 1291 |
| 1292 int64_t RTPSender::LastTimestampTimeMs() const { |
| 1293 rtc::CritScope lock(&send_critsect_); |
| 1294 return last_timestamp_time_ms_; |
| 1295 } |
| 1296 |
| 1297 void RTPSender::SendKeepAlive(uint8_t payload_type) { |
| 1298 std::unique_ptr<RtpPacketToSend> packet = AllocatePacket(); |
| 1299 packet->SetMarker(true); |
| 1300 packet->SetPayloadType(payload_type); |
| 1301 { |
| 1302 rtc::CritScope lock(&send_critsect_); |
| 1303 packet->SetTimestamp(last_rtp_timestamp_); |
| 1304 packet->set_capture_time_ms(capture_time_ms_); |
| 1305 } |
| 1306 AssignSequenceNumber(packet.get()); |
| 1307 SendToNetwork(std::move(packet), StorageType::kDontRetransmit, |
| 1308 RtpPacketSender::Priority::kLowPriority); |
| 1309 } |
| 1310 |
| 1292 } // namespace webrtc | 1311 } // namespace webrtc |
| OLD | NEW |