1 /* $Id$ */
2 /*
3  * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20 #ifndef __PJMEDIA_ERRNO_H__
21 #define __PJMEDIA_ERRNO_H__
22 
23 /**
24  * @file errno.h Error Codes
25  * @brief PJMEDIA specific error codes.
26  */
27 
28 #include <pjmedia/types.h>
29 #include <pj/errno.h>
30 
31 /**
32  * @defgroup PJMEDIA_ERRNO Error Codes
33  * @ingroup PJMEDIA_BASE
34  * @brief PJMEDIA specific error codes.
35  * @{
36  */
37 
38 
39 PJ_BEGIN_DECL
40 
41 
42 /**
43  * Start of error code relative to PJ_ERRNO_START_USER.
44  */
45 #define PJMEDIA_ERRNO_START       (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE)
46 #define PJMEDIA_ERRNO_END         (PJMEDIA_ERRNO_START + PJ_ERRNO_SPACE_SIZE - 1)
47 
48 
49 /**
50  * Mapping from PortAudio error codes to pjmedia error space.
51  */
52 #define PJMEDIA_PORTAUDIO_ERRNO_START (PJMEDIA_ERRNO_END-10000)
53 #define PJMEDIA_PORTAUDIO_ERRNO_END   (PJMEDIA_PORTAUDIO_ERRNO_START + 10000 -1)
54 /**
55  * Convert PortAudio error code to PJMEDIA error code.
56  * PortAudio error code range: 0 >= err >= -10000
57  */
58 #define PJMEDIA_ERRNO_FROM_PORTAUDIO(err)   ((int)PJMEDIA_PORTAUDIO_ERRNO_START-err)
59 
60 
61 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0)
62 
63  /**
64  * Mapping from LibSRTP error codes to pjmedia error space.
65  */
66 #define PJMEDIA_LIBSRTP_ERRNO_START (PJMEDIA_ERRNO_END-10200)
67 #define PJMEDIA_LIBSRTP_ERRNO_END   (PJMEDIA_LIBSRTP_ERRNO_START + 200 - 1)
68 /**
69  * Convert LibSRTP error code to PJMEDIA error code.
70  * LibSRTP error code range: 0 <= err < 200
71  */
72 #define PJMEDIA_ERRNO_FROM_LIBSRTP(err)   (PJMEDIA_LIBSRTP_ERRNO_START+err)
73 
74 #endif
75 
76 /************************************************************
77  * GENERIC/GENERAL PJMEDIA ERRORS
78  ***********************************************************/
79 /**
80  * @hideinitializer
81  * General/unknown PJMEDIA error.
82  */
83 #define PJMEDIA_ERROR		    (PJMEDIA_ERRNO_START+1)	/* 220001 */
84 
85 
86 /************************************************************
87  * SDP ERRORS
88  ***********************************************************/
89 /**
90  * @hideinitializer
91  * Generic invalid SDP descriptor.
92  */
93 #define PJMEDIA_SDP_EINSDP	    (PJMEDIA_ERRNO_START+20)    /* 220020 */
94 /**
95  * @hideinitializer
96  * Invalid SDP version.
97  */
98 #define PJMEDIA_SDP_EINVER	    (PJMEDIA_ERRNO_START+21)    /* 220021 */
99 /**
100  * @hideinitializer
101  * Invalid SDP origin (o=) line.
102  */
103 #define PJMEDIA_SDP_EINORIGIN	    (PJMEDIA_ERRNO_START+22)    /* 220022 */
104 /**
105  * @hideinitializer
106  * Invalid SDP time (t=) line.
107  */
108 #define PJMEDIA_SDP_EINTIME	    (PJMEDIA_ERRNO_START+23)    /* 220023 */
109 /**
110  * @hideinitializer
111  * Empty SDP subject/name (s=) line.
112  */
113 #define PJMEDIA_SDP_EINNAME	    (PJMEDIA_ERRNO_START+24)    /* 220024 */
114 /**
115  * @hideinitializer
116  * Invalid SDP connection info (c=) line.
117  */
118 #define PJMEDIA_SDP_EINCONN	    (PJMEDIA_ERRNO_START+25)    /* 220025 */
119 /**
120  * @hideinitializer
121  * Missing SDP connection info line.
122  */
123 #define PJMEDIA_SDP_EMISSINGCONN    (PJMEDIA_ERRNO_START+26)    /* 220026 */
124 /**
125  * @hideinitializer
126  * Invalid attribute (a=) line.
127  */
128 #define PJMEDIA_SDP_EINATTR	    (PJMEDIA_ERRNO_START+27)    /* 220027 */
129 /**
130  * @hideinitializer
131  * Invalid rtpmap attribute.
132  */
133 #define PJMEDIA_SDP_EINRTPMAP	    (PJMEDIA_ERRNO_START+28)    /* 220028 */
134 /**
135  * @hideinitializer
136  * rtpmap attribute is too long.
137  */
138 #define PJMEDIA_SDP_ERTPMAPTOOLONG  (PJMEDIA_ERRNO_START+29)    /* 220029 */
139 /**
140  * @hideinitializer
141  * rtpmap is missing for dynamic payload type.
142  */
143 #define PJMEDIA_SDP_EMISSINGRTPMAP  (PJMEDIA_ERRNO_START+30)    /* 220030 */
144 /**
145  * @hideinitializer
146  * Invalid SDP media (m=) line.
147  */
148 #define PJMEDIA_SDP_EINMEDIA	    (PJMEDIA_ERRNO_START+31)    /* 220031 */
149 /**
150  * @hideinitializer
151  * No payload format in the media stream.
152  */
153 #define PJMEDIA_SDP_ENOFMT	    (PJMEDIA_ERRNO_START+32)    /* 220032 */
154 /**
155  * @hideinitializer
156  * Invalid payload type in media.
157  */
158 #define PJMEDIA_SDP_EINPT	    (PJMEDIA_ERRNO_START+33)    /* 220033 */
159 /**
160  * @hideinitializer
161  * Invalid SDP "fmtp" attribute.
162  */
163 #define PJMEDIA_SDP_EINFMTP	    (PJMEDIA_ERRNO_START+34)    /* 220034 */
164 /**
165  * @hideinitializer
166  * Invalid SDP "rtcp" attribute.
167  */
168 #define PJMEDIA_SDP_EINRTCP	    (PJMEDIA_ERRNO_START+35)    /* 220035 */
169 /**
170  * @hideinitializer
171  * Invalid SDP media transport protocol.
172  */
173 #define PJMEDIA_SDP_EINPROTO	    (PJMEDIA_ERRNO_START+36)    /* 220036 */
174 /**
175  * @hideinitializer
176  * Invalid SDP bandwidth info (b=) line.
177  */
178 #define PJMEDIA_SDP_EINBANDW	    (PJMEDIA_ERRNO_START+37)    /* 220037 */
179 /**
180  * @hideinitializer
181  * Invalid SDP "ssrc" attribute.
182  */
183 #define PJMEDIA_SDP_EINSSRC	    (PJMEDIA_ERRNO_START+38)    /* 220038 */
184 
185 
186 /************************************************************
187  * SDP NEGOTIATOR ERRORS
188  ***********************************************************/
189 /**
190  * @hideinitializer
191  * Invalid state to perform the specified operation.
192  */
193 #define PJMEDIA_SDPNEG_EINSTATE	    (PJMEDIA_ERRNO_START+40)    /* 220040 */
194 /**
195  * @hideinitializer
196  * No initial local SDP.
197  */
198 #define PJMEDIA_SDPNEG_ENOINITIAL   (PJMEDIA_ERRNO_START+41)    /* 220041 */
199 /**
200  * @hideinitializer
201  * No currently active SDP.
202  */
203 #define PJMEDIA_SDPNEG_ENOACTIVE    (PJMEDIA_ERRNO_START+42)    /* 220042 */
204 /**
205  * @hideinitializer
206  * No current offer or answer.
207  */
208 #define PJMEDIA_SDPNEG_ENONEG	    (PJMEDIA_ERRNO_START+43)    /* 220043 */
209 /**
210  * @hideinitializer
211  * Media count mismatch in offer and answer.
212  */
213 #define PJMEDIA_SDPNEG_EMISMEDIA    (PJMEDIA_ERRNO_START+44)    /* 220044 */
214 /**
215  * @hideinitializer
216  * Media type is different in the remote answer.
217  */
218 #define PJMEDIA_SDPNEG_EINVANSMEDIA (PJMEDIA_ERRNO_START+45)    /* 220045 */
219 /**
220  * @hideinitializer
221  * Transport type is different in the remote answer.
222  */
223 #define PJMEDIA_SDPNEG_EINVANSTP    (PJMEDIA_ERRNO_START+46)    /* 220046 */
224 /**
225  * @hideinitializer
226  * No common media payload is provided in the answer.
227  */
228 #define PJMEDIA_SDPNEG_EANSNOMEDIA  (PJMEDIA_ERRNO_START+47)    /* 220047 */
229 /**
230  * @hideinitializer
231  * No media is active after negotiation.
232  */
233 #define PJMEDIA_SDPNEG_ENOMEDIA	    (PJMEDIA_ERRNO_START+48)    /* 220048 */
234 /**
235  * @hideinitializer
236  * No suitable codec for remote offer.
237  */
238 #define PJMEDIA_SDPNEG_NOANSCODEC   (PJMEDIA_ERRNO_START+49)    /* 220049 */
239 /**
240  * @hideinitializer
241  * No suitable telephone-event for remote offer.
242  */
243 #define PJMEDIA_SDPNEG_NOANSTELEVENT (PJMEDIA_ERRNO_START+50)   /* 220050 */
244 /**
245  * @hideinitializer
246  * No suitable answer for unknown remote offer.
247  */
248 #define PJMEDIA_SDPNEG_NOANSUNKNOWN (PJMEDIA_ERRNO_START+51)    /* 220051 */
249 
250 
251 /************************************************************
252  * SDP COMPARISON STATUS
253  ***********************************************************/
254 /**
255  * @hideinitializer
256  * SDP media stream not equal.
257  */
258 #define PJMEDIA_SDP_EMEDIANOTEQUAL  (PJMEDIA_ERRNO_START+60)    /* 220060 */
259 /**
260  * @hideinitializer
261  * Port number in SDP media descriptor not equal.
262  */
263 #define PJMEDIA_SDP_EPORTNOTEQUAL   (PJMEDIA_ERRNO_START+61)    /* 220061 */
264 /**
265  * @hideinitializer
266  * Transport in SDP media descriptor not equal.
267  */
268 #define PJMEDIA_SDP_ETPORTNOTEQUAL  (PJMEDIA_ERRNO_START+62)    /* 220062 */
269 /**
270  * @hideinitializer
271  * Media format in SDP media descriptor not equal.
272  */
273 #define PJMEDIA_SDP_EFORMATNOTEQUAL (PJMEDIA_ERRNO_START+63)    /* 220063 */
274 /**
275  * @hideinitializer
276  * SDP connection description not equal.
277  */
278 #define PJMEDIA_SDP_ECONNNOTEQUAL   (PJMEDIA_ERRNO_START+64)    /* 220064 */
279 /**
280  * @hideinitializer
281  * SDP attributes not equal.
282  */
283 #define PJMEDIA_SDP_EATTRNOTEQUAL   (PJMEDIA_ERRNO_START+65)    /* 220065 */
284 /**
285  * @hideinitializer
286  * SDP media direction not equal.
287  */
288 #define PJMEDIA_SDP_EDIRNOTEQUAL    (PJMEDIA_ERRNO_START+66)    /* 220066 */
289 /**
290  * @hideinitializer
291  * SDP fmtp attribute not equal.
292  */
293 #define PJMEDIA_SDP_EFMTPNOTEQUAL   (PJMEDIA_ERRNO_START+67)    /* 220067 */
294 /**
295  * @hideinitializer
296  * SDP ftpmap attribute not equal.
297  */
298 #define PJMEDIA_SDP_ERTPMAPNOTEQUAL (PJMEDIA_ERRNO_START+68)    /* 220068 */
299 /**
300  * @hideinitializer
301  * SDP session descriptor not equal.
302  */
303 #define PJMEDIA_SDP_ESESSNOTEQUAL   (PJMEDIA_ERRNO_START+69)    /* 220069 */
304 /**
305  * @hideinitializer
306  * SDP origin not equal.
307  */
308 #define PJMEDIA_SDP_EORIGINNOTEQUAL (PJMEDIA_ERRNO_START+70)    /* 220070 */
309 /**
310  * @hideinitializer
311  * SDP name/subject not equal.
312  */
313 #define PJMEDIA_SDP_ENAMENOTEQUAL   (PJMEDIA_ERRNO_START+71)    /* 220071 */
314 /**
315  * @hideinitializer
316  * SDP time not equal.
317  */
318 #define PJMEDIA_SDP_ETIMENOTEQUAL   (PJMEDIA_ERRNO_START+72)    /* 220072 */
319 
320 
321 /************************************************************
322  * CODEC
323  ***********************************************************/
324 /**
325  * @hideinitializer
326  * Unsupported codec.
327  */
328 #define PJMEDIA_CODEC_EUNSUP	    (PJMEDIA_ERRNO_START+80)    /* 220080 */
329 /**
330  * @hideinitializer
331  * Codec internal creation error.
332  */
333 #define PJMEDIA_CODEC_EFAILED	    (PJMEDIA_ERRNO_START+81)    /* 220081 */
334 /**
335  * @hideinitializer
336  * Codec frame is too short.
337  */
338 #define PJMEDIA_CODEC_EFRMTOOSHORT  (PJMEDIA_ERRNO_START+82)    /* 220082 */
339 /**
340  * @hideinitializer
341  * PCM buffer is too short.
342  */
343 #define PJMEDIA_CODEC_EPCMTOOSHORT  (PJMEDIA_ERRNO_START+83)    /* 220083 */
344 /**
345  * @hideinitializer
346  * Invalid codec frame length.
347  */
348 #define PJMEDIA_CODEC_EFRMINLEN	    (PJMEDIA_ERRNO_START+84)    /* 220084 */
349 /**
350  * @hideinitializer
351  * Invalid PCM frame length.
352  */
353 #define PJMEDIA_CODEC_EPCMFRMINLEN  (PJMEDIA_ERRNO_START+85)    /* 220085 */
354 /**
355  * @hideinitializer
356  * Invalid mode.
357  */
358 #define PJMEDIA_CODEC_EINMODE	    (PJMEDIA_ERRNO_START+86)    /* 220086 */
359 /**
360  * @hideinitializer
361  * Bad or corrupted bitstream.
362  */
363 #define PJMEDIA_CODEC_EBADBITSTREAM (PJMEDIA_ERRNO_START+87)    /* 220087 */
364 
365 
366 /************************************************************
367  * MEDIA
368  ***********************************************************/
369 /**
370  * @hideinitializer
371  * Invalid remote IP address (in SDP).
372  */
373 #define PJMEDIA_EINVALIDIP	    (PJMEDIA_ERRNO_START+100)    /* 220100 */
374 /**
375  * @hideinitializer
376  * Asymetric codec is not supported.
377  */
378 #define PJMEDIA_EASYMCODEC	    (PJMEDIA_ERRNO_START+101)    /* 220101 */
379 /**
380  * @hideinitializer
381  * Invalid payload type.
382  */
383 #define PJMEDIA_EINVALIDPT	    (PJMEDIA_ERRNO_START+102)    /* 220102 */
384 /**
385  * @hideinitializer
386  * Missing rtpmap.
387  */
388 #define PJMEDIA_EMISSINGRTPMAP	    (PJMEDIA_ERRNO_START+103)    /* 220103 */
389 /**
390  * @hideinitializer
391  * Invalid media type.
392  */
393 #define PJMEDIA_EINVALIMEDIATYPE    (PJMEDIA_ERRNO_START+104)    /* 220104 */
394 /**
395  * @hideinitializer
396  * Remote does not support DTMF.
397  */
398 #define PJMEDIA_EREMOTENODTMF	    (PJMEDIA_ERRNO_START+105)    /* 220105 */
399 /**
400  * @hideinitializer
401  * Invalid DTMF digit.
402  */
403 #define PJMEDIA_RTP_EINDTMF	    (PJMEDIA_ERRNO_START+106)    /* 220106 */
404 /**
405  * @hideinitializer
406  * Remote does not support RFC 2833
407  */
408 #define PJMEDIA_RTP_EREMNORFC2833   (PJMEDIA_ERRNO_START+107)    /* 220107 */
409 /**
410  * @hideinitializer
411  * Invalid or bad format
412  */
413 #define PJMEDIA_EBADFMT             (PJMEDIA_ERRNO_START+108)    /* 220108 */
414 /**
415  * @hideinitializer
416  * Unsupported media type.
417  */
418 #define PJMEDIA_EUNSUPMEDIATYPE     (PJMEDIA_ERRNO_START+109)    /* 220109 */
419 
420 /************************************************************
421  * RTP SESSION ERRORS
422  ***********************************************************/
423 /**
424  * @hideinitializer
425  * General invalid RTP packet error.
426  */
427 #define PJMEDIA_RTP_EINPKT	    (PJMEDIA_ERRNO_START+120)    /* 220120 */
428 /**
429  * @hideinitializer
430  * Invalid RTP packet packing.
431  */
432 #define PJMEDIA_RTP_EINPACK	    (PJMEDIA_ERRNO_START+121)    /* 220121 */
433 /**
434  * @hideinitializer
435  * Invalid RTP packet version.
436  */
437 #define PJMEDIA_RTP_EINVER	    (PJMEDIA_ERRNO_START+122)    /* 220122 */
438 /**
439  * @hideinitializer
440  * RTP SSRC id mismatch.
441  */
442 #define PJMEDIA_RTP_EINSSRC	    (PJMEDIA_ERRNO_START+123)    /* 220123 */
443 /**
444  * @hideinitializer
445  * RTP payload type mismatch.
446  */
447 #define PJMEDIA_RTP_EINPT	    (PJMEDIA_ERRNO_START+124)    /* 220124 */
448 /**
449  * @hideinitializer
450  * Invalid RTP packet length.
451  */
452 #define PJMEDIA_RTP_EINLEN	    (PJMEDIA_ERRNO_START+125)    /* 220125 */
453 /**
454  * @hideinitializer
455  * RTP session restarted.
456  */
457 #define PJMEDIA_RTP_ESESSRESTART    (PJMEDIA_ERRNO_START+130)    /* 220130 */
458 /**
459  * @hideinitializer
460  * RTP session in probation
461  */
462 #define PJMEDIA_RTP_ESESSPROBATION  (PJMEDIA_ERRNO_START+131)    /* 220131 */
463 /**
464  * @hideinitializer
465  * Bad RTP sequence number
466  */
467 #define PJMEDIA_RTP_EBADSEQ	    (PJMEDIA_ERRNO_START+132)    /* 220132 */
468 /**
469  * @hideinitializer
470  * RTP media port destination is not configured
471  */
472 #define PJMEDIA_RTP_EBADDEST	    (PJMEDIA_ERRNO_START+133)    /* 220133 */
473 /**
474  * @hideinitializer
475  * RTP is not configured.
476  */
477 #define PJMEDIA_RTP_ENOCONFIG	    (PJMEDIA_ERRNO_START+134)    /* 220134 */
478 
479 
480 /************************************************************
481  * PORT ERRORS
482  ***********************************************************/
483 /**
484  * @hideinitializer
485  * Generic incompatible port error.
486  */
487 #define PJMEDIA_ENOTCOMPATIBLE	    (PJMEDIA_ERRNO_START+160)    /* 220160 */
488 /**
489  * @hideinitializer
490  * Incompatible clock rate
491  */
492 #define PJMEDIA_ENCCLOCKRATE	    (PJMEDIA_ERRNO_START+161)    /* 220161 */
493 /**
494  * @hideinitializer
495  * Incompatible samples per frame
496  */
497 #define PJMEDIA_ENCSAMPLESPFRAME    (PJMEDIA_ERRNO_START+162)    /* 220162 */
498 /**
499  * @hideinitializer
500  * Incompatible media type
501  */
502 #define PJMEDIA_ENCTYPE		    (PJMEDIA_ERRNO_START+163)    /* 220163 */
503 /**
504  * @hideinitializer
505  * Incompatible bits per sample
506  */
507 #define PJMEDIA_ENCBITS		    (PJMEDIA_ERRNO_START+164)    /* 220164 */
508 /**
509  * @hideinitializer
510  * Incompatible bytes per frame
511  */
512 #define PJMEDIA_ENCBYTES	    (PJMEDIA_ERRNO_START+165)    /* 220165 */
513 /**
514  * @hideinitializer
515  * Incompatible number of channels
516  */
517 #define PJMEDIA_ENCCHANNEL	    (PJMEDIA_ERRNO_START+166)    /* 220166 */
518 
519 
520 /************************************************************
521  * FILE ERRORS
522  ***********************************************************/
523 /**
524  * @hideinitializer
525  * Not a valid WAVE file.
526  */
527 #define PJMEDIA_ENOTVALIDWAVE	    (PJMEDIA_ERRNO_START+180)    /* 220180 */
528 /**
529  * @hideinitializer
530  * Unsupported WAVE file.
531  */
532 #define PJMEDIA_EWAVEUNSUPP	    (PJMEDIA_ERRNO_START+181)    /* 220181 */
533 /**
534  * @hideinitializer
535  * Wave file too short.
536  */
537 #define PJMEDIA_EWAVETOOSHORT	    (PJMEDIA_ERRNO_START+182)    /* 220182 */
538 /**
539  * @hideinitializer
540  * Sound frame is too large for file buffer.
541  */
542 #define PJMEDIA_EFRMFILETOOBIG	    (PJMEDIA_ERRNO_START+183)    /* 220183 */
543 /**
544  * @hideinitializer
545  * Unsupported AVI file.
546  */
547 #define PJMEDIA_EAVIUNSUPP	    (PJMEDIA_ERRNO_START+191)    /* 220191 */
548 
549 
550 /************************************************************
551  * SOUND DEVICE ERRORS
552  ***********************************************************/
553 /**
554  * @hideinitializer
555  * No suitable audio capture device.
556  */
557 #define PJMEDIA_ENOSNDREC	    (PJMEDIA_ERRNO_START+200)    /* 220200 */
558 /**
559  * @hideinitializer
560  * No suitable audio playback device.
561  */
562 #define PJMEDIA_ENOSNDPLAY	    (PJMEDIA_ERRNO_START+201)    /* 220201 */
563 /**
564  * @hideinitializer
565  * Invalid sound device ID.
566  */
567 #define PJMEDIA_ESNDINDEVID	    (PJMEDIA_ERRNO_START+202)    /* 220202 */
568 /**
569  * @hideinitializer
570  * Invalid sample format for sound device.
571  */
572 #define PJMEDIA_ESNDINSAMPLEFMT	    (PJMEDIA_ERRNO_START+203)    /* 220203 */
573 
574 
575 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0)
576 /************************************************************
577  * SRTP TRANSPORT ERRORS
578  ***********************************************************/
579 /**
580  * @hideinitializer
581  * SRTP crypto-suite name not match the offerer tag.
582  */
583 #define PJMEDIA_SRTP_ECRYPTONOTMATCH (PJMEDIA_ERRNO_START+220)   /* 220220 */
584 /**
585  * @hideinitializer
586  * Invalid SRTP key length for specific crypto.
587  */
588 #define PJMEDIA_SRTP_EINKEYLEN	    (PJMEDIA_ERRNO_START+221)    /* 220221 */
589 /**
590  * @hideinitializer
591  * Unsupported SRTP crypto-suite.
592  */
593 #define PJMEDIA_SRTP_ENOTSUPCRYPTO  (PJMEDIA_ERRNO_START+222)    /* 220222 */
594 /**
595  * @hideinitializer
596  * SRTP SDP contains ambigue answer.
597  */
598 #define PJMEDIA_SRTP_ESDPAMBIGUEANS (PJMEDIA_ERRNO_START+223)    /* 220223 */
599 /**
600  * @hideinitializer
601  * Duplicated crypto tag.
602  */
603 #define PJMEDIA_SRTP_ESDPDUPCRYPTOTAG (PJMEDIA_ERRNO_START+224)  /* 220224 */
604 /**
605  * @hideinitializer
606  * Invalid crypto attribute.
607  */
608 #define PJMEDIA_SRTP_ESDPINCRYPTO   (PJMEDIA_ERRNO_START+225)    /* 220225 */
609 /**
610  * @hideinitializer
611  * Invalid crypto tag.
612  */
613 #define PJMEDIA_SRTP_ESDPINCRYPTOTAG (PJMEDIA_ERRNO_START+226)   /* 220226 */
614 /**
615  * @hideinitializer
616  * Invalid SDP media transport for SRTP.
617  */
618 #define PJMEDIA_SRTP_ESDPINTRANSPORT (PJMEDIA_ERRNO_START+227)   /* 220227 */
619 /**
620  * @hideinitializer
621  * SRTP crypto attribute required in SDP.
622  */
623 #define PJMEDIA_SRTP_ESDPREQCRYPTO  (PJMEDIA_ERRNO_START+228)    /* 220228 */
624 /**
625  * @hideinitializer
626  * Secure transport required in SDP media descriptor.
627  */
628 #define PJMEDIA_SRTP_ESDPREQSECTP   (PJMEDIA_ERRNO_START+229)    /* 220229 */
629 /**
630  * @hideinitializer
631  * SRTP parameters negotiation still in progress.
632  */
633 #define PJMEDIA_SRTP_EKEYNOTREADY   (PJMEDIA_ERRNO_START+230)	 /* 220230 */
634 
635 /**
636  * @hideinitializer
637  * No matching SRTP crypto-suite after DTLS nego.
638  */
639 #define PJMEDIA_SRTP_DTLS_ENOCRYPTO (PJMEDIA_ERRNO_START+240)    /* 220240 */
640 
641 /**
642  * @hideinitializer
643  * No certificate supplied by peer in DTLS nego.
644  */
645 #define PJMEDIA_SRTP_DTLS_EPEERNOCERT (PJMEDIA_ERRNO_START+241)  /* 220241 */
646 
647 /**
648  * @hideinitializer
649  * Fingerprint from signalling not match to actual fingerprint.
650  */
651 #define PJMEDIA_SRTP_DTLS_EFPNOTMATCH (PJMEDIA_ERRNO_START+242)  /* 220242 */
652 
653 /**
654  * @hideinitializer
655  * Fingerprint not found.
656  */
657 #define PJMEDIA_SRTP_DTLS_ENOFPRINT (PJMEDIA_ERRNO_START+243)	/* 220243 */
658 
659 /**
660  * @hideinitializer
661  * No valid SRTP protection profile for DTLS.
662  */
663 #define PJMEDIA_SRTP_DTLS_ENOPROFILE (PJMEDIA_ERRNO_START+244)   /* 220244 */
664 
665 #endif /* PJMEDIA_HAS_SRTP */
666 
667 
668 /**
669  * Get error message for the specified error code. Note that this
670  * function is only able to decode PJMEDIA specific error code.
671  * Application should use pj_strerror(), which should be able to
672  * decode all error codes belonging to all subsystems (e.g. pjlib,
673  * pjmedia, pjsip, etc).
674  *
675  * @param status    The error code.
676  * @param buffer    The buffer where to put the error message.
677  * @param bufsize   Size of the buffer.
678  *
679  * @return	    The error message as NULL terminated string,
680  *                  wrapped with pj_str_t.
681  */
682 PJ_DECL(pj_str_t) pjmedia_strerror( pj_status_t status, char *buffer,
683 				    pj_size_t bufsize);
684 
685 
686 PJ_END_DECL
687 
688 /**
689  * @}
690  */
691 
692 
693 #endif	/* __PJMEDIA_ERRNO_H__ */
694 
695