~ubuntu-branches/ubuntu/natty/flac/natty

« back to all changes in this revision

Viewing changes to doc/html/api/FLAC++_2decoder_8h-source.html

  • Committer: Bazaar Package Importer
  • Author(s): Joshua Kwan
  • Date: 2007-05-29 22:56:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529225636-ljeff8xxip09qaap
Tags: 1.1.4-1
* New upstream release. closes: #405167, #411311
  - libOggFLAC and libOggFLAC++ have been merged into libFLAC, so
    remove their corresponding packages.
  - Because of the API changes required to effect the above, there has
    been yet another soname bump. libflac7 -> libflac8 and
    libflac++5 -> libflac++6. Emails have been dispatched to the
    maintainers of dependent packages.
* Some notes on patches that were removed:
  - 02_stdin_stdout, 06_manpage_mention_utf8_convert: merged upstream
  - 08_manpage_warnings: Upstream has changed the manpage so it defintely
    can't fit in in 80 cols, so just forget about it. We'll live.
  - 05_eof_warnings_are_errors: Upstream decided to add a -w option to
    flac to treat all warnings as errors. I am going to defer to that
    for now, but if people think it's stupid let me know and I'll port
    the patch forward.
  - 04_stack_smasher: was a backport from 1.1.3, so it's obsolete.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
 
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
 
<title>include/FLAC++/decoder.h Source File</title>
4
 
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
 
</head><body>
6
 
<!-- Generated by Doxygen 1.2.14 -->
7
 
<center>
8
 
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
9
 
<hr><h1>include/FLAC++/decoder.h</h1><a href="FLAC++_2decoder_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/* libFLAC++ - Free Lossless Audio Codec library</font>
10
 
00002 <font class="comment"> * Copyright (C) 2002,2003,2004,2005  Josh Coalson</font>
11
 
00003 <font class="comment"> *</font>
12
 
00004 <font class="comment"> * Redistribution and use in source and binary forms, with or without</font>
13
 
00005 <font class="comment"> * modification, are permitted provided that the following conditions</font>
14
 
00006 <font class="comment"> * are met:</font>
15
 
00007 <font class="comment"> *</font>
16
 
00008 <font class="comment"> * - Redistributions of source code must retain the above copyright</font>
17
 
00009 <font class="comment"> * notice, this list of conditions and the following disclaimer.</font>
18
 
00010 <font class="comment"> *</font>
19
 
00011 <font class="comment"> * - Redistributions in binary form must reproduce the above copyright</font>
20
 
00012 <font class="comment"> * notice, this list of conditions and the following disclaimer in the</font>
21
 
00013 <font class="comment"> * documentation and/or other materials provided with the distribution.</font>
22
 
00014 <font class="comment"> *</font>
23
 
00015 <font class="comment"> * - Neither the name of the Xiph.org Foundation nor the names of its</font>
24
 
00016 <font class="comment"> * contributors may be used to endorse or promote products derived from</font>
25
 
00017 <font class="comment"> * this software without specific prior written permission.</font>
26
 
00018 <font class="comment"> *</font>
27
 
00019 <font class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS</font>
28
 
00020 <font class="comment"> * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT</font>
29
 
00021 <font class="comment"> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR</font>
30
 
00022 <font class="comment"> * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR</font>
31
 
00023 <font class="comment"> * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,</font>
32
 
00024 <font class="comment"> * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,</font>
33
 
00025 <font class="comment"> * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR</font>
34
 
00026 <font class="comment"> * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF</font>
35
 
00027 <font class="comment"> * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</font>
36
 
00028 <font class="comment"> * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</font>
37
 
00029 <font class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</font>
38
 
00030 <font class="comment"> */</font>
39
 
00031 
40
 
00032 <font class="preprocessor">#ifndef FLACPP__DECODER_H</font>
41
 
00033 <font class="preprocessor"></font><font class="preprocessor">#define FLACPP__DECODER_H</font>
42
 
00034 <font class="preprocessor"></font>
43
 
00035 <font class="preprocessor">#include "export.h"</font>
44
 
00036 
45
 
00037 <font class="preprocessor">#include "<a class="code" href="file__decoder_8h.html">FLAC/file_decoder.h</a>"</font>
46
 
00038 <font class="preprocessor">#include "<a class="code" href="seekable__stream__decoder_8h.html">FLAC/seekable_stream_decoder.h</a>"</font>
47
 
