oggpageheader.h
Go to the documentation of this file.
1/***************************************************************************
2 copyright : (C) 2002 - 2008 by Scott Wheeler
3 email : wheeler@kde.org
4 ***************************************************************************/
5
6/***************************************************************************
7 * This library is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU Lesser General Public License version *
9 * 2.1 as published by the Free Software Foundation. *
10 * *
11 * This library is distributed in the hope that it will be useful, but *
12 * WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14 * Lesser General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Lesser General Public *
17 * License along with this library; if not, write to the Free Software *
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
19 * 02110-1301 USA *
20 * *
21 * Alternatively, this file is available under the Mozilla Public *
22 * License Version 1.1. You may obtain a copy of the License at *
23 * http://www.mozilla.org/MPL/ *
24 ***************************************************************************/
25
26#ifndef TAGLIB_OGGPAGEHEADER_H
27#define TAGLIB_OGGPAGEHEADER_H
28
29#include "tlist.h"
30#include "tbytevector.h"
31#include "taglib_export.h"
32
33namespace TagLib {
34
35 namespace Ogg {
36
37 class File;
38
40
48 {
49 public:
55 PageHeader(File *file = 0, long pageOffset = -1);
56
60 virtual ~PageHeader();
61
65 bool isValid() const;
66
75
82 void setPacketSizes(const List<int> &sizes);
83
93
100 void setFirstPacketContinued(bool continued);
101
110
117 void setLastPacketCompleted(bool completed);
118
124 bool firstPageOfStream() const;
125
131 void setFirstPageOfStream(bool first);
132
138 bool lastPageOfStream() const;
139
145 void setLastPageOfStream(bool last);
146
154 long long absoluteGranularPosition() const;
155
163 void setAbsoluteGranularPosition(long long agp);
164
172 unsigned int streamSerialNumber() const;
173
182 void setStreamSerialNumber(unsigned int n);
183
191
197 void setPageSequenceNumber(int sequenceNumber);
198
202 int size() const;
203
208 int dataSize() const;
209
217
218 private:
219 PageHeader(const PageHeader &);
220 PageHeader &operator=(const PageHeader &);
221
222 void read(Ogg::File *file, long pageOffset);
223 ByteVector lacingValues() const;
224
225 class PageHeaderPrivate;
226 PageHeaderPrivate *d;
227 };
228
229 }
230}
231
232#endif
A byte vector.
Definition: tbytevector.h:46
A generic, implicitly shared list.
Definition: tlist.h:54
An implementation of TagLib::File with some helpers for Ogg based formats.
Definition: oggfile.h:51
An implementation of the page headers associated with each Ogg::Page.
Definition: oggpageheader.h:48
void setStreamSerialNumber(unsigned int n)
int pageSequenceNumber() const
ByteVector render() const
void setFirstPacketContinued(bool continued)
PageHeader(File *file=0, long pageOffset=-1)
bool firstPacketContinued() const
void setLastPageOfStream(bool last)
void setFirstPageOfStream(bool first)
bool lastPacketCompleted() const
void setPageSequenceNumber(int sequenceNumber)
void setLastPacketCompleted(bool completed)
unsigned int streamSerialNumber() const
long long absoluteGranularPosition() const
bool lastPageOfStream() const
void setAbsoluteGranularPosition(long long agp)
bool firstPageOfStream() const
List< int > packetSizes() const
void setPacketSizes(const List< int > &sizes)
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
#define TAGLIB_EXPORT
Definition: taglib_export.h:40