libg722_1 0.1.0
g192_bit_stream.h
Go to the documentation of this file.
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
26/*! \file */
27
28#if !defined(_G192_BIT_STREAM_H_)
29#define _G192_BIT_STREAM_H_
30
31/*! \page g192_bit_stream_page ITU G.192 codec bit stream handling
32\section g192_bit_stream_page_sec_1 What does it do?
33
34\section g192_bit_stream_page_sec_2 How does it work?
35*/
36
37enum
38{
39 ITU_CODEC_BITSTREAM_PACKED = 0,
40 ITU_CODEC_BITSTREAM_G192 = 1
41};
42
43#if defined(__cplusplus)
44extern "C"
45{
46#endif
47
48/*! \brief Write a frame of data to an output file.
49 \param out_data The buffer for the data to be written.
50 \param number_of_bits The number of bits to be written.
51 \param mode 0 = continuous, 1 = ITU G.192 codec bitstream format.
52 \param fp_bitstream The file context to be written to.*/
53void itu_codec_bitstream_write(const uint8_t out_data[],
54 int number_of_bits,
55 int mode,
56 FILE *fp_bitstream);
57
58/*! \brief Read a frame of data from an input file.
59 \param in_data The buffer for the data to be read.
60 \param p_frame_error_flags ???.
61 \param number_of_bits The number of bits to be read.
62 \param mode 0 = continuous, 1 = ITU G.192 codec bitstream format.
63 \param fp_bitstream The file context to be read from.
64 \return The number of words read. */
65int itu_codec_bitstream_read(uint8_t in_data[],
66 int16_t *p_frame_error_flag,
67 int number_of_bits,
68 int mode,
69 FILE *fp_bitstream);
70
71#if defined(__cplusplus)
72}
73#endif
74
75#endif
76/*- End of file ------------------------------------------------------------*/
int itu_codec_bitstream_read(uint8_t in_data[], int16_t *p_frame_error_flag, int number_of_bits, int mode, FILE *fp_bitstream)
Read a frame of data from an input file.
Definition g192_bit_stream.c:94
void itu_codec_bitstream_write(const uint8_t out_data[], int number_of_bits, int mode, FILE *fp_bitstream)
Write a frame of data to an output file.
Definition g192_bit_stream.c:62