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: talk/app/webrtc/peerconnectionfactory.cc

Issue 1460043002: Don't call the Pass methods of rtc::Buffer, rtc::scoped_ptr, and rtc::ScopedVector (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Restore the Pass methods Created 5 years 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,
11 * this list of conditions and the following disclaimer in the documentation 11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution. 12 * and/or other materials provided with the distribution.
13 * 3. The name of the author may not be used to endorse or promote products 13 * 3. The name of the author may not be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #include "talk/app/webrtc/peerconnectionfactory.h" 28 #include "talk/app/webrtc/peerconnectionfactory.h"
29 29
30 #include <utility>
31
30 #include "talk/app/webrtc/audiotrack.h" 32 #include "talk/app/webrtc/audiotrack.h"
31 #include "talk/app/webrtc/localaudiosource.h" 33 #include "talk/app/webrtc/localaudiosource.h"
32 #include "talk/app/webrtc/mediastream.h" 34 #include "talk/app/webrtc/mediastream.h"
33 #include "talk/app/webrtc/mediastreamproxy.h" 35 #include "talk/app/webrtc/mediastreamproxy.h"
34 #include "talk/app/webrtc/mediastreamtrackproxy.h" 36 #include "talk/app/webrtc/mediastreamtrackproxy.h"
35 #include "talk/app/webrtc/peerconnection.h" 37 #include "talk/app/webrtc/peerconnection.h"
36 #include "talk/app/webrtc/peerconnectionfactoryproxy.h" 38 #include "talk/app/webrtc/peerconnectionfactoryproxy.h"
37 #include "talk/app/webrtc/peerconnectionproxy.h" 39 #include "talk/app/webrtc/peerconnectionproxy.h"
38 #include "talk/app/webrtc/portallocatorfactory.h" 40 #include "talk/app/webrtc/portallocatorfactory.h"
39 #include "talk/app/webrtc/videosource.h" 41 #include "talk/app/webrtc/videosource.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 dtls_identity_store.reset( 269 dtls_identity_store.reset(
268 new DtlsIdentityStoreWrapper(dtls_identity_store_)); 270 new DtlsIdentityStoreWrapper(dtls_identity_store_));
269 } 271 }
270 272
271 PortAllocatorFactoryInterface* chosen_allocator_factory = 273 PortAllocatorFactoryInterface* chosen_allocator_factory =
272 allocator_factory ? allocator_factory : default_allocator_factory_.get(); 274 allocator_factory ? allocator_factory : default_allocator_factory_.get();
273 chosen_allocator_factory->SetNetworkIgnoreMask(options_.network_ignore_mask); 275 chosen_allocator_factory->SetNetworkIgnoreMask(options_.network_ignore_mask);
274 276
275 rtc::scoped_refptr<PeerConnection> pc( 277 rtc::scoped_refptr<PeerConnection> pc(
276 new rtc::RefCountedObject<PeerConnection>(this)); 278 new rtc::RefCountedObject<PeerConnection>(this));
277 if (!pc->Initialize( 279 if (!pc->Initialize(configuration, constraints, chosen_allocator_factory,
278 configuration, 280 std::move(dtls_identity_store), observer)) {
279 constraints,
280 chosen_allocator_factory,
281 dtls_identity_store.Pass(),
282 observer)) {
283 return NULL; 281 return NULL;
284 } 282 }
285 return PeerConnectionProxy::Create(signaling_thread(), pc); 283 return PeerConnectionProxy::Create(signaling_thread(), pc);
286 } 284 }
287 285
288 rtc::scoped_refptr<PeerConnectionInterface> 286 rtc::scoped_refptr<PeerConnectionInterface>
289 PeerConnectionFactory::CreatePeerConnection( 287 PeerConnectionFactory::CreatePeerConnection(
290 const PeerConnectionInterface::RTCConfiguration& configuration, 288 const PeerConnectionInterface::RTCConfiguration& configuration,
291 const MediaConstraintsInterface* constraints, 289 const MediaConstraintsInterface* constraints,
292 rtc::scoped_ptr<cricket::PortAllocator> allocator, 290 rtc::scoped_ptr<cricket::PortAllocator> allocator,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 } 360 }
363 361
364 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { 362 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() {
365 ASSERT(worker_thread_ == rtc::Thread::Current()); 363 ASSERT(worker_thread_ == rtc::Thread::Current());
366 return cricket::WebRtcMediaEngineFactory::Create( 364 return cricket::WebRtcMediaEngineFactory::Create(
367 default_adm_.get(), video_encoder_factory_.get(), 365 default_adm_.get(), video_encoder_factory_.get(),
368 video_decoder_factory_.get()); 366 video_decoder_factory_.get());
369 } 367 }
370 368
371 } // namespace webrtc 369 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/app/webrtc/peerconnection_unittest.cc ('k') | talk/app/webrtc/peerconnectionfactory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698