00039 <font class="preprocessor">#include "<a class="code" href="OggFLAC_2stream__decoder_8h.html">FLAC/stream_decoder.h</a>"</font>
48
 
00040 
49
 
00041 
50
 
00069 <font class="keyword">namespace </font>FLAC {
51
 
00070     <font class="keyword">namespace </font>Decoder {
52
 
00071 
53
 
00072         <font class="comment">// ============================================================</font>
54
 
00073         <font class="comment">//</font>
55
 
00074         <font class="comment">//  Equivalent: FLAC__StreamDecoder</font>
56
 
00075         <font class="comment">//</font>
57
 
00076         <font class="comment">// ============================================================</font>
58
 
00077 
59
 
<a name="l00091"></a><a class="code" href="classFLAC_1_1Decoder_1_1Stream.html">00091</a>         <font class="keyword">class </font>FLACPP_API Stream {
60
 
00092         <font class="keyword">public</font>:
61
 
00093             <font class="keyword">class </font>FLACPP_API State {
62
 
00094             <font class="keyword">public</font>:
63
 
00095                 <font class="keyword">inline</font> State(::<a class="code" href="FLAC_2stream__decoder_8h.html#a36">FLAC__StreamDecoderState</a> state): state_(state) { }
64
 
00096                 <font class="keyword">inline</font> <a class="code" href="FLAC_2stream__decoder_8h.html#a36">operator ::FLAC__StreamDecoderState</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> state_; }
65
 
00097                 <font class="keyword">inline</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *as_cstring()<font class="keyword"> const </font>{ return ::FLAC__StreamDecoderStateString[state_]; }
66
 
00098                 <font class="keyword">inline</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *resolved_as_cstring(<font class="keyword">const</font> Stream &amp;decoder)<font class="keyword"> const </font>{ <a class="code" href="FLAC_2stream__decoder_8h.html#a22">return ::FLAC__stream_decoder_get_resolved_state_string</a>(decoder.decoder_); }
67
 
00099             <font class="keyword">protected</font>:
68
 
00100                 ::FLAC__StreamDecoderState state_;
69
 
00101             };
70
 
00102 
71
 
00103             Stream();
72
 
00104             <font class="keyword">virtual</font> ~Stream();
73
 
00105 
74
 
00106             <font class="keywordtype">bool</font> is_valid() <font class="keyword">const</font>;
75
 
00107             <font class="keyword">inline</font> operator bool()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> is_valid(); }
76
 
00108 
77
 
00109             <font class="keywordtype">bool</font> set_metadata_respond(::<a class="code" href="format_8h.html#a97">FLAC__MetadataType</a> type);
78
 
00110             <font class="keywordtype">bool</font> set_metadata_respond_application(<font class="keyword">const</font> FLAC__byte id[4]);
79
 
00111             <font class="keywordtype">bool</font> set_metadata_respond_all();
80
 
00112             <font class="keywordtype">bool</font> set_metadata_ignore(::<a class="code" href="format_8h.html#a97">FLAC__MetadataType</a> type);
81
 
00113             <font class="keywordtype">bool</font> set_metadata_ignore_application(<font class="keyword">const</font> FLAC__byte id[4]);
82
 
00114             <font class="keywordtype">bool</font> set_metadata_ignore_all();
83
 
00115 
84
 
00116             State get_state() <font class="keyword">const</font>;
85
 
00117             <font class="keywordtype">unsigned</font> get_channels() <font class="keyword">const</font>;
86
 
00118             ::FLAC__ChannelAssignment get_channel_assignment() <font class="keyword">const</font>;
87
 
00119             <font class="keywordtype">unsigned</font> get_bits_per_sample() <font class="keyword">const</font>;
88
 
00120             <font class="keywordtype">unsigned</font> get_sample_rate() <font class="keyword">const</font>;
89
 
00121             <font class="keywordtype">unsigned</font> get_blocksize() <font class="keyword">const</font>;
90
 
00122 
91
 
00127             State init();
92
 
00128 
93
 
00129             <font class="keywordtype">void</font> finish();
94
 
00130 
95
 
00131             <font class="keywordtype">bool</font> flush();
96
 
00132             <font class="keywordtype">bool</font> reset();
97
 
00133 
98
 
00134             <font class="keywordtype">bool</font> process_single();
99
 
00135             <font class="keywordtype">bool</font> process_until_end_of_metadata();
100
 
00136             <font class="keywordtype">bool</font> process_until_end_of_stream();
101
 
00137             <font class="keywordtype">bool</font> skip_single_frame();
102
 
00138         <font class="keyword">protected</font>:
103
 
00139             virtual ::FLAC__StreamDecoderReadStatus read_callback(FLAC__byte buffer[], <font class="keywordtype">unsigned</font> *bytes) = 0;
104
 
00140             virtual ::FLAC__StreamDecoderWriteStatus write_callback(<font class="keyword">const</font> ::<a class="code" href="structFLAC____Frame.html">FLAC__Frame</a> *frame, <font class="keyword">const</font> FLAC__int32 * <font class="keyword">const</font> buffer[]) = 0;
105
 
00141             <font class="keyword">virtual</font> <font class="keywordtype">void</font> metadata_callback(<font class="keyword">const</font> ::<a class="code" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata) = 0;
106
 
00142             <font class="keyword">virtual</font> <font class="keywordtype">void</font> error_callback(::<a class="code" href="FLAC_2stream__decoder_8h.html#a39">FLAC__StreamDecoderErrorStatus</a> status) = 0;
107
 
00143 
108
 
00144 <font class="preprocessor">#if (defined _MSC_VER) || (defined __GNUG__ &amp;&amp; (__GNUG__ &lt; 2 || (__GNUG__ == 2 &amp;&amp; __GNUC_MINOR__ &lt; 96))) || (defined __SUNPRO_CC)</font>
109
 
00145 <font class="preprocessor"></font>            <font class="comment">// lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring()</font>
110
 
00146             <font class="keyword">friend</font> State;
111
 
00147 <font class="preprocessor">#endif</font>
112
 
00148 <font class="preprocessor"></font>            ::FLAC__StreamDecoder *decoder_;
113
 
00149         <font class="keyword">private</font>:
114
 
00150             static ::FLAC__StreamDecoderReadStatus read_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__byte buffer[], <font class="keywordtype">unsigned</font> *bytes, <font class="keywordtype">void</font> *client_data);
115
 
