| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 const std::string& stream_label) { | 581 const std::string& stream_label) { |
| 582 // Set max frame rate to 10fps to reduce the risk of the tests to be flaky. | 582 // Set max frame rate to 10fps to reduce the risk of the tests to be flaky. |
| 583 FakeConstraints source_constraints = video_constraints_; | 583 FakeConstraints source_constraints = video_constraints_; |
| 584 source_constraints.SetMandatoryMaxFrameRate(10); | 584 source_constraints.SetMandatoryMaxFrameRate(10); |
| 585 | 585 |
| 586 cricket::FakeVideoCapturer* fake_capturer = | 586 cricket::FakeVideoCapturer* fake_capturer = |
| 587 new webrtc::FakePeriodicVideoCapturer(); | 587 new webrtc::FakePeriodicVideoCapturer(); |
| 588 fake_capturer->SetRotation(capture_rotation_); | 588 fake_capturer->SetRotation(capture_rotation_); |
| 589 video_capturers_.push_back(fake_capturer); | 589 video_capturers_.push_back(fake_capturer); |
| 590 rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source = | 590 rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source = |
| 591 peer_connection_factory_->CreateVideoSource(fake_capturer, | 591 peer_connection_factory_->CreateVideoSource( |
| 592 &source_constraints); | 592 std::unique_ptr<cricket::VideoCapturer>(fake_capturer), |
| 593 &source_constraints); |
| 593 std::string label = stream_label + kVideoTrackLabelBase; | 594 std::string label = stream_label + kVideoTrackLabelBase; |
| 594 | 595 |
| 595 rtc::scoped_refptr<webrtc::VideoTrackInterface> track( | 596 rtc::scoped_refptr<webrtc::VideoTrackInterface> track( |
| 596 peer_connection_factory_->CreateVideoTrack(label, source)); | 597 peer_connection_factory_->CreateVideoTrack(label, source)); |
| 597 if (!local_video_renderer_) { | 598 if (!local_video_renderer_) { |
| 598 local_video_renderer_.reset(new webrtc::FakeVideoTrackRenderer(track)); | 599 local_video_renderer_.reset(new webrtc::FakeVideoTrackRenderer(track)); |
| 599 } | 600 } |
| 600 return track; | 601 return track; |
| 601 } | 602 } |
| 602 | 603 |
| (...skipping 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2820 servers.push_back(server); | 2821 servers.push_back(server); |
| 2821 EXPECT_EQ(webrtc::RTCErrorType::NONE, | 2822 EXPECT_EQ(webrtc::RTCErrorType::NONE, |
| 2822 webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_)); | 2823 webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_)); |
| 2823 EXPECT_EQ(2U, turn_servers_.size()); | 2824 EXPECT_EQ(2U, turn_servers_.size()); |
| 2824 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority); | 2825 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority); |
| 2825 } | 2826 } |
| 2826 | 2827 |
| 2827 #endif // if !defined(THREAD_SANITIZER) | 2828 #endif // if !defined(THREAD_SANITIZER) |
| 2828 | 2829 |
| 2829 } // namespace | 2830 } // namespace |
| OLD | NEW |