echo_port.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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_AEC_PORT_H__
  20. #define __PJMEDIA_AEC_PORT_H__
  21. /**
  22. * @file echo_port.h
  23. * @brief AEC (Accoustic Echo Cancellation) media port.
  24. */
  25. #include <pjmedia/port.h>
  26. /**
  27. * @defgroup PJMEDIA_ECHO_PORT Echo Cancellation Port
  28. * @ingroup PJMEDIA_PORT
  29. * @brief Echo Cancellation
  30. * @{
  31. *
  32. * Wrapper to \ref PJMEDIA_Echo_Cancel into media port interface.
  33. */
  34. PJ_BEGIN_DECL
  35. /**
  36. * Create echo canceller port.
  37. *
  38. * @param pool Pool to allocate memory.
  39. * @param dn_port Downstream port.
  40. * @param tail_ms Tail length in miliseconds.
  41. * @param latency_ms Total lacency introduced by playback and
  42. * recording device. Set to zero if the latency
  43. * is not known.
  44. * @param options Options, as in #pjmedia_echo_create().
  45. * @param p_port Pointer to receive the port instance.
  46. *
  47. * @return PJ_SUCCESS on success.
  48. */
  49. PJ_DECL(pj_status_t) pjmedia_echo_port_create(pj_pool_t *pool,
  50. pjmedia_port *dn_port,
  51. unsigned tail_ms,
  52. unsigned latency_ms,
  53. unsigned options,
  54. pjmedia_port **p_port );
  55. PJ_END_DECL
  56. /**
  57. * @}
  58. */
  59. #endif /* __PJMEDIA_AEC_PORT_H__ */