00151             static ::FLAC__StreamDecoderWriteStatus write_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <font class="keyword">const</font> ::<a class="code" href="structFLAC____Frame.html">FLAC__Frame</a> *frame, <font class="keyword">const</font> FLAC__int32 * <font class="keyword">const</font> buffer[], <font class="keywordtype">void</font> *client_data);
116
 
00152             <font class="keyword">static</font> <font class="keywordtype">void</font> metadata_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <font class="keyword">const</font> ::<a class="code" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata, <font class="keywordtype">void</font> *client_data);
117
 
00153             <font class="keyword">static</font> <font class="keywordtype">void</font> error_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, ::<a class="code" href="FLAC_2stream__decoder_8h.html#a39">FLAC__StreamDecoderErrorStatus</a> status, <font class="keywordtype">void</font> *client_data);
118
 
00154 
119
 
00155             <font class="comment">// Private and undefined so you can't use them:</font>
120
 
00156             Stream(<font class="keyword">const</font> Stream &amp;);
121
 
00157             <font class="keywordtype">void</font> operator=(<font class="keyword">const</font> Stream &amp;);
122
 
00158         };
123
 
00159 
124
 
00160         <font class="comment">/* \} */</font>
125
 
00161 
126
 
00162         <font class="comment">// ============================================================</font>
127
 
00163         <font class="comment">//</font>
128
 
00164         <font class="comment">//  Equivalent: FLAC__SeekableStreamDecoder</font>
129
 
00165         <font class="comment">//</font>
130
 
00166         <font class="comment">// ============================================================</font>
131
 
00167 
132
 
