errno.h 19 KB

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