OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2016 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 <set> | 11 #include <set> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
| 14 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h" |
14 #include "webrtc/api/datachannelinterface.h" | 15 #include "webrtc/api/datachannelinterface.h" |
15 #include "webrtc/api/peerconnectioninterface.h" | 16 #include "webrtc/api/peerconnectioninterface.h" |
16 #include "webrtc/api/stats/rtcstats_objects.h" | 17 #include "webrtc/api/stats/rtcstats_objects.h" |
17 #include "webrtc/api/stats/rtcstatsreport.h" | 18 #include "webrtc/api/stats/rtcstatsreport.h" |
18 #include "webrtc/base/checks.h" | 19 #include "webrtc/base/checks.h" |
19 #include "webrtc/base/gunit.h" | 20 #include "webrtc/base/gunit.h" |
20 #include "webrtc/base/physicalsocketserver.h" | 21 #include "webrtc/base/physicalsocketserver.h" |
21 #include "webrtc/base/refcountedobject.h" | 22 #include "webrtc/base/refcountedobject.h" |
22 #include "webrtc/base/scoped_ref_ptr.h" | 23 #include "webrtc/base/scoped_ref_ptr.h" |
23 #include "webrtc/base/virtualsocketserver.h" | 24 #include "webrtc/base/virtualsocketserver.h" |
(...skipping 21 matching lines...) Expand all Loading... |
45 callee_ = new rtc::RefCountedObject<PeerConnectionTestWrapper>( | 46 callee_ = new rtc::RefCountedObject<PeerConnectionTestWrapper>( |
46 "callee", &network_thread_, &worker_thread_); | 47 "callee", &network_thread_, &worker_thread_); |
47 } | 48 } |
48 | 49 |
49 void StartCall() { | 50 void StartCall() { |
50 // Create PeerConnections and "connect" sigslots | 51 // Create PeerConnections and "connect" sigslots |
51 PeerConnectionInterface::RTCConfiguration config; | 52 PeerConnectionInterface::RTCConfiguration config; |
52 PeerConnectionInterface::IceServer ice_server; | 53 PeerConnectionInterface::IceServer ice_server; |
53 ice_server.uri = "stun:1.1.1.1:3478"; | 54 ice_server.uri = "stun:1.1.1.1:3478"; |
54 config.servers.push_back(ice_server); | 55 config.servers.push_back(ice_server); |
55 EXPECT_TRUE(caller_->CreatePc(nullptr, config)); | 56 EXPECT_TRUE(caller_->CreatePc(nullptr, config, |
56 EXPECT_TRUE(callee_->CreatePc(nullptr, config)); | 57 CreateBuiltinAudioEncoderFactory(), |
| 58 CreateBuiltinAudioDecoderFactory())); |
| 59 EXPECT_TRUE(callee_->CreatePc(nullptr, config, |
| 60 CreateBuiltinAudioEncoderFactory(), |
| 61 CreateBuiltinAudioDecoderFactory())); |
57 PeerConnectionTestWrapper::Connect(caller_.get(), callee_.get()); | 62 PeerConnectionTestWrapper::Connect(caller_.get(), callee_.get()); |
58 | 63 |
59 // Get user media for audio and video | 64 // Get user media for audio and video |
60 caller_->GetAndAddUserMedia(true, FakeConstraints(), | 65 caller_->GetAndAddUserMedia(true, FakeConstraints(), |
61 true, FakeConstraints()); | 66 true, FakeConstraints()); |
62 callee_->GetAndAddUserMedia(true, FakeConstraints(), | 67 callee_->GetAndAddUserMedia(true, FakeConstraints(), |
63 true, FakeConstraints()); | 68 true, FakeConstraints()); |
64 | 69 |
65 // Create data channels | 70 // Create data channels |
66 DataChannelInit init; | 71 DataChannelInit init; |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 caller_ = nullptr; | 646 caller_ = nullptr; |
642 // Any pending stats requests should have completed in the act of destroying | 647 // Any pending stats requests should have completed in the act of destroying |
643 // the peer connection. | 648 // the peer connection. |
644 EXPECT_TRUE(stats_obtainer->report()); | 649 EXPECT_TRUE(stats_obtainer->report()); |
645 } | 650 } |
646 #endif // HAVE_SCTP | 651 #endif // HAVE_SCTP |
647 | 652 |
648 } // namespace | 653 } // namespace |
649 | 654 |
650 } // namespace webrtc | 655 } // namespace webrtc |
OLD | NEW |