<a name="l00181"></a><a class="code" href="classFLAC_1_1Decoder_1_1SeekableStream.html">00181</a>         <font class="keyword">class </font>FLACPP_API SeekableStream {
133
 
00182         <font class="keyword">public</font>:
134
 
00183             <font class="keyword">class </font>FLACPP_API State {
135
 
00184             <font class="keyword">public</font>:
136
 
00185                 <font class="keyword">inline</font> State(::<a class="code" href="seekable__stream__decoder_8h.html#a50">FLAC__SeekableStreamDecoderState</a> state): state_(state) { }
137
 
00186                 <font class="keyword">inline</font> <a class="code" href="seekable__stream__decoder_8h.html#a50">operator ::FLAC__SeekableStreamDecoderState</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> state_; }
138
 
00187                 <font class="keyword">inline</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *as_cstring()<font class="keyword"> const </font>{ return ::FLAC__SeekableStreamDecoderStateString[state_]; }
139
 
00188                 <font class="keyword">inline</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *resolved_as_cstring(<font class="keyword">const</font> SeekableStream &amp;decoder)<font class="keyword"> const </font>{ <a class="code" href="seekable__stream__decoder_8h.html#a33">return ::FLAC__seekable_stream_decoder_get_resolved_state_string</a>(decoder.decoder_); }
140
 
00189             <font class="keyword">protected</font>:
141
 
00190                 ::FLAC__SeekableStreamDecoderState state_;
142
 
00191             };
143
 
00192 
144
 
00193             SeekableStream();
145
 
00194             <font class="keyword">virtual</font> ~SeekableStream();
146
 
00195 
147
 
00196             <font class="keywordtype">bool</font> is_valid() <font class="keyword">const</font>;
148
 
00197             <font class="keyword">inline</font> operator bool()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> is_valid(); }
149
 
00198 
150
 
00199             <font class="keywordtype">bool</font> set_md5_checking(<font class="keywordtype">bool</font> value);
151
 
00200             <font class="keywordtype">bool</font> set_metadata_respond(::<a class="code" href="format_8h.html#a97">FLAC__MetadataType</a> type);
152
 
00201             <font class="keywordtype">bool</font> set_metadata_respond_application(<font class="keyword">const</font> FLAC__byte id[4]);
153
 
00202             <font class="keywordtype">bool</font> set_metadata_respond_all();
154
 
00203             <font class="keywordtype">bool</font> set_metadata_ignore(::<a class="code" href="format_8h.html#a97">FLAC__MetadataType</a> type);
155
 
00204             <font class="keywordtype">bool</font> set_metadata_ignore_application(<font class="keyword">const</font> FLAC__byte id[4]);
156
 
00205             <font class="keywordtype">bool</font> set_metadata_ignore_all();
157
 
00206 
158
 
00207             State get_state() <font class="keyword">const</font>;
159
 
00208             Stream::State get_stream_decoder_state() <font class="keyword">const</font>;
160
 
00209             <font class="keywordtype">bool</font> get_md5_checking() <font class="keyword">const</font>;
161
 
00210             <font class="keywordtype">unsigned</font> get_channels() <font class="keyword">const</font>;
162
 
00211             ::FLAC__ChannelAssignment get_channel_assignment() <font class="keyword">const</font>;
163
 
00212             <font class="keywordtype">unsigned</font> get_bits_per_sample() <font class="keyword">const</font>;
164
 
00213             <font class="keywordtype">unsigned</font> get_sample_rate() <font class="keyword">const</font>;
165
 
00214             <font class="keywordtype">unsigned</font> get_blocksize() <font class="keyword">const</font>;
166
 
00215 
167
 
00216             State init();
168
 
00217 
169
 
00218             <font class="keywordtype">bool</font> finish();
170
 
00219 
171
 
00220             <font class="keywordtype">bool</font> flush();
172
 
00221             <font class="keywordtype">bool</font> reset();
173
 
00222 
174
 
00223             <font class="keywordtype">bool</font> process_single();
175
 
00224             <font class="keywordtype">bool</font> process_until_end_of_metadata();
176
 
00225             <font class="keywordtype">bool</font> process_until_end_of_stream();
177
 
00226             <font class="keywordtype">bool</font> skip_single_frame();
178
 
00227 
179
 
00228             <font class="keywordtype">bool</font> seek_absolute(FLAC__uint64 sample);
180
 
00229         <font class="keyword">protected</font>:
181
 
00230             virtual ::FLAC__SeekableStreamDecoderReadStatus read_callback(FLAC__byte buffer[], <font class="keywordtype">unsigned</font> *bytes) = 0;
182
 
00231             virtual ::FLAC__SeekableStreamDecoderSeekStatus seek_callback(FLAC__uint64 absolute_byte_offset) = 0;
183
 
00232             virtual ::FLAC__SeekableStreamDecoderTellStatus tell_callback(FLAC__uint64 *absolute_byte_offset) = 0;
184
 
