| TagLib 1.13 |  |

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
33 namespace TagLib {
34
35 namespace Ogg {
36
37 class File;
38
40
47 class TAGLIB_EXPORT PageHeader
48 {
49 public:
55 PageHeader(File *file = 0, long pageOffset = -1);
56
60 virtual ~PageHeader();
61
65 bool isValid() const;
66
74 List<int> packetSizes() const;
75
82 void setPacketSizes(const List<int> &sizes);
83
92 bool firstPacketContinued() const;
93
100 void setFirstPacketContinued(bool continued);
101
109 bool lastPacketCompleted() const;
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
190 int pageSequenceNumber() const;
191
197 void setPageSequenceNumber(int sequenceNumber);
198
202 int size() const;
203
208 int dataSize() const;
209
216 ByteVector render() const;
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
TagLib::ByteVector
A byte vector.
Definition: tbytevector.h:46
TagLib::List
A generic, implicitly shared list.
Definition: tlist.h:54
TagLib::Ogg::File
An implementation of TagLib::File with some helpers for Ogg based formats.
Definition: oggfile.h:51
TagLib::Ogg::PageHeader
An implementation of the page headers associated with each Ogg::Page.
Definition: oggpageheader.h:48
TagLib::Ogg::PageHeader::setStreamSerialNumber
void setStreamSerialNumber(unsigned int n)
TagLib::Ogg::PageHeader::dataSize
int dataSize() const
TagLib::Ogg::PageHeader::pageSequenceNumber
int pageSequenceNumber() const
TagLib::Ogg::PageHeader::render
ByteVector render() const
TagLib::Ogg::PageHeader::setFirstPacketContinued
void setFirstPacketContinued(bool continued)
TagLib::Ogg::PageHeader::isValid
bool isValid() const
TagLib::Ogg::PageHeader::PageHeader
PageHeader(File *file=0, long pageOffset=-1)
TagLib::Ogg::PageHeader::firstPacketContinued
bool firstPacketContinued() const
TagLib::Ogg::PageHeader::setLastPageOfStream
void setLastPageOfStream(bool last)
TagLib::Ogg::PageHeader::setFirstPageOfStream
void setFirstPageOfStream(bool first)
TagLib::Ogg::PageHeader::lastPacketCompleted
bool lastPacketCompleted() const
TagLib::Ogg::PageHeader::setPageSequenceNumber
void setPageSequenceNumber(int sequenceNumber)
TagLib::Ogg::PageHeader::setLastPacketCompleted
void setLastPacketCompleted(bool completed)
TagLib::Ogg::PageHeader::streamSerialNumber
unsigned int streamSerialNumber() const
TagLib::Ogg::PageHeader::size
int size() const
TagLib::Ogg::PageHeader::absoluteGranularPosition
long long absoluteGranularPosition() const
TagLib::Ogg::PageHeader::lastPageOfStream
bool lastPageOfStream() const
TagLib::Ogg::PageHeader::setAbsoluteGranularPosition
void setAbsoluteGranularPosition(long long agp)
TagLib::Ogg::PageHeader::firstPageOfStream
bool firstPageOfStream() const
TagLib::Ogg::PageHeader::~PageHeader
virtual ~PageHeader()
TagLib::Ogg::PageHeader::packetSizes
List< int > packetSizes() const
TagLib::Ogg::PageHeader::setPacketSizes
void setPacketSizes(const List< int > &sizes)
TagLib
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
taglib_export.h
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
tbytevector.h
tlist.h