OLD | NEW |
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 |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "webrtc/api/test/fakedtlsidentitystore.h" | 13 #include "webrtc/api/test/fakedtlsidentitystore.h" |
14 #include "webrtc/api/test/fakeperiodicvideocapturer.h" | 14 #include "webrtc/api/test/fakeperiodicvideocapturer.h" |
15 #include "webrtc/api/test/mockpeerconnectionobservers.h" | 15 #include "webrtc/api/test/mockpeerconnectionobservers.h" |
16 #include "webrtc/api/test/peerconnectiontestwrapper.h" | 16 #include "webrtc/api/test/peerconnectiontestwrapper.h" |
17 #include "webrtc/api/videosourceinterface.h" | |
18 #include "webrtc/base/gunit.h" | 17 #include "webrtc/base/gunit.h" |
19 #include "webrtc/p2p/client/fakeportallocator.h" | 18 #include "webrtc/p2p/client/fakeportallocator.h" |
20 | 19 |
21 static const char kStreamLabelBase[] = "stream_label"; | 20 static const char kStreamLabelBase[] = "stream_label"; |
22 static const char kVideoTrackLabelBase[] = "video_track"; | 21 static const char kVideoTrackLabelBase[] = "video_track"; |
23 static const char kAudioTrackLabelBase[] = "audio_track"; | 22 static const char kAudioTrackLabelBase[] = "audio_track"; |
24 static const int kMaxWait = 10000; | 23 static const int kMaxWait = 10000; |
25 static const int kTestAudioFrameCount = 3; | 24 static const int kTestAudioFrameCount = 3; |
26 static const int kTestVideoFrameCount = 3; | 25 static const int kTestVideoFrameCount = 3; |
27 | 26 |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 peer_connection_factory_->CreateVideoSource( | 270 peer_connection_factory_->CreateVideoSource( |
272 new webrtc::FakePeriodicVideoCapturer(), &constraints); | 271 new webrtc::FakePeriodicVideoCapturer(), &constraints); |
273 std::string videotrack_label = label + kVideoTrackLabelBase; | 272 std::string videotrack_label = label + kVideoTrackLabelBase; |
274 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( | 273 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( |
275 peer_connection_factory_->CreateVideoTrack(videotrack_label, source)); | 274 peer_connection_factory_->CreateVideoTrack(videotrack_label, source)); |
276 | 275 |
277 stream->AddTrack(video_track); | 276 stream->AddTrack(video_track); |
278 } | 277 } |
279 return stream; | 278 return stream; |
280 } | 279 } |
OLD | NEW |