Ignore:
Timestamp:
11/08/06 00:20:07 (17 years ago)
Author:
r2d
Message:
  • can read sv7 & sv8
  • seek broken (not implemented)
  • added demuxer in API
  • added access to decoder in API
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpcdec/branches/zorg/src/internal.h

    r81 r104  
    5252}
    5353
    54 typedef struct {
     54typedef struct mpc_block_t {
    5555        char key[2];    // block key
    5656        mpc_uint64_t size;      // block size minus the block header size
    57 } mpc_block_t;
     57} mpc_block;
    5858
     59// mpc_bits_reader.c
     60struct mpc_bits_reader_t {
     61        unsigned char * buff; /// pointer on current byte
     62        unsigned int count; /// unread bits in current byte
     63};
    5964
    60 /// read a block header and fills the mpc_block_t struct.
    61 ///
    62 /// \param p_reader supplying raw stream data
    63 /// \param p_block returned block header
    64 /// \return MPC_STATUS_FILE on errors of any kind
    65 mpc_status mpc_get_block(mpc_reader * p_reader, mpc_block_t * p_block);
     65#define DEMUX_BUFFER_SIZE 65536
    6666
    67 /// find a block with key == find_key, stop search if key == stop_key;
    68 ///
    69 /// \param p_reader supplying raw stream data
    70 /// \param p_block returned block header
    71 /// \param find_key key to find
    72 /// \param stop_key key to stop on
    73 /// \return MPC_STATUS_FILE on errors of any kind
    74 mpc_status mpc_find_block(mpc_reader * p_reader, mpc_block_t * p_block,
    75                                                   char * find_key, char * stop_key);
    76 
    77 typedef struct  {
    78         unsigned int buff;
    79         unsigned int bitsCount;
    80 } mpc_bits_reader;
    81 
    82 mpc_uint32_t mpc_read_bits(mpc_reader * p_reader, mpc_bits_reader * p_bits,
    83                                                    int nb_bits);
     67struct mpc_demux_t {
     68        mpc_reader * r;
     69        mpc_decoder * d;
     70        mpc_streaminfo si;
     71        mpc_uint8_t buffer[DEMUX_BUFFER_SIZE];
     72        mpc_uint32_t bytes_total;
     73        mpc_bits_reader bits_reader;
     74        mpc_uint32_t block_bits;        // bits remaining in current audio block
     75};
    8476
    8577/// Searches for a ID3v2-tag and reads the length (in bytes) of it.
     
    9284/// helper functions used by multiple files
    9385mpc_uint32_t mpc_random_int(mpc_decoder *d); // in synth_filter.c
    94 void mpc_decoder_initialisiere_quantisierungstabellen(mpc_decoder *d, double scale_factor);
     86void mpc_decoder_init_quant(mpc_decoder *d, double scale_factor);
    9587void mpc_decoder_synthese_filter_float(mpc_decoder *d, MPC_SAMPLE_FORMAT* OutData);
    9688
Note: See TracChangeset for help on using the changeset viewer.