blob: 13ecf702d28d23561063bac7bfcc80819c217630 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001/*
kjellander65c7f672016-02-12 00:05:01 -08002 * Copyright 2004 The WebRTC project authors. All Rights Reserved.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00003 *
kjellander65c7f672016-02-12 00:05:01 -08004 * 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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00009 */
10
11// Types and classes used in media session descriptions.
12
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020013#ifndef PC_MEDIASESSION_H_
14#define PC_MEDIASESSION_H_
henrike@webrtc.org28e20752013-07-10 00:45:36 +000015
buildbot@webrtc.orga09a9992014-08-13 17:26:08 +000016#include <algorithm>
deadbeef0ed85b22016-02-23 17:24:52 -080017#include <map>
henrike@webrtc.org28e20752013-07-10 00:45:36 +000018#include <string>
19#include <vector>
henrike@webrtc.org28e20752013-07-10 00:45:36 +000020
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020021#include "api/mediatypes.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020022#include "media/base/mediaconstants.h"
23#include "media/base/mediaengine.h" // For DataChannelType
Jonas Oreland1cd39fa2018-10-11 07:47:12 +020024#include "p2p/base/icecredentialsiterator.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020025#include "p2p/base/transportdescriptionfactory.h"
Zhi Huang365381f2018-04-13 16:44:34 -070026#include "pc/jseptransport.h"
Steve Anton4ab68ee2017-12-19 14:26:11 -080027#include "pc/sessiondescription.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000028
29namespace cricket {
30
31class ChannelManager;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000032
zhihuang8f65cdf2016-05-06 18:40:30 -070033// Default RTCP CNAME for unit tests.
34const char kDefaultRtcpCname[] = "DefaultRtcpCname";
35
zhihuang1c378ed2017-08-17 14:10:50 -070036// Options for an RtpSender contained with an media description/"m=" section.
37struct SenderOptions {
38 std::string track_id;
Steve Anton8ffb9c32017-08-31 15:45:38 -070039 std::vector<std::string> stream_ids;
zhihuang1c378ed2017-08-17 14:10:50 -070040 int num_sim_layers;
41};
jiayl@webrtc.org742922b2014-10-07 21:32:43 +000042
zhihuang1c378ed2017-08-17 14:10:50 -070043// Options for an individual media description/"m=" section.
44struct MediaDescriptionOptions {
45 MediaDescriptionOptions(MediaType type,
46 const std::string& mid,
Steve Anton1d03a752017-11-27 14:30:09 -080047 webrtc::RtpTransceiverDirection direction,
zhihuang1c378ed2017-08-17 14:10:50 -070048 bool stopped)
49 : type(type), mid(mid), direction(direction), stopped(stopped) {}
zhihuanga77e6bb2017-08-14 18:17:48 -070050
zhihuang1c378ed2017-08-17 14:10:50 -070051 // TODO(deadbeef): When we don't support Plan B, there will only be one
52 // sender per media description and this can be simplified.
53 void AddAudioSender(const std::string& track_id,
Steve Anton8ffb9c32017-08-31 15:45:38 -070054 const std::vector<std::string>& stream_ids);
zhihuang1c378ed2017-08-17 14:10:50 -070055 void AddVideoSender(const std::string& track_id,
Steve Anton8ffb9c32017-08-31 15:45:38 -070056 const std::vector<std::string>& stream_ids,
olka3c747662017-08-17 06:50:32 -070057 int num_sim_layers);
zhihuanga77e6bb2017-08-14 18:17:48 -070058
zhihuang1c378ed2017-08-17 14:10:50 -070059 // Internally just uses sender_options.
60 void AddRtpDataChannel(const std::string& track_id,
61 const std::string& stream_id);
olka3c747662017-08-17 06:50:32 -070062
zhihuang1c378ed2017-08-17 14:10:50 -070063 MediaType type;
64 std::string mid;
Steve Anton1d03a752017-11-27 14:30:09 -080065 webrtc::RtpTransceiverDirection direction;
zhihuang1c378ed2017-08-17 14:10:50 -070066 bool stopped;
67 TransportOptions transport_options;
68 // Note: There's no equivalent "RtpReceiverOptions" because only send
69 // stream information goes in the local descriptions.
70 std::vector<SenderOptions> sender_options;
71
72 private:
73 // Doesn't DCHECK on |type|.
74 void AddSenderInternal(const std::string& track_id,
Steve Anton8ffb9c32017-08-31 15:45:38 -070075 const std::vector<std::string>& stream_ids,
olka3c747662017-08-17 06:50:32 -070076 int num_sim_layers);
zhihuang1c378ed2017-08-17 14:10:50 -070077};
olka3c747662017-08-17 06:50:32 -070078
zhihuang1c378ed2017-08-17 14:10:50 -070079// Provides a mechanism for describing how m= sections should be generated.
80// The m= section with index X will use media_description_options[X]. There
81// must be an option for each existing section if creating an answer, or a
82// subsequent offer.
83struct MediaSessionOptions {
84 MediaSessionOptions() {}
olka3c747662017-08-17 06:50:32 -070085
zhihuang1c378ed2017-08-17 14:10:50 -070086 bool has_audio() const { return HasMediaDescription(MEDIA_TYPE_AUDIO); }
87 bool has_video() const { return HasMediaDescription(MEDIA_TYPE_VIDEO); }
88 bool has_data() const { return HasMediaDescription(MEDIA_TYPE_DATA); }
89
90 bool HasMediaDescription(MediaType type) const;
91
92 DataChannelType data_channel_type = DCT_NONE;
zhihuang1c378ed2017-08-17 14:10:50 -070093 bool vad_enabled = true; // When disabled, removes all CN codecs from SDP.
94 bool rtcp_mux_enabled = true;
95 bool bundle_enabled = false;
Johannes Kron89f874e2018-11-12 10:25:48 +010096 bool offer_extmap_allow_mixed = false;
zhihuang1c378ed2017-08-17 14:10:50 -070097 std::string rtcp_cname = kDefaultRtcpCname;
Benjamin Wrighta54daf12018-10-11 15:33:17 -070098 webrtc::CryptoOptions crypto_options;
zhihuang1c378ed2017-08-17 14:10:50 -070099 // List of media description options in the same order that the media
100 // descriptions will be generated.
101 std::vector<MediaDescriptionOptions> media_description_options;
Jonas Oreland1cd39fa2018-10-11 07:47:12 +0200102 std::vector<IceParameters> pooled_ice_credentials;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000103};
104
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000105// Creates media session descriptions according to the supplied codecs and
106// other fields, as well as the supplied per-call options.
107// When creating answers, performs the appropriate negotiation
108// of the various fields to determine the proper result.
109class MediaSessionDescriptionFactory {
110 public:
111 // Default ctor; use methods below to set configuration.
112 // The TransportDescriptionFactory is not owned by MediaSessionDescFactory,
113 // so it must be kept alive by the user of this class.
114 explicit MediaSessionDescriptionFactory(
115 const TransportDescriptionFactory* factory);
116 // This helper automatically sets up the factory to get its configuration
117 // from the specified ChannelManager.
118 MediaSessionDescriptionFactory(ChannelManager* cmanager,
119 const TransportDescriptionFactory* factory);
120
ossudedfd282016-06-14 07:12:39 -0700121 const AudioCodecs& audio_sendrecv_codecs() const;
ossu075af922016-06-14 03:29:38 -0700122 const AudioCodecs& audio_send_codecs() const;
123 const AudioCodecs& audio_recv_codecs() const;
124 void set_audio_codecs(const AudioCodecs& send_codecs,
125 const AudioCodecs& recv_codecs);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000126 void set_audio_rtp_header_extensions(const RtpHeaderExtensions& extensions) {
127 audio_rtp_extensions_ = extensions;
128 }
Steve Anton8f66ddb2018-12-10 16:08:05 -0800129 RtpHeaderExtensions audio_rtp_header_extensions() const {
Steve Anton1b8773d2018-04-06 11:13:34 -0700130 RtpHeaderExtensions extensions = audio_rtp_extensions_;
131 // If we are Unified Plan, also offer the MID header extension.
Steve Anton8f66ddb2018-12-10 16:08:05 -0800132 if (is_unified_plan_) {
Steve Anton1b8773d2018-04-06 11:13:34 -0700133 extensions.push_back(webrtc::RtpExtension(
134 webrtc::RtpExtension::kMidUri, webrtc::RtpExtension::kMidDefaultId));
135 }
136 return extensions;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000137 }
138 const VideoCodecs& video_codecs() const { return video_codecs_; }
139 void set_video_codecs(const VideoCodecs& codecs) { video_codecs_ = codecs; }
140 void set_video_rtp_header_extensions(const RtpHeaderExtensions& extensions) {
141 video_rtp_extensions_ = extensions;
142 }
Steve Anton8f66ddb2018-12-10 16:08:05 -0800143 RtpHeaderExtensions video_rtp_header_extensions() const {
Steve Anton1b8773d2018-04-06 11:13:34 -0700144 RtpHeaderExtensions extensions = video_rtp_extensions_;
145 // If we are Unified Plan, also offer the MID header extension.
Steve Anton8f66ddb2018-12-10 16:08:05 -0800146 if (is_unified_plan_) {
Steve Anton1b8773d2018-04-06 11:13:34 -0700147 extensions.push_back(webrtc::RtpExtension(
148 webrtc::RtpExtension::kMidUri, webrtc::RtpExtension::kMidDefaultId));
149 }
150 return extensions;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000151 }
152 const DataCodecs& data_codecs() const { return data_codecs_; }
153 void set_data_codecs(const DataCodecs& codecs) { data_codecs_ = codecs; }
154 SecurePolicy secure() const { return secure_; }
155 void set_secure(SecurePolicy s) { secure_ = s; }
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000156
jbauch5869f502017-06-29 12:31:36 -0700157 void set_enable_encrypted_rtp_header_extensions(bool enable) {
158 enable_encrypted_rtp_header_extensions_ = enable;
159 }
160
Steve Anton8f66ddb2018-12-10 16:08:05 -0800161 void set_is_unified_plan(bool is_unified_plan) {
162 is_unified_plan_ = is_unified_plan;
163 }
164
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000165 SessionDescription* CreateOffer(
166 const MediaSessionOptions& options,
167 const SessionDescription* current_description) const;
168 SessionDescription* CreateAnswer(
zstein4b2e0822017-02-17 19:48:38 -0800169 const SessionDescription* offer,
170 const MediaSessionOptions& options,
171 const SessionDescription* current_description) const;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000172
173 private:
ossu075af922016-06-14 03:29:38 -0700174 const AudioCodecs& GetAudioCodecsForOffer(
Steve Anton1d03a752017-11-27 14:30:09 -0800175 const webrtc::RtpTransceiverDirection& direction) const;
ossu075af922016-06-14 03:29:38 -0700176 const AudioCodecs& GetAudioCodecsForAnswer(
Steve Anton1d03a752017-11-27 14:30:09 -0800177 const webrtc::RtpTransceiverDirection& offer,
178 const webrtc::RtpTransceiverDirection& answer) const;
Steve Anton5c72e712018-12-10 14:25:30 -0800179 void GetCodecsForOffer(
180 const std::vector<const ContentInfo*>& current_active_contents,
181 AudioCodecs* audio_codecs,
182 VideoCodecs* video_codecs,
183 DataCodecs* data_codecs) const;
184 void GetCodecsForAnswer(
185 const std::vector<const ContentInfo*>& current_active_contents,
186 const SessionDescription& remote_offer,
187 AudioCodecs* audio_codecs,
188 VideoCodecs* video_codecs,
189 DataCodecs* data_codecs) const;
190 void GetRtpHdrExtsToOffer(
191 const std::vector<const ContentInfo*>& current_active_contents,
Steve Anton5c72e712018-12-10 14:25:30 -0800192 RtpHeaderExtensions* audio_extensions,
193 RtpHeaderExtensions* video_extensions) const;
Yves Gerey665174f2018-06-19 15:03:05 +0200194 bool AddTransportOffer(const std::string& content_name,
195 const TransportOptions& transport_options,
196 const SessionDescription* current_desc,
Jonas Oreland1cd39fa2018-10-11 07:47:12 +0200197 SessionDescription* offer,
198 IceCredentialsIterator* ice_credentials) const;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000199
200 TransportDescription* CreateTransportAnswer(
201 const std::string& content_name,
202 const SessionDescription* offer_desc,
203 const TransportOptions& transport_options,
deadbeefb7892532017-02-22 19:35:18 -0800204 const SessionDescription* current_desc,
Jonas Oreland1cd39fa2018-10-11 07:47:12 +0200205 bool require_transport_attributes,
206 IceCredentialsIterator* ice_credentials) const;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000207
Yves Gerey665174f2018-06-19 15:03:05 +0200208 bool AddTransportAnswer(const std::string& content_name,
209 const TransportDescription& transport_desc,
210 SessionDescription* answer_desc) const;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000211
jiayl@webrtc.orge7d47a12014-08-05 19:19:05 +0000212 // Helpers for adding media contents to the SessionDescription. Returns true
213 // it succeeds or the media content is not needed, or false if there is any
214 // error.
215
216 bool AddAudioContentForOffer(
zhihuang1c378ed2017-08-17 14:10:50 -0700217 const MediaDescriptionOptions& media_description_options,
218 const MediaSessionOptions& session_options,
219 const ContentInfo* current_content,
jiayl@webrtc.orge7d47a12014-08-05 19:19:05 +0000220 const SessionDescription* current_description,
221 const RtpHeaderExtensions& audio_rtp_extensions,
222 const AudioCodecs& audio_codecs,
223 StreamParamsVec* current_streams,
Jonas Oreland1cd39fa2018-10-11 07:47:12 +0200224 SessionDescription* desc,
225 IceCredentialsIterator* ice_credentials) const;
jiayl@webrtc.orge7d47a12014-08-05 19:19:05 +0000226
227 bool AddVideoContentForOffer(
zhihuang1c378ed2017-08-17 14:10:50 -0700228 const MediaDescriptionOptions& media_description_options,
229 const MediaSessionOptions& session_options,
230 const ContentInfo* current_content,
jiayl@webrtc.orge7d47a12014-08-05 19:19:05 +0000231 const SessionDescription* current_description,
232 const RtpHeaderExtensions& video_rtp_extensions,
233 const VideoCodecs& video_codecs,
234 StreamParamsVec* current_streams,
Jonas Oreland1cd39fa2018-10-11 07:47:12 +0200235 SessionDescription* desc,
236 IceCredentialsIterator* ice_credentials) const;
jiayl@webrtc.orge7d47a12014-08-05 19:19:05 +0000237
238 bool AddDataContentForOffer(
zhihuang1c378ed2017-08-17 14:10:50 -0700239 const MediaDescriptionOptions& media_description_options,
240 const MediaSessionOptions& session_options,
241 const ContentInfo* current_content,
jiayl@webrtc.orge7d47a12014-08-05 19:19:05 +0000242 const SessionDescription* current_description,
zhihuang1c378ed2017-08-17 14:10:50 -0700243 const DataCodecs& data_codecs,
jiayl@webrtc.orge7d47a12014-08-05 19:19:05 +0000244 StreamParamsVec* current_streams,
Jonas Oreland1cd39fa2018-10-11 07:47:12 +0200245 SessionDescription* desc,
246 IceCredentialsIterator* ice_credentials) const;
jiayl@webrtc.orge7d47a12014-08-05 19:19:05 +0000247
zhihuang1c378ed2017-08-17 14:10:50 -0700248 bool AddAudioContentForAnswer(
249 const MediaDescriptionOptions& media_description_options,
250 const MediaSessionOptions& session_options,
251 const ContentInfo* offer_content,
252 const SessionDescription* offer_description,
253 const ContentInfo* current_content,
254 const SessionDescription* current_description,
255 const TransportInfo* bundle_transport,
256 const AudioCodecs& audio_codecs,
257 StreamParamsVec* current_streams,
Jonas Oreland1cd39fa2018-10-11 07:47:12 +0200258 SessionDescription* answer,
259 IceCredentialsIterator* ice_credentials) const;
jiayl@webrtc.orge7d47a12014-08-05 19:19:05 +0000260
zhihuang1c378ed2017-08-17 14:10:50 -0700261 bool AddVideoContentForAnswer(
262 const MediaDescriptionOptions& media_description_options,
263 const MediaSessionOptions& session_options,
264 const ContentInfo* offer_content,
265 const SessionDescription* offer_description,
266 const ContentInfo* current_content,
267 const SessionDescription* current_description,
268 const TransportInfo* bundle_transport,
269 const VideoCodecs& video_codecs,
270 StreamParamsVec* current_streams,
Jonas Oreland1cd39fa2018-10-11 07:47:12 +0200271 SessionDescription* answer,
272 IceCredentialsIterator* ice_credentials) const;
jiayl@webrtc.orge7d47a12014-08-05 19:19:05 +0000273
zhihuang1c378ed2017-08-17 14:10:50 -0700274 bool AddDataContentForAnswer(
275 const MediaDescriptionOptions& media_description_options,
276 const MediaSessionOptions& session_options,
277 const ContentInfo* offer_content,
278 const SessionDescription* offer_description,
279 const ContentInfo* current_content,
280 const SessionDescription* current_description,
281 const TransportInfo* bundle_transport,
282 const DataCodecs& data_codecs,
283 StreamParamsVec* current_streams,
Jonas Oreland1cd39fa2018-10-11 07:47:12 +0200284 SessionDescription* answer,
285 IceCredentialsIterator* ice_credentials) const;
zhihuang1c378ed2017-08-17 14:10:50 -0700286
287 void ComputeAudioCodecsIntersectionAndUnion();
jiayl@webrtc.orge7d47a12014-08-05 19:19:05 +0000288
Steve Anton8f66ddb2018-12-10 16:08:05 -0800289 bool is_unified_plan_ = false;
ossu075af922016-06-14 03:29:38 -0700290 AudioCodecs audio_send_codecs_;
291 AudioCodecs audio_recv_codecs_;
zhihuang1c378ed2017-08-17 14:10:50 -0700292 // Intersection of send and recv.
ossu075af922016-06-14 03:29:38 -0700293 AudioCodecs audio_sendrecv_codecs_;
zhihuang1c378ed2017-08-17 14:10:50 -0700294 // Union of send and recv.
295 AudioCodecs all_audio_codecs_;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000296 RtpHeaderExtensions audio_rtp_extensions_;
297 VideoCodecs video_codecs_;
298 RtpHeaderExtensions video_rtp_extensions_;
299 DataCodecs data_codecs_;
jbauch5869f502017-06-29 12:31:36 -0700300 bool enable_encrypted_rtp_header_extensions_ = false;
zhihuang1c378ed2017-08-17 14:10:50 -0700301 // TODO(zhihuang): Rename secure_ to sdec_policy_; rename the related getter
302 // and setter.
303 SecurePolicy secure_ = SEC_DISABLED;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000304 const TransportDescriptionFactory* transport_desc_factory_;
305};
306
307// Convenience functions.
308bool IsMediaContent(const ContentInfo* content);
309bool IsAudioContent(const ContentInfo* content);
310bool IsVideoContent(const ContentInfo* content);
311bool IsDataContent(const ContentInfo* content);
deadbeef0ed85b22016-02-23 17:24:52 -0800312const ContentInfo* GetFirstMediaContent(const ContentInfos& contents,
313 MediaType media_type);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000314const ContentInfo* GetFirstAudioContent(const ContentInfos& contents);
315const ContentInfo* GetFirstVideoContent(const ContentInfos& contents);
316const ContentInfo* GetFirstDataContent(const ContentInfos& contents);
Steve Antonad7bffc2018-01-22 10:21:56 -0800317const ContentInfo* GetFirstMediaContent(const SessionDescription* sdesc,
318 MediaType media_type);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000319const ContentInfo* GetFirstAudioContent(const SessionDescription* sdesc);
320const ContentInfo* GetFirstVideoContent(const SessionDescription* sdesc);
321const ContentInfo* GetFirstDataContent(const SessionDescription* sdesc);
322const AudioContentDescription* GetFirstAudioContentDescription(
323 const SessionDescription* sdesc);
324const VideoContentDescription* GetFirstVideoContentDescription(
325 const SessionDescription* sdesc);
326const DataContentDescription* GetFirstDataContentDescription(
327 const SessionDescription* sdesc);
Taylor Brandstetterdc4eb8c2016-05-12 08:14:50 -0700328// Non-const versions of the above functions.
329// Useful when modifying an existing description.
Steve Anton36b29d12017-10-30 09:57:42 -0700330ContentInfo* GetFirstMediaContent(ContentInfos* contents, MediaType media_type);
331ContentInfo* GetFirstAudioContent(ContentInfos* contents);
332ContentInfo* GetFirstVideoContent(ContentInfos* contents);
333ContentInfo* GetFirstDataContent(ContentInfos* contents);
Steve Antonad7bffc2018-01-22 10:21:56 -0800334ContentInfo* GetFirstMediaContent(SessionDescription* sdesc,
335 MediaType media_type);
Taylor Brandstetterdc4eb8c2016-05-12 08:14:50 -0700336ContentInfo* GetFirstAudioContent(SessionDescription* sdesc);
337ContentInfo* GetFirstVideoContent(SessionDescription* sdesc);
338ContentInfo* GetFirstDataContent(SessionDescription* sdesc);
339AudioContentDescription* GetFirstAudioContentDescription(
340 SessionDescription* sdesc);
341VideoContentDescription* GetFirstVideoContentDescription(
342 SessionDescription* sdesc);
343DataContentDescription* GetFirstDataContentDescription(
344 SessionDescription* sdesc);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000345
deadbeef7914b8c2017-04-21 03:23:33 -0700346// Helper functions to return crypto suites used for SDES.
Benjamin Wrighta54daf12018-10-11 15:33:17 -0700347void GetSupportedAudioSdesCryptoSuites(
348 const webrtc::CryptoOptions& crypto_options,
349 std::vector<int>* crypto_suites);
350void GetSupportedVideoSdesCryptoSuites(
351 const webrtc::CryptoOptions& crypto_options,
352 std::vector<int>* crypto_suites);
353void GetSupportedDataSdesCryptoSuites(
354 const webrtc::CryptoOptions& crypto_options,
355 std::vector<int>* crypto_suites);
deadbeef7914b8c2017-04-21 03:23:33 -0700356void GetSupportedAudioSdesCryptoSuiteNames(
Benjamin Wrighta54daf12018-10-11 15:33:17 -0700357 const webrtc::CryptoOptions& crypto_options,
Guo-wei Shieh521ed7b2015-11-18 19:41:53 -0800358 std::vector<std::string>* crypto_suite_names);
deadbeef7914b8c2017-04-21 03:23:33 -0700359void GetSupportedVideoSdesCryptoSuiteNames(
Benjamin Wrighta54daf12018-10-11 15:33:17 -0700360 const webrtc::CryptoOptions& crypto_options,
Guo-wei Shieh521ed7b2015-11-18 19:41:53 -0800361 std::vector<std::string>* crypto_suite_names);
deadbeef7914b8c2017-04-21 03:23:33 -0700362void GetSupportedDataSdesCryptoSuiteNames(
Benjamin Wrighta54daf12018-10-11 15:33:17 -0700363 const webrtc::CryptoOptions& crypto_options,
Guo-wei Shieh521ed7b2015-11-18 19:41:53 -0800364 std::vector<std::string>* crypto_suite_names);
365
Steve Antonfa2260d2017-12-28 16:38:23 -0800366// Returns true if the given media section protocol indicates use of RTP.
367bool IsRtpProtocol(const std::string& protocol);
368
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000369} // namespace cricket
370
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200371#endif // PC_MEDIASESSION_H_