Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 1725363003: Move RTP module activation into PayloadRouter. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: nuke comment Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/video/payload_router_unittest.cc ('k') | webrtc/video/vie_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 &stats_proxy_, 207 &stats_proxy_,
208 &overuse_detector_) { 208 &overuse_detector_) {
209 LOG(LS_INFO) << "VideoSendStream: " << config_.ToString(); 209 LOG(LS_INFO) << "VideoSendStream: " << config_.ToString();
210 210
211 RTC_DCHECK(!config_.rtp.ssrcs.empty()); 211 RTC_DCHECK(!config_.rtp.ssrcs.empty());
212 RTC_DCHECK(module_process_thread_); 212 RTC_DCHECK(module_process_thread_);
213 RTC_DCHECK(call_stats_); 213 RTC_DCHECK(call_stats_);
214 RTC_DCHECK(congestion_controller_); 214 RTC_DCHECK(congestion_controller_);
215 RTC_DCHECK(remb_); 215 RTC_DCHECK(remb_);
216 216
217 payload_router_.Init(rtp_rtcp_modules_);
217 RTC_CHECK(vie_encoder_.Init()); 218 RTC_CHECK(vie_encoder_.Init());
218 encoder_feedback_.Init(config_.rtp.ssrcs, &vie_encoder_); 219 encoder_feedback_.Init(config_.rtp.ssrcs, &vie_encoder_);
219 RTC_CHECK(vie_channel_.Init() == 0); 220 RTC_CHECK(vie_channel_.Init() == 0);
220 221
221 vcm_->RegisterProtectionCallback(vie_channel_.vcm_protection_callback()); 222 vcm_->RegisterProtectionCallback(vie_channel_.vcm_protection_callback());
222 223
223 call_stats_->RegisterStatsObserver(vie_channel_.GetStatsObserver()); 224 call_stats_->RegisterStatsObserver(vie_channel_.GetStatsObserver());
224 225
225 for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) { 226 for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) {
226 const std::string& extension = config_.rtp.extensions[i].name; 227 const std::string& extension = config_.rtp.extensions[i].name;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 rtp_rtcp_modules_.front()->SetCNAME(config_.rtp.c_name.c_str()); 273 rtp_rtcp_modules_.front()->SetCNAME(config_.rtp.c_name.c_str());
273 // 28 to match packet overhead in ModuleRtpRtcpImpl. 274 // 28 to match packet overhead in ModuleRtpRtcpImpl.
274 static const size_t kRtpPacketSizeOverhead = 28; 275 static const size_t kRtpPacketSizeOverhead = 28;
275 RTC_DCHECK_LE(config_.rtp.max_packet_size, 0xFFFFu + kRtpPacketSizeOverhead); 276 RTC_DCHECK_LE(config_.rtp.max_packet_size, 0xFFFFu + kRtpPacketSizeOverhead);
276 const uint16_t mtu = static_cast<uint16_t>(config_.rtp.max_packet_size + 277 const uint16_t mtu = static_cast<uint16_t>(config_.rtp.max_packet_size +
277 kRtpPacketSizeOverhead); 278 kRtpPacketSizeOverhead);
278 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 279 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
279 rtp_rtcp->RegisterRtcpStatisticsCallback(&stats_proxy_); 280 rtp_rtcp->RegisterRtcpStatisticsCallback(&stats_proxy_);
280 rtp_rtcp->RegisterSendChannelRtpStatisticsCallback(&stats_proxy_); 281 rtp_rtcp->RegisterSendChannelRtpStatisticsCallback(&stats_proxy_);
281 rtp_rtcp->SetMaxTransferUnit(mtu); 282 rtp_rtcp->SetMaxTransferUnit(mtu);
283 rtp_rtcp->RegisterVideoSendPayload(
284 config_.encoder_settings.payload_type,
285 config_.encoder_settings.payload_name.c_str());
282 } 286 }
283 287
284 RTC_DCHECK(config.encoder_settings.encoder != nullptr); 288 RTC_DCHECK(config.encoder_settings.encoder != nullptr);
285 RTC_DCHECK_GE(config.encoder_settings.payload_type, 0); 289 RTC_DCHECK_GE(config.encoder_settings.payload_type, 0);
286 RTC_DCHECK_LE(config.encoder_settings.payload_type, 127); 290 RTC_DCHECK_LE(config.encoder_settings.payload_type, 127);
287 RTC_CHECK_EQ(0, vie_encoder_.RegisterExternalEncoder( 291 RTC_CHECK_EQ(0, vie_encoder_.RegisterExternalEncoder(
288 config.encoder_settings.encoder, 292 config.encoder_settings.encoder,
289 config.encoder_settings.payload_type, 293 config.encoder_settings.payload_type,
290 config.encoder_settings.internal_source)); 294 config.encoder_settings.internal_source));
291 295
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 return false; 621 return false;
618 } 622 }
619 623
620 // Restart the media flow 624 // Restart the media flow
621 vie_encoder_.Restart(); 625 vie_encoder_.Restart();
622 626
623 return true; 627 return true;
624 } 628 }
625 } // namespace internal 629 } // namespace internal
626 } // namespace webrtc 630 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/payload_router_unittest.cc ('k') | webrtc/video/vie_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698