![]() |
|
#include <xingheader.h>
Public Member Functions | |
XingHeader (const ByteVector &data) | |
virtual | ~XingHeader () |
bool | isValid () const |
uint | totalFrames () const |
uint | totalSize () const |
Static Public Member Functions | |
static int | xingHeaderOffset (TagLib::MPEG::Header::Version v, TagLib::MPEG::Header::ChannelMode c) |
This is a minimalistic implementation of the Xing VBR headers. Xing 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 a Xing header based on data. The data must be at least 16 bytes long (anything longer than this is discarded).
virtual TagLib::MPEG::XingHeader::~XingHeader | ( | ) | [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 header present.
uint TagLib::MPEG::XingHeader::totalFrames | ( | ) | const |
Returns the total number of frames.
uint TagLib::MPEG::XingHeader::totalSize | ( | ) | const |
Returns the total size of stream in bytes.
static int TagLib::MPEG::XingHeader::xingHeaderOffset | ( | TagLib::MPEG::Header::Version | v, | |
TagLib::MPEG::Header::ChannelMode | c | |||
) | [static] |
Returns the offset for the start of this Xing header, given the version and channels of the frame