Changeset 104 for libmpcdec/branches/zorg/include
- Timestamp:
- 11/08/06 00:20:07 (18 years ago)
- Location:
- libmpcdec/branches/zorg/include/mpcdec
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpcdec/branches/zorg/include/mpcdec/mpcdec.h
r85 r104 53 53 54 54 typedef struct mpc_decoder_t mpc_decoder; 55 typedef struct mpc_bits_reader_t mpc_bits_reader; 56 typedef struct mpc_demux_t mpc_demux; 57 58 typedef 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; 55 64 56 65 /// Initializes mpc decoder with the supplied stream info parameters. 57 /// \param p_reader reader that will supply raw data to the decoder58 66 /// \param si streaminfo structure indicating format of source stream 59 /// \return MPC_TRUE if decoder was initalized successfully, FALSE otherwise60 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 68 mpc_decoder * mpc_decoder_init(mpc_streaminfo *si); 61 69 62 /// Releases input mpc decoder 70 /// Releases input mpc decoder 63 71 void mpc_decoder_exit(mpc_decoder *p_dec); 64 72 … … 66 74 /// \param si streaminfo structure indicating format of source stream 67 75 /// \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); 69 77 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); 71 79 72 80 /// Sets decoder sample scaling factor. All decoded samples will be multiplied … … 83 91 /// \return 0 if the stream has been completely decoded successfully and there are no more samples 84 92 /// \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); 93 void mpc_decoder_decode_frame(mpc_decoder * d, mpc_bits_reader * r, mpc_frame_info * i); 96 94 97 95 /// 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); 99 97 100 98 /// 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 102 mpc_demux * mpc_demux_init(mpc_reader * p_reader); 103 // free demuxer 104 void mpc_demux_exit(mpc_demux * d); 105 // decode frame 106 void mpc_demux_decode(mpc_demux * d, mpc_frame_info * i); 107 // get streaminfo 108 void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i); 102 109 103 110 #ifdef __cplusplus -
libmpcdec/branches/zorg/include/mpcdec/streaminfo.h
r70 r104 75 75 /// @name Replaygain properties 76 76 //@{ 77 mpc_int16_t gain_title; ///< Replaygain title value 77 mpc_int16_t gain_title; ///< Replaygain title value 78 78 mpc_int16_t gain_album; ///< Replaygain album value 79 79 mpc_uint16_t peak_album; ///< Peak album loudness level … … 89 89 char encoder[256]; ///< Encoder name 90 90 91 mpc_streaminfo_off_t tag_offset; ///< Of set to file tags91 mpc_streaminfo_off_t tag_offset; ///< Offset to file tags 92 92 mpc_streaminfo_off_t total_file_length; ///< Total length of underlying file 93 93 //@} 94 94 } mpc_streaminfo; 95 96 /// Reads streaminfo header from the mpc stream supplied by r.97 /// \param si si pointer to which info will be written98 /// \param p_reader stream reader to supply raw data99 /// \return error code100 mpc_status mpc_streaminfo_init(mpc_streaminfo *si, mpc_reader *p_reader);101 95 102 96 /// Gets length of stream si, in seconds.
Note: See TracChangeset
for help on using the changeset viewer.