| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 const webrtc::AudioReceiveStream::Config& config) override; | 69 const webrtc::AudioReceiveStream::Config& config) override; |
| 70 void DestroyAudioReceiveStream( | 70 void DestroyAudioReceiveStream( |
| 71 webrtc::AudioReceiveStream* receive_stream) override; | 71 webrtc::AudioReceiveStream* receive_stream) override; |
| 72 | 72 |
| 73 webrtc::VideoSendStream* CreateVideoSendStream( | 73 webrtc::VideoSendStream* CreateVideoSendStream( |
| 74 const webrtc::VideoSendStream::Config& config, | 74 const webrtc::VideoSendStream::Config& config, |
| 75 const VideoEncoderConfig& encoder_config) override; | 75 const VideoEncoderConfig& encoder_config) override; |
| 76 void DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) override; | 76 void DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) override; |
| 77 | 77 |
| 78 webrtc::VideoReceiveStream* CreateVideoReceiveStream( | 78 webrtc::VideoReceiveStream* CreateVideoReceiveStream( |
| 79 const webrtc::VideoReceiveStream::Config& config) override; | 79 webrtc::VideoReceiveStream::Config configuration) override; |
| 80 void DestroyVideoReceiveStream( | 80 void DestroyVideoReceiveStream( |
| 81 webrtc::VideoReceiveStream* receive_stream) override; | 81 webrtc::VideoReceiveStream* receive_stream) override; |
| 82 | 82 |
| 83 Stats GetStats() const override; | 83 Stats GetStats() const override; |
| 84 | 84 |
| 85 DeliveryStatus DeliverPacket(MediaType media_type, | 85 DeliveryStatus DeliverPacket(MediaType media_type, |
| 86 const uint8_t* packet, | 86 const uint8_t* packet, |
| 87 size_t length, | 87 size_t length, |
| 88 const PacketTime& packet_time) override; | 88 const PacketTime& packet_time) override; |
| 89 | 89 |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 it != rtp_state.end(); | 459 it != rtp_state.end(); |
| 460 ++it) { | 460 ++it) { |
| 461 suspended_video_send_ssrcs_[it->first] = it->second; | 461 suspended_video_send_ssrcs_[it->first] = it->second; |
| 462 } | 462 } |
| 463 | 463 |
| 464 UpdateAggregateNetworkState(); | 464 UpdateAggregateNetworkState(); |
| 465 delete send_stream_impl; | 465 delete send_stream_impl; |
| 466 } | 466 } |
| 467 | 467 |
| 468 webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream( | 468 webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream( |
| 469 const webrtc::VideoReceiveStream::Config& config) { | 469 webrtc::VideoReceiveStream::Config configuration) { |
| 470 TRACE_EVENT0("webrtc", "Call::CreateVideoReceiveStream"); | 470 TRACE_EVENT0("webrtc", "Call::CreateVideoReceiveStream"); |
| 471 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 471 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
| 472 VideoReceiveStream* receive_stream = new VideoReceiveStream( | 472 VideoReceiveStream* receive_stream = new VideoReceiveStream( |
| 473 num_cpu_cores_, congestion_controller_.get(), config, voice_engine(), | 473 num_cpu_cores_, congestion_controller_.get(), std::move(configuration), |
| 474 module_process_thread_.get(), call_stats_.get(), &remb_); | 474 voice_engine(), module_process_thread_.get(), call_stats_.get(), &remb_); |
| 475 |
| 476 const webrtc::VideoReceiveStream::Config& config = receive_stream->config(); |
| 475 { | 477 { |
| 476 WriteLockScoped write_lock(*receive_crit_); | 478 WriteLockScoped write_lock(*receive_crit_); |
| 477 RTC_DCHECK(video_receive_ssrcs_.find(config.rtp.remote_ssrc) == | 479 RTC_DCHECK(video_receive_ssrcs_.find(config.rtp.remote_ssrc) == |
| 478 video_receive_ssrcs_.end()); | 480 video_receive_ssrcs_.end()); |
| 479 video_receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream; | 481 video_receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream; |
| 480 // TODO(pbos): Configure different RTX payloads per receive payload. | 482 // TODO(pbos): Configure different RTX payloads per receive payload. |
| 481 VideoReceiveStream::Config::Rtp::RtxMap::const_iterator it = | 483 VideoReceiveStream::Config::Rtp::RtxMap::const_iterator it = |
| 482 config.rtp.rtx.begin(); | 484 config.rtp.rtx.begin(); |
| 483 if (it != config.rtp.rtx.end()) | 485 if (it != config.rtp.rtx.end()) |
| 484 video_receive_ssrcs_[it->second.ssrc] = receive_stream; | 486 video_receive_ssrcs_[it->second.ssrc] = receive_stream; |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 // thread. Then this check can be enabled. | 850 // thread. Then this check can be enabled. |
| 849 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); | 851 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); |
| 850 if (RtpHeaderParser::IsRtcp(packet, length)) | 852 if (RtpHeaderParser::IsRtcp(packet, length)) |
| 851 return DeliverRtcp(media_type, packet, length); | 853 return DeliverRtcp(media_type, packet, length); |
| 852 | 854 |
| 853 return DeliverRtp(media_type, packet, length, packet_time); | 855 return DeliverRtp(media_type, packet, length, packet_time); |
| 854 } | 856 } |
| 855 | 857 |
| 856 } // namespace internal | 858 } // namespace internal |
| 857 } // namespace webrtc | 859 } // namespace webrtc |
| OLD | NEW |