#include <mp3_frame_header.h>
Collaboration diagram for mp3_frame_header:

- (0-10) Frame sync
- vv MPEG Audio version ID
- ll Layer version
- c CRC bit
- bbbb Bit rate index
- yy Sampling rate
- d Padding bit
- p Private bit
- mm Channel Mode
- xx Mode extension
- r Copyright
- o Original
- ee Emphasis
Public Member Functions | |
| mp3_frame_header (void) | |
| MP3 frame header constructor. | |
| mp3_frame_header (char *pMemory) | |
| MP3 frame header constructor. | |
| ~mp3_frame_header (void) | |
| MP3 frame header destructor. | |
| void | SetFrameHeader (char *pMemory) |
| Set MP3 frame header. | |
| bool | IsValidFrameHeader (void) const |
| Test if a frame header it is a true frame header. | |
| int | GetLength (void) const |
| Gets the length of the frame. | |
| int | GetSlotSize (void) const |
| Determine the slot size. | |
| int | GetSamplerateConstant (void) const |
| Determine the samplerate constant. | |
| int | GetBitrateConstant (void) const |
| Determine the bitrate constant. | |
| string | GetMPEGVersionDesc (void) const |
| Gets MPEG version description. | |
| string | GetLayerVersionDesc (void) const |
| Gets layer version description. | |
| int | GetBitrateDesc (void) const |
| Gets bitrate description. | |
| int | GetSamplerateDesc (void) const |
| Gets samplerate description. | |
| string | GetChanmodeDesc (void) const |
| Gets channel mode description. | |
| string | GetChanmodeExDesc (void) const |
| Gets extended channel mode description. | |
| string | GetEmphasisDesc (void) const |
| Gets emphasis description. | |
| bool | GetCRC (void) const |
| Gets the CRC flag from the frame header. | |
| bool | GetPrivate (void) const |
| Gets the private flag from the frame header. | |
| bool | GetCopyright (void) const |
| Gets the copyright flag from the frame header. | |
| bool | GetOriginal (void) const |
| Gets the original flag from the frame header. | |
Private Member Functions | |
| int | GetMPEGVersion (void) const |
| Gets the MPEG version from the frame header. | |
| int | GetLayerVersion (void) const |
| Gets the layer version from the frame header. | |
| int | GetBitrate (void) const |
| Gets the bitrate index from the frame header. | |
| int | GetSamplerate (void) const |
| Gets the samplerate index from the frame header. | |
| int | GetPadded (void) const |
| Gets the padded flag from the frame header. | |
| int | GetChanmode (void) const |
| Gets the channel mode index from the frame header. | |
| int | GetChanmodeEx (void) const |
| Gets the extended channel mode index from the frame header. | |
| int | GetEmphasis (void) const |
| Gets the emphasis index from the frame header. | |
Private Attributes | |
| int | m_FrameHeader |
| MP3 frame header. | |
Static Private Attributes | |
| const int | FRAME_SYNC = 0x0FFE00000 |
| Frame Sync: 1111 1111 1110 0000 0000 0000 0000 0000. | |
| const int | NUM_MPEG_VERSION = 4 |
| Number of versions. | |
| const int | MPEG_V1 = 3 |
| Version 1. | |
| const int | MPEG_V2 = 2 |
| Version 2. | |
| const int | MPEG_V25 = 0 |
| Version 2.5. | |
| const int | INVALID_MPEG = 1 |
| Invalid version. | |
| const int | NUM_LAYER_VERSION = 4 |
| Number of layers. | |
| const int | LAYER_I = 3 |
| Layer I. | |
| const int | LAYER_II = 2 |
| Layer II. | |
| const int | LAYER_III = 1 |
| Layer III. | |
| const int | INVALID_LAYER = 0 |
| Invalid layer. | |
| const int | SLOT_SIZE_LAYER_I = 4 |
| Size of a slot - Layer I. | |
| const int | SLOT_SIZE_LAYER_II_III = 1 |
| Size of a slot - Layer II & III. | |
| const int | SAMPLERATE_CONST_LAYER_I = 384 |
| Sample rate constant - Layer I. | |
| const int | SAMPLERATE_CONST_LAYER_II_III = 1152 |
| Sample rate constant - Layer II & III. | |
| const int | BITRATE_CONST_LAYER_I = 12 |
| Bit rate constant - Layer I. | |
| const int | BITRATE_CONST_LAYER_II_III = 144 |
| Bit rate constant - Layer II & III. | |
| const int | NUM_BITRATE = 16 |
| Number of bit rates. | |
| const int | FREE_BITRATE = 0 |
| Free bitrate. | |
| const int | INVALID_BITRATE = 15 |
| Invalid bitrate. | |
| const int | INVALID_BR_DESC = -1 |
| Bit Rate desc for invalid bitrate. | |
| const int | FREE_BR_DESC = 0 |
| Bit Rate desc for free bitrate. | |
| const int | NUM_SAMPLERATE = 4 |
| Number of sample rates. | |
| const int | INVALID_SAMPLERATE = 3 |
| Invalid samplerate. | |
| const int | INVALID_SR_DESC = -1 |
| Sample Rate desc for invalid samplerate. | |
| const int | NUM_CHANMODE = 4 |
| Number of channel modes. | |
| const int | CHANMODE_EX = 1 |
| Channel mode extended. | |
| const int | NUM_CHANMODE_EX = 4 |
| Number of channel modes ex. | |
| const int | NUM_EMPHASIS = 4 |
| Number of emphasis. | |
| const string | MPEG_VERSION_DESC [NUM_MPEG_VERSION] |
| Array of mpeg versions. | |
| const string | LAYER_VERSION_DESC [NUM_LAYER_VERSION] |
| Array of channel modes. | |
| const int | BITRATE_DESC [NUM_MPEG_VERSION][NUM_LAYER_VERSION][NUM_BITRATE] |
| Array of bit rates. | |
| const int | SAMPLERATE_DESC [NUM_MPEG_VERSION][NUM_SAMPLERATE] |
| Array of sample rates. | |
| const string | CHANMODE_DESC [NUM_CHANMODE] |
| Array of channel modes. | |
| const string | CHANMODE_EX_DESC [NUM_LAYER_VERSION][NUM_CHANMODE_EX] |
| Array of extended channel modes. | |
| const string | EMPHASIS_DESC [NUM_EMPHASIS] |
| Array of emphasis. | |
|
|
MP3 frame header constructor.
|
|
|
MP3 frame header constructor.
|
Here is the call graph for this function:

