2013-07-10 00:45:36 +00:00
|
|
|
/*
|
2016-02-10 07:54:43 -08:00
|
|
|
* Copyright 2012 The WebRTC project authors. All Rights Reserved.
|
2013-07-10 00:45:36 +00:00
|
|
|
*
|
2016-02-10 07:54:43 -08:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2013-07-10 00:45:36 +00:00
|
|
|
*/
|
|
|
|
|
|
2019-01-11 09:11:00 -08:00
|
|
|
#ifndef PC_LOCAL_AUDIO_SOURCE_H_
|
|
|
|
|
#define PC_LOCAL_AUDIO_SOURCE_H_
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2018-11-28 16:47:49 +01:00
|
|
|
#include "api/audio_options.h"
|
2019-01-11 09:11:00 -08:00
|
|
|
#include "api/media_stream_interface.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "api/notifier.h"
|
2019-01-25 20:26:48 +01:00
|
|
|
#include "api/scoped_refptr.h"
|
2013-07-10 00:45:36 +00:00
|
|
|
|
|
|
|
|
// LocalAudioSource implements AudioSourceInterface.
|
|
|
|
|
// This contains settings for switching audio processing on and off.
|
|
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
class LocalAudioSource : public Notifier<AudioSourceInterface> {
|
|
|
|
|
public:
|
|
|
|
|
// Creates an instance of LocalAudioSource.
|
2016-03-04 02:51:39 -08:00
|
|
|
static rtc::scoped_refptr<LocalAudioSource> Create(
|
|
|
|
|
const cricket::AudioOptions* audio_options);
|
|
|
|
|
|
|
|
|
|
SourceState state() const override { return kLive; }
|
2015-12-15 04:27:11 -08:00
|
|
|
bool remote() const override { return false; }
|
|
|
|
|
|
2018-11-13 07:57:07 -08:00
|
|
|
const cricket::AudioOptions options() const override { return options_; }
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2015-12-15 04:27:11 -08:00
|
|
|
void AddSink(AudioTrackSinkInterface* sink) override {}
|
|
|
|
|
void RemoveSink(AudioTrackSinkInterface* sink) override {}
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2015-12-15 04:27:11 -08:00
|
|
|
protected:
|
2016-03-04 02:51:39 -08:00
|
|
|
LocalAudioSource() {}
|
2015-12-15 04:27:11 -08:00
|
|
|
~LocalAudioSource() override {}
|
2013-07-10 00:45:36 +00:00
|
|
|
|
|
|
|
|
private:
|
2017-02-10 21:26:48 -08:00
|
|
|
void Initialize(const cricket::AudioOptions* audio_options);
|
2013-07-10 00:45:36 +00:00
|
|
|
|
|
|
|
|
cricket::AudioOptions options_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2019-01-11 09:11:00 -08:00
|
|
|
#endif // PC_LOCAL_AUDIO_SOURCE_H_
|