TagLib API Documentation
Public Types | Public Member Functions | List of all members
TagLib::MPEG::XingHeader Class Reference

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
 
XingHeaderoperator= (const XingHeader &)=delete
 
bool isValid () const
 
unsigned int totalFrames () const
 
unsigned int totalSize () const
 
HeaderType type () const
 

Detailed Description

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.

Member Enumeration Documentation

◆ HeaderType

The type of the VBR header.

Enumerator
Invalid 

Invalid header or no VBR header found.

Xing 

Xing header.

VBRI 

VBRI header.

Constructor & Destructor Documentation

◆ XingHeader() [1/2]

TagLib::MPEG::XingHeader::XingHeader ( const ByteVector data)

Parses a Xing/VBRI header based on data which contains the entire first MPEG frame.

◆ ~XingHeader()

TagLib::MPEG::XingHeader::~XingHeader ( )

Destroy this XingHeader instance.

◆ XingHeader() [2/2]

TagLib::MPEG::XingHeader::XingHeader ( const XingHeader )
delete

Member Function Documentation

◆ isValid()

bool TagLib::MPEG::XingHeader::isValid ( ) const

Returns true if the data was parsed properly and if there is a valid Xing/VBRI header present.

◆ operator=()

XingHeader & TagLib::MPEG::XingHeader::operator= ( const XingHeader )
delete

◆ totalFrames()

unsigned int TagLib::MPEG::XingHeader::totalFrames ( ) const

Returns the total number of frames.

◆ totalSize()

unsigned int TagLib::MPEG::XingHeader::totalSize ( ) const

Returns the total size of stream in bytes.

◆ type()

HeaderType TagLib::MPEG::XingHeader::type ( ) const

Returns the type of the VBR header.


The documentation for this class was generated from the following file: