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

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

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 | « webrtc/pc/localaudiosource.h ('k') | webrtc/pc/localaudiosource_unittest.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 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2013 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 #include "webrtc/pc/localaudiosource.h" 11 #include "webrtc/pc/localaudiosource.h"
12 12
13 #include <vector> 13 #include <vector>
14 14
15 #include "webrtc/api/mediaconstraintsinterface.h" 15 #include "webrtc/api/mediaconstraintsinterface.h"
16 #include "webrtc/media/base/mediaengine.h" 16 #include "webrtc/media/base/mediaengine.h"
17 17
18 using webrtc::MediaConstraintsInterface; 18 using webrtc::MediaConstraintsInterface;
19 using webrtc::MediaSourceInterface; 19 using webrtc::MediaSourceInterface;
20 20
21 namespace webrtc { 21 namespace webrtc {
22 22
23 rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create( 23 rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create(
24 const PeerConnectionFactoryInterface::Options& options,
25 const MediaConstraintsInterface* constraints) { 24 const MediaConstraintsInterface* constraints) {
26 rtc::scoped_refptr<LocalAudioSource> source( 25 rtc::scoped_refptr<LocalAudioSource> source(
27 new rtc::RefCountedObject<LocalAudioSource>()); 26 new rtc::RefCountedObject<LocalAudioSource>());
28 source->Initialize(options, constraints); 27 source->Initialize(constraints);
29 return source; 28 return source;
30 } 29 }
31 30
32 rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create( 31 rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create(
33 const PeerConnectionFactoryInterface::Options& options,
34 const cricket::AudioOptions* audio_options) { 32 const cricket::AudioOptions* audio_options) {
35 rtc::scoped_refptr<LocalAudioSource> source( 33 rtc::scoped_refptr<LocalAudioSource> source(
36 new rtc::RefCountedObject<LocalAudioSource>()); 34 new rtc::RefCountedObject<LocalAudioSource>());
37 source->Initialize(options, audio_options); 35 source->Initialize(audio_options);
38 return source; 36 return source;
39 } 37 }
40 38
41 void LocalAudioSource::Initialize( 39 void LocalAudioSource::Initialize(
42 const PeerConnectionFactoryInterface::Options& options,
43 const MediaConstraintsInterface* constraints) { 40 const MediaConstraintsInterface* constraints) {
44 CopyConstraintsIntoAudioOptions(constraints, &options_); 41 CopyConstraintsIntoAudioOptions(constraints, &options_);
45 } 42 }
46 43
47 void LocalAudioSource::Initialize( 44 void LocalAudioSource::Initialize(
48 const PeerConnectionFactoryInterface::Options& options,
49 const cricket::AudioOptions* audio_options) { 45 const cricket::AudioOptions* audio_options) {
50 if (!audio_options) 46 if (!audio_options)
51 return; 47 return;
52 48
53 options_ = *audio_options; 49 options_ = *audio_options;
54 } 50 }
55 51
56 } // namespace webrtc 52 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/pc/localaudiosource.h ('k') | webrtc/pc/localaudiosource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698