TagLib API Documentation
source
taglib
mpeg
mpegheader.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_MPEGHEADER_H
27
#define TAGLIB_MPEGHEADER_H
28
29
#include <memory>
30
31
#include "
taglib.h
"
32
#include "
taglib_export.h
"
33
34
namespace
TagLib
{
35
36
class
ByteVector;
37
class
File;
38
39
namespace
MPEG {
40
42
53
class
TAGLIB_EXPORT
Header
54
{
55
public
:
63
Header
(
File
*file,
offset_t
offset,
bool
checkLength =
true
);
64
68
Header
(
const
Header
&h);
69
73
~Header
();
74
79
bool
isValid
()
const
;
80
84
enum
Version
{
86
Version1 = 0,
88
Version2 = 1,
90
Version2_5 = 2,
92
Version4 = 3
93
};
94
98
Version
version
()
const
;
99
103
int
layer
()
const
;
104
108
bool
protectionEnabled
()
const
;
109
113
int
bitrate
()
const
;
114
118
int
sampleRate
()
const
;
119
123
bool
isPadded
()
const
;
124
129
enum
ChannelMode
{
131
Stereo = 0,
133
JointStereo = 1,
135
DualChannel = 2,
137
SingleChannel = 3
138
};
139
143
ChannelMode
channelMode
()
const
;
144
148
enum
ChannelConfiguration
{
150
Custom = 0,
152
FrontCenter = 1,
154
FrontLeftRight = 2,
156
FrontCenterLeftRight = 3,
158
FrontCenterLeftRightBackCenter = 4,
161
FrontCenterLeftRightBackLeftRight = 5,
164
FrontCenterLeftRightBackLeftRightLFE = 6,
167
FrontCenterLeftRightSideLeftRightBackLeftRightLFE = 7
168
};
169
173
ChannelConfiguration
channelConfiguration
()
const
;
174
179
bool
isADTS
()
const
;
180
184
bool
isCopyrighted
()
const
;
185
189
bool
isOriginal
()
const
;
190
194
int
frameLength
()
const
;
195
199
int
samplesPerFrame
()
const
;
200
204
Header
&
operator=
(
const
Header
&h);
205
206
private
:
207
void
parse(
File
*file,
offset_t
offset,
bool
checkLength);
208
209
class
HeaderPrivate;
210
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
211
std::shared_ptr<HeaderPrivate> d;
212
};
213
}
// namespace MPEG
214
}
// namespace TagLib
215
216
#endif
TagLib::MPEG::File
An MPEG file class with some useful methods specific to MPEG.
Definition
mpegfile.h:54
TagLib::MPEG::Header
An implementation of MP3 frame headers.
Definition
mpegheader.h:54
TagLib::MPEG::Header::Version
Version
Definition
mpegheader.h:84
TagLib::MPEG::Header::isOriginal
bool isOriginal() const
TagLib::MPEG::Header::version
Version version() const
TagLib::MPEG::Header::isValid
bool isValid() const
TagLib::MPEG::Header::isCopyrighted
bool isCopyrighted() const
TagLib::MPEG::Header::bitrate
int bitrate() const
TagLib::MPEG::Header::Header
Header(const Header &h)
TagLib::MPEG::Header::protectionEnabled
bool protectionEnabled() const
TagLib::MPEG::Header::layer
int layer() const
TagLib::MPEG::Header::operator=
Header & operator=(const Header &h)
TagLib::MPEG::Header::channelMode
ChannelMode channelMode() const
TagLib::MPEG::Header::Header
Header(File *file, offset_t offset, bool checkLength=true)
TagLib::MPEG::Header::isPadded
bool isPadded() const
TagLib::MPEG::Header::channelConfiguration
ChannelConfiguration channelConfiguration() const
TagLib::MPEG::Header::frameLength
int frameLength() const
TagLib::MPEG::Header::samplesPerFrame
int samplesPerFrame() const
TagLib::MPEG::Header::ChannelMode
ChannelMode
Definition
mpegheader.h:129
TagLib::MPEG::Header::isADTS
bool isADTS() const
TagLib::MPEG::Header::sampleRate
int sampleRate() const
TagLib::MPEG::Header::~Header
~Header()
TagLib::MPEG::Header::ChannelConfiguration
ChannelConfiguration
Definition
mpegheader.h:148
TagLib
A namespace for all TagLib related classes and functions.
Definition
apefile.h:41
TagLib::offset_t
off_t offset_t
Definition
taglib.h:64
taglib.h
taglib_export.h
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition
taglib_export.h:40
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition
taglib_export.h:55