Main Page   Compound List   Header Files   Compound Members  

SB_MPEGHeader Class Reference

SB_MPEGHeader is the MPEG header information class of the Strawberry Library. More...

#include <strawberry_mpegheader.h>

List of all members.


Public Members

enum  SB_MPEG_VERSION { MPEG_VERSION_UNDEF, MPEG_VERSION_1, MPEG_VERSION_2, MPEG_VERSION_25 }
List of MPEG versions (1.0, 2.0, and 2.5).

enum  SB_MPEG_LAYER { MPEG_LAYER_UNDEF, MPEG_LAYER_1, MPEG_LAYER_2, MPEG_LAYER_3 }
List of MP3 layers (1, 2, or 3).

enum  SB_MPEG_CHANNELMODE { MPEG_MODE_UNDEF, MPEG_MODE_STEREO, MPEG_MODE_JOINTSTEREO, MPEG_MODE_DUALCHANNEL, MPEG_MODE_SINGLECHANNEL }
List of channel modes (stereo, joint stereo, dual-channel mono, or single-channel mono).

enum  SB_MPEG_CHANNELEXTENSION { MPEG_EXTENSION_UNDEF, MPEG_EXTENSION_12_4_31, MPEG_EXTENSION_12_8_31, MPEG_EXTENSION_12_12_31, MPEG_EXTENSION_12_16_31, MPEG_EXTENSION_3_NI_NM, MPEG_EXTENSION_3_YI_NM, MPEG_EXTENSION_3_NI_YM, MPEG_EXTENSION_3_YI_YM }
List of channel mode extensions (bands 4-31, bands 8-31, bands 12-31, bands 16-31, none, intensity stereo, MS stereo, intensity and MS stereo).

enum  SB_MPEG_EMPHASIS { MPEG_EMPH_UNDEF, MPEG_EMPH_NONE, MPEG_EMPH_5015MS, MPEG_EMPH_CCITT_J17 }
List of emphasis types (none, 50/15 microsec, CCITT j.17).

 SB_MPEGHeader ()
Constructor, allocates stuff.

 ~SB_MPEGHeader ()
Destructor, deallocates stuff. More...

bool Open (CFile *openfile)
"Open" MP3 from an already opened CFile.

bool Open (const CString &filename)
Open MP3 with specified filename.

bool ExtractHeader ()
Actually load header once the file has been opened.

bool Close ()
Close MP3 file.

void EraseAllFields ()
Clears all header information in memory. More...

CString GenerateReport ()
Return a multiline string with a bunch of MPEG header info.

bool IsFrameSynced ()
Returns whether or not the current frame is valid. More...

SB_MPEG_VERSION GetVersion ()
Returns identifier of MPEG version. More...

CString GetVersionString ()
Returns a string description of the MPEG header version. More...

SB_MPEG_LAYER GetLayer ()
Returns identifier of layer number. More...

CString GetLayerString ()
Returns a string description of the MPEG header layer. More...

bool IsCRCs ()
Returns whether or not the MPEG header includes CRC checksum data. More...

int GetBitrate ()
Returns the bitrate, in bits per second, of the MPEG header. More...

CString GetBitrateString ()
Returns a string description of the MPEG header bitrate. More...

int GetSamplingRate ()
Returns the sampling rate, in Hz, of the MPEG header. More...

CString GetSamplingRateString ()
Returns a string description of the MPEG header sampling rate. More...

bool IsPadded ()
Returns whether or not the MPEG header is padded. More...

bool IsPrivate ()
Returns whether or not the MPEG header has the private bit set. The private bit is set aside for a user-defined use. More...

SB_MPEG_CHANNELMODE GetChannelMode ()
Returns identifier of channel mode. More...

CString GetChannelModeString ()
Returns a string description of the MPEG header channel mode. More...

SB_MPEG_CHANNELEXTENSION GetChannelModeExtension ()
Returns identifier of layer channel mode extension. More...

CString GetChannelModeExtensionString ()
Returns a string description of the MPEG header channel mode extension. More...

bool IsCopyrighted ()
Returns whether or not the MPEG header has the copyrighted bit set. More...

bool IsOriginal ()
Returns whether or not the MPEG header has the original bit set. More...

SB_MPEG_EMPHASIS GetEmphasis ()
Returns identifier of layer emphasis. More...

CString GetEmphasisString ()
Returns a string description of the MPEG header emphasis mode. More...

long GetNumFrames ()
Returns the total number of frames in the current MP3. More...

long GetNumSeconds ()
Returns the total number of seconds in the current MP3. More...


Detailed Description

SB_MPEGHeader is the MPEG header information class of the Strawberry Library.

Includes MPEG header detection and extraction of useful audio attributes.


Member Function Documentation

SB_MPEGHeader::~SB_MPEGHeader ()

Destructor, deallocates stuff.

Parameters:
none  
Returns:
none
See also:
~SB_MPEGHeader()

void SB_MPEGHeader::EraseAllFields ()

Clears all header information in memory.

Only deallocates the open CFile pointer if it created it itself, not if it was passed on to it.

Parameters:
none  
Returns:
none
See also:
SB_MPEGHeader(), Close()

