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

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

Issue 2774623006: Let PacketRouter separate send and receive modules. (Closed)
Patch Set: Delete #if:ed out code. Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 restored_packet_in_use_(false), 109 restored_packet_in_use_(false),
110 last_packet_log_ms_(-1), 110 last_packet_log_ms_(-1),
111 rtp_rtcp_(CreateRtpRtcpModule(rtp_receive_statistics_.get(), 111 rtp_rtcp_(CreateRtpRtcpModule(rtp_receive_statistics_.get(),
112 transport, 112 transport,
113 rtt_stats, 113 rtt_stats,
114 receive_stats_proxy, 114 receive_stats_proxy,
115 packet_router)), 115 packet_router)),
116 complete_frame_callback_(complete_frame_callback), 116 complete_frame_callback_(complete_frame_callback),
117 keyframe_request_sender_(keyframe_request_sender), 117 keyframe_request_sender_(keyframe_request_sender),
118 timing_(timing) { 118 timing_(timing) {
119 packet_router_->AddRtpModule(rtp_rtcp_.get()); 119 packet_router_->AddReceiveRtpModule(rtp_rtcp_.get());
120 rtp_receive_statistics_->RegisterRtpStatisticsCallback(receive_stats_proxy); 120 rtp_receive_statistics_->RegisterRtpStatisticsCallback(receive_stats_proxy);
121 rtp_receive_statistics_->RegisterRtcpStatisticsCallback(receive_stats_proxy); 121 rtp_receive_statistics_->RegisterRtcpStatisticsCallback(receive_stats_proxy);
122 122
123 RTC_DCHECK(config_.rtp.rtcp_mode != RtcpMode::kOff) 123 RTC_DCHECK(config_.rtp.rtcp_mode != RtcpMode::kOff)
124 << "A stream should not be configured with RTCP disabled. This value is " 124 << "A stream should not be configured with RTCP disabled. This value is "
125 "reserved for internal usage."; 125 "reserved for internal usage.";
126 RTC_DCHECK(config_.rtp.remote_ssrc != 0); 126 RTC_DCHECK(config_.rtp.remote_ssrc != 0);
127 // TODO(pbos): What's an appropriate local_ssrc for receive-only streams? 127 // TODO(pbos): What's an appropriate local_ssrc for receive-only streams?
128 RTC_DCHECK(config_.rtp.local_ssrc != 0); 128 RTC_DCHECK(config_.rtp.local_ssrc != 0);
129 RTC_DCHECK(config_.rtp.remote_ssrc != config_.rtp.local_ssrc); 129 RTC_DCHECK(config_.rtp.remote_ssrc != config_.rtp.local_ssrc);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 reference_finder_.reset(new video_coding::RtpFrameReferenceFinder(this)); 196 reference_finder_.reset(new video_coding::RtpFrameReferenceFinder(this));
197 } 197 }
198 198
199 RtpStreamReceiver::~RtpStreamReceiver() { 199 RtpStreamReceiver::~RtpStreamReceiver() {
200 if (nack_module_) { 200 if (nack_module_) {
201 process_thread_->DeRegisterModule(nack_module_.get()); 201 process_thread_->DeRegisterModule(nack_module_.get());
202 } 202 }
203 203
204 process_thread_->DeRegisterModule(rtp_rtcp_.get()); 204 process_thread_->DeRegisterModule(rtp_rtcp_.get());
205 205
206 packet_router_->RemoveRtpModule(rtp_rtcp_.get()); 206 packet_router_->RemoveReceiveRtpModule(rtp_rtcp_.get());
207 rtp_rtcp_->SetREMBStatus(false); 207 rtp_rtcp_->SetREMBStatus(false);
208 if (config_.rtp.remb) { 208 if (config_.rtp.remb) {
209 remb_->RemoveReceiveChannel(rtp_rtcp_.get()); 209 remb_->RemoveReceiveChannel(rtp_rtcp_.get());
210 } 210 }
211 UpdateHistograms(); 211 UpdateHistograms();
212 } 212 }
213 213
214 bool RtpStreamReceiver::AddReceiveCodec( 214 bool RtpStreamReceiver::AddReceiveCodec(
215 const VideoCodec& video_codec, 215 const VideoCodec& video_codec,
216 const std::map<std::string, std::string>& codec_params) { 216 const std::map<std::string, std::string>& codec_params) {
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 return; 657 return;
658 658
659 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str())) 659 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str()))
660 return; 660 return;
661 661
662 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(), 662 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(),
663 sprop_decoder.pps_nalu()); 663 sprop_decoder.pps_nalu());
664 } 664 }
665 665
666 } // namespace webrtc 666 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698