Backed out 2 changesets (bug 903746) for causing non-unified build bustages on nsIPri...
[gecko.git] / third_party / sipcc / ccsdp.h
blob39e3c71f6887b33d3c6b75a61ebcf402bf83d0f7
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef __CCSDP_H__
6 #define __CCSDP_H__
8 #include "cpr_types.h"
9 #include "ccsdp_rtcp_fb.h"
11 #define SIPSDP_ILBC_MODE20 20
13 /**
14 * Return codes for sdp helper APIs
16 typedef enum rtp_ptype_
18 RTP_NONE = -1,
19 RTP_PCMU = 0,
20 RTP_CELP = 1,
21 RTP_G726 = 2,
22 RTP_GSM = 3,
23 RTP_G723 = 4,
24 RTP_DVI4 = 5,
25 RTP_DVI4_II = 6,
26 RTP_LPC = 7,
27 RTP_PCMA = 8,
28 RTP_G722 = 9,
29 RTP_G728 = 15,
30 RTP_G729 = 18,
31 RTP_JPEG = 26,
32 RTP_NV = 28,
33 RTP_H261 = 31,
34 RTP_H264_P0 = 97,
35 RTP_H264_P1 = 126,
36 RTP_TELEPHONE_EVENT = 101,
37 RTP_L16 = 102,
38 RTP_H263 = 103,
39 RTP_ILBC = 116, /* used only to make an offer */
40 RTP_OPUS = 109,
41 RTP_VP8 = 120,
42 RTP_VP9 = 121,
43 RTP_RED = 122,
44 RTP_ULPFEC = 123,
45 RTP_I420 = 124,
46 RTP_ISAC = 124,
47 RTP_RTX = 125
48 } rtp_ptype;
50 typedef struct {
51 const char *name;
52 int value;
53 } ccsdp_key_table_entry_t;
55 typedef enum max_coded_audio_bandwidth_ {
56 opus_nb = 0, /* Narrowband */
57 opus_mb = 1, /* Mediumband */
58 opus_wb = 2, /* Wideband */
59 opus_swb = 3, /* Super-wideband */
60 opus_fb = 4 /* Fullband */
61 } max_coded_audio_bandwidth;
63 static const ccsdp_key_table_entry_t max_coded_audio_bandwidth_table[] = {
64 {"nb", opus_nb},
65 {"mb", opus_mb},
66 {"wb", opus_wb},
67 {"swb", opus_swb},
68 {"fb", opus_fb}
71 typedef enum {
72 SDP_SUCCESS, /**< Success */
73 SDP_FAILURE,
74 SDP_INVALID_SDP_PTR,
75 SDP_NOT_SDP_DESCRIPTION,
76 SDP_INVALID_TOKEN_ORDERING,
77 SDP_INVALID_PARAMETER,
78 SDP_INVALID_MEDIA_LEVEL,
79 SDP_INVALID_CAPABILITY,
80 SDP_NO_RESOURCE,
81 SDP_UNRECOGNIZED_TOKEN,
82 SDP_NULL_BUF_PTR,
83 SDP_POTENTIAL_SDP_OVERFLOW,
84 SDP_EMPTY_TOKEN,
85 SDP_MAX_RC
86 } sdp_result_e;
88 /**
89 * Indicates invalid bandwidth value
91 #define SDP_INVALID_VALUE (-2)
93 /**
94 * Bandwidth modifier type for b= SDP line
96 typedef enum {
97 SDP_BW_MODIFIER_INVALID = -1,
98 SDP_BW_MODIFIER_AS, /** < b=AS: */
99 SDP_BW_MODIFIER_CT, /** < b=CT: */
100 SDP_BW_MODIFIER_TIAS, /** < b=TIAS: */
101 SDP_MAX_BW_MODIFIER_VAL,
102 SDP_BW_MODIFIER_UNSUPPORTED
103 } sdp_bw_modifier_e;
106 * SDP attribute types
108 /* Attribute Types */
109 typedef enum {
110 SDP_ATTR_BEARER = 0,
111 SDP_ATTR_CALLED,
112 SDP_ATTR_CONN_TYPE,
113 SDP_ATTR_DIALED,
114 SDP_ATTR_DIALING,
115 SDP_ATTR_DIRECTION,
116 SDP_ATTR_EECID,
117 SDP_ATTR_FMTP,
118 SDP_ATTR_SCTPMAP,
119 SDP_ATTR_FRAMING,
120 SDP_ATTR_INACTIVE,
121 SDP_ATTR_PTIME,
122 SDP_ATTR_QOS,
123 SDP_ATTR_CURR,
124 SDP_ATTR_DES,
125 SDP_ATTR_CONF,
126 SDP_ATTR_RECVONLY,
127 SDP_ATTR_RTPMAP,
128 SDP_ATTR_SECURE,
129 SDP_ATTR_SENDONLY,
130 SDP_ATTR_SENDRECV,
131 SDP_ATTR_SUBNET,
132 SDP_ATTR_T38_VERSION,
133 SDP_ATTR_T38_MAXBITRATE,
134 SDP_ATTR_T38_FILLBITREMOVAL,
135 SDP_ATTR_T38_TRANSCODINGMMR,
136 SDP_ATTR_T38_TRANSCODINGJBIG,
137 SDP_ATTR_T38_RATEMGMT,
138 SDP_ATTR_T38_MAXBUFFER,
139 SDP_ATTR_T38_MAXDGRAM,
140 SDP_ATTR_T38_UDPEC,
141 SDP_ATTR_X_CAP,
142 SDP_ATTR_X_CPAR,
143 SDP_ATTR_X_PC_CODEC,
144 SDP_ATTR_X_PC_QOS,
145 SDP_ATTR_X_QOS,
146 SDP_ATTR_X_SQN,
147 SDP_ATTR_TMRGWXID,
148 SDP_ATTR_TC1_PAYLOAD_BYTES,
149 SDP_ATTR_TC1_WINDOW_SIZE,
150 SDP_ATTR_TC2_PAYLOAD_BYTES,
151 SDP_ATTR_TC2_WINDOW_SIZE,
152 SDP_ATTR_RTCP,
153 SDP_ATTR_RTR,
154 SDP_ATTR_SILENCESUPP,
155 SDP_ATTR_SRTP_CONTEXT, /* version 2 sdescriptions */
156 SDP_ATTR_MPTIME,
157 SDP_ATTR_X_SIDIN,
158 SDP_ATTR_X_SIDOUT,
159 SDP_ATTR_X_CONFID,
160 SDP_ATTR_GROUP,
161 SDP_ATTR_MID,
162 SDP_ATTR_SOURCE_FILTER,
163 SDP_ATTR_RTCP_UNICAST,
164 SDP_ATTR_MAXPRATE,
165 SDP_ATTR_SQN,
166 SDP_ATTR_CDSC,
167 SDP_ATTR_CPAR,
168 SDP_ATTR_SPRTMAP,
169 SDP_ATTR_SDESCRIPTIONS, /* version 9 sdescriptions */
170 SDP_ATTR_LABEL,
171 SDP_ATTR_FRAMERATE,
172 SDP_ATTR_ICE_CANDIDATE,
173 SDP_ATTR_ICE_UFRAG,
174 SDP_ATTR_ICE_PWD,
175 SDP_ATTR_ICE_LITE,
176 SDP_ATTR_RTCP_MUX,
177 SDP_ATTR_DTLS_FINGERPRINT,
178 SDP_ATTR_MAXPTIME,
179 SDP_ATTR_RTCP_FB, /* RFC 4585 */
180 SDP_ATTR_SETUP,
181 SDP_ATTR_CONNECTION,
182 SDP_ATTR_EXTMAP, /* RFC 5285 */
183 SDP_ATTR_IDENTITY,
184 SDP_ATTR_MSID,
185 SDP_ATTR_MSID_SEMANTIC,
186 SDP_ATTR_BUNDLE_ONLY,
187 SDP_ATTR_END_OF_CANDIDATES,
188 SDP_ATTR_ICE_OPTIONS,
189 SDP_ATTR_SSRC,
190 SDP_ATTR_IMAGEATTR,
191 SDP_ATTR_SIMULCAST,
192 SDP_ATTR_RID,
193 SDP_ATTR_DTLS_MESSAGE,
194 SDP_ATTR_SCTPPORT,
195 SDP_ATTR_MAXMESSAGESIZE,
196 SDP_ATTR_SSRC_GROUP,
197 SDP_ATTR_RTCP_RSIZE,
198 SDP_MAX_ATTR_TYPES,
199 SDP_ATTR_INVALID
200 } sdp_attr_e;
202 typedef enum {
203 SDP_SETUP_NOT_FOUND = -1,
204 SDP_SETUP_ACTIVE = 0,
205 SDP_SETUP_PASSIVE,
206 SDP_SETUP_ACTPASS,
207 SDP_SETUP_HOLDCONN,
208 SDP_MAX_SETUP,
209 SDP_SETUP_UNKNOWN
210 } sdp_setup_type_e;
212 #endif