00233             virtual ::FLAC__SeekableStreamDecoderLengthStatus length_callback(FLAC__uint64 *stream_length) = 0;
185
 
00234             <font class="keyword">virtual</font> <font class="keywordtype">bool</font> eof_callback() = 0;
186
 
00235             virtual ::FLAC__StreamDecoderWriteStatus write_callback(<font class="keyword">const</font> ::<a class="code" href="structFLAC____Frame.html">FLAC__Frame</a> *frame, <font class="keyword">const</font> FLAC__int32 * <font class="keyword">const</font> buffer[]) = 0;
187
 
00236             <font class="keyword">virtual</font> <font class="keywordtype">void</font> metadata_callback(<font class="keyword">const</font> ::<a class="code" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata) = 0;
188
 
00237             <font class="keyword">virtual</font> <font class="keywordtype">void</font> error_callback(::<a class="code" href="FLAC_2stream__decoder_8h.html#a39">FLAC__StreamDecoderErrorStatus</a> status) = 0;
189
 
00238 
190
 
00239 <font class="preprocessor">#if (defined _MSC_VER) || (defined __GNUG__ &amp;&amp; (__GNUG__ &lt; 2 || (__GNUG__ == 2 &amp;&amp; __GNUC_MINOR__ &lt; 96))) || (defined __SUNPRO_CC)</font>
191
 
00240 <font class="preprocessor"></font>            <font class="comment">// lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring()</font>
192
 
00241             <font class="keyword">friend</font> State;
193
 
00242 <font class="preprocessor">#endif</font>
194
 
00243 <font class="preprocessor"></font>            ::FLAC__SeekableStreamDecoder *decoder_;
195
 
00244         <font class="keyword">private</font>:
196
 
00245             static ::FLAC__SeekableStreamDecoderReadStatus read_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____SeekableStreamDecoder.html">FLAC__SeekableStreamDecoder</a> *decoder, FLAC__byte buffer[], <font class="keywordtype">unsigned</font> *bytes, <font class="keywordtype">void</font> *client_data);
197
 
00246             static ::FLAC__SeekableStreamDecoderSeekStatus seek_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____SeekableStreamDecoder.html">FLAC__SeekableStreamDecoder</a> *decoder, FLAC__uint64 absolute_byte_offset, <font class="keywordtype">void</font> *client_data);
198
 
00247             static ::FLAC__SeekableStreamDecoderTellStatus tell_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____SeekableStreamDecoder.html">FLAC__SeekableStreamDecoder</a> *decoder, FLAC__uint64 *absolute_byte_offset, <font class="keywordtype">void</font> *client_data);
199
 
00248             static ::FLAC__SeekableStreamDecoderLengthStatus length_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____SeekableStreamDecoder.html">FLAC__SeekableStreamDecoder</a> *decoder, FLAC__uint64 *stream_length, <font class="keywordtype">void</font> *client_data);
200
 
00249             <font class="keyword">static</font> FLAC__bool eof_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____SeekableStreamDecoder.html">FLAC__SeekableStreamDecoder</a> *decoder, <font class="keywordtype">void</font> *client_data);
201
 
00250             static ::FLAC__StreamDecoderWriteStatus write_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____SeekableStreamDecoder.html">FLAC__SeekableStreamDecoder</a> *decoder, <font class="keyword">const</font> ::<a class="code" href="structFLAC____Frame.html">FLAC__Frame</a> *frame, <font class="keyword">const</font> FLAC__int32 * <font class="keyword">const</font> buffer[], <font class="keywordtype">void</font> *client_data);
202
 
00251             <font class="keyword">static</font> <font class="keywordtype">void</font> metadata_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____SeekableStreamDecoder.html">FLAC__SeekableStreamDecoder</a> *decoder, <font class="keyword">const</font> ::<a class="code" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata, <font class="keywordtype">void</font> *client_data);
203
 
00252             <font class="keyword">static</font> <font class="keywordtype">void</font> error_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____SeekableStreamDecoder.html">FLAC__SeekableStreamDecoder</a> *decoder, ::<a class="code" href="FLAC_2stream__decoder_8h.html#a39">FLAC__StreamDecoderErrorStatus</a> status, <font class="keywordtype">void</font> *client_data);
204
 
