OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 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_API_ORTC_ORTCFACTORYINTERFACE_H_ | 11 #ifndef WEBRTC_API_ORTC_ORTCFACTORYINTERFACE_H_ |
12 #define WEBRTC_API_ORTC_ORTCFACTORYINTERFACE_H_ | 12 #define WEBRTC_API_ORTC_ORTCFACTORYINTERFACE_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 #include <string> | 15 #include <string> |
16 #include <utility> // For std::move. | 16 #include <utility> // For std::move. |
17 | 17 |
18 #include "webrtc/api/mediaconstraintsinterface.h" | 18 #include "webrtc/api/mediaconstraintsinterface.h" |
19 #include "webrtc/api/mediastreaminterface.h" | 19 #include "webrtc/api/mediastreaminterface.h" |
20 #include "webrtc/api/mediatypes.h" | 20 #include "webrtc/api/mediatypes.h" |
21 #include "webrtc/api/ortc/ortcrtpreceiverinterface.h" | 21 #include "webrtc/api/ortc/ortcrtpreceiverinterface.h" |
22 #include "webrtc/api/ortc/ortcrtpsenderinterface.h" | 22 #include "webrtc/api/ortc/ortcrtpsenderinterface.h" |
23 #include "webrtc/api/ortc/packettransportinterface.h" | 23 #include "webrtc/api/ortc/packettransportinterface.h" |
24 #include "webrtc/api/ortc/rtptransportcontrollerinterface.h" | 24 #include "webrtc/api/ortc/rtptransportcontrollerinterface.h" |
25 #include "webrtc/api/ortc/rtptransportinterface.h" | 25 #include "webrtc/api/ortc/rtptransportinterface.h" |
| 26 #include "webrtc/api/ortc/srtptransportinterface.h" |
26 #include "webrtc/api/ortc/udptransportinterface.h" | 27 #include "webrtc/api/ortc/udptransportinterface.h" |
27 #include "webrtc/api/rtcerror.h" | 28 #include "webrtc/api/rtcerror.h" |
28 #include "webrtc/api/rtpparameters.h" | 29 #include "webrtc/api/rtpparameters.h" |
29 #include "webrtc/base/network.h" | 30 #include "webrtc/base/network.h" |
30 #include "webrtc/base/scoped_ref_ptr.h" | 31 #include "webrtc/base/scoped_ref_ptr.h" |
31 #include "webrtc/base/thread.h" | 32 #include "webrtc/base/thread.h" |
32 #include "webrtc/p2p/base/packetsocketfactory.h" | 33 #include "webrtc/p2p/base/packetsocketfactory.h" |
33 | 34 |
34 namespace webrtc { | 35 namespace webrtc { |
35 | 36 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // If |transport_controller| is null, one will automatically be created, and | 120 // If |transport_controller| is null, one will automatically be created, and |
120 // its lifetime managed by the returned RtpTransport. This should only be | 121 // its lifetime managed by the returned RtpTransport. This should only be |
121 // done if a single RtpTransport is being used to communicate with the remote | 122 // done if a single RtpTransport is being used to communicate with the remote |
122 // endpoint. | 123 // endpoint. |
123 virtual RTCErrorOr<std::unique_ptr<RtpTransportInterface>> CreateRtpTransport( | 124 virtual RTCErrorOr<std::unique_ptr<RtpTransportInterface>> CreateRtpTransport( |
124 const RtcpParameters& rtcp_parameters, | 125 const RtcpParameters& rtcp_parameters, |
125 PacketTransportInterface* rtp, | 126 PacketTransportInterface* rtp, |
126 PacketTransportInterface* rtcp, | 127 PacketTransportInterface* rtcp, |
127 RtpTransportControllerInterface* transport_controller) = 0; | 128 RtpTransportControllerInterface* transport_controller) = 0; |
128 | 129 |
| 130 // Creates an SrtpTransport which is an RTP transport that uses SRTP. |
| 131 virtual RTCErrorOr<std::unique_ptr<SrtpTransportInterface>> |
| 132 CreateSrtpTransport( |
| 133 const RtcpParameters& rtcp_parameters, |
| 134 PacketTransportInterface* rtp, |
| 135 PacketTransportInterface* rtcp, |
| 136 RtpTransportControllerInterface* transport_controller) = 0; |
| 137 |
129 // Returns the capabilities of an RTP sender of type |kind|. These | 138 // Returns the capabilities of an RTP sender of type |kind|. These |
130 // capabilities can be used to determine what RtpParameters to use to create | 139 // capabilities can be used to determine what RtpParameters to use to create |
131 // an RtpSender. | 140 // an RtpSender. |
132 // | 141 // |
133 // If for some reason you pass in MEDIA_TYPE_DATA, returns an empty structure. | 142 // If for some reason you pass in MEDIA_TYPE_DATA, returns an empty structure. |
134 virtual RtpCapabilities GetRtpSenderCapabilities( | 143 virtual RtpCapabilities GetRtpSenderCapabilities( |
135 cricket::MediaType kind) const = 0; | 144 cricket::MediaType kind) const = 0; |
136 | 145 |
137 // Creates an RTP sender with |track|. Will not start sending until Send is | 146 // Creates an RTP sender with |track|. Will not start sending until Send is |
138 // called. This is provided as a convenience; it's equivalent to calling | 147 // called. This is provided as a convenience; it's equivalent to calling |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 230 |
222 // Creates an new local audio track wrapping |source|. | 231 // Creates an new local audio track wrapping |source|. |
223 virtual rtc::scoped_refptr<AudioTrackInterface> CreateAudioTrack( | 232 virtual rtc::scoped_refptr<AudioTrackInterface> CreateAudioTrack( |
224 const std::string& id, | 233 const std::string& id, |
225 AudioSourceInterface* source) = 0; | 234 AudioSourceInterface* source) = 0; |
226 }; | 235 }; |
227 | 236 |
228 } // namespace webrtc | 237 } // namespace webrtc |
229 | 238 |
230 #endif // WEBRTC_API_ORTC_ORTCFACTORYINTERFACE_H_ | 239 #endif // WEBRTC_API_ORTC_ORTCFACTORYINTERFACE_H_ |
OLD | NEW |