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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 last_process_time_(configuration.clock->TimeInMilliseconds()), | 105 last_process_time_(configuration.clock->TimeInMilliseconds()), |
106 last_bitrate_process_time_(configuration.clock->TimeInMilliseconds()), | 106 last_bitrate_process_time_(configuration.clock->TimeInMilliseconds()), |
107 last_rtt_process_time_(configuration.clock->TimeInMilliseconds()), | 107 last_rtt_process_time_(configuration.clock->TimeInMilliseconds()), |
108 packet_overhead_(28), // IPV4 UDP. | 108 packet_overhead_(28), // IPV4 UDP. |
109 nack_last_time_sent_full_(0), | 109 nack_last_time_sent_full_(0), |
110 nack_last_time_sent_full_prev_(0), | 110 nack_last_time_sent_full_prev_(0), |
111 nack_last_seq_number_sent_(0), | 111 nack_last_seq_number_sent_(0), |
112 key_frame_req_method_(kKeyFrameReqPliRtcp), | 112 key_frame_req_method_(kKeyFrameReqPliRtcp), |
113 remote_bitrate_(configuration.remote_bitrate_estimator), | 113 remote_bitrate_(configuration.remote_bitrate_estimator), |
114 rtt_stats_(configuration.rtt_stats), | 114 rtt_stats_(configuration.rtt_stats), |
115 critical_section_rtt_(CriticalSectionWrapper::CreateCriticalSection()), | |
116 rtt_ms_(0) { | 115 rtt_ms_(0) { |
117 // Make sure that RTCP objects are aware of our SSRC. | 116 // Make sure that RTCP objects are aware of our SSRC. |
118 uint32_t SSRC = rtp_sender_.SSRC(); | 117 uint32_t SSRC = rtp_sender_.SSRC(); |
119 rtcp_sender_.SetSSRC(SSRC); | 118 rtcp_sender_.SetSSRC(SSRC); |
120 SetRtcpReceiverSsrcs(SSRC); | 119 SetRtcpReceiverSsrcs(SSRC); |
121 SetMaxTransferUnit(IP_PACKET_SIZE); | 120 SetMaxTransferUnit(IP_PACKET_SIZE); |
122 } | 121 } |
123 | 122 |
124 // Returns the number of milliseconds until the module want a worker thread | 123 // Returns the number of milliseconds until the module want a worker thread |
125 // to call Process. | 124 // to call Process. |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 | 974 |
976 void ModuleRtpRtcpImpl::SetRtcpReceiverSsrcs(uint32_t main_ssrc) { | 975 void ModuleRtpRtcpImpl::SetRtcpReceiverSsrcs(uint32_t main_ssrc) { |
977 std::set<uint32_t> ssrcs; | 976 std::set<uint32_t> ssrcs; |
978 ssrcs.insert(main_ssrc); | 977 ssrcs.insert(main_ssrc); |
979 if (rtp_sender_.RtxStatus() != kRtxOff) | 978 if (rtp_sender_.RtxStatus() != kRtxOff) |
980 ssrcs.insert(rtp_sender_.RtxSsrc()); | 979 ssrcs.insert(rtp_sender_.RtxSsrc()); |
981 rtcp_receiver_.SetSsrcs(main_ssrc, ssrcs); | 980 rtcp_receiver_.SetSsrcs(main_ssrc, ssrcs); |
982 } | 981 } |
983 | 982 |
984 void ModuleRtpRtcpImpl::set_rtt_ms(int64_t rtt_ms) { | 983 void ModuleRtpRtcpImpl::set_rtt_ms(int64_t rtt_ms) { |
985 CriticalSectionScoped cs(critical_section_rtt_.get()); | 984 rtc::CritScope cs(&critical_section_rtt_); |
986 rtt_ms_ = rtt_ms; | 985 rtt_ms_ = rtt_ms; |
987 } | 986 } |
988 | 987 |
989 int64_t ModuleRtpRtcpImpl::rtt_ms() const { | 988 int64_t ModuleRtpRtcpImpl::rtt_ms() const { |
990 CriticalSectionScoped cs(critical_section_rtt_.get()); | 989 rtc::CritScope cs(&critical_section_rtt_); |
991 return rtt_ms_; | 990 return rtt_ms_; |
992 } | 991 } |
993 | 992 |
994 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( | 993 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( |
995 StreamDataCountersCallback* callback) { | 994 StreamDataCountersCallback* callback) { |
996 rtp_sender_.RegisterRtpStatisticsCallback(callback); | 995 rtp_sender_.RegisterRtpStatisticsCallback(callback); |
997 } | 996 } |
998 | 997 |
999 StreamDataCountersCallback* | 998 StreamDataCountersCallback* |
1000 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { | 999 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { |
1001 return rtp_sender_.GetRtpStatisticsCallback(); | 1000 return rtp_sender_.GetRtpStatisticsCallback(); |
1002 } | 1001 } |
1003 } // namespace webrtc | 1002 } // namespace webrtc |
OLD | NEW |