00253 
205
 
00254             <font class="comment">// Private and undefined so you can't use them:</font>
206
 
00255             SeekableStream(<font class="keyword">const</font> SeekableStream &amp;);
207
 
00256             <font class="keywordtype">void</font> operator=(<font class="keyword">const</font> SeekableStream &amp;);
208
 
00257         };
209
 
00258 
210
 
00259         <font class="comment">/* \} */</font>
211
 
00260 
212
 
00261         <font class="comment">// ============================================================</font>
213
 
00262         <font class="comment">//</font>
214
 
00263         <font class="comment">//  Equivalent: FLAC__FileDecoder</font>
215
 
00264         <font class="comment">//</font>
216
 
00265         <font class="comment">// ============================================================</font>
217
 
00266 
218
 
<a name="l00280"></a><a class="code" href="classFLAC_1_1Decoder_1_1File.html">00280</a>         <font class="keyword">class </font>FLACPP_API File {
219
 
00281         <font class="keyword">public</font>:
220
 
00282             <font class="keyword">class </font>FLACPP_API State {
221
 
00283             <font class="keyword">public</font>:
222
 
00284                 <font class="keyword">inline</font> State(::<a class="code" href="file__decoder_8h.html#a36">FLAC__FileDecoderState</a> state): state_(state) { }
223
 
00285                 <font class="keyword">inline</font> <a class="code" href="file__decoder_8h.html#a36">operator ::FLAC__FileDecoderState</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> state_; }
224
 
00286                 <font class="keyword">inline</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *as_cstring()<font class="keyword"> const </font>{ return ::FLAC__FileDecoderStateString[state_]; }
225
 
00287                 <font class="keyword">inline</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *resolved_as_cstring(<font class="keyword">const</font> File &amp;decoder)<font class="keyword"> const </font>{ <a class="code" href="file__decoder_8h.html#a21">return ::FLAC__file_decoder_get_resolved_state_string</a>(decoder.decoder_); }
226
 
00288             <font class="keyword">protected</font>:
227
 
00289                 ::FLAC__FileDecoderState state_;
228
 
00290             };
229
 
00291 
230
 
00292             File();
231
 
00293             <font class="keyword">virtual</font> ~File();
232
 
00294 
233
 
00295             <font class="keywordtype">bool</font> is_valid() <font class="keyword">const</font>;
234
 
00296             <font class="keyword">inline</font> operator bool()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> is_valid(); }
235
 
00297 
236
 
00298             <font class="keywordtype">bool</font> set_md5_checking(<font class="keywordtype">bool</font> value);
237
 
00299             <font class="keywordtype">bool</font> set_filename(<font class="keyword">const</font> <font class="keywordtype">char</font> *value); 
238
 
00300             <font class="keywordtype">bool</font> set_metadata_respond(::<a class="code" href="format_8h.html#a97">FLAC__MetadataType</a> type);
239
 
00301             <font class="keywordtype">bool</font> set_metadata_respond_application(<font class="keyword">const</font> FLAC__byte id[4]);
240
 
00302             <font class="keywordtype">bool</font> set_metadata_respond_all();
241
 
00303             <font class="keywordtype">bool</font> set_metadata_ignore(::<a class="code" href="format_8h.html#a97">FLAC__MetadataType</a> type);
242
 
00304             <font class="keywordtype">bool</font> set_metadata_ignore_application(<font class="keyword">const</font> FLAC__byte id[4]);
243
 
00305             <font class="keywordtype">bool</font> set_metadata_ignore_all();
244
 
00306 
245
 
00307             State get_state() <font class="keyword">const</font>;
246
 
00308             SeekableStream::State get_seekable_stream_decoder_state() <font class="keyword">const</font>;
247
 
00309             Stream::State get_stream_decoder_state() <font class="keyword">const</font>;
248
 
00310             <font class="keywordtype">bool</font> get_md5_checking() <font class="keyword">const</font>;
249
 
00311             <font class="keywordtype">unsigned</font> get_channels() <font class="keyword">const</font>;
250
 
00312             ::FLAC__ChannelAssignment get_channel_assignment() <font class="keyword">const</font>;
251
 
00313             <font class="keywordtype">unsigned</font> get_bits_per_sample() <font class="keyword">const</font>;
252
 
00314             <font class="keywordtype">unsigned</font> get_sample_rate() <font class="keyword">const</font>;
253
 
