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

Side by Side Diff: talk/app/webrtc/peerconnectionfactory.cc

Issue 1528843005: Add support for GCM cipher suites from RFC 7714. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased 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
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004--2011 Google Inc. 3 * Copyright 2004--2011 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // TODO: Need to make sure only one VoE is created inside 189 // TODO: Need to make sure only one VoE is created inside
190 // WebRtcMediaEngine. 190 // WebRtcMediaEngine.
191 cricket::MediaEngineInterface* media_engine = 191 cricket::MediaEngineInterface* media_engine =
192 worker_thread_->Invoke<cricket::MediaEngineInterface*>(rtc::Bind( 192 worker_thread_->Invoke<cricket::MediaEngineInterface*>(rtc::Bind(
193 &PeerConnectionFactory::CreateMediaEngine_w, this)); 193 &PeerConnectionFactory::CreateMediaEngine_w, this));
194 194
195 channel_manager_.reset( 195 channel_manager_.reset(
196 new cricket::ChannelManager(media_engine, worker_thread_)); 196 new cricket::ChannelManager(media_engine, worker_thread_));
197 197
198 channel_manager_->SetVideoRtxEnabled(true); 198 channel_manager_->SetVideoRtxEnabled(true);
199 channel_manager_->SetCryptoOptions(options_.crypto_options);
199 if (!channel_manager_->Init()) { 200 if (!channel_manager_->Init()) {
200 return false; 201 return false;
201 } 202 }
202 203
203 dtls_identity_store_ = new RefCountedDtlsIdentityStore( 204 dtls_identity_store_ = new RefCountedDtlsIdentityStore(
204 signaling_thread_, worker_thread_); 205 signaling_thread_, worker_thread_);
205 206
206 return true; 207 return true;
207 } 208 }
208 209
210 void PeerConnectionFactory::SetOptions(const Options& options) {
211 options_ = options;
212 if (channel_manager_) {
213 channel_manager_->SetCryptoOptions(options.crypto_options);
214 }
215 }
216
209 rtc::scoped_refptr<AudioSourceInterface> 217 rtc::scoped_refptr<AudioSourceInterface>
210 PeerConnectionFactory::CreateAudioSource( 218 PeerConnectionFactory::CreateAudioSource(
211 const MediaConstraintsInterface* constraints) { 219 const MediaConstraintsInterface* constraints) {
212 RTC_DCHECK(signaling_thread_->IsCurrent()); 220 RTC_DCHECK(signaling_thread_->IsCurrent());
213 rtc::scoped_refptr<LocalAudioSource> source( 221 rtc::scoped_refptr<LocalAudioSource> source(
214 LocalAudioSource::Create(options_, constraints)); 222 LocalAudioSource::Create(options_, constraints));
215 return source; 223 return source;
216 } 224 }
217 225
218 rtc::scoped_refptr<VideoSourceInterface> 226 rtc::scoped_refptr<VideoSourceInterface>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 330 }
323 331
324 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { 332 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() {
325 ASSERT(worker_thread_ == rtc::Thread::Current()); 333 ASSERT(worker_thread_ == rtc::Thread::Current());
326 return cricket::WebRtcMediaEngineFactory::Create( 334 return cricket::WebRtcMediaEngineFactory::Create(
327 default_adm_.get(), video_encoder_factory_.get(), 335 default_adm_.get(), video_encoder_factory_.get(),
328 video_decoder_factory_.get()); 336 video_decoder_factory_.get());
329 } 337 }
330 338
331 } // namespace webrtc 339 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698