• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright 2012 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 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 
state()30   SourceState state() const override { return kLive; }
remote()31   bool remote() const override { return false; }
32 
options()33   const cricket::AudioOptions options() const override { return options_; }
34 
AddSink(AudioTrackSinkInterface * sink)35   void AddSink(AudioTrackSinkInterface* sink) override {}
RemoveSink(AudioTrackSinkInterface * sink)36   void RemoveSink(AudioTrackSinkInterface* sink) override {}
37 
38  protected:
LocalAudioSource()39   LocalAudioSource() {}
~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