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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 config_.rtp.fec.ulpfec_payload_type); | 155 config_.rtp.fec.ulpfec_payload_type); |
156 vie_encoder_->UpdateProtectionMethod(enable_protection_nack, | 156 vie_encoder_->UpdateProtectionMethod(enable_protection_nack, |
157 enable_protection_fec); | 157 enable_protection_fec); |
158 | 158 |
159 ConfigureSsrcs(); | 159 ConfigureSsrcs(); |
160 | 160 |
161 vie_channel_->SetRTCPCName(config_.rtp.c_name.c_str()); | 161 vie_channel_->SetRTCPCName(config_.rtp.c_name.c_str()); |
162 | 162 |
163 input_.reset(new internal::VideoCaptureInput( | 163 input_.reset(new internal::VideoCaptureInput( |
164 module_process_thread_, vie_encoder_, config_.local_renderer, | 164 module_process_thread_, vie_encoder_, config_.local_renderer, |
165 &stats_proxy_, this)); | 165 &stats_proxy_, this, config_.encoding_time_observer)); |
166 | 166 |
167 // 28 to match packet overhead in ModuleRtpRtcpImpl. | 167 // 28 to match packet overhead in ModuleRtpRtcpImpl. |
168 RTC_DCHECK_LE(config_.rtp.max_packet_size, static_cast<size_t>(0xFFFF - 28)); | 168 RTC_DCHECK_LE(config_.rtp.max_packet_size, static_cast<size_t>(0xFFFF - 28)); |
169 vie_channel_->SetMTU(static_cast<uint16_t>(config_.rtp.max_packet_size + 28)); | 169 vie_channel_->SetMTU(static_cast<uint16_t>(config_.rtp.max_packet_size + 28)); |
170 | 170 |
171 RTC_DCHECK(config.encoder_settings.encoder != nullptr); | 171 RTC_DCHECK(config.encoder_settings.encoder != nullptr); |
172 RTC_DCHECK_GE(config.encoder_settings.payload_type, 0); | 172 RTC_DCHECK_GE(config.encoder_settings.payload_type, 0); |
173 RTC_DCHECK_LE(config.encoder_settings.payload_type, 127); | 173 RTC_DCHECK_LE(config.encoder_settings.payload_type, 127); |
174 RTC_CHECK_EQ(0, vie_encoder_->RegisterExternalEncoder( | 174 RTC_CHECK_EQ(0, vie_encoder_->RegisterExternalEncoder( |
175 config.encoder_settings.encoder, | 175 config.encoder_settings.encoder, |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 vie_channel_->IsSendingFecEnabled()); | 502 vie_channel_->IsSendingFecEnabled()); |
503 | 503 |
504 // Restart the media flow | 504 // Restart the media flow |
505 vie_encoder_->Restart(); | 505 vie_encoder_->Restart(); |
506 | 506 |
507 return true; | 507 return true; |
508 } | 508 } |
509 | 509 |
510 } // namespace internal | 510 } // namespace internal |
511 } // namespace webrtc | 511 } // namespace webrtc |
OLD | NEW |