00315             <font class="keywordtype">unsigned</font> get_blocksize() <font class="keyword">const</font>;
254
 
00316 
255
 
00317             State init();
256
 
00318 
257
 
00319             <font class="keywordtype">bool</font> finish();
258
 
00320 
259
 
00321             <font class="keywordtype">bool</font> process_single();
260
 
00322             <font class="keywordtype">bool</font> process_until_end_of_metadata();
261
 
00323             <font class="keywordtype">bool</font> process_until_end_of_file();
262
 
00324             <font class="keywordtype">bool</font> skip_single_frame();
263
 
00325 
264
 
00326             <font class="keywordtype">bool</font> seek_absolute(FLAC__uint64 sample);
265
 
00327         <font class="keyword">protected</font>:
266
 
00328             virtual ::FLAC__StreamDecoderWriteStatus write_callback(<font class="keyword">const</font> ::<a class="code" href="structFLAC____Frame.html">FLAC__Frame</a> *frame, <font class="keyword">const</font> FLAC__int32 * <font class="keyword">const</font> buffer[]) = 0;
267
 
00329             <font class="keyword">virtual</font> <font class="keywordtype">void</font> metadata_callback(<font class="keyword">const</font> ::<a class="code" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata) = 0;
268
 
00330             <font class="keyword">virtual</font> <font class="keywordtype">void</font> error_callback(::<a class="code" href="FLAC_2stream__decoder_8h.html#a39">FLAC__StreamDecoderErrorStatus</a> status) = 0;
269
 
00331 
270
 
00332 <font class="preprocessor">#if (defined _MSC_VER) || (defined __GNUG__ &amp;&amp; (__GNUG__ &lt; 2 || (__GNUG__ == 2 &amp;&amp; __GNUC_MINOR__ &lt; 96))) || (defined __SUNPRO_CC)</font>
271
 
00333 <font class="preprocessor"></font>            <font class="comment">// lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring()</font>
272
 
00334             <font class="keyword">friend</font> State;
273
 
00335 <font class="preprocessor">#endif</font>
274
 
00336 <font class="preprocessor"></font>            ::FLAC__FileDecoder *decoder_;
275
 
00337         <font class="keyword">private</font>:
276
 
00338             static ::FLAC__StreamDecoderWriteStatus write_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____FileDecoder.html">FLAC__FileDecoder</a> *decoder, <font class="keyword">const</font> ::<a class="code" href="structFLAC____Frame.html">FLAC__Frame</a> *frame, <font class="keyword">const</font> FLAC__int32 * <font class="keyword">const</font> buffer[], <font class="keywordtype">void</font> *client_data);
277
 
00339             <font class="keyword">static</font> <font class="keywordtype">void</font> metadata_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____FileDecoder.html">FLAC__FileDecoder</a> *decoder, <font class="keyword">const</font> ::<a class="code" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata, <font class="keywordtype">void</font> *client_data);
278
 
00340             <font class="keyword">static</font> <font class="keywordtype">void</font> error_callback_(<font class="keyword">const</font> ::<a class="code" href="structFLAC____FileDecoder.html">FLAC__FileDecoder</a> *decoder, ::<a class="code" href="FLAC_2stream__decoder_8h.html#a39">FLAC__StreamDecoderErrorStatus</a> status, <font class="keywordtype">void</font> *client_data);
279
 
00341 
280
 
00342             <font class="comment">// Private and undefined so you can't use them:</font>
281
 
00343             File(<font class="keyword">const</font> File &amp;);
282
 
00344             <font class="keywordtype">void</font> operator=(<font class="keyword">const</font> File &amp;);
283
 
00345         };
284
 
00346 
285
 
00347         <font class="comment">/* \} */</font>
286
 
00348 
287
 
00349     }
288
 
00350 }
289
 
00351 
290
 
00352 <font class="preprocessor">#endif</font>
291
 
</pre></div><hr><address><small>Generated on Fri Feb 4 18:39:09 2005 for FLAC by
292
 
<a href="http://www.doxygen.org/index.html">
293
 
<img src="doxygen.gif" alt="doxygen" align="middle" border=0 
294
 
width=110 height=53></a>1.2.14 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
295
 
 &copy;&nbsp;1997-2002</small></address>
296
 
</body>
297
 
</html>