| Index: webrtc/audio/audio_receive_stream.cc
|
| diff --git a/webrtc/audio/audio_receive_stream.cc b/webrtc/audio/audio_receive_stream.cc
|
| index f46337afd139e8e1175693e90820058ba6d90c00..4f5580669534d533c1cf5d886653e27ecb3682cc 100644
|
| --- a/webrtc/audio/audio_receive_stream.cc
|
| +++ b/webrtc/audio/audio_receive_stream.cc
|
| @@ -225,13 +225,50 @@ void AudioReceiveStream::SetGain(float gain) {
|
| channel_proxy_->SetChannelOutputVolumeScaling(gain);
|
| }
|
|
|
| -const webrtc::AudioReceiveStream::Config& AudioReceiveStream::config() const {
|
| +AudioMixer::Source::AudioFrameInfo AudioReceiveStream::GetAudioFrameWithInfo(
|
| + int sample_rate_hz,
|
| + AudioFrame* audio_frame) {
|
| + return channel_proxy_->GetAudioFrameWithInfo(sample_rate_hz, audio_frame);
|
| +}
|
| +
|
| +int AudioReceiveStream::Ssrc() const {
|
| + return config_.rtp.remote_ssrc;
|
| +}
|
| +
|
| +int AudioReceiveStream::PreferredSampleRate() const {
|
| + return channel_proxy_->NeededFrequency();
|
| +}
|
| +
|
| +void AudioReceiveStream::GetRtpRtcp(RtpRtcp** rtp_rtcp,
|
| + RtpReceiver** rtp_receiver) const {
|
| RTC_DCHECK_RUN_ON(&thread_checker_);
|
| - return config_;
|
| + channel_proxy_->GetRtpRtcp(rtp_rtcp, rtp_receiver);
|
| +}
|
| +
|
| +void AudioReceiveStream::GetDelayEstimate(int* jitter_buffer_delay_ms,
|
| + int* playout_buffer_delay_ms) const {
|
| + // Called on Call's module_process_thread_.
|
| + channel_proxy_->GetDelayEstimate(jitter_buffer_delay_ms,
|
| + playout_buffer_delay_ms);
|
| +}
|
| +
|
| +uint32_t AudioReceiveStream::GetPlayoutTimestamp() const {
|
| + // Called on video capture thread.
|
| + return channel_proxy_->GetPlayoutTimestamp();
|
| +}
|
| +
|
| +void AudioReceiveStream::SetMinimumPlayoutDelay(int delay_ms) {
|
| + // Called on Call's module_process_thread_.
|
| + return channel_proxy_->SetMinimumPlayoutDelay(delay_ms);
|
| +}
|
| +
|
| +int AudioReceiveStream::id() const {
|
| + RTC_DCHECK_RUN_ON(&thread_checker_);
|
| + return config_.rtp.remote_ssrc;
|
| }
|
|
|
| void AudioReceiveStream::AssociateSendStream(AudioSendStream* send_stream) {
|
| - RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| + RTC_DCHECK_RUN_ON(&thread_checker_);
|
| if (send_stream) {
|
| VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine());
|
| std::unique_ptr<voe::ChannelProxy> send_channel_proxy =
|
| @@ -282,18 +319,15 @@ bool AudioReceiveStream::DeliverRtp(const uint8_t* packet,
|
| return channel_proxy_->ReceivedRTPPacket(packet, length, packet_time);
|
| }
|
|
|
| -AudioMixer::Source::AudioFrameInfo AudioReceiveStream::GetAudioFrameWithInfo(
|
| - int sample_rate_hz,
|
| - AudioFrame* audio_frame) {
|
| - return channel_proxy_->GetAudioFrameWithInfo(sample_rate_hz, audio_frame);
|
| -}
|
| -
|
| -int AudioReceiveStream::PreferredSampleRate() const {
|
| - return channel_proxy_->NeededFrequency();
|
| +const webrtc::AudioReceiveStream::Config& AudioReceiveStream::config() const {
|
| + RTC_DCHECK_RUN_ON(&thread_checker_);
|
| + return config_;
|
| }
|
|
|
| -int AudioReceiveStream::Ssrc() const {
|
| - return config_.rtp.remote_ssrc;
|
| +VoiceEngine* AudioReceiveStream::voice_engine() const {
|
| + auto* voice_engine = audio_state()->voice_engine();
|
| + RTC_DCHECK(voice_engine);
|
| + return voice_engine;
|
| }
|
|
|
| internal::AudioState* AudioReceiveStream::audio_state() const {
|
| @@ -302,12 +336,6 @@ internal::AudioState* AudioReceiveStream::audio_state() const {
|
| return audio_state;
|
| }
|
|
|
| -VoiceEngine* AudioReceiveStream::voice_engine() const {
|
| - auto* voice_engine = audio_state()->voice_engine();
|
| - RTC_DCHECK(voice_engine);
|
| - return voice_engine;
|
| -}
|
| -
|
| int AudioReceiveStream::SetVoiceEnginePlayout(bool playout) {
|
| ScopedVoEInterface<VoEBase> base(voice_engine());
|
| if (playout) {
|
| @@ -316,6 +344,5 @@ int AudioReceiveStream::SetVoiceEnginePlayout(bool playout) {
|
| return base->StopPlayout(config_.voe_channel_id);
|
| }
|
| }
|
| -
|
| } // namespace internal
|
| } // namespace webrtc
|
|
|