An implementation of the Xing/VBRI headers. More...
#include <xingheader.h>
Public Types | |
enum | HeaderType { Invalid = 0 , Xing = 1 , VBRI = 2 } |
Public Member Functions | |
XingHeader (const ByteVector &data) | |
virtual | ~XingHeader () |
bool | isValid () const |
unsigned int | totalFrames () const |
unsigned int | totalSize () const |
HeaderType | type () const |
Static Public Member Functions | |
static TAGLIB_DEPRECATED int | xingHeaderOffset (TagLib::MPEG::Header::Version v, TagLib::MPEG::Header::ChannelMode c) |
An implementation of the Xing/VBRI headers.
This is a minimalistic implementation of the Xing/VBRI VBR headers. Xing/VBRI headers are often added to VBR (variable bit rate) MP3 streams to make it easy to compute the length and quality of a VBR stream. Our implementation is only concerned with the total size of the stream (so that we can calculate the total playing time and the average bitrate). It uses this text and the XMMS sources as references.
TagLib::MPEG::XingHeader::XingHeader | ( | const ByteVector & | data | ) |
Parses an Xing/VBRI header based on data which contains the entire first MPEG frame.
|
virtual |
Destroy this XingHeader instance.
bool TagLib::MPEG::XingHeader::isValid | ( | ) | const |
Returns true if the data was parsed properly and if there is a valid Xing/VBRI header present.
unsigned int TagLib::MPEG::XingHeader::totalFrames | ( | ) | const |
Returns the total number of frames.
unsigned int TagLib::MPEG::XingHeader::totalSize | ( | ) | const |
Returns the total size of stream in bytes.
HeaderType TagLib::MPEG::XingHeader::type | ( | ) | const |
Returns the type of the VBR header.
|
static |
Returns the offset for the start of this Xing header, given the version and channels of the frame