|
|
MP3 frame header destructor.
|
|
|
Set MP3 frame header.
|
|
|
Test if a frame header it is a true frame header.
|
Here is the call graph for this function:

|
|
Gets the length of the frame.
|
Here is the call graph for this function:

|
|
Determine the slot size.
|
Here is the call graph for this function:

|
|
Determine the samplerate constant.
|
Here is the call graph for this function:

|
|
Determine the bitrate constant.
|
Here is the call graph for this function:

|
|
Gets MPEG version description.
|
Here is the call graph for this function:

|
|
Gets layer version description.
|
Here is the call graph for this function:

|
|
Gets bitrate description.
|
Here is the call graph for this function:

|
|
Gets samplerate description.
|
Here is the call graph for this function:

|
|
Gets channel mode description.
|
Here is the call graph for this function:

|
|
Gets extended channel mode description.
|
Here is the call graph for this function:

|
|
Gets emphasis description.
|
Here is the call graph for this function:

|
|
Gets the CRC flag from the frame header.
|
|
|
Gets the private flag from the frame header.
|
|
|
Gets the copyright flag from the frame header.
|
|
|
Gets the original flag from the frame header.
|
|
|
Gets the MPEG version from the frame header.
|
|
|
Gets the layer version from the frame header.
|
|
|
Gets the bitrate index from the frame header.
|
|
|
Gets the samplerate index from the frame header.
|
|
|
Gets the padded flag from the frame header.
|
|
|
Gets the channel mode index from the frame header.
|
|
|
Gets the extended channel mode index from the frame header.
|
|
|
Gets the emphasis index from the frame header.
|
|
|
Frame Sync: 1111 1111 1110 0000 0000 0000 0000 0000.
|
|
|
Number of versions.
|
|
|
Version 1.
|
|
|
Version 2.
|
|
|
Version 2.5.
|
|
|
Invalid version.
|
|
|
Number of layers.
|
|
|
Layer I.
|
|
|
Layer II.
|
|
|
Layer III.
|
|
|
Invalid layer.
|
|
|
Size of a slot - Layer I.
|
|
|
Size of a slot - Layer II & III.
|
|
|
Sample rate constant - Layer I.
|
|
|
Sample rate constant - Layer II & III.
|
|
|
Bit rate constant - Layer I.
|
|
|
Bit rate constant - Layer II & III.
|
|
|
Number of bit rates.
|
|
|
Free bitrate.
|
|
|
Invalid bitrate.
|
|
|
Bit Rate desc for invalid bitrate.
|
|
|
Bit Rate desc for free bitrate.
|
|
|
Number of sample rates.
|
|
|
Invalid samplerate.
|
|
|
Sample Rate desc for invalid samplerate.
|
|
|
Number of channel modes.
|
|
|
Channel mode extended.
|
|
|
Number of channel modes ex.
|
|
|
Number of emphasis.
|
|
|
Initial value:
{
"MPEG Version 2.5",
"Invalid value",
"MPEG Version 2",
"MPEG Version 1"
}
|
|
|
Initial value:
{
"Invalid value",
"Layer III",
"Layer II",
"Layer I"
}
|
|
|
Array of bit rates.
|
|
|
Initial value:
{
11025, 12000, 8000, INVALID_SR_DESC,
INVALID_SR_DESC, INVALID_SR_DESC, INVALID_SR_DESC, INVALID_SR_DESC,
22050, 24000, 16000, INVALID_SR_DESC,
44100, 48000, 32000, INVALID_SR_DESC
}
|
|
|
Initial value:
{
"Stereo",
"Extended",
"Dual channel (Mono)",
"Mono"
}
|
|
|
Initial value:
{
"Invalid value", "Invalid value", "Invalid value", "Invalid value",
"Joint stereo", "Intensity stereo", "Mid side stereo", "Intensity & mid side stereo",
"Intensity stereo", "Intensity stereo", "Intensity stereo", "Intensity stereo",
"Intensity stereo", "Intensity stereo", "Intensity stereo", "Intensity stereo"
}
Layer I & II:
Layer III:
|
|
|
Initial value:
{
"None",
"50/15 ms",
"reserved",
"CCIT J.17"
}
|
|
|
MP3 frame header.
|
|
|
|