Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

MP3Core Class Reference

Top-level class. More...

Collaboration diagram for MP3Core:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MP3Core ()
bool Params (int argc, const char *argv[])
void GetInfo ()
bool WriteResult ()
bool Process ()

Static Public Member Functions

static void ShowHelp (const char *filename)

Detailed Description

Top-level class.

Implements argument parsing and file processing, created in and called from main().

Definition at line 17 of file mp3core.h.


Constructor & Destructor Documentation

MP3Core::MP3Core  ) 
 

Constructor, initalizes everything to zero.

Definition at line 15 of file mp3core.cpp.


Member Function Documentation

void MP3Core::GetInfo  ) 
 

Processes the MP3 stream and extracts information (bitrate, number of frames...). Also displays ID3 tags and detects silence (simply ask whether frame is silent, a block of frames is considered silent when there are no more than mp3::maxloud non-silent frames in a row).

Definition at line 79 of file mp3core.cpp.

References Conv::Frame2Time(), mp3::maxloud, MP3Frame::nowrite, and ID3Tag::Show().

Referenced by Process().

bool MP3Core::Params int  argc,
const char *  argv[]
 

Parses command line arguments and fills internal structures.

Parameters:
argc Argument count from main()
argv[] Arguments from main()
Returns:
Whether arguments were correct

Definition at line 27 of file mp3core.cpp.

References Conv::dB2Gain(), ID3Tag::ParseParam(), and Conv::Time2Frame().

Referenced by main().

bool MP3Core::Process  ) 
 

Do what should be done (extract tags, display info, write data).

Returns:
Whether operation was succesful

Definition at line 192 of file mp3core.cpp.

References GetInfo(), ID3Tag::Read(), and WriteResult().

Referenced by main().

void MP3Core::ShowHelp const char *  filename  )  [static]
 

Display a help message

Parameters:
filename Name of binary (argv[0])

Definition at line 213 of file mp3core.cpp.

Referenced by main().

bool MP3Core::WriteResult  ) 
 

Processes input file(s) and writes the result (joined files, removed frames, changes volume etc.). This operation can theoretically fail, because sometimes data won't fit in frame and it must be resized, which is not possible at maximum bitrate.

Returns:
Whether operation was succesful

Definition at line 145 of file mp3core.cpp.

References MP3Frame::fastwrite, Conv::Frame2Time(), MP3Frame::normal, Bitstream::out, and ID3Tag::Write().

Referenced by Process().


Generated on Wed Sep 6 00:18:18 2006 for Kraken by  doxygen 1.4.4