#include <mpegheader.h>
Public Types | |
enum | Version { Version1 = 0, Version2 = 1, Version2_5 = 2 } |
enum | ChannelMode { Stereo = 0, JointStereo = 1, DualChannel = 2, SingleChannel = 3 } |
Public Member Functions | |
Header (const ByteVector &data) | |
Header (const Header &h) | |
virtual | ~Header () |
bool | isValid () const |
Version | version () const |
int | layer () const |
bool | protectionEnabled () const |
int | bitrate () const |
int | sampleRate () const |
bool | isPadded () const |
ChannelMode | channelMode () const |
bool | isCopyrighted () const |
bool | isOriginal () const |
int | frameLength () const |
Header & | operator= (const Header &h) |
This is an implementation of MPEG Layer III headers. The API follows more or less the binary format of these headers. I've used this document as a reference.
|
There are a few combinations or one or two channel audio that are possible: |
|
The MPEG Version. |
|
Parses an MPEG header based on data. |
|
Does a shallow copy of h. |
|
Destroys this Header instance. |
|
Returns the bitrate encoded in the header. |
|
Returns the channel mode for this frame. |
|
Returns the frame length. |
|
Returns true if the copyrighted bit is set. |
|
Returns true if the "original" bit is set. |
|
Returns true if the frame is padded. |
|
Returns true if the frame is at least an appropriate size and has legal values. |
|
Returns the layer version. This will be between the values 1-3. |
|
Makes a shallow copy of the header. |
|
Returns true if the MPEG protection bit is enabled. |
|
Returns the sample rate in Hz. |
|
Returns the MPEG Version of the header. |