null_port.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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_NULL_PORT_H__
  20. #define __PJMEDIA_NULL_PORT_H__
  21. /**
  22. * @file null_port.h
  23. * @brief Null media port.
  24. */
  25. #include <pjmedia/port.h>
  26. /**
  27. * @defgroup PJMEDIA_NULL_PORT Null Port
  28. * @ingroup PJMEDIA_PORT
  29. * @brief The simplest type of media port which does nothing.
  30. * @{
  31. */
  32. PJ_BEGIN_DECL
  33. /**
  34. * Create Null port.
  35. *
  36. * @param pool Pool to allocate memory.
  37. * @param sampling_rate Sampling rate of the port.
  38. * @param channel_count Number of channels.
  39. * @param samples_per_frame Number of samples per frame.
  40. * @param bits_per_sample Number of bits per sample.
  41. * @param p_port Pointer to receive the port instance.
  42. *
  43. * @return PJ_SUCCESS on success.
  44. */
  45. PJ_DECL(pj_status_t) pjmedia_null_port_create( pj_pool_t *pool,
  46. unsigned sampling_rate,
  47. unsigned channel_count,
  48. unsigned samples_per_frame,
  49. unsigned bits_per_sample,
  50. pjmedia_port **p_port );
  51. PJ_END_DECL
  52. /**
  53. * @}
  54. */
  55. #endif /* __PJMEDIA_NULL_PORT_H__ */