blob: a4eb89d169e8177f1d472d5d333f8e3c86a0bfa4 [file] [log] [blame]
solenbergc7a8b082015-10-16 14:35:07 -07001/*
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"
solenberg566ef242015-11-06 15:34:49 -080015#include "webrtc/audio_state.h"
solenberg85a04962015-10-27 03:35:21 -070016#include "webrtc/base/thread_checker.h"
solenbergc7a8b082015-10-16 14:35:07 -070017
18namespace webrtc {
solenberg3a941542015-11-16 07:34:50 -080019
20class VoiceEngine;
21
solenbergc7a8b082015-10-16 14:35:07 -070022namespace internal {
23
solenberg85a04962015-10-27 03:35:21 -070024class AudioSendStream final : public webrtc::AudioSendStream {
solenbergc7a8b082015-10-16 14:35:07 -070025 public:
solenberg85a04962015-10-27 03:35:21 -070026 AudioSendStream(const webrtc::AudioSendStream::Config& config,
solenberg566ef242015-11-06 15:34:49 -080027 const rtc::scoped_refptr<webrtc::AudioState>& audio_state);
solenbergc7a8b082015-10-16 14:35:07 -070028 ~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
solenberg85a04962015-10-27 03:35:21 -070039 const webrtc::AudioSendStream::Config& config() const;
solenbergc7a8b082015-10-16 14:35:07 -070040
41 private:
solenberg3a941542015-11-16 07:34:50 -080042 VoiceEngine* voice_engine() const;
43
solenberg85a04962015-10-27 03:35:21 -070044 rtc::ThreadChecker thread_checker_;
solenbergc7a8b082015-10-16 14:35:07 -070045 const webrtc::AudioSendStream::Config config_;
solenberg566ef242015-11-06 15:34:49 -080046 rtc::scoped_refptr<webrtc::AudioState> audio_state_;
solenberg85a04962015-10-27 03:35:21 -070047
48 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream);
solenbergc7a8b082015-10-16 14:35:07 -070049};
50} // namespace internal
51} // namespace webrtc
52
53#endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_