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

Side by Side Diff: webrtc/call/call.cc

Issue 2625633003: Let FlexfecReceiveStreamImpl send RTCP RRs. (Closed)
Patch Set: Rebase. Created 3 years, 11 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 | « no previous file | webrtc/call/flexfec_receive_stream_impl.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) 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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 UpdateAggregateNetworkState(); 695 UpdateAggregateNetworkState();
696 delete receive_stream_impl; 696 delete receive_stream_impl;
697 } 697 }
698 698
699 FlexfecReceiveStream* Call::CreateFlexfecReceiveStream( 699 FlexfecReceiveStream* Call::CreateFlexfecReceiveStream(
700 const FlexfecReceiveStream::Config& config) { 700 const FlexfecReceiveStream::Config& config) {
701 TRACE_EVENT0("webrtc", "Call::CreateFlexfecReceiveStream"); 701 TRACE_EVENT0("webrtc", "Call::CreateFlexfecReceiveStream");
702 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 702 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
703 703
704 RecoveredPacketReceiver* recovered_packet_receiver = this; 704 RecoveredPacketReceiver* recovered_packet_receiver = this;
705 FlexfecReceiveStreamImpl* receive_stream = 705 FlexfecReceiveStreamImpl* receive_stream = new FlexfecReceiveStreamImpl(
706 new FlexfecReceiveStreamImpl(config, recovered_packet_receiver); 706 config, recovered_packet_receiver, call_stats_->rtcp_rtt_stats(),
707 module_process_thread_.get());
707 708
708 { 709 {
709 WriteLockScoped write_lock(*receive_crit_); 710 WriteLockScoped write_lock(*receive_crit_);
710 711
711 RTC_DCHECK(flexfec_receive_streams_.find(receive_stream) == 712 RTC_DCHECK(flexfec_receive_streams_.find(receive_stream) ==
712 flexfec_receive_streams_.end()); 713 flexfec_receive_streams_.end());
713 flexfec_receive_streams_.insert(receive_stream); 714 flexfec_receive_streams_.insert(receive_stream);
714 715
715 for (auto ssrc : config.protected_media_ssrcs) 716 for (auto ssrc : config.protected_media_ssrcs)
716 flexfec_receive_ssrcs_media_.insert(std::make_pair(ssrc, receive_stream)); 717 flexfec_receive_ssrcs_media_.insert(std::make_pair(ssrc, receive_stream));
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 return status; 1159 return status;
1159 } 1160 }
1160 } 1161 }
1161 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) { 1162 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) {
1162 auto it = flexfec_receive_ssrcs_protection_.find(ssrc); 1163 auto it = flexfec_receive_ssrcs_protection_.find(ssrc);
1163 if (it != flexfec_receive_ssrcs_protection_.end()) { 1164 if (it != flexfec_receive_ssrcs_protection_.end()) {
1164 rtc::Optional<RtpPacketReceived> parsed_packet = 1165 rtc::Optional<RtpPacketReceived> parsed_packet =
1165 ParseRtpPacket(packet, length, packet_time); 1166 ParseRtpPacket(packet, length, packet_time);
1166 if (parsed_packet) { 1167 if (parsed_packet) {
1167 NotifyBweOfReceivedPacket(*parsed_packet); 1168 NotifyBweOfReceivedPacket(*parsed_packet);
1168 auto status = 1169 auto status = it->second->AddAndProcessReceivedPacket(*parsed_packet)
1169 it->second->AddAndProcessReceivedPacket(std::move(*parsed_packet)) 1170 ? DELIVERY_OK
1170 ? DELIVERY_OK 1171 : DELIVERY_PACKET_ERROR;
1171 : DELIVERY_PACKET_ERROR;
1172 if (status == DELIVERY_OK) 1172 if (status == DELIVERY_OK)
1173 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length); 1173 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length);
1174 return status; 1174 return status;
1175 } 1175 }
1176 } 1176 }
1177 } 1177 }
1178 return DELIVERY_UNKNOWN_SSRC; 1178 return DELIVERY_UNKNOWN_SSRC;
1179 } 1179 }
1180 1180
1181 PacketReceiver::DeliveryStatus Call::DeliverPacket( 1181 PacketReceiver::DeliveryStatus Call::DeliverPacket(
(...skipping 24 matching lines...) Expand all
1206 1206
1207 void Call::NotifyBweOfReceivedPacket(const RtpPacketReceived& packet) { 1207 void Call::NotifyBweOfReceivedPacket(const RtpPacketReceived& packet) {
1208 RTPHeader header; 1208 RTPHeader header;
1209 packet.GetHeader(&header); 1209 packet.GetHeader(&header);
1210 congestion_controller_->OnReceivedPacket(packet.arrival_time_ms(), 1210 congestion_controller_->OnReceivedPacket(packet.arrival_time_ms(),
1211 packet.payload_size(), header); 1211 packet.payload_size(), header);
1212 } 1212 }
1213 1213
1214 } // namespace internal 1214 } // namespace internal
1215 } // namespace webrtc 1215 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/call/flexfec_receive_stream_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698