summaryrefslogtreecommitdiff
path: root/pjmedia/include/pjmedia/errno.h
blob: af3467ede8e821d723c925d9840c3d1c5854a150 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
/* $Id$ */
/* 
 * Copyright (C) 2003-2006 Benny Prijono <benny@prijono.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 */
#ifndef __PJMEDIA_ERRNO_H__
#define __PJMEDIA_ERRNO_H__

/**
 * @file errno.h Error Codes
 * @brief PJMEDIA specific error codes.
 */

#include <pjmedia/types.h>
#include <pj/errno.h>

/**
 * @defgroup PJMEDIA_ERRNO Error Codes
 * @ingroup PJMEDIA_BASE
 * @brief PJMEDIA specific error codes.
 * @{
 */


PJ_BEGIN_DECL


/**
 * Start of error code relative to PJ_ERRNO_START_USER.
 */
#define PJMEDIA_ERRNO_START       (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE)


/**
 * Mapping from PortAudio error codes to pjmedia error space.
 */
#define PJMEDIA_PORTAUDIO_ERRNO_START (PJMEDIA_ERRNO_START+PJ_ERRNO_SPACE_SIZE-1000)

/**
 * Convert PortAudio error code to PJMEDIA error code.
 */
#define PJMEDIA_ERRNO_FROM_PORTAUDIO(err)   (err+PJMEDIA_PORTAUDIO_ERRNO_START)


/************************************************************
 * GENERIC/GENERAL PJMEDIA ERRORS
 ***********************************************************/
/**
 * @hideinitializer
 * General/unknown PJMEDIA error.
 */
#define PJMEDIA_ERROR		    (PJMEDIA_ERRNO_START+1)	/* 220001 */


/************************************************************
 * SDP ERRORS
 ***********************************************************/
/**
 * @hideinitializer
 * Generic invalid SDP descriptor.
 */
#define PJMEDIA_SDP_EINSDP	    (PJMEDIA_ERRNO_START+20)    /* 220020 */
/**
 * @hideinitializer
 * Invalid SDP version.
 */
#define PJMEDIA_SDP_EINVER	    (PJMEDIA_ERRNO_START+21)    /* 220021 */
/**
 * @hideinitializer
 * Invalid SDP origin (o=) line.
 */
#define PJMEDIA_SDP_EINORIGIN	    (PJMEDIA_ERRNO_START+22)    /* 220022 */
/**
 * @hideinitializer
 * Invalid SDP time (t=) line.
 */
#define PJMEDIA_SDP_EINTIME	    (PJMEDIA_ERRNO_START+23)    /* 220023 */
/**
 * @hideinitializer
 * Empty SDP subject/name (s=) line.
 */
#define PJMEDIA_SDP_EINNAME	    (PJMEDIA_ERRNO_START+24)    /* 220024 */
/**
 * @hideinitializer
 * Invalid SDP connection info (c=) line.
 */
#define PJMEDIA_SDP_EINCONN	    (PJMEDIA_ERRNO_START+25)    /* 220025 */
/**
 * @hideinitializer
 * Missing SDP connection info line.
 */
#define PJMEDIA_SDP_EMISSINGCONN    (PJMEDIA_ERRNO_START+26)    /* 220026 */
/**
 * @hideinitializer
 * Invalid attribute (a=) line.
 */
#define PJMEDIA_SDP_EINATTR	    (PJMEDIA_ERRNO_START+27)    /* 220027 */
/**
 * @hideinitializer
 * Invalid rtpmap attribute.
 */
#define PJMEDIA_SDP_EINRTPMAP	    (PJMEDIA_ERRNO_START+28)    /* 220028 */
/**
 * @hideinitializer
 * rtpmap attribute is too long.
 */
#define PJMEDIA_SDP_ERTPMAPTOOLONG  (PJMEDIA_ERRNO_START+29)    /* 220029 */
/**
 * @hideinitializer
 * rtpmap is missing for dynamic payload type.
 */
