a52.h 2.21 KB
Newer Older
Gildas Bazin's avatar
 
Gildas Bazin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
/*****************************************************************************
 * a52.h: ATSC A/52 aka AC-3 decoder plugin for vlc.
 *   This plugin makes use of liba52 to decode A/52 audio
 *   (http://liba52.sf.net/).
 *****************************************************************************
 * Copyright (C) 2001 VideoLAN
 * $Id: a52.h,v 1.1 2002/02/06 20:44:22 gbazin Exp $
 *
 * Authors: Gildas Bazin <gbazin@netcourrier.com>
 *      
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
 *****************************************************************************/

/*****************************************************************************
 * a52_adec_thread_t : a52 decoder thread descriptor
 *****************************************************************************/
typedef struct a52_adec_thread_s
{
    /*
     * liba52 properties
     */
    a52_state_t a52_state;
    int         frame_size;
    int         flags;
    int         sample_rate;
    int         bit_rate;
    sample_t    *p_decoded_samples;

    /* The bit stream structure handles the PES stream at the bit level */
    bit_stream_t        bit_stream;

    /*
     * Input properties
     */
    decoder_fifo_t     *p_fifo;                /* stores the PES stream data */
    data_packet_t      *p_data;
    decoder_config_t   *p_config;

    /*
     * Output properties
     */
    aout_fifo_t        *p_aout_fifo; /* stores the decompressed audio frames */
    int                i_channels;

    /* temporary buffer to store the raw frame to be decoded */
    u8 p_frame_buffer[3840];

} a52_adec_thread_t;