TagLib 1.11.1 (mpegheader.h Source File)
Home
Class Hierarchy
Namespaces
Classes
Headers
Namespace Members
Class Members
File Members
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 "
taglib_export.h
"
30
31
namespace
TagLib
{
32
33
class
ByteVector;
34
class
File
;
35
36
namespace
MPEG {
37
39
47
class
TAGLIB_EXPORT
Header
48
{
49
public
:
55
Header
(
const
ByteVector
&data);
56
64
Header
(
File
*file,
long
offset,
bool
checkLength =
true
);
65
69
Header
(
const
Header
&h);
70
74
virtual
~Header
();
75
80
bool
isValid
()
const
;
81
85
enum
Version
{
87
Version1 = 0,
89
Version2 = 1,
91
Version2_5 = 2
92
};
93
97
Version
version
()
const
;
98
102
int
layer
()
const
;
103
107
bool
protectionEnabled
()
const
;
108
112
int
bitrate
()
const
;
113
117
int
sampleRate
()
const
;
118
122
bool
isPadded
()
const
;
123
128
enum
ChannelMode
{
130
Stereo = 0,
132
JointStereo = 1,
134
DualChannel = 2,
136
SingleChannel = 3
137
};
138
142
ChannelMode
channelMode
()
const
;
143
147
bool
isCopyrighted
()
const
;
148
152
bool
isOriginal
()
const
;
153
157
int
frameLength
()
const
;
158
162
int
samplesPerFrame
()
const
;
163
167
Header
&
operator=
(
const
Header
&h);
168
169
private
:
170
void
parse(
File
*file,
long
offset,
bool
checkLength);
171
172
class
HeaderPrivate;
173
HeaderPrivate *d;
174
};
175
}
176
}
177
178
#endif
File
TagLib::ByteVector
A byte vector.
Definition:
tbytevector.h:46
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:48
TagLib::MPEG::Header::Version
Version
Definition:
mpegheader.h:85
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::Header
Header(File *file, long offset, bool checkLength=true)
TagLib::MPEG::Header::~Header
virtual ~Header()
TagLib::MPEG::Header::operator=
Header & operator=(const Header &h)
TagLib::MPEG::Header::Header
Header(const ByteVector &data)
TagLib::MPEG::Header::channelMode
ChannelMode channelMode() const
TagLib::MPEG::Header::isPadded
bool isPadded() const
TagLib::MPEG::Header::frameLength
int frameLength() const
TagLib::MPEG::Header::samplesPerFrame
int samplesPerFrame() const
TagLib::MPEG::Header::ChannelMode
ChannelMode
Definition:
mpegheader.h:128
TagLib::MPEG::Header::sampleRate
int sampleRate() const
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