#define PJMEDIA_SDP_EMISSINGRTPMAP  (PJMEDIA_ERRNO_START+30)    /* 220030 */
/**
 * @hideinitializer
 * Invalid SDP media (m=) line.
 */
#define PJMEDIA_SDP_EINMEDIA	    (PJMEDIA_ERRNO_START+31)    /* 220031 */
/**
 * @hideinitializer
 * No payload format in the media stream.
 */
#define PJMEDIA_SDP_ENOFMT	    (PJMEDIA_ERRNO_START+32)    /* 220032 */
/**
 * @hideinitializer
 * Invalid payload type in media.
 */
#define PJMEDIA_SDP_EINPT	    (PJMEDIA_ERRNO_START+33)    /* 220033 */
/**
 * @hideinitializer
 * Invalid SDP "fmtp" attribute.
 */
#define PJMEDIA_SDP_EINFMTP	    (PJMEDIA_ERRNO_START+34)    /* 220034 */
/**
 * @hideinitializer
 * Invalid SDP "rtcp" attribute.
 */
#define PJMEDIA_SDP_EINRTCP	    (PJMEDIA_ERRNO_START+35)    /* 220035 */


/************************************************************
 * SDP NEGOTIATOR ERRORS
 ***********************************************************/
/**
 * @hideinitializer
 * Invalid state to perform the specified operation.
 */
#define PJMEDIA_SDPNEG_EINSTATE	    (PJMEDIA_ERRNO_START+40)    /* 220040 */
/**
 * @hideinitializer
 * No initial local SDP.
 */
#define PJMEDIA_SDPNEG_ENOINITIAL   (PJMEDIA_ERRNO_START+41)    /* 220041 */
/**
 * @hideinitializer
 * No currently active SDP.
 */
#define PJMEDIA_SDPNEG_ENOACTIVE    (PJMEDIA_ERRNO_START+42)    /* 220042 */
/**
 * @hideinitializer
 * No current offer or answer.
 */
#define PJMEDIA_SDPNEG_ENONEG	    (PJMEDIA_ERRNO_START+43)    /* 220043 */
/**
 * @hideinitializer
 * Media count mismatch in offer and answer.
 */
#define PJMEDIA_SDPNEG_EMISMEDIA    (PJMEDIA_ERRNO_START+44)    /* 220044 */
/**
 * @hideinitializer
 * Media type is different in the remote answer.
 */
#define PJMEDIA_SDPNEG_EINVANSMEDIA (PJMEDIA_ERRNO_START+45)    /* 220045 */
/**
 * @hideinitializer
 * Transport type is different in the remote answer.
 */
#define PJMEDIA_SDPNEG_EINVANSTP    (PJMEDIA_ERRNO_START+46)    /* 220046 */
/**
 * @hideinitializer
 * No common media payload is provided in the answer.
 */
#define PJMEDIA_SDPNEG_EANSNOMEDIA  (PJMEDIA_ERRNO_START+47)    /* 220047 */
/**
 * @hideinitializer
 * No media is active after negotiation.
 */
#define PJMEDIA_SDPNEG_ENOMEDIA	    (PJMEDIA_ERRNO_START+48)    /* 220048 */
/**
 * @hideinitializer
 * No suitable codec for remote offer.
 */
#define PJMEDIA_SDPNEG_NOANSCODEC   (PJMEDIA_ERRNO_START+49)    /* 220049 */
/**
 * @hideinitializer
 * No suitable telephone-event for remote offer.
 */
#define PJMEDIA_SDPNEG_NOANSTELEVENT (PJMEDIA_ERRNO_START+50)   /* 220050 */
/**
 * @hideinitializer
 * No suitable answer for unknown remote offer.
 */
#define PJMEDIA_SDPNEG_NOANSUNKNOWN (PJMEDIA_ERRNO_START+51)    /* 220051 */


