TagLib API Documentation
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.h"
32#include "taglib_export.h"
33
34namespace TagLib {
35
36 namespace Ogg {
37
38 class File;
39
41
49 {
50 public:
56 PageHeader(File *file = nullptr, offset_t pageOffset = -1);
57
62
63 PageHeader(const PageHeader &) = delete;
64 PageHeader &operator=(const PageHeader &) = delete;
65
69 bool isValid() const;
70
79
86 void setPacketSizes(const List<int> &sizes);
87
97
104 void setFirstPacketContinued(bool continued);
105
114
121 void setLastPacketCompleted(bool completed);
122
128 bool firstPageOfStream() const;
129
135 void setFirstPageOfStream(bool first);
136
142 bool lastPageOfStream() const;
143
149 void setLastPageOfStream(bool last);
150
158 long long absoluteGranularPosition() const;
159
167 void setAbsoluteGranularPosition(long long agp);
168
176 unsigned int streamSerialNumber() const;
177
186 void setStreamSerialNumber(unsigned int n);
187
195
201 void setPageSequenceNumber(int sequenceNumber);
202
206 int size() const;
207
212 int dataSize() const;
213
221
222 private:
223 void read(Ogg::File *file, offset_t pageOffset);
224 ByteVector lacingValues() const;
225
226 class PageHeaderPrivate;
228 std::unique_ptr<PageHeaderPrivate> d;
229 };
230
231 } // namespace Ogg
232} // namespace TagLib
233
234#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:49
void setStreamSerialNumber(unsigned int n)
int pageSequenceNumber() const
ByteVector render() const
PageHeader(const PageHeader &)=delete
void setFirstPacketContinued(bool continued)
bool firstPacketContinued() const
void setLastPageOfStream(bool last)
void setFirstPageOfStream(bool first)
bool lastPacketCompleted() const
void setPageSequenceNumber(int sequenceNumber)
PageHeader(File *file=nullptr, offset_t pageOffset=-1)
void setLastPacketCompleted(bool completed)
unsigned int streamSerialNumber() const
long long absoluteGranularPosition() const
bool lastPageOfStream() const
void setAbsoluteGranularPosition(long long agp)
PageHeader & operator=(const PageHeader &)=delete
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
off_t offset_t
Definition: taglib.h:64
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55