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 |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <utility> | 13 #include <utility> |
14 | 14 |
15 #include "webrtc/api/audiotrack.h" | |
16 #include "webrtc/api/jsepsessiondescription.h" | |
17 #include "webrtc/api/mediastream.h" | |
18 #include "webrtc/api/mediastreaminterface.h" | 15 #include "webrtc/api/mediastreaminterface.h" |
19 #include "webrtc/api/peerconnection.h" | |
20 #include "webrtc/api/peerconnectioninterface.h" | 16 #include "webrtc/api/peerconnectioninterface.h" |
21 #include "webrtc/api/rtpreceiverinterface.h" | 17 #include "webrtc/api/rtpreceiverinterface.h" |
22 #include "webrtc/api/rtpsenderinterface.h" | 18 #include "webrtc/api/rtpsenderinterface.h" |
23 #include "webrtc/api/streamcollection.h" | |
24 #include "webrtc/api/test/fakeconstraints.h" | |
25 #include "webrtc/api/test/fakertccertificategenerator.h" | |
26 #include "webrtc/api/test/fakevideotracksource.h" | |
27 #include "webrtc/api/test/mockpeerconnectionobservers.h" | |
28 #include "webrtc/api/test/testsdpstrings.h" | |
29 #include "webrtc/api/videocapturertracksource.h" | |
30 #include "webrtc/api/videotrack.h" | |
31 #include "webrtc/base/gunit.h" | 19 #include "webrtc/base/gunit.h" |
32 #include "webrtc/base/ssladapter.h" | 20 #include "webrtc/base/ssladapter.h" |
33 #include "webrtc/base/sslstreamadapter.h" | 21 #include "webrtc/base/sslstreamadapter.h" |
34 #include "webrtc/base/stringutils.h" | 22 #include "webrtc/base/stringutils.h" |
35 #include "webrtc/base/thread.h" | 23 #include "webrtc/base/thread.h" |
36 #include "webrtc/media/base/fakevideocapturer.h" | 24 #include "webrtc/media/base/fakevideocapturer.h" |
37 #include "webrtc/media/sctp/sctpdataengine.h" | 25 #include "webrtc/media/sctp/sctpdataengine.h" |
38 #include "webrtc/p2p/base/fakeportallocator.h" | 26 #include "webrtc/p2p/base/fakeportallocator.h" |
39 #include "webrtc/p2p/base/faketransportcontroller.h" | 27 #include "webrtc/p2p/base/faketransportcontroller.h" |
| 28 #include "webrtc/pc/audiotrack.h" |
| 29 #include "webrtc/pc/jsepsessiondescription.h" |
40 #include "webrtc/pc/mediasession.h" | 30 #include "webrtc/pc/mediasession.h" |
| 31 #include "webrtc/pc/mediastream.h" |
| 32 #include "webrtc/pc/peerconnection.h" |
| 33 #include "webrtc/pc/streamcollection.h" |
| 34 #include "webrtc/pc/test/fakeconstraints.h" |
| 35 #include "webrtc/pc/test/fakertccertificategenerator.h" |
| 36 #include "webrtc/pc/test/fakevideotracksource.h" |
| 37 #include "webrtc/pc/test/mockpeerconnectionobservers.h" |
| 38 #include "webrtc/pc/test/testsdpstrings.h" |
| 39 #include "webrtc/pc/videocapturertracksource.h" |
| 40 #include "webrtc/pc/videotrack.h" |
41 #include "webrtc/test/gmock.h" | 41 #include "webrtc/test/gmock.h" |
42 | 42 |
43 #ifdef WEBRTC_ANDROID | 43 #ifdef WEBRTC_ANDROID |
44 #include "webrtc/api/test/androidtestinitializer.h" | 44 #include "webrtc/pc/test/androidtestinitializer.h" |
45 #endif | 45 #endif |
46 | 46 |
47 static const char kStreamLabel1[] = "local_stream_1"; | 47 static const char kStreamLabel1[] = "local_stream_1"; |
48 static const char kStreamLabel2[] = "local_stream_2"; | 48 static const char kStreamLabel2[] = "local_stream_2"; |
49 static const char kStreamLabel3[] = "local_stream_3"; | 49 static const char kStreamLabel3[] = "local_stream_3"; |
50 static const int kDefaultStunPort = 3478; | 50 static const int kDefaultStunPort = 3478; |
51 static const char kStunAddressOnly[] = "stun:address"; | 51 static const char kStunAddressOnly[] = "stun:address"; |
52 static const char kStunInvalidPort[] = "stun:address:-1"; | 52 static const char kStunInvalidPort[] = "stun:address:-1"; |
53 static const char kStunAddressPortAndMore1[] = "stun:address:port:more"; | 53 static const char kStunAddressPortAndMore1[] = "stun:address:port:more"; |
54 static const char kStunAddressPortAndMore2[] = "stun:address:port more"; | 54 static const char kStunAddressPortAndMore2[] = "stun:address:port more"; |
(...skipping 2927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2982 FakeConstraints updated_answer_c; | 2982 FakeConstraints updated_answer_c; |
2983 answer_c.SetMandatoryReceiveAudio(false); | 2983 answer_c.SetMandatoryReceiveAudio(false); |
2984 answer_c.SetMandatoryReceiveVideo(false); | 2984 answer_c.SetMandatoryReceiveVideo(false); |
2985 | 2985 |
2986 cricket::MediaSessionOptions updated_answer_options; | 2986 cricket::MediaSessionOptions updated_answer_options; |
2987 EXPECT_TRUE( | 2987 EXPECT_TRUE( |
2988 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); | 2988 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); |
2989 EXPECT_TRUE(updated_answer_options.has_audio()); | 2989 EXPECT_TRUE(updated_answer_options.has_audio()); |
2990 EXPECT_TRUE(updated_answer_options.has_video()); | 2990 EXPECT_TRUE(updated_answer_options.has_video()); |
2991 } | 2991 } |
OLD | NEW |