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

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

Issue 2061423003: Refactor NACK bitrate allocation (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed nit Created 4 years, 5 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/send_statistics_proxy.h » ('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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 rtcp_packet_type_counter_observer; 51 rtcp_packet_type_counter_observer;
52 configuration.paced_sender = paced_sender; 52 configuration.paced_sender = paced_sender;
53 configuration.transport_sequence_number_allocator = 53 configuration.transport_sequence_number_allocator =
54 transport_sequence_number_allocator; 54 transport_sequence_number_allocator;
55 configuration.send_bitrate_observer = nullptr; 55 configuration.send_bitrate_observer = nullptr;
56 configuration.send_frame_count_observer = nullptr; 56 configuration.send_frame_count_observer = nullptr;
57 configuration.send_side_delay_observer = nullptr; 57 configuration.send_side_delay_observer = nullptr;
58 configuration.send_packet_observer = nullptr; 58 configuration.send_packet_observer = nullptr;
59 configuration.bandwidth_callback = nullptr; 59 configuration.bandwidth_callback = nullptr;
60 configuration.transport_feedback_callback = nullptr; 60 configuration.transport_feedback_callback = nullptr;
61 configuration.retransmission_rate_limiter = nullptr;
61 62
62 std::unique_ptr<RtpRtcp> rtp_rtcp(RtpRtcp::CreateRtpRtcp(configuration)); 63 std::unique_ptr<RtpRtcp> rtp_rtcp(RtpRtcp::CreateRtpRtcp(configuration));
63 rtp_rtcp->SetSendingStatus(false); 64 rtp_rtcp->SetSendingStatus(false);
64 rtp_rtcp->SetSendingMediaStatus(false); 65 rtp_rtcp->SetSendingMediaStatus(false);
65 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); 66 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound);
66 67
67 return rtp_rtcp; 68 return rtp_rtcp;
68 } 69 }
69 70
70 static const int kPacketLogIntervalMs = 10000; 71 static const int kPacketLogIntervalMs = 10000;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 config_.rtp.fec.red_payload_type, 179 config_.rtp.fec.red_payload_type,
179 config_.rtp.fec.ulpfec_payload_type); 180 config_.rtp.fec.ulpfec_payload_type);
180 } 181 }
181 182
182 if (config_.rtp.rtcp_xr.receiver_reference_time_report) 183 if (config_.rtp.rtcp_xr.receiver_reference_time_report)
183 rtp_rtcp_->SetRtcpXrRrtrStatus(true); 184 rtp_rtcp_->SetRtcpXrRrtrStatus(true);
184 185
185 // Stats callback for CNAME changes. 186 // Stats callback for CNAME changes.
186 rtp_rtcp_->RegisterRtcpStatisticsCallback(receive_stats_proxy); 187 rtp_rtcp_->RegisterRtcpStatisticsCallback(receive_stats_proxy);
187 188
188 process_thread_->RegisterModule(rtp_receive_statistics_.get());
189 process_thread_->RegisterModule(rtp_rtcp_.get()); 189 process_thread_->RegisterModule(rtp_rtcp_.get());
190 } 190 }
191 191
192 RtpStreamReceiver::~RtpStreamReceiver() { 192 RtpStreamReceiver::~RtpStreamReceiver() {
193 process_thread_->DeRegisterModule(rtp_receive_statistics_.get());
194 process_thread_->DeRegisterModule(rtp_rtcp_.get()); 193 process_thread_->DeRegisterModule(rtp_rtcp_.get());
195 194
196 packet_router_->RemoveRtpModule(rtp_rtcp_.get()); 195 packet_router_->RemoveRtpModule(rtp_rtcp_.get());
197 rtp_rtcp_->SetREMBStatus(false); 196 rtp_rtcp_->SetREMBStatus(false);
198 remb_->RemoveReceiveChannel(rtp_rtcp_.get()); 197 remb_->RemoveReceiveChannel(rtp_rtcp_.get());
199 UpdateHistograms(); 198 UpdateHistograms();
200 } 199 }
201 200
202 bool RtpStreamReceiver::SetReceiveCodec(const VideoCodec& video_codec) { 201 bool RtpStreamReceiver::SetReceiveCodec(const VideoCodec& video_codec) {
203 int8_t old_pltype = -1; 202 int8_t old_pltype = -1;
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 const std::string& extension, int id) { 535 const std::string& extension, int id) {
537 // One-byte-extension local identifiers are in the range 1-14 inclusive. 536 // One-byte-extension local identifiers are in the range 1-14 inclusive.
538 RTC_DCHECK_GE(id, 1); 537 RTC_DCHECK_GE(id, 1);
539 RTC_DCHECK_LE(id, 14); 538 RTC_DCHECK_LE(id, 14);
540 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); 539 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension));
541 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( 540 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension(
542 StringToRtpExtensionType(extension), id)); 541 StringToRtpExtensionType(extension), id));
543 } 542 }
544 543
545 } // namespace webrtc 544 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/payload_router_unittest.cc ('k') | webrtc/video/send_statistics_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698