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

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

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

Powered by Google App Engine
This is Rietveld 408576698