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

Side by Side Diff: webrtc/api/peerconnectionfactory.cc

Issue 1670153003: Introduce struct MediaConfig, with construction-time settings. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed test nit; use reference. Created 4 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/api/peerconnectionfactory.h ('k') | webrtc/api/peerconnectioninterface_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 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 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
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 279 }
280 280
281 rtc::scoped_refptr<AudioTrackInterface> 281 rtc::scoped_refptr<AudioTrackInterface>
282 PeerConnectionFactory::CreateAudioTrack(const std::string& id, 282 PeerConnectionFactory::CreateAudioTrack(const std::string& id,
283 AudioSourceInterface* source) { 283 AudioSourceInterface* source) {
284 RTC_DCHECK(signaling_thread_->IsCurrent()); 284 RTC_DCHECK(signaling_thread_->IsCurrent());
285 rtc::scoped_refptr<AudioTrackInterface> track(AudioTrack::Create(id, source)); 285 rtc::scoped_refptr<AudioTrackInterface> track(AudioTrack::Create(id, source));
286 return AudioTrackProxy::Create(signaling_thread_, track); 286 return AudioTrackProxy::Create(signaling_thread_, track);
287 } 287 }
288 288
289 webrtc::MediaControllerInterface* PeerConnectionFactory::CreateMediaController() 289 webrtc::MediaControllerInterface* PeerConnectionFactory::CreateMediaController(
290 const { 290 const cricket::MediaConfig& config) const {
291 RTC_DCHECK(signaling_thread_->IsCurrent()); 291 RTC_DCHECK(signaling_thread_->IsCurrent());
292 return MediaControllerInterface::Create(worker_thread_, 292 return MediaControllerInterface::Create(config, worker_thread_,
293 channel_manager_.get()); 293 channel_manager_.get());
294 } 294 }
295 295
296 rtc::Thread* PeerConnectionFactory::signaling_thread() { 296 rtc::Thread* PeerConnectionFactory::signaling_thread() {
297 // This method can be called on a different thread when the factory is 297 // This method can be called on a different thread when the factory is
298 // created in CreatePeerConnectionFactory(). 298 // created in CreatePeerConnectionFactory().
299 return signaling_thread_; 299 return signaling_thread_;
300 } 300 }
301 301
302 rtc::Thread* PeerConnectionFactory::worker_thread() { 302 rtc::Thread* PeerConnectionFactory::worker_thread() {
303 RTC_DCHECK(signaling_thread_->IsCurrent()); 303 RTC_DCHECK(signaling_thread_->IsCurrent());
304 return worker_thread_; 304 return worker_thread_;
305 } 305 }
306 306
307 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { 307 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() {
308 ASSERT(worker_thread_ == rtc::Thread::Current()); 308 ASSERT(worker_thread_ == rtc::Thread::Current());
309 return cricket::WebRtcMediaEngineFactory::Create( 309 return cricket::WebRtcMediaEngineFactory::Create(
310 default_adm_.get(), video_encoder_factory_.get(), 310 default_adm_.get(), video_encoder_factory_.get(),
311 video_decoder_factory_.get()); 311 video_decoder_factory_.get());
312 } 312 }
313 313
314 } // namespace webrtc 314 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/peerconnectionfactory.h ('k') | webrtc/api/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698