g192_bit_stream.h

Go to the documentation of this file.
00001 /*
00002  * broadvoice - a library for the BroadVoice 16 and 32 codecs
00003  *
00004  * g192_bit_stream.h
00005  *
00006  * Copyright 2008-2009 Steve Underwood <steveu@coppice.org>
00007  *
00008  * All rights reserved.
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU Lesser General Public License version 2.1,
00012  * as published by the Free Software Foundation.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU Lesser General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public
00020  * License along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00022  */
00023 
00024 /*! \file */
00025 
00026 #if !defined(_G192_BIT_STREAM_H_)
00027 #define _G192_BIT_STREAM_H_
00028 
00029 /*! \page g192_bit_stream_page ITU G.192 codec bit stream handling
00030 \section g192_bit_stream_page_sec_1 What does it do?
00031 
00032 \section g192_bit_stream_page_sec_2 How does it work?
00033 */
00034 
00035 enum
00036 {
00037     ITU_CODEC_BITSTREAM_PACKED = 0,
00038     ITU_CODEC_BITSTREAM_G192 = 1
00039 };
00040 
00041 #if defined(__cplusplus)
00042 extern "C"
00043 {
00044 #endif
00045 
00046 /*! \brief Write a frame of data to an output file.
00047     \param out_data The buffer for the data to be written.
00048     \param number_of_bits The number of bits to be written.
00049     \param mode 0 = continuous, 1 = ITU G.192 codec bitstream format.
00050     \param fp_bitstream The file context to be written to.
00051     \return The number of words written. */
00052 int itu_codec_bitstream_write(const uint8_t out_data[],
00053                               int number_of_bits,
00054                               int mode,
00055                               FILE *fp_bitstream);
00056 
00057 /*! \brief Read a frame of data from an input file.
00058     \param in_data The buffer for the data to be read.
00059     \param p_erasure Set to TRUE if there is a frame erasure, else set to FALSE.
00060     \param number_of_bits The number of bits to be read.
00061     \param mode 0 = continuous, 1 = ITU G.192 codec bitstream format.
00062     \param fp_bitstream The file context to be read from.
00063     \return The number of words read. */
00064 int itu_codec_bitstream_read(uint8_t in_data[],
00065                              int16_t *p_erasure,
00066                              int number_of_bits,
00067                              int mode,
00068                              FILE *fp_bitstream);
00069 
00070 #if defined(__cplusplus)
00071 }
00072 #endif
00073 
00074 #endif
00075 /*- End of file ------------------------------------------------------------*/

Generated on 29 Mar 2018 for libg722_1 by  doxygen 1.6.1