Changeset 411 for libmpc/trunk/include


Ignore:
Timestamp:
10/31/08 00:20:05 (16 years ago)
Author:
r2d
Message:

added chapter gain / peak to libmpcdec and mpcchap as in the spec

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/include/mpc/mpcdec.h

    r402 r411  
    6262
    6363typedef struct mpc_frame_info_t {
    64         mpc_uint32_t samples;   /// number of samples in the frame (counting once for multiple channels)
    65         mpc_int32_t bits;       /// number of bits consumed by this frame (-1) if end of stream
     64        mpc_uint32_t samples;           /// number of samples in the frame (counting once for multiple channels)
     65        mpc_int32_t bits;                       /// number of bits consumed by this frame (-1) if end of stream
    6666        MPC_SAMPLE_FORMAT * buffer;     /// frame samples buffer (size = samples * channels * sizeof(MPC_SAMPLE_FORMAT))
    67         mpc_bool_t is_key_frame; /// 1 if this frame is a key frame (first in block) 0 else. Set by the demuxer.
     67        mpc_bool_t is_key_frame;        /// 1 if this frame is a key frame (first in block) 0 else. Set by the demuxer.
    6868} mpc_frame_info;
     69
     70typedef struct mpc_chap_info_t {
     71        mpc_uint64_t sample;    /// sample where the chapter starts
     72        mpc_uint16_t gain;              /// replaygain chapter value
     73        mpc_uint16_t peak;              /// peak chapter loudness level
     74        mpc_uint_t tag_size;    /// size of the tag element (0 if no tag is present for this chapter)
     75        char * tag;                             /// pointer to an APEv2 tag without the preamble
     76} mpc_chap_info;
    6977
    7078/// Initializes mpc decoder with the supplied stream info parameters.
     
    128136/**
    129137 * Gets datas associated to a given chapter
    130  * You can pass 0 for tag and tag_size if you don't needs the tag information
    131138 * The chapter tag is an APEv2 tag without the preamble
    132139 * @param d pointer to a musepack demuxer
    133140 * @param chap_nb chapter number you want datas (from 0 to mpc_demux_chap_nb(d) - 1)
    134  * @param tag will return a pointer to the chapter tag datas
    135  * @param tag_size will be filed with the tag data size (0 if no tag for this chapter)
    136  * @return the sample where the chapter starts
     141 * @return the chapter information structure
    137142 */
    138 MPC_API mpc_uint64_t mpc_demux_chap(mpc_demux * d, int chap_nb, char ** tag, mpc_uint_t * tag_size);
     143MPC_API mpc_chap_info * mpc_demux_chap(mpc_demux * d, int chap_nb);
    139144
    140145#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.