bool SB_MPEGHeader::IsFrameSynced () [inline]

Returns whether or not the current frame is valid.

Returns:
Boolean, true if the current frame is recognized as a valid MP3 audio frame.
See also:
EraseAllFields(), ExtractTag(), GenerateReport()

SB_MPEG_VERSION SB_MPEGHeader::GetVersion () [inline]

Returns identifier of MPEG version.

Returns:
Value of the SB_MPEG_VERSION type indicating the MPEG header's version.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetVersionString()

CString SB_MPEGHeader::GetVersionString ()

Returns a string description of the MPEG header version.

Returns:
A CString of the MPEG header version.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetVersion()

SB_MPEG_LAYER SB_MPEGHeader::GetLayer () [inline]

Returns identifier of layer number.

Returns:
Value of the SB_MPEG_LAYER type indicating the MPEG header's layer number.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetLayerString()

CString SB_MPEGHeader::GetLayerString ()

Returns a string description of the MPEG header layer.

Returns:
A CString of the MPEG header layer.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetLayer()

bool SB_MPEGHeader::IsCRCs () [inline]

Returns whether or not the MPEG header includes CRC checksum data.

Returns:
Boolean, true if the MPEG header contains checksums.
See also:
EraseAllFields(), ExtractTag(), GenerateReport()

int SB_MPEGHeader::GetBitrate () [inline]

Returns the bitrate, in bits per second, of the MPEG header.

Returns:
An integer, in bps, of the MPEG header.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetBitrateString()

CString SB_MPEGHeader::GetBitrateString ()

Returns a string description of the MPEG header bitrate.

Returns:
A CString of the MPEG header bitrate.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetBitrate()

int SB_MPEGHeader::GetSamplingRate () [inline]

Returns the sampling rate, in Hz, of the MPEG header.

Returns:
An integer, in Hz, of the MPEG header.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetSamplingRateString()

CString SB_MPEGHeader::GetSamplingRateString ()

Returns a string description of the MPEG header sampling rate.

Returns:
A CString of the MPEG header sampling rate.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetSamplingRate()

bool SB_MPEGHeader::IsPadded () [inline]

Returns whether or not the MPEG header is padded.

Returns:
Boolean, true if the MPEG header is padded.
See also:
EraseAllFields(), ExtractTag(), GenerateReport()

bool SB_MPEGHeader::IsPrivate () [inline]

Returns whether or not the MPEG header has the private bit set. The private bit is set aside for a user-defined use.

Returns:
Boolean, true if the MPEG header has the private bit set.
See also:
EraseAllFields(), ExtractTag(), GenerateReport()

SB_MPEG_CHANNELMODE SB_MPEGHeader::GetChannelMode () [inline]

Returns identifier of channel mode.

Returns:
Value of the SB_MPEG_CHANNELMODE type indicating the MPEG header's channel mode.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetChannelModeString()

CString SB_MPEGHeader::GetChannelModeString ()

Returns a string description of the MPEG header channel mode.

Returns:
A CString of the MPEG channel mode.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetChannelMode()

SB_MPEG_CHANNELEXTENSION SB_MPEGHeader::GetChannelModeExtension () [inline]

Returns identifier of layer channel mode extension.

Returns:
Value of the SB_MPEG_CHANNELEXTENSION type indicating the MPEG header's channel mode extension.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetChannelModeExtensionString()

CString SB_MPEGHeader::GetChannelModeExtensionString ()

Returns a string description of the MPEG header channel mode extension.

Returns:
A CString of the MPEG header channel mode extension.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetChannelModeExtension()

bool SB_MPEGHeader::IsCopyrighted () [inline]

Returns whether or not the MPEG header has the copyrighted bit set.

Returns:
Boolean, true if the MPEG header is copyrighted.
See also:
EraseAllFields(), ExtractTag(), GenerateReport()

bool SB_MPEGHeader::IsOriginal () [inline]

Returns whether or not the MPEG header has the original bit set.

Returns:
Boolean, true if the MPEG header is original.
See also:
EraseAllFields(), ExtractTag(), GenerateReport()

SB_MPEG_EMPHASIS SB_MPEGHeader::GetEmphasis () [inline]

Returns identifier of layer emphasis.

Returns:
Value of the SB_MPEG_EMPHASIS type indicating the MPEG header's emphasis type.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetEmphasisString()

CString SB_MPEGHeader::GetEmphasisString ()

Returns a string description of the MPEG header emphasis mode.

Returns:
A CString of the MPEG header emphasis.
See also:
EraseAllFields(), ExtractTag(), GenerateReport(), GetEmphasis()

long SB_MPEGHeader::GetNumFrames () [inline]

Returns the total number of frames in the current MP3.

Returns:
A long integer with the total number of frames.
See also:
EraseAllFields(), ExtractTag(), GenerateReport()

long SB_MPEGHeader::GetNumSeconds () [inline]

Returns the total number of seconds in the current MP3.

Returns:
A long integer with the total number of seconds.
See also:
EraseAllFields(), ExtractTag(), GenerateReport()

The documentation for this class was generated from the following files:
Generated at Mon Feb 7 19:10:13 2000 for Strawberry by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999