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

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

Issue 2682253002: Remove PC factory options param from LocalAudioSource::Create. (Closed)
Patch Set: Rebase onto master Created 3 years, 10 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
« no previous file with comments | « no previous file | webrtc/pc/localaudiosource.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_PC_LOCALAUDIOSOURCE_H_ 11 #ifndef WEBRTC_PC_LOCALAUDIOSOURCE_H_
12 #define WEBRTC_PC_LOCALAUDIOSOURCE_H_ 12 #define WEBRTC_PC_LOCALAUDIOSOURCE_H_
13 13
14 #include "webrtc/api/mediastreaminterface.h" 14 #include "webrtc/api/mediastreaminterface.h"
15 #include "webrtc/api/notifier.h" 15 #include "webrtc/api/notifier.h"
16 #include "webrtc/api/peerconnectioninterface.h"
17 #include "webrtc/media/base/mediachannel.h" 16 #include "webrtc/media/base/mediachannel.h"
18 17
19 // LocalAudioSource implements AudioSourceInterface. 18 // LocalAudioSource implements AudioSourceInterface.
20 // This contains settings for switching audio processing on and off. 19 // This contains settings for switching audio processing on and off.
21 20
22 namespace webrtc { 21 namespace webrtc {
23 22
24 class MediaConstraintsInterface; 23 class MediaConstraintsInterface;
25 24
26 class LocalAudioSource : public Notifier<AudioSourceInterface> { 25 class LocalAudioSource : public Notifier<AudioSourceInterface> {
27 public: 26 public:
28 // Creates an instance of LocalAudioSource. 27 // Creates an instance of LocalAudioSource.
29 static rtc::scoped_refptr<LocalAudioSource> Create( 28 static rtc::scoped_refptr<LocalAudioSource> Create(
30 const PeerConnectionFactoryInterface::Options& options,
31 const MediaConstraintsInterface* constraints); 29 const MediaConstraintsInterface* constraints);
32 30
33 static rtc::scoped_refptr<LocalAudioSource> Create( 31 static rtc::scoped_refptr<LocalAudioSource> Create(
34 const PeerConnectionFactoryInterface::Options& options,
35 const cricket::AudioOptions* audio_options); 32 const cricket::AudioOptions* audio_options);
36 33
37 SourceState state() const override { return kLive; } 34 SourceState state() const override { return kLive; }
38 bool remote() const override { return false; } 35 bool remote() const override { return false; }
39 36
40 virtual const cricket::AudioOptions& options() const { return options_; } 37 virtual const cricket::AudioOptions& options() const { return options_; }
41 38
42 void AddSink(AudioTrackSinkInterface* sink) override {} 39 void AddSink(AudioTrackSinkInterface* sink) override {}
43 void RemoveSink(AudioTrackSinkInterface* sink) override {} 40 void RemoveSink(AudioTrackSinkInterface* sink) override {}
44 41
45 protected: 42 protected:
46 LocalAudioSource() {} 43 LocalAudioSource() {}
47 ~LocalAudioSource() override {} 44 ~LocalAudioSource() override {}
48 45
49 private: 46 private:
50 void Initialize(const PeerConnectionFactoryInterface::Options& options, 47 void Initialize(const MediaConstraintsInterface* constraints);
51 const MediaConstraintsInterface* constraints); 48 void Initialize(const cricket::AudioOptions* audio_options);
52 void Initialize(const PeerConnectionFactoryInterface::Options& options,
53 const cricket::AudioOptions* audio_options);
54 49
55 cricket::AudioOptions options_; 50 cricket::AudioOptions options_;
56 }; 51 };
57 52
58 } // namespace webrtc 53 } // namespace webrtc
59 54
60 #endif // WEBRTC_PC_LOCALAUDIOSOURCE_H_ 55 #endif // WEBRTC_PC_LOCALAUDIOSOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/pc/localaudiosource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698