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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 for (const auto& d : config.decoders) { | 101 for (const auto& d : config.decoders) { |
102 auto search = config.rtp.rtx_payload_types.find(d.payload_type); | 102 auto search = config.rtp.rtx_payload_types.find(d.payload_type); |
103 rtclog_config.codecs.emplace_back( | 103 rtclog_config.codecs.emplace_back( |
104 d.payload_name, d.payload_type, | 104 d.payload_name, d.payload_type, |
105 search != config.rtp.rtx_payload_types.end() ? search->second : 0); | 105 search != config.rtp.rtx_payload_types.end() ? search->second : 0); |
106 } | 106 } |
107 return rtclog_config; | 107 return rtclog_config; |
108 } | 108 } |
109 | 109 |
| 110 rtclog::StreamConfig CreateRtcLogStreamConfig( |
| 111 const VideoSendStream::Config& config, |
| 112 size_t ssrc_index) { |
| 113 rtclog::StreamConfig rtclog_config; |
| 114 rtclog_config.local_ssrc = config.rtp.ssrcs[ssrc_index]; |
| 115 if (ssrc_index < config.rtp.rtx.ssrcs.size()) { |
| 116 rtclog_config.rtx_ssrc = config.rtp.rtx.ssrcs[ssrc_index]; |
| 117 } |
| 118 rtclog_config.rtcp_mode = config.rtp.rtcp_mode; |
| 119 rtclog_config.rtp_extensions = config.rtp.extensions; |
| 120 |
| 121 rtclog_config.codecs.emplace_back(config.encoder_settings.payload_name, |
| 122 config.encoder_settings.payload_type, |
| 123 config.rtp.rtx.payload_type); |
| 124 return rtclog_config; |
| 125 } |
| 126 |
110 } // namespace | 127 } // namespace |
111 | 128 |
112 namespace internal { | 129 namespace internal { |
113 | 130 |
114 class Call : public webrtc::Call, | 131 class Call : public webrtc::Call, |
115 public PacketReceiver, | 132 public PacketReceiver, |
116 public RecoveredPacketReceiver, | 133 public RecoveredPacketReceiver, |
117 public SendSideCongestionController::Observer, | 134 public SendSideCongestionController::Observer, |
118 public BitrateAllocator::LimitObserver { | 135 public BitrateAllocator::LimitObserver { |
119 public: | 136 public: |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 delete audio_receive_stream; | 648 delete audio_receive_stream; |
632 } | 649 } |
633 | 650 |
634 webrtc::VideoSendStream* Call::CreateVideoSendStream( | 651 webrtc::VideoSendStream* Call::CreateVideoSendStream( |
635 webrtc::VideoSendStream::Config config, | 652 webrtc::VideoSendStream::Config config, |
636 VideoEncoderConfig encoder_config) { | 653 VideoEncoderConfig encoder_config) { |
637 TRACE_EVENT0("webrtc", "Call::CreateVideoSendStream"); | 654 TRACE_EVENT0("webrtc", "Call::CreateVideoSendStream"); |
638 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 655 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
639 | 656 |
640 video_send_delay_stats_->AddSsrcs(config); | 657 video_send_delay_stats_->AddSsrcs(config); |
641 event_log_->LogVideoSendStreamConfig(config); | 658 for (size_t ssrc_index = 0; ssrc_index < config.rtp.ssrcs.size(); |
| 659 ++ssrc_index) { |
| 660 event_log_->LogVideoSendStreamConfig( |
| 661 CreateRtcLogStreamConfig(config, ssrc_index)); |
| 662 } |
642 | 663 |
643 // TODO(mflodman): Base the start bitrate on a current bandwidth estimate, if | 664 // TODO(mflodman): Base the start bitrate on a current bandwidth estimate, if |
644 // the call has already started. | 665 // the call has already started. |
645 // Copy ssrcs from |config| since |config| is moved. | 666 // Copy ssrcs from |config| since |config| is moved. |
646 std::vector<uint32_t> ssrcs = config.rtp.ssrcs; | 667 std::vector<uint32_t> ssrcs = config.rtp.ssrcs; |
647 VideoSendStream* send_stream = new VideoSendStream( | 668 VideoSendStream* send_stream = new VideoSendStream( |
648 num_cpu_cores_, module_process_thread_.get(), &worker_queue_, | 669 num_cpu_cores_, module_process_thread_.get(), &worker_queue_, |
649 call_stats_.get(), transport_send_.get(), bitrate_allocator_.get(), | 670 call_stats_.get(), transport_send_.get(), bitrate_allocator_.get(), |
650 video_send_delay_stats_.get(), event_log_, std::move(config), | 671 video_send_delay_stats_.get(), event_log_, std::move(config), |
651 std::move(encoder_config), suspended_video_send_ssrcs_); | 672 std::move(encoder_config), suspended_video_send_ssrcs_); |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1251 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { | 1272 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { |
1252 receive_side_cc_.OnReceivedPacket( | 1273 receive_side_cc_.OnReceivedPacket( |
1253 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), | 1274 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), |
1254 header); | 1275 header); |
1255 } | 1276 } |
1256 } | 1277 } |
1257 | 1278 |
1258 } // namespace internal | 1279 } // namespace internal |
1259 | 1280 |
1260 } // namespace webrtc | 1281 } // namespace webrtc |
OLD | NEW |