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