/************************************************************
 * SDP COMPARISON STATUS
 ***********************************************************/
/**
 * @hideinitializer
 * SDP media stream not equal.
 */
#define PJMEDIA_SDP_EMEDIANOTEQUAL  (PJMEDIA_ERRNO_START+60)    /* 220060 */
/**
 * @hideinitializer
 * Port number in SDP media descriptor not equal.
 */
#define PJMEDIA_SDP_EPORTNOTEQUAL   (PJMEDIA_ERRNO_START+61)    /* 220061 */
/**
 * @hideinitializer
 * Transport in SDP media descriptor not equal.
 */
#define PJMEDIA_SDP_ETPORTNOTEQUAL  (PJMEDIA_ERRNO_START+62)    /* 220062 */
/**
 * @hideinitializer
 * Media format in SDP media descriptor not equal.
 */
#define PJMEDIA_SDP_EFORMATNOTEQUAL (PJMEDIA_ERRNO_START+63)    /* 220063 */
/**
 * @hideinitializer
 * SDP connection description not equal.
 */
#define PJMEDIA_SDP_ECONNNOTEQUAL   (PJMEDIA_ERRNO_START+64)    /* 220064 */
/**
 * @hideinitializer
 * SDP attributes not equal.
 */
#define PJMEDIA_SDP_EATTRNOTEQUAL   (PJMEDIA_ERRNO_START+65)    /* 220065 */
/**
 * @hideinitializer
 * SDP media direction not equal.
 */
#define PJMEDIA_SDP_EDIRNOTEQUAL    (PJMEDIA_ERRNO_START+66)    /* 220066 */
/**
 * @hideinitializer
 * SDP fmtp attribute not equal.
 */
#define PJMEDIA_SDP_EFMTPNOTEQUAL   (PJMEDIA_ERRNO_START+67)    /* 220067 */
/**
 * @hideinitializer
 * SDP ftpmap attribute not equal.
 */
#define PJMEDIA_SDP_ERTPMAPNOTEQUAL (PJMEDIA_ERRNO_START+68)    /* 220068 */
/**
 * @hideinitializer
 * SDP session descriptor not equal.
 */
#define PJMEDIA_SDP_ESESSNOTEQUAL   (PJMEDIA_ERRNO_START+69)    /* 220069 */
/**
 * @hideinitializer
 * SDP origin not equal.
 */
#define PJMEDIA_SDP_EORIGINNOTEQUAL (PJMEDIA_ERRNO_START+70)    /* 220070 */
/**
 * @hideinitializer
 * SDP name/subject not equal.
 */
#define PJMEDIA_SDP_ENAMENOTEQUAL   (PJMEDIA_ERRNO_START+71)    /* 220071 */
/**
 * @hideinitializer
 * SDP time not equal.
 */
#define PJMEDIA_SDP_ETIMENOTEQUAL   (PJMEDIA_ERRNO_START+72)    /* 220072 */


/************************************************************
 * CODEC
 ***********************************************************/
/**
 * @hideinitializer
 * Unsupported codec.
 */
#define PJMEDIA_CODEC_EUNSUP	    (PJMEDIA_ERRNO_START+80)    /* 220080 */
/**
 * @hideinitializer
 * Codec internal creation error.
 */
#define PJMEDIA_CODEC_EFAILED	    (PJMEDIA_ERRNO_START+81)    /* 220081 */
/**
 * @hideinitializer
 * Codec frame is too short.
 */
#define PJMEDIA_CODEC_EFRMTOOSHORT  (PJMEDIA_ERRNO_START+82)    /* 220082 */
/**
 * @hideinitializer
 * PCM buffer is too short.
 */
#define PJMEDIA_CODEC_EPCMTOOSHORT  (PJMEDIA_ERRNO_START+83)    /* 220083 */
/**
 * @hideinitializer
 * Invalid codec frame length.
 */
