| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2  *  Copyright (c) 2015 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 | 
| 11 #ifndef WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ | 11 #ifndef WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ | 
| 12 #define WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ | 12 #define WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ | 
| 13 | 13 | 
| 14 #include <memory> | 14 #include <memory> | 
| 15 | 15 | 
| 16 #include "webrtc/api/audio/audio_mixer.h" | 16 #include "webrtc/api/audio/audio_mixer.h" | 
| 17 #include "webrtc/audio/audio_state.h" | 17 #include "webrtc/audio/audio_state.h" | 
| 18 #include "webrtc/base/constructormagic.h" | 18 #include "webrtc/base/constructormagic.h" | 
| 19 #include "webrtc/base/thread_checker.h" | 19 #include "webrtc/base/thread_checker.h" | 
| 20 #include "webrtc/call/audio_receive_stream.h" | 20 #include "webrtc/call/audio_receive_stream.h" | 
| 21 #include "webrtc/call/syncable.h" | 21 #include "webrtc/call/syncable.h" | 
| 22 | 22 | 
| 23 namespace webrtc { | 23 namespace webrtc { | 
| 24 class PacketRouter; | 24 class PacketRouter; | 
| 25 class RemoteBitrateEstimator; |  | 
| 26 class RtcEventLog; | 25 class RtcEventLog; | 
| 27 | 26 | 
| 28 namespace voe { | 27 namespace voe { | 
| 29 class ChannelProxy; | 28 class ChannelProxy; | 
| 30 }  // namespace voe | 29 }  // namespace voe | 
| 31 | 30 | 
| 32 namespace internal { | 31 namespace internal { | 
| 33 class AudioSendStream; | 32 class AudioSendStream; | 
| 34 | 33 | 
| 35 class AudioReceiveStream final : public webrtc::AudioReceiveStream, | 34 class AudioReceiveStream final : public webrtc::AudioReceiveStream, | 
| 36                                  public AudioMixer::Source, | 35                                  public AudioMixer::Source, | 
| 37                                  public Syncable { | 36                                  public Syncable { | 
| 38  public: | 37  public: | 
| 39   AudioReceiveStream(PacketRouter* packet_router, | 38   AudioReceiveStream(PacketRouter* packet_router, | 
| 40                      RemoteBitrateEstimator* remote_bitrate_estimator, |  | 
| 41                      const webrtc::AudioReceiveStream::Config& config, | 39                      const webrtc::AudioReceiveStream::Config& config, | 
| 42                      const rtc::scoped_refptr<webrtc::AudioState>& audio_state, | 40                      const rtc::scoped_refptr<webrtc::AudioState>& audio_state, | 
| 43                      webrtc::RtcEventLog* event_log); | 41                      webrtc::RtcEventLog* event_log); | 
| 44   ~AudioReceiveStream() override; | 42   ~AudioReceiveStream() override; | 
| 45 | 43 | 
| 46   // webrtc::AudioReceiveStream implementation. | 44   // webrtc::AudioReceiveStream implementation. | 
| 47   void Start() override; | 45   void Start() override; | 
| 48   void Stop() override; | 46   void Stop() override; | 
| 49   webrtc::AudioReceiveStream::Stats GetStats() const override; | 47   webrtc::AudioReceiveStream::Stats GetStats() const override; | 
| 50   void SetSink(std::unique_ptr<AudioSinkInterface> sink) override; | 48   void SetSink(std::unique_ptr<AudioSinkInterface> sink) override; | 
| (...skipping 19 matching lines...) Expand all  Loading... | 
| 70                   const PacketTime& packet_time); | 68                   const PacketTime& packet_time); | 
| 71   const webrtc::AudioReceiveStream::Config& config() const; | 69   const webrtc::AudioReceiveStream::Config& config() const; | 
| 72 | 70 | 
| 73  private: | 71  private: | 
| 74   VoiceEngine* voice_engine() const; | 72   VoiceEngine* voice_engine() const; | 
| 75   AudioState* audio_state() const; | 73   AudioState* audio_state() const; | 
| 76   int SetVoiceEnginePlayout(bool playout); | 74   int SetVoiceEnginePlayout(bool playout); | 
| 77 | 75 | 
| 78   rtc::ThreadChecker worker_thread_checker_; | 76   rtc::ThreadChecker worker_thread_checker_; | 
| 79   rtc::ThreadChecker module_process_thread_checker_; | 77   rtc::ThreadChecker module_process_thread_checker_; | 
| 80   RemoteBitrateEstimator* const remote_bitrate_estimator_; |  | 
| 81   const webrtc::AudioReceiveStream::Config config_; | 78   const webrtc::AudioReceiveStream::Config config_; | 
| 82   rtc::scoped_refptr<webrtc::AudioState> audio_state_; | 79   rtc::scoped_refptr<webrtc::AudioState> audio_state_; | 
| 83   std::unique_ptr<voe::ChannelProxy> channel_proxy_; | 80   std::unique_ptr<voe::ChannelProxy> channel_proxy_; | 
| 84 | 81 | 
| 85   bool playing_ ACCESS_ON(worker_thread_checker_) = false; | 82   bool playing_ ACCESS_ON(worker_thread_checker_) = false; | 
| 86 | 83 | 
| 87   RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioReceiveStream); | 84   RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioReceiveStream); | 
| 88 }; | 85 }; | 
| 89 }  // namespace internal | 86 }  // namespace internal | 
| 90 }  // namespace webrtc | 87 }  // namespace webrtc | 
| 91 | 88 | 
| 92 #endif  // WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ | 89 #endif  // WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ | 
| OLD | NEW | 
|---|