| OLD | NEW |
| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 #include "webrtc/video/stats_counter.h" | 56 #include "webrtc/video/stats_counter.h" |
| 57 #include "webrtc/video/video_receive_stream.h" | 57 #include "webrtc/video/video_receive_stream.h" |
| 58 #include "webrtc/video/video_send_stream.h" | 58 #include "webrtc/video/video_send_stream.h" |
| 59 | 59 |
| 60 namespace webrtc { | 60 namespace webrtc { |
| 61 | 61 |
| 62 const int Call::Config::kDefaultStartBitrateBps = 300000; | 62 const int Call::Config::kDefaultStartBitrateBps = 300000; |
| 63 | 63 |
| 64 namespace { | 64 namespace { |
| 65 | 65 |
| 66 // TODO(nisse): This really begs for a shared context struct. | 66 bool UseTransportSeqno(const std::vector<RtpExtension>& extensions) { |
| 67 bool UseSendSideBwe(const std::vector<RtpExtension>& extensions, | |
| 68 bool transport_cc) { | |
| 69 if (!transport_cc) | |
| 70 return false; | |
| 71 for (const auto& extension : extensions) { | 67 for (const auto& extension : extensions) { |
| 72 if (extension.uri == RtpExtension::kTransportSequenceNumberUri) | 68 if (extension.uri == RtpExtension::kTransportSequenceNumberUri) |
| 73 return true; | 69 return true; |
| 74 } | 70 } |
| 75 return false; | 71 return false; |
| 76 } | 72 } |
| 77 | 73 |
| 78 bool UseSendSideBwe(const VideoReceiveStream::Config& config) { | 74 // TODO(nisse): This really begs for a shared context struct. |
| 79 return UseSendSideBwe(config.rtp.extensions, config.rtp.transport_cc); | 75 bool UseSendSideBwe(const std::vector<RtpExtension>& extensions, |
| 76 bool transport_cc) { |
| 77 return transport_cc && UseTransportSeqno(extensions); |
| 80 } | 78 } |
| 81 | 79 |
| 82 bool UseSendSideBwe(const AudioReceiveStream::Config& config) { | 80 bool UseSendSideBwe(const AudioReceiveStream::Config& config) { |
| 83 return UseSendSideBwe(config.rtp.extensions, config.rtp.transport_cc); | 81 return UseSendSideBwe(config.rtp.extensions, config.rtp.transport_cc); |
| 84 } | 82 } |
| 85 | 83 |
| 86 bool UseSendSideBwe(const FlexfecReceiveStream::Config& config) { | |
| 87 return UseSendSideBwe(config.rtp_header_extensions, config.transport_cc); | |
| 88 } | |
| 89 | |
| 90 class RtpTransportControllerSend : public RtpTransportControllerSendInterface { | 84 class RtpTransportControllerSend : public RtpTransportControllerSendInterface { |
| 91 public: | 85 public: |
| 92 RtpTransportControllerSend(Clock* clock, webrtc::RtcEventLog* event_log); | 86 RtpTransportControllerSend(Clock* clock, webrtc::RtcEventLog* event_log); |
| 93 | 87 |
| 94 void RegisterNetworkObserver( | 88 void RegisterNetworkObserver( |
| 95 SendSideCongestionController::Observer* observer); | 89 SendSideCongestionController::Observer* observer); |
| 96 | 90 |
| 97 // Implements RtpTransportControllerSendInterface | 91 // Implements RtpTransportControllerSendInterface |
| 98 PacketRouter* packet_router() override { return &packet_router_; } | 92 PacketRouter* packet_router() override { return &packet_router_; } |
| 99 SendSideCongestionController* send_side_cc() override { | 93 SendSideCongestionController* send_side_cc() override { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 public SendSideCongestionController::Observer, | 125 public SendSideCongestionController::Observer, |
| 132 public BitrateAllocator::LimitObserver { | 126 public BitrateAllocator::LimitObserver { |
| 133 public: | 127 public: |
| 134 Call(const Call::Config& config, | 128 Call(const Call::Config& config, |
| 135 std::unique_ptr<RtpTransportControllerSend> transport_send); | 129 std::unique_ptr<RtpTransportControllerSend> transport_send); |
| 136 virtual ~Call(); | 130 virtual ~Call(); |
| 137 | 131 |
| 138 // Implements webrtc::Call. | 132 // Implements webrtc::Call. |
| 139 PacketReceiver* Receiver() override; | 133 PacketReceiver* Receiver() override; |
| 140 | 134 |
| 135 void SetVideoReceiveRtpHeaderExtensions( |
| 136 const std::vector<RtpExtension>& extensions) override; |
| 137 |
| 141 webrtc::AudioSendStream* CreateAudioSendStream( | 138 webrtc::AudioSendStream* CreateAudioSendStream( |
| 142 const webrtc::AudioSendStream::Config& config) override; | 139 const webrtc::AudioSendStream::Config& config) override; |
| 143 void DestroyAudioSendStream(webrtc::AudioSendStream* send_stream) override; | 140 void DestroyAudioSendStream(webrtc::AudioSendStream* send_stream) override; |
| 144 | 141 |
| 145 webrtc::AudioReceiveStream* CreateAudioReceiveStream( | 142 webrtc::AudioReceiveStream* CreateAudioReceiveStream( |
| 146 const webrtc::AudioReceiveStream::Config& config) override; | 143 const webrtc::AudioReceiveStream::Config& config) override; |
| 147 void DestroyAudioReceiveStream( | 144 void DestroyAudioReceiveStream( |
| 148 webrtc::AudioReceiveStream* receive_stream) override; | 145 webrtc::AudioReceiveStream* receive_stream) override; |
| 149 | 146 |
| 150 webrtc::VideoSendStream* CreateVideoSendStream( | 147 webrtc::VideoSendStream* CreateVideoSendStream( |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 // streams. | 245 // streams. |
| 249 std::multimap<uint32_t, FlexfecReceiveStreamImpl*> | 246 std::multimap<uint32_t, FlexfecReceiveStreamImpl*> |
| 250 flexfec_receive_ssrcs_media_ GUARDED_BY(receive_crit_); | 247 flexfec_receive_ssrcs_media_ GUARDED_BY(receive_crit_); |
| 251 std::map<uint32_t, FlexfecReceiveStreamImpl*> | 248 std::map<uint32_t, FlexfecReceiveStreamImpl*> |
| 252 flexfec_receive_ssrcs_protection_ GUARDED_BY(receive_crit_); | 249 flexfec_receive_ssrcs_protection_ GUARDED_BY(receive_crit_); |
| 253 std::set<FlexfecReceiveStreamImpl*> flexfec_receive_streams_ | 250 std::set<FlexfecReceiveStreamImpl*> flexfec_receive_streams_ |
| 254 GUARDED_BY(receive_crit_); | 251 GUARDED_BY(receive_crit_); |
| 255 std::map<std::string, AudioReceiveStream*> sync_stream_mapping_ | 252 std::map<std::string, AudioReceiveStream*> sync_stream_mapping_ |
| 256 GUARDED_BY(receive_crit_); | 253 GUARDED_BY(receive_crit_); |
| 257 | 254 |
| 255 std::vector<RtpExtension> video_rtp_header_extensions_ |
| 256 GUARDED_BY(receive_crit_); |
| 257 |
| 258 // This extra map is used for receive processing which is | 258 // This extra map is used for receive processing which is |
| 259 // independent of media type. | 259 // independent of media type. |
| 260 | 260 |
| 261 // TODO(nisse): In the RTP transport refactoring, we should have a | 261 // TODO(nisse): In the RTP transport refactoring, we should have a |
| 262 // single mapping from ssrc to a more abstract receive stream, with | 262 // single mapping from ssrc to a more abstract receive stream, with |
| 263 // accessor methods for all configuration we need at this level. | 263 // accessor methods for all configuration we need at this level. |
| 264 struct ReceiveRtpConfig { | 264 struct ReceiveRtpConfig { |
| 265 ReceiveRtpConfig() = default; // Needed by std::map | 265 ReceiveRtpConfig() = default; // Needed by std::map |
| 266 ReceiveRtpConfig(const std::vector<RtpExtension>& extensions, | 266 ReceiveRtpConfig(const std::vector<RtpExtension>& extensions, |
| 267 bool use_send_side_bwe) | 267 bool use_send_side_bwe) |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 } | 526 } |
| 527 } | 527 } |
| 528 | 528 |
| 529 PacketReceiver* Call::Receiver() { | 529 PacketReceiver* Call::Receiver() { |
| 530 // TODO(solenberg): Some test cases in EndToEndTest use this from a different | 530 // TODO(solenberg): Some test cases in EndToEndTest use this from a different |
| 531 // thread. Re-enable once that is fixed. | 531 // thread. Re-enable once that is fixed. |
| 532 // RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 532 // RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
| 533 return this; | 533 return this; |
| 534 } | 534 } |
| 535 | 535 |
| 536 void Call::SetVideoReceiveRtpHeaderExtensions( |
| 537 const std::vector<RtpExtension>& extensions) { |
| 538 WriteLockScoped write_lock(*receive_crit_); |
| 539 video_rtp_header_extensions_ = extensions; |
| 540 } |
| 541 |
| 536 webrtc::AudioSendStream* Call::CreateAudioSendStream( | 542 webrtc::AudioSendStream* Call::CreateAudioSendStream( |
| 537 const webrtc::AudioSendStream::Config& config) { | 543 const webrtc::AudioSendStream::Config& config) { |
| 538 TRACE_EVENT0("webrtc", "Call::CreateAudioSendStream"); | 544 TRACE_EVENT0("webrtc", "Call::CreateAudioSendStream"); |
| 539 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 545 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
| 540 event_log_->LogAudioSendStreamConfig(config); | 546 event_log_->LogAudioSendStreamConfig(config); |
| 541 AudioSendStream* send_stream = new AudioSendStream( | 547 AudioSendStream* send_stream = new AudioSendStream( |
| 542 config, config_.audio_state, &worker_queue_, transport_send_.get(), | 548 config, config_.audio_state, &worker_queue_, transport_send_.get(), |
| 543 bitrate_allocator_.get(), event_log_, call_stats_->rtcp_rtt_stats()); | 549 bitrate_allocator_.get(), event_log_, call_stats_->rtcp_rtt_stats()); |
| 544 { | 550 { |
| 545 WriteLockScoped write_lock(*send_crit_); | 551 WriteLockScoped write_lock(*send_crit_); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 webrtc::VideoReceiveStream::Config configuration) { | 723 webrtc::VideoReceiveStream::Config configuration) { |
| 718 TRACE_EVENT0("webrtc", "Call::CreateVideoReceiveStream"); | 724 TRACE_EVENT0("webrtc", "Call::CreateVideoReceiveStream"); |
| 719 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 725 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
| 720 | 726 |
| 721 VideoReceiveStream* receive_stream = | 727 VideoReceiveStream* receive_stream = |
| 722 new VideoReceiveStream(num_cpu_cores_, transport_send_->packet_router(), | 728 new VideoReceiveStream(num_cpu_cores_, transport_send_->packet_router(), |
| 723 std::move(configuration), | 729 std::move(configuration), |
| 724 module_process_thread_.get(), call_stats_.get()); | 730 module_process_thread_.get(), call_stats_.get()); |
| 725 | 731 |
| 726 const webrtc::VideoReceiveStream::Config& config = receive_stream->config(); | 732 const webrtc::VideoReceiveStream::Config& config = receive_stream->config(); |
| 727 ReceiveRtpConfig receive_config(config.rtp.extensions, | |
| 728 UseSendSideBwe(config)); | |
| 729 { | 733 { |
| 730 WriteLockScoped write_lock(*receive_crit_); | 734 WriteLockScoped write_lock(*receive_crit_); |
| 731 RTC_DCHECK(video_receive_ssrcs_.find(config.rtp.remote_ssrc) == | 735 RTC_DCHECK(video_receive_ssrcs_.find(config.rtp.remote_ssrc) == |
| 732 video_receive_ssrcs_.end()); | 736 video_receive_ssrcs_.end()); |
| 737 ReceiveRtpConfig receive_config( |
| 738 video_rtp_header_extensions_, |
| 739 config.rtp.transport_cc && |
| 740 UseTransportSeqno(video_rtp_header_extensions_)); |
| 741 |
| 733 video_receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream; | 742 video_receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream; |
| 734 if (config.rtp.rtx_ssrc) { | 743 if (config.rtp.rtx_ssrc) { |
| 735 video_receive_ssrcs_[config.rtp.rtx_ssrc] = receive_stream; | 744 video_receive_ssrcs_[config.rtp.rtx_ssrc] = receive_stream; |
| 736 // We record identical config for the rtx stream as for the main | 745 // We record identical config for the rtx stream as for the main |
| 737 // stream. Since the transport_send_cc negotiation is per payload | 746 // stream. Since the transport_send_cc negotiation is per payload |
| 738 // type, we may get an incorrect value for the rtx stream, but | 747 // type, we may get an incorrect value for the rtx stream, but |
| 739 // that is unlikely to matter in practice. | 748 // that is unlikely to matter in practice. |
| 740 receive_rtp_config_[config.rtp.rtx_ssrc] = receive_config; | 749 receive_rtp_config_[config.rtp.rtx_ssrc] = receive_config; |
| 741 } | 750 } |
| 742 receive_rtp_config_[config.rtp.remote_ssrc] = receive_config; | 751 receive_rtp_config_[config.rtp.remote_ssrc] = receive_config; |
| 743 video_receive_streams_.insert(receive_stream); | 752 video_receive_streams_.insert(receive_stream); |
| 744 ConfigureSync(config.sync_group); | 753 ConfigureSync(config.sync_group); |
| 745 } | 754 } |
| 746 receive_stream->SignalNetworkState(video_network_state_); | 755 receive_stream->SignalNetworkState(video_network_state_); |
| 747 UpdateAggregateNetworkState(); | 756 UpdateAggregateNetworkState(); |
| 748 event_log_->LogVideoReceiveStreamConfig(config); | 757 event_log_->LogVideoReceiveStreamConfig(config); |
| 749 return receive_stream; | 758 return receive_stream; |
| 750 } | 759 } |
| 751 | 760 |
| 752 void Call::DestroyVideoReceiveStream( | 761 void Call::DestroyVideoReceiveStream( |
| 753 webrtc::VideoReceiveStream* receive_stream) { | 762 webrtc::VideoReceiveStream* receive_stream) { |
| 754 TRACE_EVENT0("webrtc", "Call::DestroyVideoReceiveStream"); | 763 TRACE_EVENT0("webrtc", "Call::DestroyVideoReceiveStream"); |
| 755 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 764 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
| 756 RTC_DCHECK(receive_stream != nullptr); | 765 RTC_DCHECK(receive_stream != nullptr); |
| 757 VideoReceiveStream* receive_stream_impl = nullptr; | 766 VideoReceiveStream* receive_stream_impl = nullptr; |
| 767 bool use_send_side_bwe = false; |
| 758 { | 768 { |
| 759 WriteLockScoped write_lock(*receive_crit_); | 769 WriteLockScoped write_lock(*receive_crit_); |
| 760 // Remove all ssrcs pointing to a receive stream. As RTX retransmits on a | 770 // Remove all ssrcs pointing to a receive stream. As RTX retransmits on a |
| 761 // separate SSRC there can be either one or two. | 771 // separate SSRC there can be either one or two. |
| 762 auto it = video_receive_ssrcs_.begin(); | 772 auto it = video_receive_ssrcs_.begin(); |
| 763 while (it != video_receive_ssrcs_.end()) { | 773 while (it != video_receive_ssrcs_.end()) { |
| 764 if (it->second == static_cast<VideoReceiveStream*>(receive_stream)) { | 774 if (it->second == static_cast<VideoReceiveStream*>(receive_stream)) { |
| 765 if (receive_stream_impl != nullptr) | 775 if (receive_stream_impl != nullptr) { |
| 766 RTC_DCHECK(receive_stream_impl == it->second); | 776 RTC_DCHECK(receive_stream_impl == it->second); |
| 777 use_send_side_bwe = receive_rtp_config_[it->first].use_send_side_bwe; |
| 778 } |
| 767 receive_stream_impl = it->second; | 779 receive_stream_impl = it->second; |
| 768 receive_rtp_config_.erase(it->first); | 780 receive_rtp_config_.erase(it->first); |
| 769 it = video_receive_ssrcs_.erase(it); | 781 it = video_receive_ssrcs_.erase(it); |
| 770 } else { | 782 } else { |
| 771 ++it; | 783 ++it; |
| 772 } | 784 } |
| 773 } | 785 } |
| 786 RTC_CHECK(receive_stream_impl != nullptr); |
| 774 video_receive_streams_.erase(receive_stream_impl); | 787 video_receive_streams_.erase(receive_stream_impl); |
| 775 RTC_CHECK(receive_stream_impl != nullptr); | |
| 776 ConfigureSync(receive_stream_impl->config().sync_group); | 788 ConfigureSync(receive_stream_impl->config().sync_group); |
| 777 } | 789 } |
| 778 const VideoReceiveStream::Config& config = receive_stream_impl->config(); | 790 const VideoReceiveStream::Config& config = receive_stream_impl->config(); |
| 779 | 791 |
| 780 receive_side_cc_.GetRemoteBitrateEstimator(UseSendSideBwe(config)) | 792 receive_side_cc_.GetRemoteBitrateEstimator(use_send_side_bwe) |
| 781 ->RemoveStream(config.rtp.remote_ssrc); | 793 ->RemoveStream(config.rtp.remote_ssrc); |
| 782 | 794 |
| 783 UpdateAggregateNetworkState(); | 795 UpdateAggregateNetworkState(); |
| 784 delete receive_stream_impl; | 796 delete receive_stream_impl; |
| 785 } | 797 } |
| 786 | 798 |
| 787 FlexfecReceiveStream* Call::CreateFlexfecReceiveStream( | 799 FlexfecReceiveStream* Call::CreateFlexfecReceiveStream( |
| 788 const FlexfecReceiveStream::Config& config) { | 800 const FlexfecReceiveStream::Config& config) { |
| 789 TRACE_EVENT0("webrtc", "Call::CreateFlexfecReceiveStream"); | 801 TRACE_EVENT0("webrtc", "Call::CreateFlexfecReceiveStream"); |
| 790 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 802 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 804 for (auto ssrc : config.protected_media_ssrcs) | 816 for (auto ssrc : config.protected_media_ssrcs) |
| 805 flexfec_receive_ssrcs_media_.insert(std::make_pair(ssrc, receive_stream)); | 817 flexfec_receive_ssrcs_media_.insert(std::make_pair(ssrc, receive_stream)); |
| 806 | 818 |
| 807 RTC_DCHECK(flexfec_receive_ssrcs_protection_.find(config.remote_ssrc) == | 819 RTC_DCHECK(flexfec_receive_ssrcs_protection_.find(config.remote_ssrc) == |
| 808 flexfec_receive_ssrcs_protection_.end()); | 820 flexfec_receive_ssrcs_protection_.end()); |
| 809 flexfec_receive_ssrcs_protection_[config.remote_ssrc] = receive_stream; | 821 flexfec_receive_ssrcs_protection_[config.remote_ssrc] = receive_stream; |
| 810 | 822 |
| 811 RTC_DCHECK(receive_rtp_config_.find(config.remote_ssrc) == | 823 RTC_DCHECK(receive_rtp_config_.find(config.remote_ssrc) == |
| 812 receive_rtp_config_.end()); | 824 receive_rtp_config_.end()); |
| 813 receive_rtp_config_[config.remote_ssrc] = | 825 receive_rtp_config_[config.remote_ssrc] = |
| 814 ReceiveRtpConfig(config.rtp_header_extensions, UseSendSideBwe(config)); | 826 ReceiveRtpConfig(video_rtp_header_extensions_, |
| 827 config.transport_cc && |
| 828 UseTransportSeqno(video_rtp_header_extensions_)); |
| 815 } | 829 } |
| 816 | 830 |
| 817 // TODO(brandtr): Store config in RtcEventLog here. | 831 // TODO(brandtr): Store config in RtcEventLog here. |
| 818 | 832 |
| 819 return receive_stream; | 833 return receive_stream; |
| 820 } | 834 } |
| 821 | 835 |
| 822 void Call::DestroyFlexfecReceiveStream(FlexfecReceiveStream* receive_stream) { | 836 void Call::DestroyFlexfecReceiveStream(FlexfecReceiveStream* receive_stream) { |
| 823 TRACE_EVENT0("webrtc", "Call::DestroyFlexfecReceiveStream"); | 837 TRACE_EVENT0("webrtc", "Call::DestroyFlexfecReceiveStream"); |
| 824 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 838 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
| 825 | 839 |
| 826 RTC_DCHECK(receive_stream != nullptr); | 840 RTC_DCHECK(receive_stream != nullptr); |
| 827 // There exist no other derived classes of FlexfecReceiveStream, | 841 // There exist no other derived classes of FlexfecReceiveStream, |
| 828 // so this downcast is safe. | 842 // so this downcast is safe. |
| 829 FlexfecReceiveStreamImpl* receive_stream_impl = | 843 FlexfecReceiveStreamImpl* receive_stream_impl = |
| 830 static_cast<FlexfecReceiveStreamImpl*>(receive_stream); | 844 static_cast<FlexfecReceiveStreamImpl*>(receive_stream); |
| 831 { | 845 { |
| 832 WriteLockScoped write_lock(*receive_crit_); | 846 WriteLockScoped write_lock(*receive_crit_); |
| 833 | 847 |
| 834 const FlexfecReceiveStream::Config& config = | 848 const FlexfecReceiveStream::Config& config = |
| 835 receive_stream_impl->GetConfig(); | 849 receive_stream_impl->GetConfig(); |
| 836 uint32_t ssrc = config.remote_ssrc; | 850 uint32_t ssrc = config.remote_ssrc; |
| 851 receive_side_cc_.GetRemoteBitrateEstimator( |
| 852 receive_rtp_config_[ssrc].use_send_side_bwe) |
| 853 ->RemoveStream(ssrc); |
| 837 receive_rtp_config_.erase(ssrc); | 854 receive_rtp_config_.erase(ssrc); |
| 838 | 855 |
| 839 // Remove all SSRCs pointing to the FlexfecReceiveStreamImpl to be | 856 // Remove all SSRCs pointing to the FlexfecReceiveStreamImpl to be |
| 840 // destroyed. | 857 // destroyed. |
| 841 auto prot_it = flexfec_receive_ssrcs_protection_.begin(); | 858 auto prot_it = flexfec_receive_ssrcs_protection_.begin(); |
| 842 while (prot_it != flexfec_receive_ssrcs_protection_.end()) { | 859 while (prot_it != flexfec_receive_ssrcs_protection_.end()) { |
| 843 if (prot_it->second == receive_stream_impl) | 860 if (prot_it->second == receive_stream_impl) |
| 844 prot_it = flexfec_receive_ssrcs_protection_.erase(prot_it); | 861 prot_it = flexfec_receive_ssrcs_protection_.erase(prot_it); |
| 845 else | 862 else |
| 846 ++prot_it; | 863 ++prot_it; |
| 847 } | 864 } |
| 848 auto media_it = flexfec_receive_ssrcs_media_.begin(); | 865 auto media_it = flexfec_receive_ssrcs_media_.begin(); |
| 849 while (media_it != flexfec_receive_ssrcs_media_.end()) { | 866 while (media_it != flexfec_receive_ssrcs_media_.end()) { |
| 850 if (media_it->second == receive_stream_impl) | 867 if (media_it->second == receive_stream_impl) |
| 851 media_it = flexfec_receive_ssrcs_media_.erase(media_it); | 868 media_it = flexfec_receive_ssrcs_media_.erase(media_it); |
| 852 else | 869 else |
| 853 ++media_it; | 870 ++media_it; |
| 854 } | 871 } |
| 855 | 872 |
| 856 receive_side_cc_.GetRemoteBitrateEstimator(UseSendSideBwe(config)) | |
| 857 ->RemoveStream(ssrc); | |
| 858 | |
| 859 flexfec_receive_streams_.erase(receive_stream_impl); | 873 flexfec_receive_streams_.erase(receive_stream_impl); |
| 860 } | 874 } |
| 861 | 875 |
| 862 delete receive_stream_impl; | 876 delete receive_stream_impl; |
| 863 } | 877 } |
| 864 | 878 |
| 865 Call::Stats Call::GetStats() const { | 879 Call::Stats Call::GetStats() const { |
| 866 // TODO(solenberg): Some test cases in EndToEndTest use this from a different | 880 // TODO(solenberg): Some test cases in EndToEndTest use this from a different |
| 867 // thread. Re-enable once that is fixed. | 881 // thread. Re-enable once that is fixed. |
| 868 // RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 882 // RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1317 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { | 1331 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { |
| 1318 receive_side_cc_.OnReceivedPacket( | 1332 receive_side_cc_.OnReceivedPacket( |
| 1319 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), | 1333 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), |
| 1320 header); | 1334 header); |
| 1321 } | 1335 } |
| 1322 } | 1336 } |
| 1323 | 1337 |
| 1324 } // namespace internal | 1338 } // namespace internal |
| 1325 | 1339 |
| 1326 } // namespace webrtc | 1340 } // namespace webrtc |
| OLD | NEW |