#define PJMEDIA_CODEC_EFRMINLEN	    (PJMEDIA_ERRNO_START+84)    /* 220084 */
/**
 * @hideinitializer
 * Invalid PCM frame length.
 */
#define PJMEDIA_CODEC_EPCMFRMINLEN  (PJMEDIA_ERRNO_START+85)    /* 220085 */
/**
 * @hideinitializer
 * Invalid mode.
 */
#define PJMEDIA_CODEC_EINMODE	    (PJMEDIA_ERRNO_START+86)    /* 220086 */


/************************************************************
 * MEDIA
 ***********************************************************/
/**
 * @hideinitializer
 * Invalid remote IP address (in SDP).
 */
#define PJMEDIA_EINVALIDIP	    (PJMEDIA_ERRNO_START+100)    /* 220100 */
/**
 * @hideinitializer
 * Asymetric codec is not supported.
 */
#define PJMEDIA_EASYMCODEC	    (PJMEDIA_ERRNO_START+101)    /* 220101 */
/**
 * @hideinitializer
 * Invalid payload type.
 */
#define PJMEDIA_EINVALIDPT	    (PJMEDIA_ERRNO_START+102)    /* 220102 */
/**
 * @hideinitializer
 * Missing rtpmap.
 */
#define PJMEDIA_EMISSINGRTPMAP	    (PJMEDIA_ERRNO_START+103)    /* 220103 */
/**
 * @hideinitializer
 * Invalid media type.
 */
#define PJMEDIA_EINVALIMEDIATYPE    (PJMEDIA_ERRNO_START+104)    /* 220104 */
/**
 * @hideinitializer
 * Remote does not support DTMF.
 */
#define PJMEDIA_EREMOTENODTMF	    (PJMEDIA_ERRNO_START+105)    /* 220105 */
/**
 * @hideinitializer
 * Invalid DTMF digit.
 */
#define PJMEDIA_RTP_EINDTMF	    (PJMEDIA_ERRNO_START+106)    /* 220106 */
/**
 * @hideinitializer
 * Remote does not support RFC 2833
 */
#define PJMEDIA_RTP_EREMNORFC2833   (PJMEDIA_ERRNO_START+107)    /* 220107 */



/************************************************************
 * RTP SESSION ERRORS
 ***********************************************************/
/**
 * @hideinitializer
 * General invalid RTP packet error.
 */
#define PJMEDIA_RTP_EINPKT	    (PJMEDIA_ERRNO_START+120)    /* 220120 */
/**
 * @hideinitializer
 * Invalid RTP packet packing.
 */
#define PJMEDIA_RTP_EINPACK	    (PJMEDIA_ERRNO_START+121)    /* 220121 */
/**
 * @hideinitializer
 * Invalid RTP packet version.
 */
#define PJMEDIA_RTP_EINVER	    (PJMEDIA_ERRNO_START+122)    /* 220122 */
/**
 * @hideinitializer
 * RTP SSRC id mismatch.
 */
#define PJMEDIA_RTP_EINSSRC	    (PJMEDIA_ERRNO_START+123)    /* 220123 */
/**
 * @hideinitializer
 * RTP payload type mismatch.
 */
#define PJMEDIA_RTP_EINPT	    (PJMEDIA_ERRNO_START+124)    /* 220124 */
/**
 * @hideinitializer
 * Invalid RTP packet length.
 */
#define PJMEDIA_RTP_EINLEN	    (PJMEDIA_ERRNO_START+125)    /* 220125 */
/**
 * @hideinitializer
 * RTP session restarted.
 */
#define PJMEDIA_RTP_ESESSRESTART    (PJMEDIA_ERRNO_START+130)    /* 220130 */
/**
 * @hideinitializer
 * RTP session in probation
 */
#define PJMEDIA_RTP_ESESSPROBATION  (PJMEDIA_ERRNO_START+131)    /* 220131 */
/**
 * @hideinitializer
 * Bad RTP sequence number
 */
