2
0

g192_bit_stream.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * broadvoice - a library for the BroadVoice 16 and 32 codecs
  3. *
  4. * g192_bit_stream.h
  5. *
  6. * Copyright 2008-2009 Steve Underwood <steveu@coppice.org>
  7. *
  8. * All rights reserved.
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU Lesser General Public License version 2.1,
  12. * as published by the Free Software Foundation.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. *
  23. * $Id: g192_bit_stream.h,v 1.1.1.1 2009/11/19 12:10:48 steveu Exp $
  24. */
  25. /*! \file */
  26. #if !defined(_G192_BIT_STREAM_H_)
  27. #define _G192_BIT_STREAM_H_
  28. /*! \page g192_bit_stream_page ITU G.192 codec bit stream handling
  29. \section g192_bit_stream_page_sec_1 What does it do?
  30. \section g192_bit_stream_page_sec_2 How does it work?
  31. */
  32. enum
  33. {
  34. ITU_CODEC_BITSTREAM_PACKED = 0,
  35. ITU_CODEC_BITSTREAM_G192 = 1
  36. };
  37. #if defined(__cplusplus)
  38. extern "C"
  39. {
  40. #endif
  41. /*! \brief Write a frame of data to an output file.
  42. \param out_data The buffer for the data to be written.
  43. \param number_of_bits The number of bits to be written.
  44. \param mode 0 = continuous, 1 = ITU G.192 codec bitstream format.
  45. \param fp_bitstream The file context to be written to.*/
  46. void itu_codec_bitstream_write(const uint8_t out_data[],
  47. int number_of_bits,
  48. int mode,
  49. FILE *fp_bitstream);
  50. /*! \brief Read a frame of data from an input file.
  51. \param in_data The buffer for the data to be read.
  52. \param p_frame_error_flags ???.
  53. \param number_of_bits The number of bits to be read.
  54. \param mode 0 = continuous, 1 = ITU G.192 codec bitstream format.
  55. \param fp_bitstream The file context to be read from.
  56. \return The number of words read. */
  57. int itu_codec_bitstream_read(uint8_t in_data[],
  58. int16_t *p_frame_error_flag,
  59. int number_of_bits,
  60. int mode,
  61. FILE *fp_bitstream);
  62. #if defined(__cplusplus)
  63. }
  64. #endif
  65. #endif
  66. /*- End of file ------------------------------------------------------------*/