| 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_SEND_STREAM_H_ | 11 #ifndef WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ |
| 12 #define WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ | 12 #define WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ |
| 13 | 13 |
| 14 #include "webrtc/audio_send_stream.h" | 14 #include "webrtc/audio_send_stream.h" |
| 15 #include "webrtc/audio/scoped_voe_interface.h" | 15 #include "webrtc/audio_state.h" |
| 16 #include "webrtc/base/thread_checker.h" | 16 #include "webrtc/base/thread_checker.h" |
| 17 #include "webrtc/voice_engine/include/voe_base.h" | |
| 18 | 17 |
| 19 namespace webrtc { | 18 namespace webrtc { |
| 20 | |
| 21 class VoiceEngine; | |
| 22 | |
| 23 namespace internal { | 19 namespace internal { |
| 24 | 20 |
| 25 class AudioSendStream final : public webrtc::AudioSendStream { | 21 class AudioSendStream final : public webrtc::AudioSendStream { |
| 26 public: | 22 public: |
| 27 AudioSendStream(const webrtc::AudioSendStream::Config& config, | 23 AudioSendStream(const webrtc::AudioSendStream::Config& config, |
| 28 VoiceEngine* voice_engine); | 24 const rtc::scoped_refptr<webrtc::AudioState>& audio_state); |
| 29 ~AudioSendStream() override; | 25 ~AudioSendStream() override; |
| 30 | 26 |
| 31 // webrtc::SendStream implementation. | 27 // webrtc::SendStream implementation. |
| 32 void Start() override; | 28 void Start() override; |
| 33 void Stop() override; | 29 void Stop() override; |
| 34 void SignalNetworkState(NetworkState state) override; | 30 void SignalNetworkState(NetworkState state) override; |
| 35 bool DeliverRtcp(const uint8_t* packet, size_t length) override; | 31 bool DeliverRtcp(const uint8_t* packet, size_t length) override; |
| 36 | 32 |
| 37 // webrtc::AudioSendStream implementation. | 33 // webrtc::AudioSendStream implementation. |
| 38 webrtc::AudioSendStream::Stats GetStats() const override; | 34 webrtc::AudioSendStream::Stats GetStats() const override; |
| 39 | 35 |
| 40 const webrtc::AudioSendStream::Config& config() const; | 36 const webrtc::AudioSendStream::Config& config() const; |
| 41 | 37 |
| 42 private: | 38 private: |
| 43 rtc::ThreadChecker thread_checker_; | 39 rtc::ThreadChecker thread_checker_; |
| 44 const webrtc::AudioSendStream::Config config_; | 40 const webrtc::AudioSendStream::Config config_; |
| 45 VoiceEngine* voice_engine_; | 41 rtc::scoped_refptr<webrtc::AudioState> audio_state_; |
| 46 // We hold one interface pointer to the VoE to make sure it is kept alive. | |
| 47 ScopedVoEInterface<VoEBase> voe_base_; | |
| 48 | 42 |
| 49 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream); | 43 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream); |
| 50 }; | 44 }; |
| 51 } // namespace internal | 45 } // namespace internal |
| 52 } // namespace webrtc | 46 } // namespace webrtc |
| 53 | 47 |
| 54 #endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ | 48 #endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ |
| OLD | NEW |