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  * $Id: g192_bit_stream.h,v 1.1.1.1 2009/11/19 12:10:48 steveu Exp $
00024  */
00025 
00026 /*! \file */
00027 
00028 #if !defined(_G192_BIT_STREAM_H_)
00029 #define _G192_BIT_STREAM_H_
00030 
00031 /*! \page g192_bit_stream_page ITU G.192 codec bit stream handling
00032 \section g192_bit_stream_page_sec_1 What does it do?
00033 
00034 \section g192_bit_stream_page_sec_2 How does it work?
00035 */
00036 
00037 enum
00038 {
00039     ITU_CODEC_BITSTREAM_PACKED = 0,
00040     ITU_CODEC_BITSTREAM_G192 = 1
00041 };
00042 
00043 #if defined(__cplusplus)
00044 extern "C"
00045 {
00046 #endif
00047 
00048 /*! \brief Write a frame of data to an output file.
00049     \param out_data The buffer for the data to be written.
00050     \param number_of_bits The number of bits to be written.
00051     \param mode 0 = continuous, 1 = ITU G.192 codec bitstream format.
00052     \param fp_bitstream The file context to be written to.*/
00053 void itu_codec_bitstream_write(const uint8_t out_data[],
00054                                int number_of_bits,
00055                                int mode,
00056                                FILE *fp_bitstream);
00057 
00058 /*! \brief Read a frame of data from an input file.
00059     \param in_data The buffer for the data to be read.
00060     \param p_frame_error_flags ???.
00061     \param number_of_bits The number of bits to be read.
00062     \param mode 0 = continuous, 1 = ITU G.192 codec bitstream format.
00063     \param fp_bitstream The file context to be read from.
00064     \return The number of words read. */
00065 int itu_codec_bitstream_read(uint8_t in_data[],
00066                              int16_t *p_frame_error_flag,
00067                              int number_of_bits,
00068                              int mode,
00069                              FILE *fp_bitstream);
00070 
00071 #if defined(__cplusplus)
00072 }
00073 #endif
00074 
00075 #endif
00076 /*- End of file ------------------------------------------------------------*/

Generated on 15 Mar 2017 for libg722_1 by  doxygen 1.6.1