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

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

Issue 2553863003: Parse FlexFEC RTP headers in Call and add integration with BWE. (Closed)
Patch Set: Add NotifyBweOfReceivedPacket to mock. Created 4 years 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) 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
11 #include <string.h> 11 #include <string.h>
12 #include <algorithm> 12 #include <algorithm>
13 #include <map> 13 #include <map>
14 #include <memory> 14 #include <memory>
15 #include <set> 15 #include <set>
16 #include <utility> 16 #include <utility>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/audio/audio_receive_stream.h" 19 #include "webrtc/audio/audio_receive_stream.h"
20 #include "webrtc/audio/audio_send_stream.h" 20 #include "webrtc/audio/audio_send_stream.h"
21 #include "webrtc/audio/audio_state.h" 21 #include "webrtc/audio/audio_state.h"
22 #include "webrtc/audio/scoped_voe_interface.h" 22 #include "webrtc/audio/scoped_voe_interface.h"
23 #include "webrtc/base/basictypes.h" 23 #include "webrtc/base/basictypes.h"
24 #include "webrtc/base/checks.h" 24 #include "webrtc/base/checks.h"
25 #include "webrtc/base/constructormagic.h" 25 #include "webrtc/base/constructormagic.h"
26 #include "webrtc/base/logging.h" 26 #include "webrtc/base/logging.h"
27 #include "webrtc/base/optional.h"
27 #include "webrtc/base/task_queue.h" 28 #include "webrtc/base/task_queue.h"
28 #include "webrtc/base/thread_annotations.h" 29 #include "webrtc/base/thread_annotations.h"
29 #include "webrtc/base/thread_checker.h" 30 #include "webrtc/base/thread_checker.h"
30 #include "webrtc/base/trace_event.h" 31 #include "webrtc/base/trace_event.h"
31 #include "webrtc/call/bitrate_allocator.h" 32 #include "webrtc/call/bitrate_allocator.h"
32 #include "webrtc/call/call.h" 33 #include "webrtc/call/call.h"
33 #include "webrtc/call/flexfec_receive_stream_impl.h" 34 #include "webrtc/call/flexfec_receive_stream_impl.h"
34 #include "webrtc/config.h" 35 #include "webrtc/config.h"
35 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" 36 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
36 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" 37 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
37 #include "webrtc/modules/congestion_controller/include/congestion_controller.h" 38 #include "webrtc/modules/congestion_controller/include/congestion_controller.h"
38 #include "webrtc/modules/pacing/paced_sender.h" 39 #include "webrtc/modules/pacing/paced_sender.h"
39 #include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h" 40 #include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h"
40 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 41 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
41 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" 42 #include "webrtc/modules/rtp_rtcp/source/byte_io.h"
43 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h"
44 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h"
42 #include "webrtc/modules/utility/include/process_thread.h" 45 #include "webrtc/modules/utility/include/process_thread.h"
43 #include "webrtc/system_wrappers/include/clock.h" 46 #include "webrtc/system_wrappers/include/clock.h"
44 #include "webrtc/system_wrappers/include/cpu_info.h" 47 #include "webrtc/system_wrappers/include/cpu_info.h"
45 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" 48 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
46 #include "webrtc/system_wrappers/include/metrics.h" 49 #include "webrtc/system_wrappers/include/metrics.h"
47 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h" 50 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h"
48 #include "webrtc/system_wrappers/include/trace.h" 51 #include "webrtc/system_wrappers/include/trace.h"
49 #include "webrtc/video/call_stats.h" 52 #include "webrtc/video/call_stats.h"
50 #include "webrtc/video/send_delay_stats.h" 53 #include "webrtc/video/send_delay_stats.h"
51 #include "webrtc/video/stats_counter.h" 54 #include "webrtc/video/stats_counter.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 150
148 VoiceEngine* voice_engine() { 151 VoiceEngine* voice_engine() {
149 internal::AudioState* audio_state = 152 internal::AudioState* audio_state =
150 static_cast<internal::AudioState*>(config_.audio_state.get()); 153 static_cast<internal::AudioState*>(config_.audio_state.get());
151 if (audio_state) 154 if (audio_state)
152 return audio_state->voice_engine(); 155 return audio_state->voice_engine();
153 else 156 else
154 return nullptr; 157 return nullptr;
155 } 158 }
156 159
160 rtc::Optional<RtpPacketReceived> ParseRtpPacket(const uint8_t* packet,
161 size_t length,
162 const PacketTime& packet_time)
163 SHARED_LOCKS_REQUIRED(receive_crit_);
164
157 void UpdateSendHistograms() EXCLUSIVE_LOCKS_REQUIRED(&bitrate_crit_); 165 void UpdateSendHistograms() EXCLUSIVE_LOCKS_REQUIRED(&bitrate_crit_);
158 void UpdateReceiveHistograms(); 166 void UpdateReceiveHistograms();
159 void UpdateHistograms(); 167 void UpdateHistograms();
160 void UpdateAggregateNetworkState(); 168 void UpdateAggregateNetworkState();
161 169
162 Clock* const clock_; 170 Clock* const clock_;
163 171
164 const int num_cpu_cores_; 172 const int num_cpu_cores_;
165 const std::unique_ptr<ProcessThread> module_process_thread_; 173 const std::unique_ptr<ProcessThread> module_process_thread_;
166 const std::unique_ptr<ProcessThread> pacer_thread_; 174 const std::unique_ptr<ProcessThread> pacer_thread_;
(...skipping 18 matching lines...) Expand all
185 // streams. 193 // streams.
186 std::multimap<uint32_t, FlexfecReceiveStreamImpl*> 194 std::multimap<uint32_t, FlexfecReceiveStreamImpl*>
187 flexfec_receive_ssrcs_media_ GUARDED_BY(receive_crit_); 195 flexfec_receive_ssrcs_media_ GUARDED_BY(receive_crit_);
188 std::map<uint32_t, FlexfecReceiveStreamImpl*> 196 std::map<uint32_t, FlexfecReceiveStreamImpl*>
189 flexfec_receive_ssrcs_protection_ GUARDED_BY(receive_crit_); 197 flexfec_receive_ssrcs_protection_ GUARDED_BY(receive_crit_);
190 std::set<FlexfecReceiveStreamImpl*> flexfec_receive_streams_ 198 std::set<FlexfecReceiveStreamImpl*> flexfec_receive_streams_
191 GUARDED_BY(receive_crit_); 199 GUARDED_BY(receive_crit_);
192 std::map<std::string, AudioReceiveStream*> sync_stream_mapping_ 200 std::map<std::string, AudioReceiveStream*> sync_stream_mapping_
193 GUARDED_BY(receive_crit_); 201 GUARDED_BY(receive_crit_);
194 202
203 // Registered RTP header extensions for each stream.
204 // Note that RTP header extensions are negotiated per track ("m= line") in the
205 // SDP, but we have no notion of tracks at the Call level. We therefore store
206 // the RTP header extensions per SSRC instead, which leads to some storage
207 // overhead.
208 std::map<uint32_t, RtpHeaderExtensionMap> received_rtp_header_extensions_
209 GUARDED_BY(receive_crit_);
210
195 std::unique_ptr<RWLockWrapper> send_crit_; 211 std::unique_ptr<RWLockWrapper> send_crit_;
196 // Audio and Video send streams are owned by the client that creates them. 212 // Audio and Video send streams are owned by the client that creates them.
197 std::map<uint32_t, AudioSendStream*> audio_send_ssrcs_ GUARDED_BY(send_crit_); 213 std::map<uint32_t, AudioSendStream*> audio_send_ssrcs_ GUARDED_BY(send_crit_);
198 std::map<uint32_t, VideoSendStream*> video_send_ssrcs_ GUARDED_BY(send_crit_); 214 std::map<uint32_t, VideoSendStream*> video_send_ssrcs_ GUARDED_BY(send_crit_);
199 std::set<VideoSendStream*> video_send_streams_ GUARDED_BY(send_crit_); 215 std::set<VideoSendStream*> video_send_streams_ GUARDED_BY(send_crit_);
200 216
201 VideoSendStream::RtpStateMap suspended_video_send_ssrcs_; 217 VideoSendStream::RtpStateMap suspended_video_send_ssrcs_;
202 webrtc::RtcEventLog* event_log_; 218 webrtc::RtcEventLog* event_log_;
203 219
204 // The following members are only accessed (exclusively) from one thread and 220 // The following members are only accessed (exclusively) from one thread and
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 { 354 {
339 rtc::CritScope lock(&bitrate_crit_); 355 rtc::CritScope lock(&bitrate_crit_);
340 UpdateSendHistograms(); 356 UpdateSendHistograms();
341 } 357 }
342 UpdateReceiveHistograms(); 358 UpdateReceiveHistograms();
343 UpdateHistograms(); 359 UpdateHistograms();
344 360
345 Trace::ReturnTrace(); 361 Trace::ReturnTrace();
346 } 362 }
347 363
364 rtc::Optional<RtpPacketReceived> Call::ParseRtpPacket(
365 const uint8_t* packet,
366 size_t length,
367 const PacketTime& packet_time) {
368 RtpPacketReceived parsed_packet;
369 if (!parsed_packet.Parse(packet, length))
370 return rtc::Optional<RtpPacketReceived>();
371
372 auto it = received_rtp_header_extensions_.find(parsed_packet.Ssrc());
373 if (it != received_rtp_header_extensions_.end())
374 parsed_packet.IdentifyExtensions(it->second);
375
376 int64_t arrival_time_ms;
377 if (packet_time.timestamp != -1) {
378 arrival_time_ms = (packet_time.timestamp + 500) / 1000;
379 } else {
380 arrival_time_ms = clock_->TimeInMilliseconds();
381 }
382 parsed_packet.set_arrival_time_ms(arrival_time_ms);
383
384 return rtc::Optional<RtpPacketReceived>(std::move(parsed_packet));
385 }
386
348 void Call::UpdateHistograms() { 387 void Call::UpdateHistograms() {
349 RTC_HISTOGRAM_COUNTS_100000( 388 RTC_HISTOGRAM_COUNTS_100000(
350 "WebRTC.Call.LifetimeInSeconds", 389 "WebRTC.Call.LifetimeInSeconds",
351 (clock_->TimeInMilliseconds() - start_ms_) / 1000); 390 (clock_->TimeInMilliseconds() - start_ms_) / 1000);
352 } 391 }
353 392
354 void Call::UpdateSendHistograms() { 393 void Call::UpdateSendHistograms() {
355 if (first_packet_sent_ms_ == -1) 394 if (first_packet_sent_ms_ == -1)
356 return; 395 return;
357 int64_t elapsed_sec = 396 int64_t elapsed_sec =
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 ConfigureSync(receive_stream_impl->config().sync_group); 691 ConfigureSync(receive_stream_impl->config().sync_group);
653 } 692 }
654 UpdateAggregateNetworkState(); 693 UpdateAggregateNetworkState();
655 delete receive_stream_impl; 694 delete receive_stream_impl;
656 } 695 }
657 696
658 FlexfecReceiveStream* Call::CreateFlexfecReceiveStream( 697 FlexfecReceiveStream* Call::CreateFlexfecReceiveStream(
659 const FlexfecReceiveStream::Config& config) { 698 const FlexfecReceiveStream::Config& config) {
660 TRACE_EVENT0("webrtc", "Call::CreateFlexfecReceiveStream"); 699 TRACE_EVENT0("webrtc", "Call::CreateFlexfecReceiveStream");
661 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 700 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
701
702 RecoveredPacketReceiver* recovered_packet_receiver = this;
662 FlexfecReceiveStreamImpl* receive_stream = 703 FlexfecReceiveStreamImpl* receive_stream =
663 new FlexfecReceiveStreamImpl(config, this); 704 new FlexfecReceiveStreamImpl(config, recovered_packet_receiver);
664 705
665 { 706 {
666 WriteLockScoped write_lock(*receive_crit_); 707 WriteLockScoped write_lock(*receive_crit_);
708
709 RTC_DCHECK(flexfec_receive_streams_.find(receive_stream) ==
710 flexfec_receive_streams_.end());
711 flexfec_receive_streams_.insert(receive_stream);
712
667 for (auto ssrc : config.protected_media_ssrcs) 713 for (auto ssrc : config.protected_media_ssrcs)
668 flexfec_receive_ssrcs_media_.insert(std::make_pair(ssrc, receive_stream)); 714 flexfec_receive_ssrcs_media_.insert(std::make_pair(ssrc, receive_stream));
715
669 RTC_DCHECK(flexfec_receive_ssrcs_protection_.find(config.remote_ssrc) == 716 RTC_DCHECK(flexfec_receive_ssrcs_protection_.find(config.remote_ssrc) ==
670 flexfec_receive_ssrcs_protection_.end()); 717 flexfec_receive_ssrcs_protection_.end());
671 flexfec_receive_ssrcs_protection_[config.remote_ssrc] = receive_stream; 718 flexfec_receive_ssrcs_protection_[config.remote_ssrc] = receive_stream;
672 flexfec_receive_streams_.insert(receive_stream); 719
720 RTC_DCHECK(received_rtp_header_extensions_.find(config.remote_ssrc) ==
721 received_rtp_header_extensions_.end());
722 RtpHeaderExtensionMap rtp_header_extensions(config.rtp_header_extensions);
723 received_rtp_header_extensions_[config.remote_ssrc] = rtp_header_extensions;
673 } 724 }
725
674 // TODO(brandtr): Store config in RtcEventLog here. 726 // TODO(brandtr): Store config in RtcEventLog here.
727
675 return receive_stream; 728 return receive_stream;
676 } 729 }
677 730
678 void Call::DestroyFlexfecReceiveStream(FlexfecReceiveStream* receive_stream) { 731 void Call::DestroyFlexfecReceiveStream(FlexfecReceiveStream* receive_stream) {
679 TRACE_EVENT0("webrtc", "Call::DestroyFlexfecReceiveStream"); 732 TRACE_EVENT0("webrtc", "Call::DestroyFlexfecReceiveStream");
680 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 733 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
734
681 RTC_DCHECK(receive_stream != nullptr); 735 RTC_DCHECK(receive_stream != nullptr);
682 // There exist no other derived classes of FlexfecReceiveStream, 736 // There exist no other derived classes of FlexfecReceiveStream,
683 // so this downcast is safe. 737 // so this downcast is safe.
684 FlexfecReceiveStreamImpl* receive_stream_impl = 738 FlexfecReceiveStreamImpl* receive_stream_impl =
685 static_cast<FlexfecReceiveStreamImpl*>(receive_stream); 739 static_cast<FlexfecReceiveStreamImpl*>(receive_stream);
686 { 740 {
687 WriteLockScoped write_lock(*receive_crit_); 741 WriteLockScoped write_lock(*receive_crit_);
742
743 uint32_t ssrc = receive_stream_impl->GetConfig().remote_ssrc;
744 received_rtp_header_extensions_.erase(ssrc);
745
688 // Remove all SSRCs pointing to the FlexfecReceiveStreamImpl to be 746 // Remove all SSRCs pointing to the FlexfecReceiveStreamImpl to be
689 // destroyed. 747 // destroyed.
690 auto media_it = flexfec_receive_ssrcs_media_.begin();
691 while (media_it != flexfec_receive_ssrcs_media_.end()) {
692 if (media_it->second == receive_stream_impl)
693 media_it = flexfec_receive_ssrcs_media_.erase(media_it);
694 else
695 ++media_it;
696 }
697 auto prot_it = flexfec_receive_ssrcs_protection_.begin(); 748 auto prot_it = flexfec_receive_ssrcs_protection_.begin();
698 while (prot_it != flexfec_receive_ssrcs_protection_.end()) { 749 while (prot_it != flexfec_receive_ssrcs_protection_.end()) {
699 if (prot_it->second == receive_stream_impl) 750 if (prot_it->second == receive_stream_impl)
700 prot_it = flexfec_receive_ssrcs_protection_.erase(prot_it); 751 prot_it = flexfec_receive_ssrcs_protection_.erase(prot_it);
701 else 752 else
702 ++prot_it; 753 ++prot_it;
703 } 754 }
755 auto media_it = flexfec_receive_ssrcs_media_.begin();
756 while (media_it != flexfec_receive_ssrcs_media_.end()) {
757 if (media_it->second == receive_stream_impl)
758 media_it = flexfec_receive_ssrcs_media_.erase(media_it);
759 else
760 ++media_it;
761 }
762
704 flexfec_receive_streams_.erase(receive_stream_impl); 763 flexfec_receive_streams_.erase(receive_stream_impl);
705 } 764 }
765
706 delete receive_stream_impl; 766 delete receive_stream_impl;
707 } 767 }
708 768
709 Call::Stats Call::GetStats() const { 769 Call::Stats Call::GetStats() const {
710 // TODO(solenberg): Some test cases in EndToEndTest use this from a different 770 // TODO(solenberg): Some test cases in EndToEndTest use this from a different
711 // thread. Re-enable once that is fixed. 771 // thread. Re-enable once that is fixed.
712 // RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 772 // RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
713 Stats stats; 773 Stats stats;
714 // Fetch available send/receive bitrates. 774 // Fetch available send/receive bitrates.
715 uint32_t send_bandwidth = 0; 775 uint32_t send_bandwidth = 0;
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 if (status == DELIVERY_OK) 1129 if (status == DELIVERY_OK)
1070 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length); 1130 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length);
1071 return status; 1131 return status;
1072 } 1132 }
1073 } 1133 }
1074 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) { 1134 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) {
1075 auto it = video_receive_ssrcs_.find(ssrc); 1135 auto it = video_receive_ssrcs_.find(ssrc);
1076 if (it != video_receive_ssrcs_.end()) { 1136 if (it != video_receive_ssrcs_.end()) {
1077 received_bytes_per_second_counter_.Add(static_cast<int>(length)); 1137 received_bytes_per_second_counter_.Add(static_cast<int>(length));
1078 received_video_bytes_per_second_counter_.Add(static_cast<int>(length)); 1138 received_video_bytes_per_second_counter_.Add(static_cast<int>(length));
1139 // TODO(brandtr): Notify the BWE of received media packets here.
1079 auto status = it->second->DeliverRtp(packet, length, packet_time) 1140 auto status = it->second->DeliverRtp(packet, length, packet_time)
1080 ? DELIVERY_OK 1141 ? DELIVERY_OK
1081 : DELIVERY_PACKET_ERROR; 1142 : DELIVERY_PACKET_ERROR;
1082 // Deliver media packets to FlexFEC subsystem. 1143 // Deliver media packets to FlexFEC subsystem. RTP header extensions need
1083 auto it_bounds = flexfec_receive_ssrcs_media_.equal_range(ssrc); 1144 // not be parsed, as FlexFEC is oblivious to the semantic meaning of the
1084 for (auto it = it_bounds.first; it != it_bounds.second; ++it) 1145 // packet contents beyond the 12 byte RTP base header. The BWE is fed
1085 it->second->AddAndProcessReceivedPacket(packet, length); 1146 // information about these media packets from the regular media pipeline.
1147 rtc::Optional<RtpPacketReceived> parsed_packet =
1148 ParseRtpPacket(packet, length, packet_time);
1149 if (parsed_packet) {
1150 auto it_bounds = flexfec_receive_ssrcs_media_.equal_range(ssrc);
1151 for (auto it = it_bounds.first; it != it_bounds.second; ++it)
1152 it->second->AddAndProcessReceivedPacket(*parsed_packet);
1153 }
1086 if (status == DELIVERY_OK) 1154 if (status == DELIVERY_OK)
1087 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length); 1155 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length);
1088 return status; 1156 return status;
1089 } 1157 }
1090 } 1158 }
1091 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) { 1159 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) {
1092 auto it = flexfec_receive_ssrcs_protection_.find(ssrc); 1160 auto it = flexfec_receive_ssrcs_protection_.find(ssrc);
1093 if (it != flexfec_receive_ssrcs_protection_.end()) { 1161 if (it != flexfec_receive_ssrcs_protection_.end()) {
1094 auto status = it->second->AddAndProcessReceivedPacket(packet, length) 1162 rtc::Optional<RtpPacketReceived> parsed_packet =
1095 ? DELIVERY_OK 1163 ParseRtpPacket(packet, length, packet_time);
1096 : DELIVERY_PACKET_ERROR; 1164 if (parsed_packet) {
1097 if (status == DELIVERY_OK) 1165 congestion_controller_->NotifyBweOfReceivedPacket(*parsed_packet);
1098 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length); 1166 auto status =
1099 return status; 1167 it->second->AddAndProcessReceivedPacket(std::move(*parsed_packet))
1168 ? DELIVERY_OK
1169 : DELIVERY_PACKET_ERROR;
1170 if (status == DELIVERY_OK)
1171 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length);
1172 return status;
1173 }
1100 } 1174 }
1101 } 1175 }
1102 return DELIVERY_UNKNOWN_SSRC; 1176 return DELIVERY_UNKNOWN_SSRC;
1103 } 1177 }
1104 1178
1105 PacketReceiver::DeliveryStatus Call::DeliverPacket( 1179 PacketReceiver::DeliveryStatus Call::DeliverPacket(
1106 MediaType media_type, 1180 MediaType media_type,
1107 const uint8_t* packet, 1181 const uint8_t* packet,
1108 size_t length, 1182 size_t length,
1109 const PacketTime& packet_time) { 1183 const PacketTime& packet_time) {
(...skipping 13 matching lines...) Expand all
1123 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]); 1197 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]);
1124 ReadLockScoped read_lock(*receive_crit_); 1198 ReadLockScoped read_lock(*receive_crit_);
1125 auto it = video_receive_ssrcs_.find(ssrc); 1199 auto it = video_receive_ssrcs_.find(ssrc);
1126 if (it == video_receive_ssrcs_.end()) 1200 if (it == video_receive_ssrcs_.end())
1127 return false; 1201 return false;
1128 return it->second->OnRecoveredPacket(packet, length); 1202 return it->second->OnRecoveredPacket(packet, length);
1129 } 1203 }
1130 1204
1131 } // namespace internal 1205 } // namespace internal
1132 } // namespace webrtc 1206 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/call/flexfec_receive_stream.h » ('j') | webrtc/modules/congestion_controller/congestion_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698