#define PJMEDIA_RTP_EBADSEQ	    (PJMEDIA_ERRNO_START+132)    /* 220132 */
/**
 * @hideinitializer
 * RTP media port destination is not configured
 */
#define PJMEDIA_RTP_EBADDEST	    (PJMEDIA_ERRNO_START+133)    /* 220133 */
/**
 * @hideinitializer
 * RTP is not configured.
 */
#define PJMEDIA_RTP_ENOCONFIG	    (PJMEDIA_ERRNO_START+134)    /* 220134 */


/************************************************************
 * PORT ERRORS
 ***********************************************************/
/**
 * @hideinitializer
 * Generic incompatible port error.
 */
#define PJMEDIA_ENOTCOMPATIBLE	    (PJMEDIA_ERRNO_START+160)    /* 220160 */
/**
 * @hideinitializer
 * Incompatible clock rate
 */
#define PJMEDIA_ENCCLOCKRATE	    (PJMEDIA_ERRNO_START+161)    /* 220161 */
/**
 * @hideinitializer
 * Incompatible samples per frame
 */
#define PJMEDIA_ENCSAMPLESPFRAME    (PJMEDIA_ERRNO_START+162)    /* 220162 */
/**
 * @hideinitializer
 * Incompatible media type
 */
#define PJMEDIA_ENCTYPE		    (PJMEDIA_ERRNO_START+163)    /* 220163 */
/**
 * @hideinitializer
 * Incompatible bits per sample
 */
#define PJMEDIA_ENCBITS		    (PJMEDIA_ERRNO_START+164)    /* 220164 */
/**
 * @hideinitializer
 * Incompatible bytes per frame
 */
#define PJMEDIA_ENCBYTES	    (PJMEDIA_ERRNO_START+165)    /* 220165 */
/**
 * @hideinitializer
 * Incompatible number of channels
 */
#define PJMEDIA_ENCCHANNEL	    (PJMEDIA_ERRNO_START+166)    /* 220166 */


/************************************************************
 * FILE ERRORS
 ***********************************************************/
/**
 * @hideinitializer
 * Not a valid WAVE file.
 */
#define PJMEDIA_ENOTVALIDWAVE	    (PJMEDIA_ERRNO_START+180)    /* 220180 */
/**
 * @hideinitializer
 * Unsupported WAVE file.
 */
#define PJMEDIA_EWAVEUNSUPP	    (PJMEDIA_ERRNO_START+181)    /* 220181 */
/**
 * @hideinitializer
 * Wave file too short.
 */
#define PJMEDIA_EWAVETOOSHORT	    (PJMEDIA_ERRNO_START+182)    /* 220182 */
/**
 * @hideinitializer
 * Sound frame is too large for file buffer.
 */
#define PJMEDIA_EFRMFILETOOBIG	    (PJMEDIA_ERRNO_START+183)    /* 220183 */


/************************************************************
 * SOUND DEVICE ERRORS
 ***********************************************************/
/**
 * @hideinitializer
 * No suitable audio capture device.
 */
#define PJMEDIA_ENOSNDREC	    (PJMEDIA_ERRNO_START+200)    /* 220200 */
/**
 * @hideinitializer
 * No suitable audio playback device.
 */
#define PJMEDIA_ENOSNDPLAY	    (PJMEDIA_ERRNO_START+201)    /* 220201 */
/**
 * @hideinitializer
 * Invalid sound device ID.
 */
#define PJMEDIA_ESNDINDEVID	    (PJMEDIA_ERRNO_START+202)    /* 220202 */
/**
 * @hideinitializer
 * Invalid sample format for sound device.
 */
#define PJMEDIA_ESNDINSAMPLEFMT	    (PJMEDIA_ERRNO_START+203)    /* 220203 */



PJ_END_DECL

/**
 * @}
 */


#endif	/* __PJMEDIA_ERRNO_H__ */