~ubuntu-branches/ubuntu/feisty/flac/feisty

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2004-04-16 15:14:31 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040416151431-eyloggqxpwbwpogz
Tags: 1.1.0-11
Ensure that libFLAC is linked with -lm on all architectures, and
regardless of whether nasm is present

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/OggFLAC++/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/OggFLAC++/decoder.h</h1><a href="OggFLAC++_2decoder_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/* libOggFLAC++ - Free Lossless Audio Codec + Ogg library</font>
 
10
00002 <font class="comment"> * Copyright (C) 2002,2003  Josh Coalson</font>
 
11
00003 <font class="comment"> *</font>
 
12
00004 <font class="comment"> * This library is free software; you can redistribute it and/or</font>
 
13
00005 <font class="comment"> * modify it under the terms of the GNU Library General Public</font>
 
14
00006 <font class="comment"> * License as published by the Free Software Foundation; either</font>
 
15
00007 <font class="comment"> * version 2 of the License, or (at your option) any later version.</font>
 
16
00008 <font class="comment"> *</font>
 
17
00009 <font class="comment"> * This library is distributed in the hope that it will be useful,</font>
 
18
00010 <font class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</font>
 
19
00011 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</font>
 
20
00012 <font class="comment"> * Library General Public License for more details.</font>
 
21
00013 <font class="comment"> *</font>
 
22
00014 <font class="comment"> * You should have received a copy of the GNU Library General Public</font>
 
23
00015 <font class="comment"> * License along with this library; if not, write to the</font>
 
24
00016 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330,</font>
 
25
00017 <font class="comment"> * Boston, MA  02111-1307, USA.</font>
 
26
00018 <font class="comment"> */</font>
 
27
00019 
 
28
00020 <font class="preprocessor">#ifndef OggFLACPP__DECODER_H</font>
 
29
00021 <font class="preprocessor"></font><font class="preprocessor">#define OggFLACPP__DECODER_H</font>
 
30
00022 <font class="preprocessor"></font>
 
31
00023 <font class="preprocessor">#include "export.h"</font>
 
32
00024 
 
33
00025 <font class="preprocessor">#include "<a class="code" href="OggFLAC_2stream__decoder_8h.html">OggFLAC/stream_decoder.h</a>"</font>
 
34
00026 <font class="comment">// we only need this for the state abstraction really...</font>
 
35
00027 <font class="preprocessor">#include "<a class="code" href="OggFLAC++_2decoder_8h.html">FLAC++/decoder.h</a>"</font>
 
36
00028 
 
37
00029 
 
