solenberg | c7a8b08 | 2015-10-16 14:35:07 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ |
| 12 | #define WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ |
| 13 | |
| 14 | #include "webrtc/audio_send_stream.h" |
solenberg | 566ef24 | 2015-11-06 15:34:49 -0800 | [diff] [blame] | 15 | #include "webrtc/audio_state.h" |
solenberg | 85a0496 | 2015-10-27 03:35:21 -0700 | [diff] [blame] | 16 | #include "webrtc/base/thread_checker.h" |
solenberg | c7a8b08 | 2015-10-16 14:35:07 -0700 | [diff] [blame] | 17 | |
| 18 | namespace webrtc { |
solenberg | 3a94154 | 2015-11-16 07:34:50 -0800 | [diff] [blame^] | 19 | |
| 20 | class VoiceEngine; |
| 21 | |
solenberg | c7a8b08 | 2015-10-16 14:35:07 -0700 | [diff] [blame] | 22 | namespace internal { |
| 23 | |
solenberg | 85a0496 | 2015-10-27 03:35:21 -0700 | [diff] [blame] | 24 | class AudioSendStream final : public webrtc::AudioSendStream { |
solenberg | c7a8b08 | 2015-10-16 14:35:07 -0700 | [diff] [blame] | 25 | public: |
solenberg | 85a0496 | 2015-10-27 03:35:21 -0700 | [diff] [blame] | 26 | AudioSendStream(const webrtc::AudioSendStream::Config& config, |
solenberg | 566ef24 | 2015-11-06 15:34:49 -0800 | [diff] [blame] | 27 | const rtc::scoped_refptr<webrtc::AudioState>& audio_state); |
solenberg | c7a8b08 | 2015-10-16 14:35:07 -0700 | [diff] [blame] | 28 | ~AudioSendStream() override; |
| 29 | |
| 30 | // webrtc::SendStream implementation. |
| 31 | void Start() override; |
| 32 | void Stop() override; |
| 33 | void SignalNetworkState(NetworkState state) override; |
| 34 | bool DeliverRtcp(const uint8_t* packet, size_t length) override; |
| 35 | |
| 36 | // webrtc::AudioSendStream implementation. |
| 37 | webrtc::AudioSendStream::Stats GetStats() const override; |
| 38 | |
solenberg | 85a0496 | 2015-10-27 03:35:21 -0700 | [diff] [blame] | 39 | const webrtc::AudioSendStream::Config& config() const; |
solenberg | c7a8b08 | 2015-10-16 14:35:07 -0700 | [diff] [blame] | 40 | |
| 41 | private: |
solenberg | 3a94154 | 2015-11-16 07:34:50 -0800 | [diff] [blame^] | 42 | VoiceEngine* voice_engine() const; |
| 43 | |
solenberg | 85a0496 | 2015-10-27 03:35:21 -0700 | [diff] [blame] | 44 | rtc::ThreadChecker thread_checker_; |
solenberg | c7a8b08 | 2015-10-16 14:35:07 -0700 | [diff] [blame] | 45 | const webrtc::AudioSendStream::Config config_; |
solenberg | 566ef24 | 2015-11-06 15:34:49 -0800 | [diff] [blame] | 46 | rtc::scoped_refptr<webrtc::AudioState> audio_state_; |
solenberg | 85a0496 | 2015-10-27 03:35:21 -0700 | [diff] [blame] | 47 | |
| 48 | RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream); |
solenberg | c7a8b08 | 2015-10-16 14:35:07 -0700 | [diff] [blame] | 49 | }; |
| 50 | } // namespace internal |
| 51 | } // namespace webrtc |
| 52 | |
| 53 | #endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ |