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