38
00057 <font class="keyword">namespace </font>OggFLAC {
 
39
00058     <font class="keyword">namespace </font>Decoder {
 
40
00059 
 
41
00060         <font class="comment">// ============================================================</font>
 
42
00061         <font class="comment">//</font>
 
43
00062         <font class="comment">//  Equivalent: OggFLAC__StreamDecoder</font>
 
44
00063         <font class="comment">//</font>
 
45
00064         <font class="comment">// ============================================================</font>
 
46
00065 
 
47
<a name="l00079"></a><a class="code" href="classOggFLAC_1_1Decoder_1_1Stream.html">00079</a>         <font class="keyword">class </font>OggFLACPP_API Stream {
 
48
00080         <font class="keyword">public</font>:
 
49
00081             <font class="keyword">class </font>OggFLACPP_API State {
 
50
00082             <font class="keyword">public</font>:
 
51
00083                 <font class="keyword">inline</font> State(::<a class="code" href="OggFLAC_2stream__decoder_8h.html#a33">OggFLAC__StreamDecoderState</a> state): state_(state) { }
 
52
00084                 <font class="keyword">inline</font> <a class="code" href="OggFLAC_2stream__decoder_8h.html#a33">operator ::OggFLAC__StreamDecoderState</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> state_; }
 
53
00085                 <font class="keyword">inline</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *as_cstring()<font class="keyword"> const </font>{ return ::OggFLAC__StreamDecoderStateString[state_]; }
 
54
00086             <font class="keyword">protected</font>:
 
55
00087                 ::OggFLAC__StreamDecoderState state_;
 
56
00088             };
 
57
00089 
 
58
00090             Stream();
 
59
00091             <font class="keyword">virtual</font> ~Stream();
 
60
00092 
 
61
00093             <font class="keywordtype">bool</font> is_valid() <font class="keyword">const</font>;
 
62
00094             <font class="keyword">inline</font> operator bool()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> is_valid(); }
 
63
00095 
 
64
00096             <font class="keywordtype">bool</font> set_serial_number(<font class="keywordtype">long</font> value);
 
65
00097             <font class="keywordtype">bool</font> set_metadata_respond(::<a class="code" href="format_8h.html#a93">FLAC__MetadataType</a> type);
 
66
00098             <font class="keywordtype">bool</font> set_metadata_respond_application(<font class="keyword">const</font> FLAC__byte id[4]);
 
67
00099             <font class="keywordtype">bool</font> set_metadata_respond_all();
 
68
00100             <font class="keywordtype">bool</font> set_metadata_ignore(::<a class="code" href="format_8h.html#a93">FLAC__MetadataType</a> type);
 
69
00101             <font class="keywordtype">bool</font> set_metadata_ignore_application(<font class="keyword">const</font> FLAC__byte id[4]);
 
70
00102             <font class="keywordtype">bool</font> set_metadata_ignore_all();
 
71
00103 
 
72
00104             State get_state() <font class="keyword">const</font>;
 
73
00105             FLAC::Decoder::Stream::State get_FLAC_stream_decoder_state() <font class="keyword">const</font>;
 
74
00106             <font class="keywordtype">unsigned</font> get_channels() <font class="keyword">const</font>;
 
75
00107             ::FLAC__ChannelAssignment get_channel_assignment() <font class="keyword">const</font>;
 
76
00108             <font class="keywordtype">unsigned</font> get_bits_per_sample() <font class="keyword">const</font>;
 
77
00109             <font class="keywordtype">unsigned</font> get_sample_rate() <font class="keyword">const</font>;
 
78
00110             <font class="keywordtype">unsigned</font> get_blocksize() <font class="keyword">const</font>;
 
79
00111 
 
80
00112             State init();
 
81
00113 
 
82
00114             <font class="keywordtype">void</font> finish();
 
83
00115 
 
84
00116             <font class="keywordtype">bool</font> flush();
 
85
00117             <font class="keywordtype">bool</font> reset();
 
86
00118 
 
87
00119             <font class="keywordtype">bool</font> process_single();
 
88
00120             <font class="keywordtype">bool</font> process_until_end_of_metadata();
 
89
00121             <font class="keywordtype">bool</font> process_until_end_of_stream();
 
90
00122         <font class="keyword">protected</font>:
 
91
00123             virtual ::FLAC__StreamDecoderReadStatus read_callback(FLAC__byte buffer[], <font class="keywordtype">unsigned</font> *bytes) = 0;
 
92
00124             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;
 
93
00125             <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;
 
94
00126             <font class="keyword">virtual</font> <font class="keywordtype">void</font> error_callback(::<a class="code" href="FLAC_2stream__decoder_8h.html#a37">FLAC__StreamDecoderErrorStatus</a> status) = 0;
 
95
00127 
 
96
00128             ::OggFLAC__StreamDecoder *decoder_;
 
97
00129         <font class="keyword">private</font>:
 
98
00130             static ::FLAC__StreamDecoderReadStatus read_callback_(<font class="keyword">const</font> ::<a class="code" href="structOggFLAC____StreamDecoder.html">OggFLAC__StreamDecoder</a> *decoder, FLAC__byte buffer[], <font class="keywordtype">unsigned</font> *bytes, <font class="keywordtype">void</font> *client_data);
 
99
00131             static ::FLAC__StreamDecoderWriteStatus write_callback_(<font class="keyword">const</font> ::<a class="code" href="structOggFLAC____StreamDecoder.html">OggFLAC__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);
 
100
00132             <font class="keyword">static</font> <font class="keywordtype">void</font> metadata_callback_(<font class="keyword">const</font> ::<a class="code" href="structOggFLAC____StreamDecoder.html">OggFLAC__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);
 
101
00133             <font class="keyword">static</font> <font class="keywordtype">void</font> error_callback_(<font class="keyword">const</font> ::<a class="code" href="structOggFLAC____StreamDecoder.html">OggFLAC__StreamDecoder</a> *decoder, ::<a class="code" href="FLAC_2stream__decoder_8h.html#a37">FLAC__StreamDecoderErrorStatus</a> status, <font class="keywordtype">void</font> *client_data);
 
102
00134 
 
103
00135             <font class="comment">// Private and undefined so you can't use them:</font>
 
104
00136             Stream(<font class="keyword">const</font> Stream &amp;);
 
105
00137             <font class="keywordtype">void</font> operator=(<font class="keyword">const</font> Stream &amp;);
 
106
00138         };
 
107
00139 
 
108
00140         <font class="comment">/* \} */</font>
 
109
00141 
 
110
00142     };
 
111
00143 };
 
112
00144 
 
113
00145 <font class="preprocessor">#endif</font>
 
114
</pre></div><hr><address><small>Generated on Sat Jan 25 10:44:46 2003 for FLAC by
 
115
<a href="http://www.doxygen.org/index.html">
 
116
<img src="doxygen.gif" alt="doxygen" align="middle" border=0 
 
117
width=110 height=53></a>1.2.14 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
 
118
 &copy;&nbsp;1997-2002</small></address>
 
119
</body>
 
120
</html>