g711.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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_G711_H__
  20. #define __PJMEDIA_G711_H__
  21. /**
  22. * @file g711.h
  23. * @brief G711 Codec
  24. */
  25. #include <pjmedia-codec/types.h>
  26. /**
  27. * @defgroup PJMED_G711 G.711 Codec
  28. * @ingroup PJMEDIA_CODEC_CODECS
  29. * @brief Standard G.711/PCMA and PCMU codec.
  30. * @{
  31. *
  32. * This section describes functions to initialize and register G.711 codec
  33. * factory to the codec manager. After the codec factory has been registered,
  34. * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
  35. *
  36. * The G.711 is an ultra low complexity codecs and in trade-off it results
  37. * in high bitrate, i.e: 64kbps for 16-bit PCM with sampling rate 8000Hz.
  38. *
  39. * The factory contains two main compression algorithms, PCMU/u-Law and
  40. * PCMA/A-Law.
  41. *
  42. * \section codec_setting Codec Settings
  43. *
  44. * \subsection general_setting General Settings
  45. *
  46. * General codec settings for this codec such as VAD and PLC can be
  47. * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
  48. * Please see the documentation of #pjmedia_codec_param for more info.
  49. *
  50. * \subsection specific_setting Codec Specific Settings
  51. *
  52. * Currently none.
  53. */
  54. PJ_BEGIN_DECL
  55. /**
  56. * Initialize and register G711 codec factory to pjmedia endpoint.
  57. * This will register PCMU and PCMA codec, in that order.
  58. *
  59. * @param endpt The pjmedia endpoint.
  60. *
  61. * @return PJ_SUCCESS on success.
  62. */
  63. PJ_DECL(pj_status_t) pjmedia_codec_g711_init(pjmedia_endpt *endpt);
  64. /**
  65. * Unregister G711 codec factory from pjmedia endpoint.
  66. *
  67. * @return PJ_SUCCESS on success.
  68. */
  69. PJ_DECL(pj_status_t) pjmedia_codec_g711_deinit(void);
  70. PJ_END_DECL
  71. /**
  72. * @}
  73. */
  74. #endif /* __PJMEDIA_G711_H__ */