| 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 return send_stream; | 630 return send_stream; |
| 631 } | 631 } |
| 632 | 632 |
| 633 void Call::DestroyAudioSendStream(webrtc::AudioSendStream* send_stream) { | 633 void Call::DestroyAudioSendStream(webrtc::AudioSendStream* send_stream) { |
| 634 TRACE_EVENT0("webrtc", "Call::DestroyAudioSendStream"); | 634 TRACE_EVENT0("webrtc", "Call::DestroyAudioSendStream"); |
| 635 RTC_DCHECK_RUN_ON(&configuration_thread_checker_); | 635 RTC_DCHECK_RUN_ON(&configuration_thread_checker_); |
| 636 RTC_DCHECK(send_stream != nullptr); | 636 RTC_DCHECK(send_stream != nullptr); |
| 637 | 637 |
| 638 send_stream->Stop(); | 638 send_stream->Stop(); |
| 639 | 639 |
| 640 const uint32_t ssrc = send_stream->GetConfig().rtp.ssrc; |
| 640 webrtc::internal::AudioSendStream* audio_send_stream = | 641 webrtc::internal::AudioSendStream* audio_send_stream = |
| 641 static_cast<webrtc::internal::AudioSendStream*>(send_stream); | 642 static_cast<webrtc::internal::AudioSendStream*>(send_stream); |
| 642 const uint32_t ssrc = audio_send_stream->config().rtp.ssrc; | |
| 643 suspended_audio_send_ssrcs_[ssrc] = audio_send_stream->GetRtpState(); | 643 suspended_audio_send_ssrcs_[ssrc] = audio_send_stream->GetRtpState(); |
| 644 { | 644 { |
| 645 WriteLockScoped write_lock(*send_crit_); | 645 WriteLockScoped write_lock(*send_crit_); |
| 646 size_t num_deleted = audio_send_ssrcs_.erase(ssrc); | 646 size_t num_deleted = audio_send_ssrcs_.erase(ssrc); |
| 647 RTC_DCHECK_EQ(1, num_deleted); | 647 RTC_DCHECK_EQ(1, num_deleted); |
| 648 } | 648 } |
| 649 { | 649 { |
| 650 ReadLockScoped read_lock(*receive_crit_); | 650 ReadLockScoped read_lock(*receive_crit_); |
| 651 for (AudioReceiveStream* stream : audio_receive_streams_) { | 651 for (AudioReceiveStream* stream : audio_receive_streams_) { |
| 652 if (stream->config().rtp.local_ssrc == ssrc) { | 652 if (stream->config().rtp.local_ssrc == ssrc) { |
| 653 stream->AssociateSendStream(nullptr); | 653 stream->AssociateSendStream(nullptr); |
| 654 } | 654 } |
| 655 } | 655 } |
| 656 } | 656 } |
| 657 UpdateAggregateNetworkState(); | 657 UpdateAggregateNetworkState(); |
| 658 sent_rtp_audio_timer_ms_.Extend(audio_send_stream->GetActiveLifetime()); | 658 sent_rtp_audio_timer_ms_.Extend(audio_send_stream->GetActiveLifetime()); |
| 659 delete audio_send_stream; | 659 delete send_stream; |
| 660 } | 660 } |
| 661 | 661 |
| 662 webrtc::AudioReceiveStream* Call::CreateAudioReceiveStream( | 662 webrtc::AudioReceiveStream* Call::CreateAudioReceiveStream( |
| 663 const webrtc::AudioReceiveStream::Config& config) { | 663 const webrtc::AudioReceiveStream::Config& config) { |
| 664 TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream"); | 664 TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream"); |
| 665 RTC_DCHECK_RUN_ON(&configuration_thread_checker_); | 665 RTC_DCHECK_RUN_ON(&configuration_thread_checker_); |
| 666 event_log_->LogAudioReceiveStreamConfig(CreateRtcLogStreamConfig(config)); | 666 event_log_->LogAudioReceiveStreamConfig(CreateRtcLogStreamConfig(config)); |
| 667 AudioReceiveStream* receive_stream = new AudioReceiveStream( | 667 AudioReceiveStream* receive_stream = new AudioReceiveStream( |
| 668 &audio_receiver_controller_, transport_send_->packet_router(), config, | 668 &audio_receiver_controller_, transport_send_->packet_router(), config, |
| 669 config_.audio_state, event_log_); | 669 config_.audio_state, event_log_); |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1418 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { | 1418 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { |
| 1419 receive_side_cc_.OnReceivedPacket( | 1419 receive_side_cc_.OnReceivedPacket( |
| 1420 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), | 1420 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), |
| 1421 header); | 1421 header); |
| 1422 } | 1422 } |
| 1423 } | 1423 } |
| 1424 | 1424 |
| 1425 } // namespace internal | 1425 } // namespace internal |
| 1426 | 1426 |
| 1427 } // namespace webrtc | 1427 } // namespace webrtc |
| OLD | NEW |