diff options
author | Sean Bartell <wingedtachikoma@gmail.com> | 2011-06-25 21:32:25 -0400 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2012-04-25 22:13:20 +0200 |
commit | f40bfc9267b13b54e6379dfe7539447662879d24 (patch) | |
tree | 9b20069d5e62809ff434061ad730096836f916f2 /lib/rbcodec/codecs/libmusepack/streaminfo.h | |
parent | a0009907de7a0107d49040d8a180f140e2eff299 (diff) | |
download | rockbox-f40bfc9267b13b54e6379dfe7539447662879d24.tar.gz rockbox-f40bfc9267b13b54e6379dfe7539447662879d24.zip |
Add codecs to librbcodec.
Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97
Reviewed-on: http://gerrit.rockbox.org/137
Reviewed-by: Nils Wallménius <nils@rockbox.org>
Tested-by: Nils Wallménius <nils@rockbox.org>
Diffstat (limited to 'lib/rbcodec/codecs/libmusepack/streaminfo.h')
-rw-r--r-- | lib/rbcodec/codecs/libmusepack/streaminfo.h | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/libmusepack/streaminfo.h b/lib/rbcodec/codecs/libmusepack/streaminfo.h new file mode 100644 index 0000000000..52e97936a0 --- /dev/null +++ b/lib/rbcodec/codecs/libmusepack/streaminfo.h | |||
@@ -0,0 +1,114 @@ | |||
1 | /* | ||
2 | Copyright (c) 2005-2009, The Musepack Development Team | ||
3 | All rights reserved. | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without | ||
6 | modification, are permitted provided that the following conditions are | ||
7 | met: | ||
8 | |||
9 | * Redistributions of source code must retain the above copyright | ||
10 | notice, this list of conditions and the following disclaimer. | ||
11 | |||
12 | * Redistributions in binary form must reproduce the above | ||
13 | copyright notice, this list of conditions and the following | ||
14 | disclaimer in the documentation and/or other materials provided | ||
15 | with the distribution. | ||
16 | |||
17 | * Neither the name of the The Musepack Development Team nor the | ||
18 | names of its contributors may be used to endorse or promote | ||
19 | products derived from this software without specific prior | ||
20 | written permission. | ||
21 | |||
22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
33 | */ | ||
34 | /// \file streaminfo.h | ||
35 | #ifndef _MPCDEC_STREAMINFO_H_ | ||
36 | #define _MPCDEC_STREAMINFO_H_ | ||
37 | #ifdef WIN32 | ||
38 | #pragma once | ||
39 | #endif | ||
40 | |||
41 | #include "mpc_types.h" | ||
42 | |||
43 | #ifdef __cplusplus | ||
44 | extern "C" { | ||
45 | #endif | ||
46 | |||
47 | |||
48 | typedef mpc_int32_t mpc_streaminfo_off_t; | ||
49 | |||
50 | /// \brief mpc stream properties structure | ||
51 | /// | ||
52 | /// Structure containing all the properties of an mpc stream. Populated | ||
53 | /// by the streaminfo_read function. | ||
54 | typedef struct mpc_streaminfo { | ||
55 | /// @name Core mpc stream properties | ||
56 | //@{ | ||
57 | mpc_uint32_t sample_freq; ///< Sample frequency of stream | ||
58 | mpc_uint32_t channels; ///< Number of channels in stream | ||
59 | mpc_uint32_t stream_version; ///< Streamversion of stream | ||
60 | mpc_uint32_t bitrate; ///< Bitrate of stream file (in bps) | ||
61 | mpc_uint32_t average_bitrate; ///< Average bitrate of stream (in bits/sec) | ||
62 | mpc_uint32_t max_band; ///< Maximum band-index used in stream (0...31) | ||
63 | mpc_uint32_t ms; ///< Mid/side stereo (0: off, 1: on) | ||
64 | mpc_uint32_t fast_seek; ///< True if stream supports fast-seeking (sv7) | ||
65 | mpc_uint32_t block_pwr; ///< Number of frames in a block = 2^block_pwr (sv8) | ||
66 | //@} | ||
67 | |||
68 | /// @name Replaygain properties | ||
69 | //@{ | ||
70 | mpc_uint16_t gain_title; ///< Replaygain title value | ||
71 | mpc_uint16_t gain_album; ///< Replaygain album value | ||
72 | mpc_uint16_t peak_album; ///< Peak album loudness level | ||
73 | mpc_uint16_t peak_title; ///< Peak title loudness level | ||
74 | //@} | ||
75 | |||
76 | /// @name True gapless properties | ||
77 | //@{ | ||
78 | mpc_uint32_t is_true_gapless; ///< True gapless? (0: no, 1: yes) | ||
79 | mpc_uint64_t samples; ///< Number of samples in the stream | ||
80 | mpc_uint64_t beg_silence; ///< Number of samples that must not be played at the beginning of the stream | ||
81 | //@} | ||
82 | |||
83 | /// @name Encoder informations | ||
84 | //@{ | ||
85 | mpc_uint32_t encoder_version; ///< Version of encoder used | ||
86 | /* rockbox: not used | ||
87 | char encoder[256]; ///< Encoder name | ||
88 | */ | ||
89 | mpc_bool_t pns; ///< pns used | ||
90 | mpc_uint32_t profile; ///< Quality profile of stream | ||
91 | /* rockbox: not used | ||
92 | const char* profile_name; ///< Name of profile used by stream | ||
93 | */ | ||
94 | //@} | ||
95 | |||
96 | |||
97 | mpc_streaminfo_off_t header_position; ///< Byte offset of position of header in stream | ||
98 | mpc_streaminfo_off_t tag_offset; ///< Offset to file tags | ||
99 | mpc_streaminfo_off_t total_file_length; ///< Total length of underlying file | ||
100 | } mpc_streaminfo; | ||
101 | |||
102 | /* rockbox: not used | ||
103 | /// Gets length of stream si, in seconds. | ||
104 | /// \return length of stream in seconds | ||
105 | MPC_API double mpc_streaminfo_get_length(mpc_streaminfo *si); | ||
106 | |||
107 | /// Returns length of stream si, in samples. | ||
108 | /// \return length of stream in samples | ||
109 | MPC_API mpc_int64_t mpc_streaminfo_get_length_samples(mpc_streaminfo *si); | ||
110 | */ | ||
111 | #ifdef __cplusplus | ||
112 | } | ||
113 | #endif | ||
114 | #endif | ||