TagLib
2.2.1
taglib
ogg
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
33
namespace
TagLib
{
34
35
namespace
Ogg {
36
37
class
File;
38
class
PageHeader;
39
41
53
class
TAGLIB_EXPORT
Page
54
{
55
public
:
59
Page
(
File
*file,
offset_t
pageOffset);
60
61
~
Page
();
62
63
Page
(
const
Page
&) =
delete
;
64
Page
&operator=(
const
Page
&) =
delete
;
65
69
offset_t
fileOffset()
const
;
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
113
enum
ContainsPacketFlags
{
115
DoesNotContainPacket = 0x0000,
117
CompletePacket = 0x0001,
119
BeginsWithPacket = 0x0002,
121
EndsWithPacket = 0x0004
122
};
123
130
ContainsPacketFlags containsPacket(
int
index)
const
;
131
135
unsigned
int
packetCount()
const
;
136
143
ByteVectorList
packets()
const
;
144
148
int
size()
const
;
149
150
ByteVector
render()
const
;
151
159
enum
PaginationStrategy
{
166
SinglePagePerGroup
,
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;
215
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
216
std::unique_ptr<PagePrivate> d;
217
};
218
}
// namespace Ogg
219
}
// namespace TagLib
220
#endif
TagLib::ByteVectorList
A list of ByteVectors.
Definition:
tbytevectorlist.h:41
TagLib::List
A generic, implicitly shared list.
Definition:
tlist.h:53
taglib.h
TagLib::Ogg::Page::SinglePagePerGroup
Definition:
oggpage.h:166
TagLib::ByteVector
A byte vector.
Definition:
tbytevector.h:45
TagLib::Ogg::Page::ContainsPacketFlags
ContainsPacketFlags
Definition:
oggpage.h:113
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition:
taglib_export.h:55
TagLib::Ogg::Page::PaginationStrategy
PaginationStrategy
Definition:
oggpage.h:159
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition:
taglib_export.h:40
TagLib::Ogg::File
An implementation of TagLib::File with some helpers for Ogg based formats.
Definition:
oggfile.h:50
TagLib::Ogg::Page
An implementation of Ogg pages.
Definition:
oggpage.h:53
TagLib::offset_t
off_t offset_t
Definition:
taglib.h:64
tbytevectorlist.h
taglib_export.h
TagLib
A namespace for all TagLib related classes and functions.
Definition:
apefile.h:41
TagLib::Ogg::PageHeader
An implementation of the page headers associated with each Ogg::Page.
Definition:
oggpageheader.h:48