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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 rtc::CritScope lock(&critical_section_rtcp_sender_); | 296 rtc::CritScope lock(&critical_section_rtcp_sender_); |
297 last_rtp_timestamp_ = rtp_timestamp; | 297 last_rtp_timestamp_ = rtp_timestamp; |
298 if (capture_time_ms < 0) { | 298 if (capture_time_ms < 0) { |
299 // We don't currently get a capture time from VoiceEngine. | 299 // We don't currently get a capture time from VoiceEngine. |
300 last_frame_capture_time_ms_ = clock_->TimeInMilliseconds(); | 300 last_frame_capture_time_ms_ = clock_->TimeInMilliseconds(); |
301 } else { | 301 } else { |
302 last_frame_capture_time_ms_ = capture_time_ms; | 302 last_frame_capture_time_ms_ = capture_time_ms; |
303 } | 303 } |
304 } | 304 } |
305 | 305 |
| 306 uint32_t RTCPSender::SSRC() const { |
| 307 rtc::CritScope lock(&critical_section_rtcp_sender_); |
| 308 return ssrc_; |
| 309 } |
| 310 |
306 void RTCPSender::SetSSRC(uint32_t ssrc) { | 311 void RTCPSender::SetSSRC(uint32_t ssrc) { |
307 rtc::CritScope lock(&critical_section_rtcp_sender_); | 312 rtc::CritScope lock(&critical_section_rtcp_sender_); |
308 | 313 |
309 if (ssrc_ != 0) { | 314 if (ssrc_ != 0) { |
310 // not first SetSSRC, probably due to a collision | 315 // not first SetSSRC, probably due to a collision |
311 // schedule a new RTCP report | 316 // schedule a new RTCP report |
312 // make sure that we send a RTP packet | 317 // make sure that we send a RTP packet |
313 next_time_to_send_rtcp_ = clock_->TimeInMilliseconds() + 100; | 318 next_time_to_send_rtcp_ = clock_->TimeInMilliseconds() + 100; |
314 } | 319 } |
315 ssrc_ = ssrc; | 320 ssrc_ = ssrc; |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 max_packet_size = max_packet_size_; | 1057 max_packet_size = max_packet_size_; |
1053 } | 1058 } |
1054 | 1059 |
1055 RTC_DCHECK_LE(max_packet_size, IP_PACKET_SIZE); | 1060 RTC_DCHECK_LE(max_packet_size, IP_PACKET_SIZE); |
1056 uint8_t buffer[IP_PACKET_SIZE]; | 1061 uint8_t buffer[IP_PACKET_SIZE]; |
1057 return packet.BuildExternalBuffer(buffer, max_packet_size, &sender) && | 1062 return packet.BuildExternalBuffer(buffer, max_packet_size, &sender) && |
1058 !sender.send_failure_; | 1063 !sender.send_failure_; |
1059 } | 1064 } |
1060 | 1065 |
1061 } // namespace webrtc | 1066 } // namespace webrtc |
OLD | NEW |