TagLib API Documentation
oggpage.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_OGGPAGE_H
27#define TAGLIB_OGGPAGE_H
28
29#include "tbytevectorlist.h"
30#include "taglib.h"
31#include "taglib_export.h"
32
33namespace TagLib {
34
35 namespace Ogg {
36
37 class File;
38 class PageHeader;
39
41
54 {
55 public:
59 Page(File *file, offset_t pageOffset);
60
62
63 Page(const Page &) = delete;
64 Page &operator=(const Page &) = delete;
65
70
75 const PageHeader *header() const;
76
83 int pageSequenceNumber() const;
84
90 void setPageSequenceNumber(int sequenceNumber);
91
98 int firstPacketIndex() const;
99
105 void setFirstPacketIndex(int index);
106
115 DoesNotContainPacket = 0x0000,
117 CompletePacket = 0x0001,
119 BeginsWithPacket = 0x0002,
121 EndsWithPacket = 0x0004
122 };
123
131
135 unsigned int packetCount() const;
136
144
148 int size() const;
149
151
171 Repaginate
172 };
173
193 static List<Page *> paginate(const ByteVectorList &packets,
194 PaginationStrategy strategy,
195 unsigned int streamSerialNumber,
196 int firstPage,
197 bool firstPacketContinued = false,
198 bool lastPacketCompleted = true,
199 bool containsLastPacket = false);
200
201 protected:
206 Page(const ByteVectorList &packets,
207 unsigned int streamSerialNumber,
208 int pageNumber,
209 bool firstPacketContinued = false,
210 bool lastPacketCompleted = true,
211 bool containsLastPacket = false);
212
213 private:
214 class PagePrivate;
216 std::unique_ptr<PagePrivate> d;
217 };
218 } // namespace Ogg
219} // namespace TagLib
220#endif
A list of ByteVectors.
Definition: tbytevectorlist.h:42
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
An implementation of Ogg pages.
Definition: oggpage.h:54
int pageSequenceNumber() const
ByteVector render() const
ByteVectorList packets() const
static List< Page * > paginate(const ByteVectorList &packets, PaginationStrategy strategy, unsigned int streamSerialNumber, int firstPage, bool firstPacketContinued=false, bool lastPacketCompleted=true, bool containsLastPacket=false)
Page(const Page &)=delete
PaginationStrategy
Definition: oggpage.h:159
@ SinglePagePerGroup
Definition: oggpage.h:166
Page & operator=(const Page &)=delete
void setPageSequenceNumber(int sequenceNumber)
int size() const
ContainsPacketFlags
Definition: oggpage.h:113
void setFirstPacketIndex(int index)
Page(File *file, offset_t pageOffset)
ContainsPacketFlags containsPacket(int index) const
const PageHeader * header() const
offset_t fileOffset() const
int firstPacketIndex() const
Page(const ByteVectorList &packets, unsigned int streamSerialNumber, int pageNumber, bool firstPacketContinued=false, bool lastPacketCompleted=true, bool containsLastPacket=false)
unsigned int packetCount() const
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