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