OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 3619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3630 WebRtcVoiceChannelRenderer* channel = receive_channels_[ssrc]; | 3630 WebRtcVoiceChannelRenderer* channel = receive_channels_[ssrc]; |
3631 DCHECK(channel != nullptr); | 3631 DCHECK(channel != nullptr); |
3632 DCHECK(receive_streams_.find(ssrc) == receive_streams_.end()); | 3632 DCHECK(receive_streams_.find(ssrc) == receive_streams_.end()); |
3633 // If we are hooked up to a webrtc::Call, create an AudioReceiveStream too. | 3633 // If we are hooked up to a webrtc::Call, create an AudioReceiveStream too. |
3634 if (!call_) { | 3634 if (!call_) { |
3635 return; | 3635 return; |
3636 } | 3636 } |
3637 webrtc::AudioReceiveStream::Config config; | 3637 webrtc::AudioReceiveStream::Config config; |
3638 config.rtp.remote_ssrc = ssrc; | 3638 config.rtp.remote_ssrc = ssrc; |
3639 // Only add RTP extensions if we support combined A/V BWE. | 3639 // Only add RTP extensions if we support combined A/V BWE. |
3640 if (options_.combined_audio_video_bwe.GetWithDefaultIfUnset(false)) { | 3640 config.rtp.extensions = recv_rtp_extensions_; |
3641 config.rtp.extensions = recv_rtp_extensions_; | 3641 config.combined_audio_video_bwe = |
3642 } | 3642 options_.combined_audio_video_bwe.GetWithDefaultIfUnset(false); |
3643 config.voe_channel_id = channel->channel(); | 3643 config.voe_channel_id = channel->channel(); |
3644 config.sync_group = receive_stream_params_[ssrc].sync_label; | 3644 config.sync_group = receive_stream_params_[ssrc].sync_label; |
3645 webrtc::AudioReceiveStream* s = call_->CreateAudioReceiveStream(config); | 3645 webrtc::AudioReceiveStream* s = call_->CreateAudioReceiveStream(config); |
3646 receive_streams_.insert(std::make_pair(ssrc, s)); | 3646 receive_streams_.insert(std::make_pair(ssrc, s)); |
3647 } | 3647 } |
3648 | 3648 |
3649 void WebRtcVoiceMediaChannel::TryRemoveAudioRecvStream(uint32 ssrc) { | 3649 void WebRtcVoiceMediaChannel::TryRemoveAudioRecvStream(uint32 ssrc) { |
3650 DCHECK(thread_checker_.CalledOnValidThread()); | 3650 DCHECK(thread_checker_.CalledOnValidThread()); |
3651 // If we are hooked up to a webrtc::Call, assume there is an | 3651 // If we are hooked up to a webrtc::Call, assume there is an |
3652 // AudioReceiveStream to destroy too. | 3652 // AudioReceiveStream to destroy too. |
(...skipping 14 matching lines...) Expand all Loading... |
3667 | 3667 |
3668 int WebRtcSoundclipStream::Rewind() { | 3668 int WebRtcSoundclipStream::Rewind() { |
3669 mem_.Rewind(); | 3669 mem_.Rewind(); |
3670 // Return -1 to keep VoiceEngine from looping. | 3670 // Return -1 to keep VoiceEngine from looping. |
3671 return (loop_) ? 0 : -1; | 3671 return (loop_) ? 0 : -1; |
3672 } | 3672 } |
3673 | 3673 |
3674 } // namespace cricket | 3674 } // namespace cricket |
3675 | 3675 |
3676 #endif // HAVE_WEBRTC_VOICE | 3676 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |