Ignore:
Timestamp:
11/08/06 00:20:07 (18 years ago)
Author:
r2d
Message:
  • can read sv7 & sv8
  • seek broken (not implemented)
  • added demuxer in API
  • added access to decoder in API
Location:
libmpcdec/branches/zorg/include/mpcdec
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libmpcdec/branches/zorg/include/mpcdec/mpcdec.h

    r85 r104  
    5353
    5454typedef struct mpc_decoder_t mpc_decoder;
     55typedef struct mpc_bits_reader_t mpc_bits_reader;
     56typedef struct mpc_demux_t mpc_demux;
     57
     58typedef struct mpc_frame_info_t {
     59        mpc_uint32_t samples;   // number of samples in the frame
     60        mpc_uint32_t sample_freq;       // frame sample frequency
     61        mpc_uint8_t channels;   // number of channels
     62        MPC_SAMPLE_FORMAT * buffer;     // frame samples buffer (size = samples * channels * sizeof(MPC_SAMPLE_FORMAT)
     63} mpc_frame_info;
    5564
    5665/// Initializes mpc decoder with the supplied stream info parameters.
    57 /// \param p_reader reader that will supply raw data to the decoder
    5866/// \param si streaminfo structure indicating format of source stream
    59 /// \return MPC_TRUE if decoder was initalized successfully, FALSE otherwise   
    60 mpc_status mpc_decoder_init(mpc_decoder **p_dec, mpc_reader *p_reader, mpc_streaminfo *si);
     67/// \return pointer on the initialized decoder structure if successful, 0 if not
     68mpc_decoder * mpc_decoder_init(mpc_streaminfo *si);
    6169
    62 /// Releases input mpc decoder 
     70/// Releases input mpc decoder
    6371void mpc_decoder_exit(mpc_decoder *p_dec);
    6472
     
    6674/// \param si streaminfo structure indicating format of source stream
    6775/// \param fast_seeking boolean 0 = use fast seeking if safe, 1 = force fast seeking
    68 void mpc_decoder_set_seeking(mpc_decoder *p_dec, mpc_streaminfo *si, mpc_bool_t fast_seeking);
     76// void mpc_decoder_set_seeking(mpc_decoder *p_dec, mpc_streaminfo *si, mpc_bool_t fast_seeking);
    6977
    70 void mpc_decoder_set_streaminfo(mpc_decoder *p_dec, mpc_streaminfo *si);
     78// void mpc_decoder_set_streaminfo(mpc_decoder *p_dec, mpc_streaminfo *si);
    7179
    7280/// Sets decoder sample scaling factor.  All decoded samples will be multiplied
     
    8391/// \return 0 if the stream has been completely decoded successfully and there are no more samples
    8492/// \return > 0 to indicate the number of bytes that were actually read from the stream.
    85 mpc_uint32_t mpc_decoder_decode(
    86     mpc_decoder       *p_dec,
    87     MPC_SAMPLE_FORMAT *buffer,
    88     mpc_uint32_t      *vbr_update_acc,
    89     mpc_uint32_t      *vbr_update_bits);
    90 
    91 mpc_uint32_t mpc_decoder_decode_frame(
    92     mpc_decoder       *p_dec,
    93     mpc_uint32_t      *in_buffer,
    94     mpc_uint32_t      in_len,
    95     MPC_SAMPLE_FORMAT *out_buffer);
     93void mpc_decoder_decode_frame(mpc_decoder * d, mpc_bits_reader * r, mpc_frame_info * i);
    9694
    9795/// Seeks to the specified sample in the source stream.
    98 mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *p_dec, mpc_int64_t destsample);
     96// mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *p_dec, mpc_int64_t destsample);
    9997
    10098/// Seeks to specified position in seconds in the source stream.
    101 mpc_bool_t mpc_decoder_seek_seconds(mpc_decoder *p_dec, double seconds);
     99// mpc_bool_t mpc_decoder_seek_seconds(mpc_decoder *p_dec, double seconds);
     100
     101// init demuxer
     102mpc_demux * mpc_demux_init(mpc_reader * p_reader);
     103// free demuxer
     104void mpc_demux_exit(mpc_demux * d);
     105// decode frame
     106void mpc_demux_decode(mpc_demux * d, mpc_frame_info * i);
     107// get streaminfo
     108void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i);
    102109
    103110#ifdef __cplusplus
  • libmpcdec/branches/zorg/include/mpcdec/streaminfo.h

    r70 r104  
    7575    /// @name Replaygain properties
    7676    //@{
    77     mpc_int16_t          gain_title;         ///< Replaygain title value 
     77    mpc_int16_t          gain_title;         ///< Replaygain title value
    7878    mpc_int16_t          gain_album;         ///< Replaygain album value
    7979    mpc_uint16_t         peak_album;         ///< Peak album loudness level
     
    8989    char                 encoder[256];       ///< Encoder name
    9090
    91     mpc_streaminfo_off_t tag_offset;         ///< Ofset to file tags
     91    mpc_streaminfo_off_t tag_offset;         ///< Offset to file tags
    9292    mpc_streaminfo_off_t total_file_length;  ///< Total length of underlying file
    9393    //@}
    9494} mpc_streaminfo;
    95 
    96 /// Reads streaminfo header from the mpc stream supplied by r.
    97 /// \param si si pointer to which info will be written
    98 /// \param p_reader stream reader to supply raw data
    99 /// \return error code
    100 mpc_status mpc_streaminfo_init(mpc_streaminfo *si, mpc_reader *p_reader);
    10195
    10296/// Gets length of stream si, in seconds.
Note: See TracChangeset for help on using the changeset viewer.