An implementation of MP3 frame headers. More...
#include <mpegheader.h>
Public Types | |
enum | Version { Version1 = 0 , Version2 = 1 , Version2_5 = 2 , Version4 = 3 } |
enum | ChannelMode { Stereo = 0 , JointStereo = 1 , DualChannel = 2 , SingleChannel = 3 } |
enum | ChannelConfiguration { Custom = 0 , FrontCenter = 1 , FrontLeftRight = 2 , FrontCenterLeftRight = 3 , FrontCenterLeftRightBackCenter = 4 , FrontCenterLeftRightBackLeftRight = 5 , FrontCenterLeftRightBackLeftRightLFE = 6 , FrontCenterLeftRightSideLeftRightBackLeftRightLFE = 7 } |
Public Member Functions | |
Header (File *file, offset_t offset, bool checkLength=true) | |
Header (const Header &h) | |
~Header () | |
bool | isValid () const |
Version | version () const |
int | layer () const |
bool | protectionEnabled () const |
int | bitrate () const |
int | sampleRate () const |
bool | isPadded () const |
ChannelMode | channelMode () const |
ChannelConfiguration | channelConfiguration () const |
bool | isADTS () const |
bool | isCopyrighted () const |
bool | isOriginal () const |
int | frameLength () const |
int | samplesPerFrame () const |
Header & | operator= (const Header &h) |
An implementation of MP3 frame headers.
This is an implementation of MPEG Layer III headers. The API follows more or less the binary format of these headers.
See these documents as a reference
MPEG-4 channel configuration.
TagLib::MPEG::Header::Header | ( | const Header & | h | ) |
Does a shallow copy of h.
TagLib::MPEG::Header::~Header | ( | ) |
Destroys this Header instance.
int TagLib::MPEG::Header::bitrate | ( | ) | const |
Returns the bitrate encoded in the header.
ChannelConfiguration TagLib::MPEG::Header::channelConfiguration | ( | ) | const |
Returns the MPEG-4 channel configuration.
ChannelMode TagLib::MPEG::Header::channelMode | ( | ) | const |
Returns the channel mode for this frame.
int TagLib::MPEG::Header::frameLength | ( | ) | const |
Returns the frame length in bytes.
bool TagLib::MPEG::Header::isADTS | ( | ) | const |
Returns true
if this is the header of an Audio Data Transport Stream (ADTS), usually AAC.
bool TagLib::MPEG::Header::isCopyrighted | ( | ) | const |
Returns true
if the copyrighted bit is set.
bool TagLib::MPEG::Header::isOriginal | ( | ) | const |
Returns true
if the "original" bit is set.
bool TagLib::MPEG::Header::isPadded | ( | ) | const |
Returns true
if the frame is padded.
bool TagLib::MPEG::Header::isValid | ( | ) | const |
Returns true
if the frame is at least an appropriate size and has legal values.
int TagLib::MPEG::Header::layer | ( | ) | const |
Returns the layer version. This will be between the values 1-3.
bool TagLib::MPEG::Header::protectionEnabled | ( | ) | const |
Returns true
if the MPEG protection bit is enabled.
int TagLib::MPEG::Header::sampleRate | ( | ) | const |
Returns the sample rate in Hz.
int TagLib::MPEG::Header::samplesPerFrame | ( | ) | const |
Returns the number of frames per sample.