1 /*****************************************************************************
2 * lpcm_decoder.h : lpcm decoder interface
3 *****************************************************************************
4 * Copyright (C) 1999, 2000 VideoLAN
5 * $Id: lpcm_decoder.h,v 1.3 2001/03/21 13:42:34 sam Exp $
7 * Authors: Samuel Hocevar <sam@zoy.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
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 GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public
20 * License along with this program; if not, write to the
21 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 * Boston, MA 02111-1307, USA.
23 *****************************************************************************/
25 typedef struct lpcmdec_s lpcmdec_t;
27 typedef struct lpcm_sync_info_s {
28 int sample_rate; /* sample rate in Hz */
29 int frame_size; /* frame size in bytes */
30 int bit_rate; /* nominal bit rate in kbps */
33 typedef struct lpcm_byte_stream_s {
40 int lpcm_init (lpcmdec_t * p_lpcmdec);
41 int lpcm_sync_frame (lpcmdec_t * p_lpcmdec, lpcm_sync_info_t * p_sync_info);
42 int lpcm_decode_frame (lpcmdec_t * p_lcpmdec, s16 * buffer);
43 //static lpcm_byte_stream_t * lpcm_byte_stream (lcpmdec_t * p_lpcmdec);
46 void lpcm_byte_stream_next (lpcm_byte_stream_t * p_byte_stream);
48 typedef struct lpcm_bit_stream_s {
51 lpcm_byte_stream_t byte_stream;
60 /* The bit stream structure handles the PES stream at the bit level */
61 lpcm_bit_stream_t bit_stream;
65 static lpcm_byte_stream_t * lpcm_byte_stream (lpcmdec_t * p_lpcmdec)
67 return &(p_lpcmdec->bit_stream.byte_stream);