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