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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 module_process_thread_, vie_encoder_, config_.local_renderer, | 162 module_process_thread_, vie_encoder_, config_.local_renderer, |
163 &stats_proxy_, overuse_observer)); | 163 &stats_proxy_, overuse_observer)); |
164 | 164 |
165 // 28 to match packet overhead in ModuleRtpRtcpImpl. | 165 // 28 to match packet overhead in ModuleRtpRtcpImpl. |
166 DCHECK_LE(config_.rtp.max_packet_size, static_cast<size_t>(0xFFFF - 28)); | 166 DCHECK_LE(config_.rtp.max_packet_size, static_cast<size_t>(0xFFFF - 28)); |
167 vie_channel_->SetMTU(static_cast<uint16_t>(config_.rtp.max_packet_size + 28)); | 167 vie_channel_->SetMTU(static_cast<uint16_t>(config_.rtp.max_packet_size + 28)); |
168 | 168 |
169 DCHECK(config.encoder_settings.encoder != nullptr); | 169 DCHECK(config.encoder_settings.encoder != nullptr); |
170 DCHECK_GE(config.encoder_settings.payload_type, 0); | 170 DCHECK_GE(config.encoder_settings.payload_type, 0); |
171 DCHECK_LE(config.encoder_settings.payload_type, 127); | 171 DCHECK_LE(config.encoder_settings.payload_type, 127); |
172 // TODO(pbos): Wire up codec internal-source setting or remove setting. | |
173 CHECK_EQ(0, vie_encoder_->RegisterExternalEncoder( | 172 CHECK_EQ(0, vie_encoder_->RegisterExternalEncoder( |
174 config.encoder_settings.encoder, | 173 config.encoder_settings.encoder, |
175 config.encoder_settings.payload_type, false)); | 174 config.encoder_settings.payload_type, |
| 175 config.encoder_settings.internal_source)); |
176 | 176 |
177 CHECK(ReconfigureVideoEncoder(encoder_config)); | 177 CHECK(ReconfigureVideoEncoder(encoder_config)); |
178 | 178 |
179 vie_channel_->RegisterSendSideDelayObserver(&stats_proxy_); | 179 vie_channel_->RegisterSendSideDelayObserver(&stats_proxy_); |
180 vie_encoder_->RegisterSendStatisticsProxy(&stats_proxy_); | 180 vie_encoder_->RegisterSendStatisticsProxy(&stats_proxy_); |
181 | 181 |
182 vie_encoder_->RegisterPreEncodeCallback(config_.pre_encode_callback); | 182 vie_encoder_->RegisterPreEncodeCallback(config_.pre_encode_callback); |
183 if (config_.post_encode_callback) | 183 if (config_.post_encode_callback) |
184 vie_encoder_->RegisterPostEncodeImageCallback(&encoded_frame_proxy_); | 184 vie_encoder_->RegisterPostEncodeImageCallback(&encoded_frame_proxy_); |
185 | 185 |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 vie_channel_->IsSendingFecEnabled()); | 499 vie_channel_->IsSendingFecEnabled()); |
500 | 500 |
501 // Restart the media flow | 501 // Restart the media flow |
502 vie_encoder_->Restart(); | 502 vie_encoder_->Restart(); |
503 | 503 |
504 return true; | 504 return true; |
505 } | 505 } |
506 | 506 |
507 } // namespace internal | 507 } // namespace internal |
508 } // namespace webrtc | 508 } // namespace webrtc |
OLD | NEW |