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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 return 0; | 281 return 0; |
282 } | 282 } |
283 | 283 |
284 // TODO(nisse): Delete this method, only used internally and by test code. | 284 // TODO(nisse): Delete this method, only used internally and by test code. |
285 void RTPSender::SetSendPayloadType(int8_t payload_type) { | 285 void RTPSender::SetSendPayloadType(int8_t payload_type) { |
286 rtc::CritScope lock(&send_critsect_); | 286 rtc::CritScope lock(&send_critsect_); |
287 payload_type_ = payload_type; | 287 payload_type_ = payload_type; |
288 } | 288 } |
289 | 289 |
290 void RTPSender::SetMaxRtpPacketSize(size_t max_packet_size) { | 290 void RTPSender::SetMaxRtpPacketSize(size_t max_packet_size) { |
291 // Sanity check. | 291 RTC_DCHECK_GE(max_packet_size, 100); |
292 RTC_DCHECK(max_packet_size >= 100 && max_packet_size <= IP_PACKET_SIZE) | 292 RTC_DCHECK_LE(max_packet_size, IP_PACKET_SIZE); |
293 << "Invalid max payload length: " << max_packet_size; | |
294 rtc::CritScope lock(&send_critsect_); | 293 rtc::CritScope lock(&send_critsect_); |
295 max_packet_size_ = max_packet_size; | 294 max_packet_size_ = max_packet_size; |
296 } | 295 } |
297 | 296 |
298 size_t RTPSender::MaxRtpPacketSize() const { | 297 size_t RTPSender::MaxRtpPacketSize() const { |
299 return max_packet_size_; | 298 return max_packet_size_; |
300 } | 299 } |
301 | 300 |
302 void RTPSender::SetRtxStatus(int mode) { | 301 void RTPSender::SetRtxStatus(int mode) { |
303 rtc::CritScope lock(&send_critsect_); | 302 rtc::CritScope lock(&send_critsect_); |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 rtc::CritScope lock(&send_critsect_); | 1295 rtc::CritScope lock(&send_critsect_); |
1297 packet->SetTimestamp(last_rtp_timestamp_); | 1296 packet->SetTimestamp(last_rtp_timestamp_); |
1298 packet->set_capture_time_ms(capture_time_ms_); | 1297 packet->set_capture_time_ms(capture_time_ms_); |
1299 } | 1298 } |
1300 AssignSequenceNumber(packet.get()); | 1299 AssignSequenceNumber(packet.get()); |
1301 SendToNetwork(std::move(packet), StorageType::kDontRetransmit, | 1300 SendToNetwork(std::move(packet), StorageType::kDontRetransmit, |
1302 RtpPacketSender::Priority::kLowPriority); | 1301 RtpPacketSender::Priority::kLowPriority); |
1303 } | 1302 } |
1304 | 1303 |
1305 } // namespace webrtc | 1304 } // namespace webrtc |
OLD | NEW |