1 /*****************************************************************************
2 * lpcm_decoder.h : lpcm decoder interface
3 *****************************************************************************
4 * Copyright (C) 1999, 2000 VideoLAN
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public
19 * License along with this program; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
22 *****************************************************************************/
24 typedef struct lpcmdec_s lpcmdec_t;
26 typedef struct lpcm_sync_info_s {
27 int sample_rate; /* sample rate in Hz */
28 int frame_size; /* frame size in bytes */
29 int bit_rate; /* nominal bit rate in kbps */
32 typedef struct lpcm_byte_stream_s {
39 int lpcm_init (lpcmdec_t * p_lpcmdec);
40 int lpcm_sync_frame (lpcmdec_t * p_lpcmdec, lpcm_sync_info_t * p_sync_info);
41 int lpcm_decode_frame (lpcmdec_t * p_lcpmdec, s16 * buffer);
42 //static lpcm_byte_stream_t * lpcm_byte_stream (lcpmdec_t * p_lpcmdec);
45 void lpcm_byte_stream_next (lpcm_byte_stream_t * p_byte_stream);
47 typedef struct lpcm_bit_stream_s {
50 lpcm_byte_stream_t byte_stream;
59 /* The bit stream structure handles the PES stream at the bit level */
60 lpcm_bit_stream_t bit_stream;
64 static lpcm_byte_stream_t * lpcm_byte_stream (lpcmdec_t * p_lpcmdec)
66 return &(p_lpcmdec->bit_stream.byte_stream);