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

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

Issue 2886993005: Introduce RtpStreamReceiver and RtpStreamReceiverControllerInterface. (Closed)
Patch Set: Reenable FlexfecReceiveStreamTest. Created 3 years, 6 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) 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 16 matching lines...) Expand all
27 #include "webrtc/base/logging.h" 27 #include "webrtc/base/logging.h"
28 #include "webrtc/base/optional.h" 28 #include "webrtc/base/optional.h"
29 #include "webrtc/base/ptr_util.h" 29 #include "webrtc/base/ptr_util.h"
30 #include "webrtc/base/task_queue.h" 30 #include "webrtc/base/task_queue.h"
31 #include "webrtc/base/thread_annotations.h" 31 #include "webrtc/base/thread_annotations.h"
32 #include "webrtc/base/thread_checker.h" 32 #include "webrtc/base/thread_checker.h"
33 #include "webrtc/base/trace_event.h" 33 #include "webrtc/base/trace_event.h"
34 #include "webrtc/call/bitrate_allocator.h" 34 #include "webrtc/call/bitrate_allocator.h"
35 #include "webrtc/call/call.h" 35 #include "webrtc/call/call.h"
36 #include "webrtc/call/flexfec_receive_stream_impl.h" 36 #include "webrtc/call/flexfec_receive_stream_impl.h"
37 #include "webrtc/call/rtp_demuxer.h" 37 #include "webrtc/call/rtp_transport_controller_receive.h"
38 #include "webrtc/call/rtp_transport_controller_send.h" 38 #include "webrtc/call/rtp_transport_controller_send.h"
39 #include "webrtc/config.h" 39 #include "webrtc/config.h"
40 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" 40 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
41 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" 41 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
42 #include "webrtc/modules/congestion_controller/include/receive_side_congestion_c ontroller.h" 42 #include "webrtc/modules/congestion_controller/include/receive_side_congestion_c ontroller.h"
43 #include "webrtc/modules/pacing/paced_sender.h" 43 #include "webrtc/modules/pacing/paced_sender.h"
44 #include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h" 44 #include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h"
45 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 45 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
46 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" 46 #include "webrtc/modules/rtp_rtcp/source/byte_io.h"
47 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" 47 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // Audio, Video, and FlexFEC receive streams are owned by the client that 263 // Audio, Video, and FlexFEC receive streams are owned by the client that
264 // creates them. 264 // creates them.
265 std::set<AudioReceiveStream*> audio_receive_streams_ 265 std::set<AudioReceiveStream*> audio_receive_streams_
266 GUARDED_BY(receive_crit_); 266 GUARDED_BY(receive_crit_);
267 std::set<VideoReceiveStream*> video_receive_streams_ 267 std::set<VideoReceiveStream*> video_receive_streams_
268 GUARDED_BY(receive_crit_); 268 GUARDED_BY(receive_crit_);
269 269
270 std::map<std::string, AudioReceiveStream*> sync_stream_mapping_ 270 std::map<std::string, AudioReceiveStream*> sync_stream_mapping_
271 GUARDED_BY(receive_crit_); 271 GUARDED_BY(receive_crit_);
272 272
273 // TODO(nisse): Should eventually be part of injected 273 // TODO(nisse): Should eventually be injected at creation,
274 // RtpTransportControllerReceive, with a single demuxer in the bundled case. 274 // with a single object in the bundled case.
275 RtpDemuxer audio_rtp_demuxer_ GUARDED_BY(receive_crit_); 275 RtpTransportControllerReceive audio_transport_receive_;
276 RtpDemuxer video_rtp_demuxer_ GUARDED_BY(receive_crit_); 276 RtpTransportControllerReceive video_transport_receive_;
277 277
278 // This extra map is used for receive processing which is 278 // This extra map is used for receive processing which is
279 // independent of media type. 279 // independent of media type.
280 280
281 // TODO(nisse): In the RTP transport refactoring, we should have a 281 // TODO(nisse): In the RTP transport refactoring, we should have a
282 // single mapping from ssrc to a more abstract receive stream, with 282 // single mapping from ssrc to a more abstract receive stream, with
283 // accessor methods for all configuration we need at this level. 283 // accessor methods for all configuration we need at this level.
284 struct ReceiveRtpConfig { 284 struct ReceiveRtpConfig {
285 ReceiveRtpConfig() = default; // Needed by std::map 285 ReceiveRtpConfig() = default; // Needed by std::map
286 ReceiveRtpConfig(const std::vector<RtpExtension>& extensions, 286 ReceiveRtpConfig(const std::vector<RtpExtension>& extensions,
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 UpdateAggregateNetworkState(); 626 UpdateAggregateNetworkState();
627 delete audio_send_stream; 627 delete audio_send_stream;
628 } 628 }
629 629
630 webrtc::AudioReceiveStream* Call::CreateAudioReceiveStream( 630 webrtc::AudioReceiveStream* Call::CreateAudioReceiveStream(
631 const webrtc::AudioReceiveStream::Config& config) { 631 const webrtc::AudioReceiveStream::Config& config) {
632 TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream"); 632 TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream");
633 RTC_DCHECK_RUN_ON(&configuration_thread_checker_); 633 RTC_DCHECK_RUN_ON(&configuration_thread_checker_);
634 event_log_->LogAudioReceiveStreamConfig(CreateRtcLogStreamConfig(config)); 634 event_log_->LogAudioReceiveStreamConfig(CreateRtcLogStreamConfig(config));
635 AudioReceiveStream* receive_stream = 635 AudioReceiveStream* receive_stream =
636 new AudioReceiveStream(transport_send_->packet_router(), config, 636 new AudioReceiveStream(
637 config_.audio_state, event_log_); 637 &audio_transport_receive_, transport_send_->packet_router(), config,
638 config_.audio_state, event_log_);
638 { 639 {
639 WriteLockScoped write_lock(*receive_crit_); 640 WriteLockScoped write_lock(*receive_crit_);
640 audio_rtp_demuxer_.AddSink(config.rtp.remote_ssrc, receive_stream);
641 receive_rtp_config_[config.rtp.remote_ssrc] = 641 receive_rtp_config_[config.rtp.remote_ssrc] =
642 ReceiveRtpConfig(config.rtp.extensions, UseSendSideBwe(config)); 642 ReceiveRtpConfig(config.rtp.extensions, UseSendSideBwe(config));
643 audio_receive_streams_.insert(receive_stream); 643 audio_receive_streams_.insert(receive_stream);
644 644
645 ConfigureSync(config.sync_group); 645 ConfigureSync(config.sync_group);
646 } 646 }
647 { 647 {
648 ReadLockScoped read_lock(*send_crit_); 648 ReadLockScoped read_lock(*send_crit_);
649 auto it = audio_send_ssrcs_.find(config.rtp.local_ssrc); 649 auto it = audio_send_ssrcs_.find(config.rtp.local_ssrc);
650 if (it != audio_send_ssrcs_.end()) { 650 if (it != audio_send_ssrcs_.end()) {
(...skipping 11 matching lines...) Expand all
662 RTC_DCHECK_RUN_ON(&configuration_thread_checker_); 662 RTC_DCHECK_RUN_ON(&configuration_thread_checker_);
663 RTC_DCHECK(receive_stream != nullptr); 663 RTC_DCHECK(receive_stream != nullptr);
664 webrtc::internal::AudioReceiveStream* audio_receive_stream = 664 webrtc::internal::AudioReceiveStream* audio_receive_stream =
665 static_cast<webrtc::internal::AudioReceiveStream*>(receive_stream); 665 static_cast<webrtc::internal::AudioReceiveStream*>(receive_stream);
666 { 666 {
667 WriteLockScoped write_lock(*receive_crit_); 667 WriteLockScoped write_lock(*receive_crit_);
668 const AudioReceiveStream::Config& config = audio_receive_stream->config(); 668 const AudioReceiveStream::Config& config = audio_receive_stream->config();
669 uint32_t ssrc = config.rtp.remote_ssrc; 669 uint32_t ssrc = config.rtp.remote_ssrc;
670 receive_side_cc_.GetRemoteBitrateEstimator(UseSendSideBwe(config)) 670 receive_side_cc_.GetRemoteBitrateEstimator(UseSendSideBwe(config))
671 ->RemoveStream(ssrc); 671 ->RemoveStream(ssrc);
672 size_t num_deleted = audio_rtp_demuxer_.RemoveSink(audio_receive_stream);
673 RTC_DCHECK(num_deleted == 1);
674 audio_receive_streams_.erase(audio_receive_stream); 672 audio_receive_streams_.erase(audio_receive_stream);
675 const std::string& sync_group = audio_receive_stream->config().sync_group; 673 const std::string& sync_group = audio_receive_stream->config().sync_group;
676 const auto it = sync_stream_mapping_.find(sync_group); 674 const auto it = sync_stream_mapping_.find(sync_group);
677 if (it != sync_stream_mapping_.end() && 675 if (it != sync_stream_mapping_.end() &&
678 it->second == audio_receive_stream) { 676 it->second == audio_receive_stream) {
679 sync_stream_mapping_.erase(it); 677 sync_stream_mapping_.erase(it);
680 ConfigureSync(sync_group); 678 ConfigureSync(sync_group);
681 } 679 }
682 receive_rtp_config_.erase(ssrc); 680 receive_rtp_config_.erase(ssrc);
683 } 681 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 UpdateAggregateNetworkState(); 754 UpdateAggregateNetworkState();
757 delete send_stream_impl; 755 delete send_stream_impl;
758 } 756 }
759 757
760 webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream( 758 webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream(
761 webrtc::VideoReceiveStream::Config configuration) { 759 webrtc::VideoReceiveStream::Config configuration) {
762 TRACE_EVENT0("webrtc", "Call::CreateVideoReceiveStream"); 760 TRACE_EVENT0("webrtc", "Call::CreateVideoReceiveStream");
763 RTC_DCHECK_RUN_ON(&configuration_thread_checker_); 761 RTC_DCHECK_RUN_ON(&configuration_thread_checker_);
764 762
765 VideoReceiveStream* receive_stream = 763 VideoReceiveStream* receive_stream =
766 new VideoReceiveStream(num_cpu_cores_, transport_send_->packet_router(), 764 new VideoReceiveStream(
767 std::move(configuration), 765 &video_transport_receive_, num_cpu_cores_,
768 module_process_thread_.get(), call_stats_.get()); 766 transport_send_->packet_router(), std::move(configuration),
767 module_process_thread_.get(), call_stats_.get());
769 768
770 const webrtc::VideoReceiveStream::Config& config = receive_stream->config(); 769 const webrtc::VideoReceiveStream::Config& config = receive_stream->config();
771 ReceiveRtpConfig receive_config(config.rtp.extensions, 770 ReceiveRtpConfig receive_config(config.rtp.extensions,
772 UseSendSideBwe(config)); 771 UseSendSideBwe(config));
773 { 772 {
774 WriteLockScoped write_lock(*receive_crit_); 773 WriteLockScoped write_lock(*receive_crit_);
775 video_rtp_demuxer_.AddSink(config.rtp.remote_ssrc, receive_stream);
776 if (config.rtp.rtx_ssrc) { 774 if (config.rtp.rtx_ssrc) {
777 video_rtp_demuxer_.AddSink(config.rtp.rtx_ssrc, receive_stream);
778 // We record identical config for the rtx stream as for the main 775 // We record identical config for the rtx stream as for the main
779 // stream. Since the transport_send_cc negotiation is per payload 776 // stream. Since the transport_send_cc negotiation is per payload
780 // type, we may get an incorrect value for the rtx stream, but 777 // type, we may get an incorrect value for the rtx stream, but
781 // that is unlikely to matter in practice. 778 // that is unlikely to matter in practice.
782 receive_rtp_config_[config.rtp.rtx_ssrc] = receive_config; 779 receive_rtp_config_[config.rtp.rtx_ssrc] = receive_config;
783 } 780 }
784 receive_rtp_config_[config.rtp.remote_ssrc] = receive_config; 781 receive_rtp_config_[config.rtp.remote_ssrc] = receive_config;
785 video_receive_streams_.insert(receive_stream); 782 video_receive_streams_.insert(receive_stream);
786 ConfigureSync(config.sync_group); 783 ConfigureSync(config.sync_group);
787 } 784 }
788 receive_stream->SignalNetworkState(video_network_state_); 785 receive_stream->SignalNetworkState(video_network_state_);
789 UpdateAggregateNetworkState(); 786 UpdateAggregateNetworkState();
790 event_log_->LogVideoReceiveStreamConfig(CreateRtcLogStreamConfig(config)); 787 event_log_->LogVideoReceiveStreamConfig(CreateRtcLogStreamConfig(config));
791 return receive_stream; 788 return receive_stream;
792 } 789 }
793 790
794 void Call::DestroyVideoReceiveStream( 791 void Call::DestroyVideoReceiveStream(
795 webrtc::VideoReceiveStream* receive_stream) { 792 webrtc::VideoReceiveStream* receive_stream) {
796 TRACE_EVENT0("webrtc", "Call::DestroyVideoReceiveStream"); 793 TRACE_EVENT0("webrtc", "Call::DestroyVideoReceiveStream");
797 RTC_DCHECK_RUN_ON(&configuration_thread_checker_); 794 RTC_DCHECK_RUN_ON(&configuration_thread_checker_);
798 RTC_DCHECK(receive_stream != nullptr); 795 RTC_DCHECK(receive_stream != nullptr);
799 VideoReceiveStream* receive_stream_impl = 796 VideoReceiveStream* receive_stream_impl =
800 static_cast<VideoReceiveStream*>(receive_stream); 797 static_cast<VideoReceiveStream*>(receive_stream);
801 const VideoReceiveStream::Config& config = receive_stream_impl->config(); 798 const VideoReceiveStream::Config& config = receive_stream_impl->config();
802 { 799 {
803 WriteLockScoped write_lock(*receive_crit_); 800 WriteLockScoped write_lock(*receive_crit_);
804 // Remove all ssrcs pointing to a receive stream. As RTX retransmits on a 801 // Remove all ssrcs pointing to a receive stream. As RTX retransmits on a
805 // separate SSRC there can be either one or two. 802 // separate SSRC there can be either one or two.
806 size_t num_deleted = video_rtp_demuxer_.RemoveSink(receive_stream_impl);
807 RTC_DCHECK_GE(num_deleted, 1);
808 receive_rtp_config_.erase(config.rtp.remote_ssrc); 803 receive_rtp_config_.erase(config.rtp.remote_ssrc);
809 if (config.rtp.rtx_ssrc) { 804 if (config.rtp.rtx_ssrc) {
810 receive_rtp_config_.erase(config.rtp.rtx_ssrc); 805 receive_rtp_config_.erase(config.rtp.rtx_ssrc);
811 } 806 }
812 video_receive_streams_.erase(receive_stream_impl); 807 video_receive_streams_.erase(receive_stream_impl);
813 ConfigureSync(config.sync_group); 808 ConfigureSync(config.sync_group);
814 } 809 }
815 810
816 receive_side_cc_.GetRemoteBitrateEstimator(UseSendSideBwe(config)) 811 receive_side_cc_.GetRemoteBitrateEstimator(UseSendSideBwe(config))
817 ->RemoveStream(config.rtp.remote_ssrc); 812 ->RemoveStream(config.rtp.remote_ssrc);
818 813
819 UpdateAggregateNetworkState(); 814 UpdateAggregateNetworkState();
820 delete receive_stream_impl; 815 delete receive_stream_impl;
821 } 816 }
822 817
823 FlexfecReceiveStream* Call::CreateFlexfecReceiveStream( 818 FlexfecReceiveStream* Call::CreateFlexfecReceiveStream(
824 const FlexfecReceiveStream::Config& config) { 819 const FlexfecReceiveStream::Config& config) {
825 TRACE_EVENT0("webrtc", "Call::CreateFlexfecReceiveStream"); 820 TRACE_EVENT0("webrtc", "Call::CreateFlexfecReceiveStream");
826 RTC_DCHECK_RUN_ON(&configuration_thread_checker_); 821 RTC_DCHECK_RUN_ON(&configuration_thread_checker_);
827 822
828 RecoveredPacketReceiver* recovered_packet_receiver = this; 823 RecoveredPacketReceiver* recovered_packet_receiver = this;
824
829 FlexfecReceiveStreamImpl* receive_stream = new FlexfecReceiveStreamImpl( 825 FlexfecReceiveStreamImpl* receive_stream = new FlexfecReceiveStreamImpl(
830 config, recovered_packet_receiver, call_stats_->rtcp_rtt_stats(), 826 &video_transport_receive_, config, recovered_packet_receiver,
831 module_process_thread_.get()); 827 call_stats_->rtcp_rtt_stats(), module_process_thread_.get());
832
833 { 828 {
834 WriteLockScoped write_lock(*receive_crit_); 829 WriteLockScoped write_lock(*receive_crit_);
835 video_rtp_demuxer_.AddSink(config.remote_ssrc, receive_stream);
836
837 for (auto ssrc : config.protected_media_ssrcs)
838 video_rtp_demuxer_.AddSink(ssrc, receive_stream);
839
840 RTC_DCHECK(receive_rtp_config_.find(config.remote_ssrc) == 830 RTC_DCHECK(receive_rtp_config_.find(config.remote_ssrc) ==
841 receive_rtp_config_.end()); 831 receive_rtp_config_.end());
842 receive_rtp_config_[config.remote_ssrc] = 832 receive_rtp_config_[config.remote_ssrc] =
843 ReceiveRtpConfig(config.rtp_header_extensions, UseSendSideBwe(config)); 833 ReceiveRtpConfig(config.rtp_header_extensions, UseSendSideBwe(config));
844 } 834 }
845 835
846 // TODO(brandtr): Store config in RtcEventLog here. 836 // TODO(brandtr): Store config in RtcEventLog here.
847 837
848 return receive_stream; 838 return receive_stream;
849 } 839 }
(...skipping 10 matching lines...) Expand all
860 { 850 {
861 WriteLockScoped write_lock(*receive_crit_); 851 WriteLockScoped write_lock(*receive_crit_);
862 852
863 const FlexfecReceiveStream::Config& config = 853 const FlexfecReceiveStream::Config& config =
864 receive_stream_impl->GetConfig(); 854 receive_stream_impl->GetConfig();
865 uint32_t ssrc = config.remote_ssrc; 855 uint32_t ssrc = config.remote_ssrc;
866 receive_rtp_config_.erase(ssrc); 856 receive_rtp_config_.erase(ssrc);
867 857
868 // Remove all SSRCs pointing to the FlexfecReceiveStreamImpl to be 858 // Remove all SSRCs pointing to the FlexfecReceiveStreamImpl to be
869 // destroyed. 859 // destroyed.
870 video_rtp_demuxer_.RemoveSink(receive_stream_impl);
871 receive_side_cc_.GetRemoteBitrateEstimator(UseSendSideBwe(config)) 860 receive_side_cc_.GetRemoteBitrateEstimator(UseSendSideBwe(config))
872 ->RemoveStream(ssrc); 861 ->RemoveStream(ssrc);
873 } 862 }
874 863
875 delete receive_stream_impl; 864 delete receive_stream_impl;
876 } 865 }
877 866
878 Call::Stats Call::GetStats() const { 867 Call::Stats Call::GetStats() const {
879 // TODO(solenberg): Some test cases in EndToEndTest use this from a different 868 // TODO(solenberg): Some test cases in EndToEndTest use this from a different
880 // thread. Re-enable once that is fixed. 869 // thread. Re-enable once that is fixed.
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 // on parsed_packet to the receive streams. 1221 // on parsed_packet to the receive streams.
1233 rtc::Optional<RtpPacketReceived> parsed_packet = 1222 rtc::Optional<RtpPacketReceived> parsed_packet =
1234 ParseRtpPacket(packet, length, &packet_time); 1223 ParseRtpPacket(packet, length, &packet_time);
1235 1224
1236 if (!parsed_packet) 1225 if (!parsed_packet)
1237 return DELIVERY_PACKET_ERROR; 1226 return DELIVERY_PACKET_ERROR;
1238 1227
1239 NotifyBweOfReceivedPacket(*parsed_packet, media_type); 1228 NotifyBweOfReceivedPacket(*parsed_packet, media_type);
1240 1229
1241 if (media_type == MediaType::AUDIO) { 1230 if (media_type == MediaType::AUDIO) {
1242 if (audio_rtp_demuxer_.OnRtpPacket(*parsed_packet)) { 1231 if (audio_transport_receive_.OnRtpPacket(*parsed_packet)) {
1243 received_bytes_per_second_counter_.Add(static_cast<int>(length)); 1232 received_bytes_per_second_counter_.Add(static_cast<int>(length));
1244 received_audio_bytes_per_second_counter_.Add(static_cast<int>(length)); 1233 received_audio_bytes_per_second_counter_.Add(static_cast<int>(length));
1245 event_log_->LogRtpHeader(kIncomingPacket, packet, length); 1234 event_log_->LogRtpHeader(kIncomingPacket, packet, length);
1246 return DELIVERY_OK; 1235 return DELIVERY_OK;
1247 } 1236 }
1248 } else if (media_type == MediaType::VIDEO) { 1237 } else if (media_type == MediaType::VIDEO) {
1249 if (video_rtp_demuxer_.OnRtpPacket(*parsed_packet)) { 1238 if (video_transport_receive_.OnRtpPacket(*parsed_packet)) {
1250 received_bytes_per_second_counter_.Add(static_cast<int>(length)); 1239 received_bytes_per_second_counter_.Add(static_cast<int>(length));
1251 received_video_bytes_per_second_counter_.Add(static_cast<int>(length)); 1240 received_video_bytes_per_second_counter_.Add(static_cast<int>(length));
1252 event_log_->LogRtpHeader(kIncomingPacket, packet, length); 1241 event_log_->LogRtpHeader(kIncomingPacket, packet, length);
1253 return DELIVERY_OK; 1242 return DELIVERY_OK;
1254 } 1243 }
1255 } 1244 }
1256 return DELIVERY_UNKNOWN_SSRC; 1245 return DELIVERY_UNKNOWN_SSRC;
1257 } 1246 }
1258 1247
1259 PacketReceiver::DeliveryStatus Call::DeliverPacket( 1248 PacketReceiver::DeliveryStatus Call::DeliverPacket(
(...skipping 15 matching lines...) Expand all
1275 // audio packets with FlexFEC. 1264 // audio packets with FlexFEC.
1276 void Call::OnRecoveredPacket(const uint8_t* packet, size_t length) { 1265 void Call::OnRecoveredPacket(const uint8_t* packet, size_t length) {
1277 ReadLockScoped read_lock(*receive_crit_); 1266 ReadLockScoped read_lock(*receive_crit_);
1278 rtc::Optional<RtpPacketReceived> parsed_packet = 1267 rtc::Optional<RtpPacketReceived> parsed_packet =
1279 ParseRtpPacket(packet, length, nullptr); 1268 ParseRtpPacket(packet, length, nullptr);
1280 if (!parsed_packet) 1269 if (!parsed_packet)
1281 return; 1270 return;
1282 1271
1283 parsed_packet->set_recovered(true); 1272 parsed_packet->set_recovered(true);
1284 1273
1285 video_rtp_demuxer_.OnRtpPacket(*parsed_packet); 1274 video_transport_receive_.OnRtpPacket(*parsed_packet);
1286 } 1275 }
1287 1276
1288 void Call::NotifyBweOfReceivedPacket(const RtpPacketReceived& packet, 1277 void Call::NotifyBweOfReceivedPacket(const RtpPacketReceived& packet,
1289 MediaType media_type) { 1278 MediaType media_type) {
1290 auto it = receive_rtp_config_.find(packet.Ssrc()); 1279 auto it = receive_rtp_config_.find(packet.Ssrc());
1291 bool use_send_side_bwe = 1280 bool use_send_side_bwe =
1292 (it != receive_rtp_config_.end()) && it->second.use_send_side_bwe; 1281 (it != receive_rtp_config_.end()) && it->second.use_send_side_bwe;
1293 1282
1294 RTPHeader header; 1283 RTPHeader header;
1295 packet.GetHeader(&header); 1284 packet.GetHeader(&header);
(...skipping 13 matching lines...) Expand all
1309 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { 1298 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) {
1310 receive_side_cc_.OnReceivedPacket( 1299 receive_side_cc_.OnReceivedPacket(
1311 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), 1300 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(),
1312 header); 1301 header);
1313 } 1302 }
1314 } 1303 }
1315 1304
1316 } // namespace internal 1305 } // namespace internal
1317 1306
1318 } // namespace webrtc 1307 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698