| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 rtc::CritScope lock(&critical_section_rtcp_sender_); | 288 rtc::CritScope lock(&critical_section_rtcp_sender_); |
| 289 last_rtp_timestamp_ = rtp_timestamp; | 289 last_rtp_timestamp_ = rtp_timestamp; |
| 290 if (capture_time_ms < 0) { | 290 if (capture_time_ms < 0) { |
| 291 // We don't currently get a capture time from VoiceEngine. | 291 // We don't currently get a capture time from VoiceEngine. |
| 292 last_frame_capture_time_ms_ = clock_->TimeInMilliseconds(); | 292 last_frame_capture_time_ms_ = clock_->TimeInMilliseconds(); |
| 293 } else { | 293 } else { |
| 294 last_frame_capture_time_ms_ = capture_time_ms; | 294 last_frame_capture_time_ms_ = capture_time_ms; |
| 295 } | 295 } |
| 296 } | 296 } |
| 297 | 297 |
| 298 uint32_t RTCPSender::SSRC() const { |
| 299 rtc::CritScope lock(&critical_section_rtcp_sender_); |
| 300 return ssrc_; |
| 301 } |
| 302 |
| 298 void RTCPSender::SetSSRC(uint32_t ssrc) { | 303 void RTCPSender::SetSSRC(uint32_t ssrc) { |
| 299 rtc::CritScope lock(&critical_section_rtcp_sender_); | 304 rtc::CritScope lock(&critical_section_rtcp_sender_); |
| 300 | 305 |
| 301 if (ssrc_ != 0) { | 306 if (ssrc_ != 0) { |
| 302 // not first SetSSRC, probably due to a collision | 307 // not first SetSSRC, probably due to a collision |
| 303 // schedule a new RTCP report | 308 // schedule a new RTCP report |
| 304 // make sure that we send a RTP packet | 309 // make sure that we send a RTP packet |
| 305 next_time_to_send_rtcp_ = clock_->TimeInMilliseconds() + 100; | 310 next_time_to_send_rtcp_ = clock_->TimeInMilliseconds() + 100; |
| 306 } | 311 } |
| 307 ssrc_ = ssrc; | 312 ssrc_ = ssrc; |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 max_packet_size = max_packet_size_; | 1007 max_packet_size = max_packet_size_; |
| 1003 } | 1008 } |
| 1004 | 1009 |
| 1005 RTC_DCHECK_LE(max_packet_size, IP_PACKET_SIZE); | 1010 RTC_DCHECK_LE(max_packet_size, IP_PACKET_SIZE); |
| 1006 uint8_t buffer[IP_PACKET_SIZE]; | 1011 uint8_t buffer[IP_PACKET_SIZE]; |
| 1007 return packet.BuildExternalBuffer(buffer, max_packet_size, &sender) && | 1012 return packet.BuildExternalBuffer(buffer, max_packet_size, &sender) && |
| 1008 !sender.send_failure_; | 1013 !sender.send_failure_; |
| 1009 } | 1014 } |
| 1010 | 1015 |
| 1011 } // namespace webrtc | 1016 } // namespace webrtc |
| OLD | NEW |