OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 static_cast<internal::AudioState*>(config_.audio_state.get()); | 110 static_cast<internal::AudioState*>(config_.audio_state.get()); |
111 if (audio_state) | 111 if (audio_state) |
112 return audio_state->voice_engine(); | 112 return audio_state->voice_engine(); |
113 else | 113 else |
114 return nullptr; | 114 return nullptr; |
115 } | 115 } |
116 | 116 |
117 void UpdateSendHistograms() EXCLUSIVE_LOCKS_REQUIRED(&bitrate_crit_); | 117 void UpdateSendHistograms() EXCLUSIVE_LOCKS_REQUIRED(&bitrate_crit_); |
118 void UpdateReceiveHistograms(); | 118 void UpdateReceiveHistograms(); |
119 | 119 |
120 const Clock* const clock_; | 120 Clock* const clock_; |
121 | 121 |
122 const int num_cpu_cores_; | 122 const int num_cpu_cores_; |
123 const rtc::scoped_ptr<ProcessThread> module_process_thread_; | 123 const rtc::scoped_ptr<ProcessThread> module_process_thread_; |
124 const rtc::scoped_ptr<CallStats> call_stats_; | 124 const rtc::scoped_ptr<CallStats> call_stats_; |
125 const rtc::scoped_ptr<BitrateAllocator> bitrate_allocator_; | 125 const rtc::scoped_ptr<BitrateAllocator> bitrate_allocator_; |
126 Call::Config config_; | 126 Call::Config config_; |
127 rtc::ThreadChecker configuration_thread_checker_; | 127 rtc::ThreadChecker configuration_thread_checker_; |
128 | 128 |
129 bool network_enabled_; | 129 bool network_enabled_; |
130 | 130 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 Call* Call::Create(const Call::Config& config) { | 175 Call* Call::Create(const Call::Config& config) { |
176 return new internal::Call(config); | 176 return new internal::Call(config); |
177 } | 177 } |
178 | 178 |
179 namespace internal { | 179 namespace internal { |
180 | 180 |
181 Call::Call(const Call::Config& config) | 181 Call::Call(const Call::Config& config) |
182 : clock_(Clock::GetRealTimeClock()), | 182 : clock_(Clock::GetRealTimeClock()), |
183 num_cpu_cores_(CpuInfo::DetectNumberOfCores()), | 183 num_cpu_cores_(CpuInfo::DetectNumberOfCores()), |
184 module_process_thread_(ProcessThread::Create("ModuleProcessThread")), | 184 module_process_thread_(ProcessThread::Create("ModuleProcessThread")), |
185 call_stats_(new CallStats()), | 185 call_stats_(new CallStats(clock_)), |
186 bitrate_allocator_(new BitrateAllocator()), | 186 bitrate_allocator_(new BitrateAllocator()), |
187 config_(config), | 187 config_(config), |
188 network_enabled_(true), | 188 network_enabled_(true), |
189 receive_crit_(RWLockWrapper::CreateRWLock()), | 189 receive_crit_(RWLockWrapper::CreateRWLock()), |
190 send_crit_(RWLockWrapper::CreateRWLock()), | 190 send_crit_(RWLockWrapper::CreateRWLock()), |
191 received_video_bytes_(0), | 191 received_video_bytes_(0), |
192 received_audio_bytes_(0), | 192 received_audio_bytes_(0), |
193 received_rtcp_bytes_(0), | 193 received_rtcp_bytes_(0), |
194 first_rtp_packet_received_ms_(-1), | 194 first_rtp_packet_received_ms_(-1), |
195 last_rtp_packet_received_ms_(-1), | 195 last_rtp_packet_received_ms_(-1), |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 // thread. Then this check can be enabled. | 737 // thread. Then this check can be enabled. |
738 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); | 738 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); |
739 if (RtpHeaderParser::IsRtcp(packet, length)) | 739 if (RtpHeaderParser::IsRtcp(packet, length)) |
740 return DeliverRtcp(media_type, packet, length); | 740 return DeliverRtcp(media_type, packet, length); |
741 | 741 |
742 return DeliverRtp(media_type, packet, length, packet_time); | 742 return DeliverRtp(media_type, packet, length, packet_time); |
743 } | 743 } |
744 | 744 |
745 } // namespace internal | 745 } // namespace internal |
746 } // namespace webrtc | 746 } // namespace webrtc |
OLD | NEW |