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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 webrtc::VideoSendStream* Call::CreateVideoSendStream( | 387 webrtc::VideoSendStream* Call::CreateVideoSendStream( |
388 const webrtc::VideoSendStream::Config& config, | 388 const webrtc::VideoSendStream::Config& config, |
389 const VideoEncoderConfig& encoder_config) { | 389 const VideoEncoderConfig& encoder_config) { |
390 TRACE_EVENT0("webrtc", "Call::CreateVideoSendStream"); | 390 TRACE_EVENT0("webrtc", "Call::CreateVideoSendStream"); |
391 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 391 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
392 | 392 |
393 // TODO(mflodman): Base the start bitrate on a current bandwidth estimate, if | 393 // TODO(mflodman): Base the start bitrate on a current bandwidth estimate, if |
394 // the call has already started. | 394 // the call has already started. |
395 VideoSendStream* send_stream = new VideoSendStream( | 395 VideoSendStream* send_stream = new VideoSendStream( |
396 num_cpu_cores_, module_process_thread_.get(), call_stats_.get(), | 396 num_cpu_cores_, module_process_thread_.get(), call_stats_.get(), |
397 congestion_controller_.get(), &remb_, bitrate_allocator_.get(), config, | 397 congestion_controller_.get(), bitrate_allocator_.get(), &remb_, config, |
398 encoder_config, suspended_video_send_ssrcs_); | 398 encoder_config, suspended_video_send_ssrcs_); |
399 | 399 |
400 if (!network_enabled_) | 400 if (!network_enabled_) |
401 send_stream->SignalNetworkState(kNetworkDown); | 401 send_stream->SignalNetworkState(kNetworkDown); |
402 | 402 |
403 WriteLockScoped write_lock(*send_crit_); | 403 WriteLockScoped write_lock(*send_crit_); |
404 for (uint32_t ssrc : config.rtp.ssrcs) { | 404 for (uint32_t ssrc : config.rtp.ssrcs) { |
405 RTC_DCHECK(video_send_ssrcs_.find(ssrc) == video_send_ssrcs_.end()); | 405 RTC_DCHECK(video_send_ssrcs_.find(ssrc) == video_send_ssrcs_.end()); |
406 video_send_ssrcs_[ssrc] = send_stream; | 406 video_send_ssrcs_[ssrc] = send_stream; |
407 } | 407 } |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 // thread. Then this check can be enabled. | 744 // thread. Then this check can be enabled. |
745 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); | 745 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); |
746 if (RtpHeaderParser::IsRtcp(packet, length)) | 746 if (RtpHeaderParser::IsRtcp(packet, length)) |
747 return DeliverRtcp(media_type, packet, length); | 747 return DeliverRtcp(media_type, packet, length); |
748 | 748 |
749 return DeliverRtp(media_type, packet, length, packet_time); | 749 return DeliverRtp(media_type, packet, length, packet_time); |
750 } | 750 } |
751 | 751 |
752 } // namespace internal | 752 } // namespace internal |
753 } // namespace webrtc | 753 } // namespace webrtc |
OLD | NEW |