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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
297 rtc::CritScope lock(&send_critsect_); | 297 rtc::CritScope lock(&send_critsect_); |
298 return rtp_header_extension_map_.GetTotalLengthInBytes(); | 298 return rtp_header_extension_map_.GetTotalLengthInBytes(); |
299 } | 299 } |
300 | 300 |
301 int32_t RTPSender::RegisterPayload( | 301 int32_t RTPSender::RegisterPayload( |
302 const char payload_name[RTP_PAYLOAD_NAME_SIZE], | 302 const char payload_name[RTP_PAYLOAD_NAME_SIZE], |
303 int8_t payload_number, | 303 int8_t payload_number, |
304 uint32_t frequency, | 304 uint32_t frequency, |
305 size_t channels, | 305 size_t channels, |
306 uint32_t rate) { | 306 uint32_t rate) { |
307 assert(payload_name); | 307 RTC_DCHECK_LT(strlen(payload_name), |
308 static_cast<size_t>(RTP_PAYLOAD_NAME_SIZE)); | |
stefan-webrtc
2016/02/26 14:49:07
Can you instead change the type of this const?
pbos-webrtc
2016/02/26 14:58:55
This is stored in RtpUtility::Payload which has a
| |
308 rtc::CritScope lock(&send_critsect_); | 309 rtc::CritScope lock(&send_critsect_); |
309 | 310 |
310 std::map<int8_t, RtpUtility::Payload*>::iterator it = | 311 std::map<int8_t, RtpUtility::Payload*>::iterator it = |
311 payload_type_map_.find(payload_number); | 312 payload_type_map_.find(payload_number); |
312 | 313 |
313 if (payload_type_map_.end() != it) { | 314 if (payload_type_map_.end() != it) { |
314 // We already use this payload type. | 315 // We already use this payload type. |
315 RtpUtility::Payload* payload = it->second; | 316 RtpUtility::Payload* payload = it->second; |
316 assert(payload); | 317 assert(payload); |
317 | 318 |
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1911 rtc::CritScope lock(&send_critsect_); | 1912 rtc::CritScope lock(&send_critsect_); |
1912 | 1913 |
1913 RtpState state; | 1914 RtpState state; |
1914 state.sequence_number = sequence_number_rtx_; | 1915 state.sequence_number = sequence_number_rtx_; |
1915 state.start_timestamp = start_timestamp_; | 1916 state.start_timestamp = start_timestamp_; |
1916 | 1917 |
1917 return state; | 1918 return state; |
1918 } | 1919 } |
1919 | 1920 |
1920 } // namespace webrtc | 1921 } // namespace webrtc |
OLD | NEW |