2 * Copyright (C) 2017 Matthew Waters <matthew@centricular.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #ifndef __WEBRTC_SDP_H__
21 #define __WEBRTC_SDP_H__
24 #include <gst/webrtc/webrtc.h>
37 const gchar * _sdp_source_to_string (SDPSource source);
41 gboolean validate_sdp (GstWebRTCSignalingState state,
43 GstWebRTCSessionDescription * sdp,
47 GstWebRTCRTPTransceiverDirection _get_direction_from_media (const GstSDPMedia * media);
49 GstWebRTCRTPTransceiverDirection _intersect_answer_directions (GstWebRTCRTPTransceiverDirection offer,
50 GstWebRTCRTPTransceiverDirection answer);
52 void _media_replace_direction (GstSDPMedia * media,
53 GstWebRTCRTPTransceiverDirection direction);
55 GstWebRTCRTPTransceiverDirection _get_final_direction (GstWebRTCRTPTransceiverDirection local_dir,
56 GstWebRTCRTPTransceiverDirection remote_dir);
59 GstWebRTCDTLSSetup _get_dtls_setup_from_media (const GstSDPMedia * media);
61 GstWebRTCDTLSSetup _intersect_dtls_setup (GstWebRTCDTLSSetup offer);
63 void _media_replace_setup (GstSDPMedia * media,
64 GstWebRTCDTLSSetup setup);
66 GstWebRTCDTLSSetup _get_final_setup (GstWebRTCDTLSSetup local_setup,
67 GstWebRTCDTLSSetup remote_setup);
69 gchar * _generate_fingerprint_from_certificate (gchar * certificate,
70 GChecksumType checksum_type);
72 void _generate_ice_credentials (gchar ** ufrag,
76 gboolean _media_has_attribute_key (const GstSDPMedia * media,
80 int _get_sctp_port_from_media (const GstSDPMedia * media);
82 guint64 _get_sctp_max_message_size_from_media (const GstSDPMedia * media);
85 void _get_ice_credentials_from_sdp_media (const GstSDPMessage * sdp,
90 gboolean _message_media_is_datachannel (const GstSDPMessage * msg,
94 gboolean _get_bundle_index (GstSDPMessage * sdp,
98 gboolean _parse_bundle (GstSDPMessage * sdp,
101 #endif /* __WEBRTC_UTILS_H__ */