blob: 587ce10809073f5f12cccba81aa8d8bfe28a0c7c [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:361/*
kjellanderb24317b2016-02-10 15:54:432 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
henrike@webrtc.org28e20752013-07-10 00:45:363 *
kjellanderb24317b2016-02-10 15:54:434 * 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.
henrike@webrtc.org28e20752013-07-10 00:45:369 */
10
Steve Anton10542f22019-01-11 17:11:0011#ifndef PC_LOCAL_AUDIO_SOURCE_H_
12#define PC_LOCAL_AUDIO_SOURCE_H_
henrike@webrtc.org28e20752013-07-10 00:45:3613
Yves Gerey3e707812018-11-28 15:47:4914#include "api/audio_options.h"
Steve Anton10542f22019-01-11 17:11:0015#include "api/media_stream_interface.h"
Mirko Bonadei92ea95e2017-09-15 04:47:3116#include "api/notifier.h"
Mirko Bonadeid9708072019-01-25 19:26:4817#include "api/scoped_refptr.h"
henrike@webrtc.org28e20752013-07-10 00:45:3618
19// LocalAudioSource implements AudioSourceInterface.
20// This contains settings for switching audio processing on and off.
21
22namespace webrtc {
23
henrike@webrtc.org28e20752013-07-10 00:45:3624class LocalAudioSource : public Notifier<AudioSourceInterface> {
25 public:
26 // Creates an instance of LocalAudioSource.
buildbot@webrtc.orgd4e598d2014-07-29 17:36:5227 static rtc::scoped_refptr<LocalAudioSource> Create(
htaa2a49d92016-03-04 10:51:3928 const cricket::AudioOptions* audio_options);
29
30 SourceState state() const override { return kLive; }
tommi6eca7e32015-12-15 12:27:1131 bool remote() const override { return false; }
32
Piotr (Peter) Slatala95ca6e12018-11-13 15:57:0733 const cricket::AudioOptions options() const override { return options_; }
henrike@webrtc.org28e20752013-07-10 00:45:3634
tommi6eca7e32015-12-15 12:27:1135 void AddSink(AudioTrackSinkInterface* sink) override {}
36 void RemoveSink(AudioTrackSinkInterface* sink) override {}
henrike@webrtc.org28e20752013-07-10 00:45:3637
tommi6eca7e32015-12-15 12:27:1138 protected:
htaa2a49d92016-03-04 10:51:3939 LocalAudioSource() {}
tommi6eca7e32015-12-15 12:27:1140 ~LocalAudioSource() override {}
henrike@webrtc.org28e20752013-07-10 00:45:3641
42 private:
deadbeef757146b2017-02-11 05:26:4843 void Initialize(const cricket::AudioOptions* audio_options);
henrike@webrtc.org28e20752013-07-10 00:45:3644
45 cricket::AudioOptions options_;
henrike@webrtc.org28e20752013-07-10 00:45:3646};
47
48} // namespace webrtc
49
Steve Anton10542f22019-01-11 17:11:0050#endif // PC_LOCAL_AUDIO_SOURCE_H_