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 rtc::CritScope lock(&send_critsect_); | |
1299 if (!ssrc_) | |
1300 return; | |
1301 | |
1302 std::unique_ptr<RtpPacketToSend> packet = AllocatePacket(); | |
1303 packet->SetMarker(true); | |
1304 packet->SetPayloadType(payload_type); | |
1305 packet->SetTimestamp(last_rtp_timestamp_); | |
åsapersson
2017/06/30 15:09:13
Could last_rtp_timestamp_ be 0 here and if so ok?
sprang_webrtc
2017/06/30 16:21:00
Hm, if the stream is started with media being sent
| |
1306 packet->set_capture_time_ms(capture_time_ms_); | |
åsapersson
2017/06/30 15:09:13
is locked needed for SendToNetwork?
And AllocateP
sprang_webrtc
2017/06/30 16:21:00
No, in fact it probably shouldn't. Missed cleaning
| |
1307 SendToNetwork(std::move(packet), StorageType::kDontRetransmit, | |
1308 RtpPacketSender::Priority::kLowPriority); | |
1309 } | |
1310 | |
1292 } // namespace webrtc | 1311 } // namespace webrtc |
OLD | NEW |