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

Side by Side Diff: webrtc/pc/test/peerconnectiontestwrapper.cc

Issue 2685093002: Switching some interfaces to use std::unique_ptr<>. (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
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
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 stream->AddTrack(audio_track); 262 stream->AddTrack(audio_track);
263 } 263 }
264 264
265 if (video) { 265 if (video) {
266 // Set max frame rate to 10fps to reduce the risk of the tests to be flaky. 266 // Set max frame rate to 10fps to reduce the risk of the tests to be flaky.
267 FakeConstraints constraints = video_constraints; 267 FakeConstraints constraints = video_constraints;
268 constraints.SetMandatoryMaxFrameRate(10); 268 constraints.SetMandatoryMaxFrameRate(10);
269 269
270 rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source = 270 rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source =
271 peer_connection_factory_->CreateVideoSource( 271 peer_connection_factory_->CreateVideoSource(
272 new webrtc::FakePeriodicVideoCapturer(), &constraints); 272 std::unique_ptr<cricket::VideoCapturer>(
273 new webrtc::FakePeriodicVideoCapturer()),
274 &constraints);
273 std::string videotrack_label = label + kVideoTrackLabelBase; 275 std::string videotrack_label = label + kVideoTrackLabelBase;
274 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( 276 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track(
275 peer_connection_factory_->CreateVideoTrack(videotrack_label, source)); 277 peer_connection_factory_->CreateVideoTrack(videotrack_label, source));
276 278
277 stream->AddTrack(video_track); 279 stream->AddTrack(video_track);
278 } 280 }
279 return stream; 281 return stream;
280 } 282 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698