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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 RTC_CHECK_EQ(0u, video_receive_streams_.size()); | 169 RTC_CHECK_EQ(0u, video_receive_streams_.size()); |
170 | 170 |
171 module_process_thread_->Stop(); | 171 module_process_thread_->Stop(); |
172 Trace::ReturnTrace(); | 172 Trace::ReturnTrace(); |
173 } | 173 } |
174 | 174 |
175 PacketReceiver* Call::Receiver() { return this; } | 175 PacketReceiver* Call::Receiver() { return this; } |
176 | 176 |
177 webrtc::AudioSendStream* Call::CreateAudioSendStream( | 177 webrtc::AudioSendStream* Call::CreateAudioSendStream( |
178 const webrtc::AudioSendStream::Config& config) { | 178 const webrtc::AudioSendStream::Config& config) { |
| 179 // TODO(pbos): When adding AudioSendStream, add both TRACE_EVENT0 and config |
| 180 // logging to AudioSendStream constructor. |
179 return nullptr; | 181 return nullptr; |
180 } | 182 } |
181 | 183 |
182 void Call::DestroyAudioSendStream(webrtc::AudioSendStream* send_stream) { | 184 void Call::DestroyAudioSendStream(webrtc::AudioSendStream* send_stream) { |
| 185 // TODO(pbos): When adding AudioSendStream, add both TRACE_EVENT0 and config |
| 186 // logging to AudioSendStream destructor. |
183 } | 187 } |
184 | 188 |
185 webrtc::AudioReceiveStream* Call::CreateAudioReceiveStream( | 189 webrtc::AudioReceiveStream* Call::CreateAudioReceiveStream( |
186 const webrtc::AudioReceiveStream::Config& config) { | 190 const webrtc::AudioReceiveStream::Config& config) { |
187 TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream"); | 191 TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream"); |
188 LOG(LS_INFO) << "CreateAudioReceiveStream: " << config.ToString(); | |
189 AudioReceiveStream* receive_stream = new AudioReceiveStream( | 192 AudioReceiveStream* receive_stream = new AudioReceiveStream( |
190 channel_group_->GetRemoteBitrateEstimator(), config); | 193 channel_group_->GetRemoteBitrateEstimator(), config); |
191 { | 194 { |
192 WriteLockScoped write_lock(*receive_crit_); | 195 WriteLockScoped write_lock(*receive_crit_); |
193 RTC_DCHECK(audio_receive_ssrcs_.find(config.rtp.remote_ssrc) == | 196 RTC_DCHECK(audio_receive_ssrcs_.find(config.rtp.remote_ssrc) == |
194 audio_receive_ssrcs_.end()); | 197 audio_receive_ssrcs_.end()); |
195 audio_receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream; | 198 audio_receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream; |
196 ConfigureSync(config.sync_group); | 199 ConfigureSync(config.sync_group); |
197 } | 200 } |
198 return receive_stream; | 201 return receive_stream; |
(...skipping 18 matching lines...) Expand all Loading... |
217 ConfigureSync(sync_group); | 220 ConfigureSync(sync_group); |
218 } | 221 } |
219 } | 222 } |
220 delete audio_receive_stream; | 223 delete audio_receive_stream; |
221 } | 224 } |
222 | 225 |
223 webrtc::VideoSendStream* Call::CreateVideoSendStream( | 226 webrtc::VideoSendStream* Call::CreateVideoSendStream( |
224 const webrtc::VideoSendStream::Config& config, | 227 const webrtc::VideoSendStream::Config& config, |
225 const VideoEncoderConfig& encoder_config) { | 228 const VideoEncoderConfig& encoder_config) { |
226 TRACE_EVENT0("webrtc", "Call::CreateVideoSendStream"); | 229 TRACE_EVENT0("webrtc", "Call::CreateVideoSendStream"); |
227 LOG(LS_INFO) << "CreateVideoSendStream: " << config.ToString(); | |
228 RTC_DCHECK(!config.rtp.ssrcs.empty()); | |
229 | 230 |
230 // TODO(mflodman): Base the start bitrate on a current bandwidth estimate, if | 231 // TODO(mflodman): Base the start bitrate on a current bandwidth estimate, if |
231 // the call has already started. | 232 // the call has already started. |
232 VideoSendStream* send_stream = new VideoSendStream(num_cpu_cores_, | 233 VideoSendStream* send_stream = new VideoSendStream(num_cpu_cores_, |
233 module_process_thread_.get(), channel_group_.get(), | 234 module_process_thread_.get(), channel_group_.get(), |
234 rtc::AtomicOps::Increment(&next_channel_id_), config, encoder_config, | 235 rtc::AtomicOps::Increment(&next_channel_id_), config, encoder_config, |
235 suspended_video_send_ssrcs_); | 236 suspended_video_send_ssrcs_); |
236 | 237 |
237 // This needs to be taken before send_crit_ as both locks need to be held | 238 // This needs to be taken before send_crit_ as both locks need to be held |
238 // while changing network state. | 239 // while changing network state. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 ++it) { | 282 ++it) { |
282 suspended_video_send_ssrcs_[it->first] = it->second; | 283 suspended_video_send_ssrcs_[it->first] = it->second; |
283 } | 284 } |
284 | 285 |
285 delete send_stream_impl; | 286 delete send_stream_impl; |
286 } | 287 } |
287 | 288 |
288 webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream( | 289 webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream( |
289 const webrtc::VideoReceiveStream::Config& config) { | 290 const webrtc::VideoReceiveStream::Config& config) { |
290 TRACE_EVENT0("webrtc", "Call::CreateVideoReceiveStream"); | 291 TRACE_EVENT0("webrtc", "Call::CreateVideoReceiveStream"); |
291 LOG(LS_INFO) << "CreateVideoReceiveStream: " << config.ToString(); | |
292 VideoReceiveStream* receive_stream = new VideoReceiveStream( | 292 VideoReceiveStream* receive_stream = new VideoReceiveStream( |
293 num_cpu_cores_, channel_group_.get(), | 293 num_cpu_cores_, channel_group_.get(), |
294 rtc::AtomicOps::Increment(&next_channel_id_), config, | 294 rtc::AtomicOps::Increment(&next_channel_id_), config, |
295 config_.voice_engine); | 295 config_.voice_engine); |
296 | 296 |
297 // This needs to be taken before receive_crit_ as both locks need to be held | 297 // This needs to be taken before receive_crit_ as both locks need to be held |
298 // while changing network state. | 298 // while changing network state. |
299 rtc::CritScope lock(&network_enabled_crit_); | 299 rtc::CritScope lock(&network_enabled_crit_); |
300 WriteLockScoped write_lock(*receive_crit_); | 300 WriteLockScoped write_lock(*receive_crit_); |
301 RTC_DCHECK(video_receive_ssrcs_.find(config.rtp.remote_ssrc) == | 301 RTC_DCHECK(video_receive_ssrcs_.find(config.rtp.remote_ssrc) == |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 size_t length, | 532 size_t length, |
533 const PacketTime& packet_time) { | 533 const PacketTime& packet_time) { |
534 if (RtpHeaderParser::IsRtcp(packet, length)) | 534 if (RtpHeaderParser::IsRtcp(packet, length)) |
535 return DeliverRtcp(media_type, packet, length); | 535 return DeliverRtcp(media_type, packet, length); |
536 | 536 |
537 return DeliverRtp(media_type, packet, length, packet_time); | 537 return DeliverRtp(media_type, packet, length, packet_time); |
538 } | 538 } |
539 | 539 |
540 } // namespace internal | 540 } // namespace internal |
541 } // namespace webrtc | 541 } // namespace webrtc |
OLD | NEW |