Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: webrtc/api/localaudiosource.h

Issue 1610243002: Move talk/app/webrtc to webrtc/api (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Updated location for peerconnection_unittests.isolate Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 "talk/media/base/mediachannel.h"
15 #include "webrtc/api/mediastreaminterface.h"
16 #include "webrtc/api/notifier.h"
17 #include "webrtc/api/peerconnectioninterface.h"
18 #include "webrtc/base/scoped_ptr.h"
19
20 // LocalAudioSource implements AudioSourceInterface.
21 // This contains settings for switching audio processing on and off.
22
23 namespace webrtc {
24
25 class MediaConstraintsInterface;
26
27 class LocalAudioSource : public Notifier<AudioSourceInterface> {
28 public:
29 // Creates an instance of LocalAudioSource.
30 static rtc::scoped_refptr<LocalAudioSource> Create(
31 const PeerConnectionFactoryInterface::Options& options,
32 const MediaConstraintsInterface* constraints);
33
34 SourceState state() const override { return source_state_; }
35 bool remote() const override { return false; }
36
37 virtual const cricket::AudioOptions& options() const { return options_; }
38
39 void AddSink(AudioTrackSinkInterface* sink) override {}
40 void RemoveSink(AudioTrackSinkInterface* sink) override {}
41
42 protected:
43 LocalAudioSource() : source_state_(kInitializing) {}
44 ~LocalAudioSource() override {}
45
46 private:
47 void Initialize(const PeerConnectionFactoryInterface::Options& options,
48 const MediaConstraintsInterface* constraints);
49
50 cricket::AudioOptions options_;
51 SourceState source_state_;
52 };
53
54 } // namespace webrtc
55
56 #endif // WEBRTC_API_LOCALAUDIOSOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698