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) | |
~XingHeader () | |
XingHeader (const XingHeader &)=delete | |
XingHeader & | operator= (const XingHeader &)=delete |
bool | isValid () const |
unsigned int | totalFrames () const |
unsigned int | totalSize () const |
HeaderType | type () const |
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 mp3extensions.txt and the XMMS sources as references.
TagLib::MPEG::XingHeader::XingHeader | ( | const ByteVector & | data | ) |
Parses a Xing/VBRI header based on data which contains the entire first MPEG frame.
TagLib::MPEG::XingHeader::~XingHeader | ( | ) |
Destroy this XingHeader instance.
|
delete |
bool TagLib::MPEG::XingHeader::isValid | ( | ) | const |
Returns true
if the data was parsed properly and if there is a valid Xing/VBRI header present.
|
delete |
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.