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 #ifndef WEBRTC_PC_PEERCONNECTION_H_ | 11 #ifndef WEBRTC_PC_PEERCONNECTION_H_ |
12 #define WEBRTC_PC_PEERCONNECTION_H_ | 12 #define WEBRTC_PC_PEERCONNECTION_H_ |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 #include <map> | 15 #include <map> |
16 #include <memory> | 16 #include <memory> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "webrtc/api/peerconnectioninterface.h" | 19 #include "webrtc/api/peerconnectioninterface.h" |
| 20 #include "webrtc/pc/iceserverparsing.h" |
20 #include "webrtc/pc/peerconnectionfactory.h" | 21 #include "webrtc/pc/peerconnectionfactory.h" |
21 #include "webrtc/pc/rtcstatscollector.h" | 22 #include "webrtc/pc/rtcstatscollector.h" |
22 #include "webrtc/pc/rtpreceiver.h" | 23 #include "webrtc/pc/rtpreceiver.h" |
23 #include "webrtc/pc/rtpsender.h" | 24 #include "webrtc/pc/rtpsender.h" |
24 #include "webrtc/pc/statscollector.h" | 25 #include "webrtc/pc/statscollector.h" |
25 #include "webrtc/pc/streamcollection.h" | 26 #include "webrtc/pc/streamcollection.h" |
26 #include "webrtc/pc/webrtcsession.h" | 27 #include "webrtc/pc/webrtcsession.h" |
27 | 28 |
28 namespace webrtc { | 29 namespace webrtc { |
29 | 30 |
(...skipping 16 matching lines...) Expand all Loading... |
46 // Will also set defaults if corresponding constraints are not present: | 47 // Will also set defaults if corresponding constraints are not present: |
47 // recv_audio=true, recv_video=true, bundle_enabled=true. | 48 // recv_audio=true, recv_video=true, bundle_enabled=true. |
48 // Other fields will be left with existing values. | 49 // Other fields will be left with existing values. |
49 // | 50 // |
50 // Deprecated. Will be removed once callers that use constraints are gone. | 51 // Deprecated. Will be removed once callers that use constraints are gone. |
51 // TODO(hta): Remove when callers are gone. | 52 // TODO(hta): Remove when callers are gone. |
52 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5617 | 53 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5617 |
53 bool ParseConstraintsForAnswer(const MediaConstraintsInterface* constraints, | 54 bool ParseConstraintsForAnswer(const MediaConstraintsInterface* constraints, |
54 cricket::MediaSessionOptions* session_options); | 55 cricket::MediaSessionOptions* session_options); |
55 | 56 |
56 // Parses the URLs for each server in |servers| to build |stun_servers| and | |
57 // |turn_servers|. Can return SYNTAX_ERROR if the URL is malformed, or | |
58 // INVALID_PARAMETER if a TURN server is missing |username| or |password|. | |
59 RTCErrorType ParseIceServers( | |
60 const PeerConnectionInterface::IceServers& servers, | |
61 cricket::ServerAddresses* stun_servers, | |
62 std::vector<cricket::RelayServerConfig>* turn_servers); | |
63 | |
64 // PeerConnection implements the PeerConnectionInterface interface. | 57 // PeerConnection implements the PeerConnectionInterface interface. |
65 // It uses WebRtcSession to implement the PeerConnection functionality. | 58 // It uses WebRtcSession to implement the PeerConnection functionality. |
66 class PeerConnection : public PeerConnectionInterface, | 59 class PeerConnection : public PeerConnectionInterface, |
67 public IceObserver, | 60 public IceObserver, |
68 public rtc::MessageHandler, | 61 public rtc::MessageHandler, |
69 public sigslot::has_slots<> { | 62 public sigslot::has_slots<> { |
70 public: | 63 public: |
71 explicit PeerConnection(PeerConnectionFactory* factory); | 64 explicit PeerConnection(PeerConnectionFactory* factory); |
72 | 65 |
73 bool Initialize( | 66 bool Initialize( |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>> | 439 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>> |
447 receivers_; | 440 receivers_; |
448 std::unique_ptr<WebRtcSession> session_; | 441 std::unique_ptr<WebRtcSession> session_; |
449 std::unique_ptr<StatsCollector> stats_; | 442 std::unique_ptr<StatsCollector> stats_; |
450 rtc::scoped_refptr<RTCStatsCollector> stats_collector_; | 443 rtc::scoped_refptr<RTCStatsCollector> stats_collector_; |
451 }; | 444 }; |
452 | 445 |
453 } // namespace webrtc | 446 } // namespace webrtc |
454 | 447 |
455 #endif // WEBRTC_PC_PEERCONNECTION_H_ | 448 #endif // WEBRTC_PC_PEERCONNECTION_H_ |
OLD | NEW |