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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 // TODO(brandtr): Store config in RtcEventLog here. | 878 // TODO(brandtr): Store config in RtcEventLog here. |
879 | 879 |
880 return receive_stream; | 880 return receive_stream; |
881 } | 881 } |
882 | 882 |
883 void Call::DestroyFlexfecReceiveStream(FlexfecReceiveStream* receive_stream) { | 883 void Call::DestroyFlexfecReceiveStream(FlexfecReceiveStream* receive_stream) { |
884 TRACE_EVENT0("webrtc", "Call::DestroyFlexfecReceiveStream"); | 884 TRACE_EVENT0("webrtc", "Call::DestroyFlexfecReceiveStream"); |
885 RTC_DCHECK_RUN_ON(&configuration_thread_checker_); | 885 RTC_DCHECK_RUN_ON(&configuration_thread_checker_); |
886 | 886 |
887 RTC_DCHECK(receive_stream != nullptr); | 887 RTC_DCHECK(receive_stream != nullptr); |
888 // There exist no other derived classes of FlexfecReceiveStream, | |
889 // so this downcast is safe. | |
890 FlexfecReceiveStreamImpl* receive_stream_impl = | |
891 static_cast<FlexfecReceiveStreamImpl*>(receive_stream); | |
892 { | 888 { |
893 WriteLockScoped write_lock(*receive_crit_); | 889 WriteLockScoped write_lock(*receive_crit_); |
894 | 890 |
895 const FlexfecReceiveStream::Config& config = | 891 const FlexfecReceiveStream::Config& config = receive_stream->GetConfig(); |
896 receive_stream_impl->GetConfig(); | |
897 uint32_t ssrc = config.remote_ssrc; | 892 uint32_t ssrc = config.remote_ssrc; |
898 receive_rtp_config_.erase(ssrc); | 893 receive_rtp_config_.erase(ssrc); |
899 | 894 |
900 // Remove all SSRCs pointing to the FlexfecReceiveStreamImpl to be | 895 // Remove all SSRCs pointing to the FlexfecReceiveStreamImpl to be |
901 // destroyed. | 896 // destroyed. |
902 receive_side_cc_.GetRemoteBitrateEstimator(UseSendSideBwe(config)) | 897 receive_side_cc_.GetRemoteBitrateEstimator(UseSendSideBwe(config)) |
903 ->RemoveStream(ssrc); | 898 ->RemoveStream(ssrc); |
904 } | 899 } |
905 | 900 |
906 delete receive_stream_impl; | 901 delete receive_stream; |
907 } | 902 } |
908 | 903 |
909 Call::Stats Call::GetStats() const { | 904 Call::Stats Call::GetStats() const { |
910 // TODO(solenberg): Some test cases in EndToEndTest use this from a different | 905 // TODO(solenberg): Some test cases in EndToEndTest use this from a different |
911 // thread. Re-enable once that is fixed. | 906 // thread. Re-enable once that is fixed. |
912 // RTC_DCHECK_RUN_ON(&configuration_thread_checker_); | 907 // RTC_DCHECK_RUN_ON(&configuration_thread_checker_); |
913 Stats stats; | 908 Stats stats; |
914 // Fetch available send/receive bitrates. | 909 // Fetch available send/receive bitrates. |
915 uint32_t send_bandwidth = 0; | 910 uint32_t send_bandwidth = 0; |
916 transport_send_->send_side_cc()->GetBitrateController()->AvailableBandwidth( | 911 transport_send_->send_side_cc()->GetBitrateController()->AvailableBandwidth( |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1423 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { | 1418 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { |
1424 receive_side_cc_.OnReceivedPacket( | 1419 receive_side_cc_.OnReceivedPacket( |
1425 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), | 1420 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), |
1426 header); | 1421 header); |
1427 } | 1422 } |
1428 } | 1423 } |
1429 | 1424 |
1430 } // namespace internal | 1425 } // namespace internal |
1431 | 1426 |
1432 } // namespace webrtc | 1427 } // namespace webrtc |
OLD | NEW |