| 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 PC_LOCAL_AUDIO_SOURCE_H_ |
| 12 | #define PC_LOCAL_AUDIO_SOURCE_H_ |
| 13 |
| 14 | #include "api/audio_options.h" |
| 15 | #include "api/media_stream_interface.h" |
| 16 | #include "api/notifier.h" |
| 17 | #include "api/scoped_refptr.h" |
| 18 |
| 19 | // LocalAudioSource implements AudioSourceInterface. |
| 20 | // This contains settings for switching audio processing on and off. |
| 21 |
| 22 | namespace webrtc { |
| 23 |
| 24 | class LocalAudioSource : public Notifier<AudioSourceInterface> { |
| 25 | public: |
| 26 | // Creates an instance of LocalAudioSource. |
| 27 | static rtc::scoped_refptr<LocalAudioSource> Create( |
| 28 | const cricket::AudioOptions* audio_options); |
| 29 |
| 30 | SourceState state() const override { return kLive; } |
| 31 | bool remote() const override { return false; } |
| 32 |
| 33 | const cricket::AudioOptions options() const override { return options_; } |
| 34 |
| 35 | void AddSink(AudioTrackSinkInterface* sink) override {} |
| 36 | void RemoveSink(AudioTrackSinkInterface* sink) override {} |
| 37 |
| 38 | protected: |
| 39 | LocalAudioSource() {} |
| 40 | ~LocalAudioSource() override {} |
| 41 |
| 42 | private: |
| 43 | void Initialize(const cricket::AudioOptions* audio_options); |
| 44 |
| 45 | cricket::AudioOptions options_; |
| 46 | }; |
| 47 |
| 48 | } // namespace webrtc |
| 49 |
| 50 | #endif // PC_LOCAL_AUDIO_SOURCE_H_ |
| 51 |