TagLib  2.0.2
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
34namespace TagLib {
35
36 class ByteVector;
37 class File;
38
39 namespace MPEG {
40
42
52
54 {
55 public:
63 Header(File *file, offset_t offset, bool checkLength = true);
64
68 Header(const Header &h);
69
74
79 bool isValid() const;
80
84 enum Version {
93 };
94
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
139
144
169
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
205
206 private:
207 void parse(File *file, offset_t offset, bool checkLength);
208
209 class HeaderPrivate;
211 std::shared_ptr<HeaderPrivate> d;
212 };
213 } // namespace MPEG
214} // namespace TagLib
215
216#endif
A byte vector.
Definition tbytevector.h:46
A file class with some useful methods for tag manipulation.
Definition tfile.h:51
An MPEG file class with some useful methods specific to MPEG.
Definition mpegfile.h:54
Version
Definition mpegheader.h:84
@ Version1
MPEG Version 1.
Definition mpegheader.h:86
@ Version2_5
MPEG Version 2.5.
Definition mpegheader.h:90
@ Version4
MPEG Version 4.
Definition mpegheader.h:92
@ Version2
MPEG Version 2.
Definition mpegheader.h:88
bool isOriginal() const
Version version() const
bool isValid() const
bool isCopyrighted() const
Header(const Header &h)
bool protectionEnabled() const
Header & operator=(const Header &h)
ChannelMode channelMode() const
Header(File *file, offset_t offset, bool checkLength=true)
bool isPadded() const
ChannelConfiguration channelConfiguration() const
int frameLength() const
int samplesPerFrame() const
ChannelMode
Definition mpegheader.h:129
@ Stereo
Stereo.
Definition mpegheader.h:131
@ SingleChannel
Mono.
Definition mpegheader.h:137
@ DualChannel
Dual Mono.
Definition mpegheader.h:135
@ JointStereo
Stereo.
Definition mpegheader.h:133
bool isADTS() const
int sampleRate() const
ChannelConfiguration
Definition mpegheader.h:148
@ FrontCenterLeftRightSideLeftRightBackLeftRightLFE
Definition mpegheader.h:167
@ FrontCenter
1 channel: front-center
Definition mpegheader.h:152
@ Custom
Defined in audio object type (AOT) specific configuration.
Definition mpegheader.h:150
@ FrontCenterLeftRightBackLeftRightLFE
Definition mpegheader.h:164
@ FrontCenterLeftRightBackLeftRight
Definition mpegheader.h:161
@ FrontCenterLeftRightBackCenter
4 channels: front-center, front-left, front-right, back-center
Definition mpegheader.h:158
@ FrontLeftRight
2 channels: front-left, front-right
Definition mpegheader.h:154
@ FrontCenterLeftRight
3 channels: front-center, front-left, front-right
Definition mpegheader.h:156
An implementation of TagLib::File with MPEG (MP3) specific methods.
Definition mpegfile.h:43
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