Changeset 68 for libmpcdec/branches/zorg/include/mpcdec/streaminfo.h
- Timestamp:
- 10/06/06 17:14:05 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpcdec/branches/zorg/include/mpcdec/streaminfo.h
r37 r68 32 32 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 33 */ 34 /// \file streaminfo.h 35 #ifndef _MPCDEC_STREAMINFO_H_ 36 #define _MPCDEC_STREAMINFO_H_ 37 #ifdef WIN32 38 #pragma once 39 #endif 34 40 35 /// \file streaminfo.h 41 #include "mpc_types.h" 42 #include "reader.h" 36 43 37 #ifndef _mpcdec_streaminfo_h_ 38 #define _mpcdec_streaminfo_h_ 44 #ifdef __cplusplus 45 extern "C" { 46 #endif 47 39 48 40 49 typedef mpc_int32_t mpc_streaminfo_off_t; … … 45 54 /// by the streaminfo_read function. 46 55 typedef struct mpc_streaminfo { 47 /// @name core mpc stream properties56 /// @name Core mpc stream properties 48 57 //@{ 49 mpc_uint32_t sample_freq; ///< sample frequency of stream 50 mpc_uint32_t channels; ///< number of channels in stream 51 mpc_streaminfo_off_t header_position; ///< byte offset of position of header in stream 52 mpc_uint32_t stream_version; ///< streamversion of stream 53 mpc_uint32_t bitrate; ///< bitrate of stream file (in bps) 54 double average_bitrate; ///< average bitrate of stream (in bits/sec) 55 mpc_uint32_t frames; ///< number of frames in stream 56 mpc_int64_t pcm_samples; 57 mpc_uint32_t max_band; ///< maximum band-index used in stream (0...31) 58 mpc_uint32_t is; ///< intensity stereo (0: off, 1: on) 59 mpc_uint32_t ms; ///< mid/side stereo (0: off, 1: on) 60 mpc_uint32_t block_size; ///< only needed for SV4...SV6 -> not supported 61 mpc_uint32_t profile; ///< quality profile of stream 62 const char* profile_name; ///< name of profile used by stream 58 mpc_uint32_t sample_freq; ///< Sample frequency of stream 59 mpc_uint32_t channels; ///< Number of channels in stream 60 mpc_streaminfo_off_t header_position; ///< Byte offset of position of header in stream 61 mpc_uint32_t stream_version; ///< Streamversion of stream 62 mpc_uint32_t bitrate; ///< Bitrate of stream file (in bps) 63 double average_bitrate; ///< Average bitrate of stream (in bits/sec) 64 mpc_uint32_t frames; ///< Number of frames in stream 65 mpc_int64_t pcm_samples; ///< Approximate number of pcm samples in stream 66 mpc_uint32_t max_band; ///< Maximum band-index used in stream (0...31) 67 mpc_uint32_t is; ///< Intensity stereo (0: off, 1: on) 68 mpc_uint32_t ms; ///< Mid/side stereo (0: off, 1: on) 69 mpc_uint32_t block_size; ///< Only needed for SV4...SV6 -> not supported 70 mpc_uint32_t profile; ///< Quality profile of stream 71 const char* profile_name; ///< Name of profile used by stream 72 mpc_uint32_t fast_seek; ///< True if stream supports fast-seeking 63 73 //@} 64 74 65 /// @name replaygain related fields75 /// @name Replaygain properties 66 76 //@{ 67 mpc_int16_t gain_title; ///< replaygain title value68 mpc_int16_t gain_album; ///< replaygain album value69 mpc_uint16_t peak_album; ///< peak album loudness level70 mpc_uint16_t peak_title; ///< peak title loudness level77 mpc_int16_t gain_title; ///< Replaygain title value 78 mpc_int16_t gain_album; ///< Replaygain album value 79 mpc_uint16_t peak_album; ///< Peak album loudness level 80 mpc_uint16_t peak_title; ///< Peak title loudness level 71 81 //@} 72 82 73 /// @name true gapless support data83 /// @name True gapless properties 74 84 //@{ 75 mpc_uint32_t is_true_gapless; ///< true gapless? (0: no, 1: yes)76 mpc_uint32_t last_frame_samples; ///< number of valid samples within last frame85 mpc_uint32_t is_true_gapless; ///< True gapless? (0: no, 1: yes) 86 mpc_uint32_t last_frame_samples; ///< Number of valid samples within last frame 77 87 78 mpc_uint32_t encoder_version; ///< version of encoder used79 char encoder[256]; ///< encoder name88 mpc_uint32_t encoder_version; ///< Version of encoder used 89 char encoder[256]; ///< Encoder name 80 90 81 mpc_streaminfo_off_t tag_offset; ///< offset to file tags 82 mpc_streaminfo_off_t total_file_length; ///< total length of underlying file 83 //@} 84 85 /// @name fast seeking support 86 //@{ 87 mpc_uint32_t fast_seek; ///< support fast seeking ? (0: no, 1: yes) 91 mpc_streaminfo_off_t tag_offset; ///< Ofset to file tags 92 mpc_streaminfo_off_t total_file_length; ///< Total length of underlying file 88 93 //@} 89 94 } mpc_streaminfo; 90 95 91 #endif // _mpcdec_streaminfo_h_ 96 /// Initializes a streaminfo structure. 97 /// \param si streaminfo structure to initialize 98 void mpc_streaminfo_init(mpc_streaminfo *si); 99 100 /// Reads streaminfo header from the mpc stream supplied by r. 101 /// \param si si pointer to which info will be written 102 /// \param p_reader stream reader to supply raw data 103 /// \return error code 104 mpc_status mpc_streaminfo_read(mpc_streaminfo *si, mpc_reader *p_reader); 105 106 /// Gets length of stream si, in seconds. 107 /// \return length of stream in seconds 108 double mpc_streaminfo_get_length(mpc_streaminfo *si); 109 110 /// Returns length of stream si, in samples. 111 /// \return length of stream in samples 112 mpc_int64_t mpc_streaminfo_get_length_samples(mpc_streaminfo *si); 113 114 #ifdef __cplusplus 115 } 116 #endif 117 #endif
Note: See TracChangeset
for help on using the changeset viewer.