| TagLib 1.13 |  |

Public Types | Public Member Functions | Static 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)
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)

## 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 this text and the XMMS sources as references.

## Member Enumeration Documentation

## ◆ HeaderType

enum TagLib::MPEG::XingHeader::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()

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

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

## ◆ ~XingHeader()

virtual TagLib::MPEG::XingHeader::~XingHeader | ( |  | ) |
| virtual

Destroy this XingHeader instance.

## 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.

## ◆ 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.

## ◆ xingHeaderOffset()

static TAGLIB_DEPRECATED 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

Deprecated:
  Always returns 0.

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

- xingheader.h