Main Page   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

AEncodeProperties Class Reference

the AEncodeProperties class is responsible for handling all the encoding properties. More...

#include <AEncodeProperties.h>

List of all members.

Public Methods

 AEncodeProperties ()
 default constructor.

virtual ~AEncodeProperties ()
 default destructor.

bool HandleDialogCommand (const HWND parentWnd, const WPARAM wParam, const LPARAM lParam)
 Handle all the commands that occur in the Config dialog box.

bool operator!= (const AEncodeProperties &the_instance) const
 check wether 2 instances are equal, ie have the same encoding parameters.

const bool GetCopyrightMode () const
 Check wether the Encode process should use the Copyright bit.

const bool GetCRCMode () const
 Check wether the Encode process should use the CRC bit.

const bool GetOriginalMode () const
 Check wether the Encode process should use the Original bit.

const bool GetPrivateMode () const
 Check wether the Encode process should use the Private bit.

const bool GetNoBiResMode () const
 Check wether the Encode process shouldn't use the Bit Reservoir.

const bool GetForceChannelMode () const
 Check wether the Encode process should force the channel mode (stereo or mono resampling).

const bool GetVBRUseMode () const
 Check wether the Encode process should use the VBR mode.

const bool GetXingFrameMode () const
 Check wether the Encode process should use the Xing frame in the VBR mode. More...

const bool GetResampleMode () const
 Check wether the Encode process should resample before encoding.

void SetCopyrightMode (const bool bMode)
 Set wether the Encode process should use the Copyright bit.

void SetCRCMode (const bool bMode)
 Set wether the Encode process should use the CRC bit.

void SetOriginalMode (const bool bMode)
 Set wether the Encode process should use the Original bit.

void SetPrivateMode (const bool bMode)
 Set wether the Encode process should use the Private bit.

void SetNoBiResMode (const bool bMode)
 Set wether the Encode process shouldn't use the Bit Reservoir.

void SetForceChannelMode (const bool bMode)
 Set wether the Encode process should force the channel mode (stereo or mono resampling).

void SetVBRUseMode (const bool bMode)
 Set wether the Encode process should use the VBR mode.

void SetXingFrameMode (const bool bMode)
 Set wether the Encode process should use the Xing frame in the VBR mode. More...

const unsigned int GetBitrateValue () const
 CBR : Get the bitrate to use / VBR : Get the minimum bitrate value.

const int GetBitrateValue (DWORD &bitrate, const DWORD MPEG_Version) const
 Get the current (VBR:min) bitrate for the specified MPEG version. More...

const int GetBitrateValueMPEG1 (DWORD &bitrate) const
 Get the current (VBR:min) bitrate for MPEG I. More...

const int GetBitrateValueMPEG2 (DWORD &bitrate) const
 Get the current (VBR:min) bitrate for MPEG II. More...

const int GetBitrateString (char *string, int string_size) const
 Get the current (VBR:min) bitrate in the form of a string. More...

const int GetBitrateString (char *string, int string_size, int a_bitrateID) const
 Get the (VBR:min) bitrate corresponding to the specified index in the form of a string. More...

const int GetBitrateLentgh () const
 Get the number of possible bitrates.

const unsigned int GetResampleFreq () const
 Get the number of possible sampling frequencies.

bool GetVBRValue (DWORD &MaxBitrate, int &Quality, BOOL &VBRHeader, const DWORD MPEG_Version) const
 Get the VBR attributes for a specified MPEG version. More...

const char * GetDllLocation () const
 Get the Lame DLL Location.

void SetDllLocation (const char *the_string)
 Set the Lame DLL Location.

const char * GetOutputDirectory () const
 Get the output directory for encoding.

void SetOutputDirectory (const char *the_string)
 Set the output directory for encoding.

const unsigned int GetChannelModeValue () const
 Get the current channel mode to use.

const char * GetChannelModeString () const
 Get the current channel mode in the form of a string.

const char * GetChannelModeString (const int a_channelID) const
 Get the channel mode in the form of a string for the specified Channel mode index. More...

const int GetChannelLentgh () const
 Get the number of possible channel mode.

const LAME_QUALTIY_PRESET GetPresetModeValue () const
 Get the current preset to use, see lame documentation/code for more info on the possible presets.

const char * GetPresetModeString (const int a_presetID) const
 Get the preset in the form of a string for the specified Channel mode index. More...

const int GetPresetLentgh () const
 Get the number of possible presets.

bool Config (const HINSTANCE hInstance, const HWND HwndParent)
 Start the user configuration process (called by AOut::config()).

bool InitConfigDlg (HWND hDialog)
 Init the config dialog box with the right texts and choices.

bool UpdateValueFromDlg (HWND hDialog)
 Update the instance parameters from the config dialog box. More...

bool UpdateDlgFromValue (HWND hDialog)
 Update the config dialog box from the instance parameters.

void SaveParams (const HWND hDialog)
 Handle the saving of parameters when something has changed in the config dialog box. More...

void ParamsSave (void)
 Save the current parameters (current config in use). More...

void ParamsRestore (void)
 Load the parameters (current config in use).

void SelectSavedParams (const std::string config_name)
 Select the specified config name as the new default one.

void SaveValuesToStringKey (const std::string &config_name)
 Save the current parameters to the specified config name.

bool RenameCurrentTo (const std::string &new_config_name)
 Rename the current config name to something else.

bool DeleteConfig (const std::string &config_name)
 Delete the config name from the saved configs. More...


Static Public Methods

void DisplayVbrOptions (HWND hDialog, bool bValue)
 Update the config dialog box with the VBR mode (on/off).


Detailed Description

the AEncodeProperties class is responsible for handling all the encoding properties.

Definition at line 43 of file AEncodeProperties.h.


Member Function Documentation

bool AEncodeProperties::DeleteConfig const std::string & config_name
 

Delete the config name from the saved configs.

Todo:
support language names

Definition at line 1583 of file AEncodeProperties.cpp.

Referenced by HandleDialogCommand().

const int AEncodeProperties::GetBitrateString char * string,
int string_size,
int a_bitrateID
const
 

Get the (VBR:min) bitrate corresponding to the specified index in the form of a string.

Parameters:
string   the string that will be filled
string_size   the size of the string
a_bitrateID   the index in the Bitrate table

Returns:
-1 if the bitrate is not found, and the number of char copied otherwise

Definition at line 217 of file AEncodeProperties.cpp.

const int AEncodeProperties::GetBitrateString char * string,
int string_size
const [inline]
 

Get the current (VBR:min) bitrate in the form of a string.

Parameters:
string   the string that will be filled
string_size   the size of the string

Returns:
-1 if the bitrate is not found, and the number of char copied otherwise

Definition at line 184 of file AEncodeProperties.h.

Referenced by InitConfigDlg().

const int AEncodeProperties::GetBitrateValue DWORD & bitrate,
const DWORD MPEG_Version
const
 

Get the current (VBR:min) bitrate for the specified MPEG version.

Parameters:
bitrate   the data that will be filled with the bitrate
MPEG_Version   The MPEG version (MPEG1 or MPEG2)

Returns:
0 if the bitrate is not found, 1 if the bitrate is found

Definition at line 286 of file AEncodeProperties.cpp.

const int AEncodeProperties::GetBitrateValueMPEG1 DWORD & bitrate const [inline]
 

Get the current (VBR:min) bitrate for MPEG I.

Parameters:
bitrate   the data that will be filled with the bitrate

Returns:
0 if the bitrate is not found, 1 if the bitrate is found

Definition at line 264 of file AEncodeProperties.cpp.

Referenced by GetBitrateValue().

const int AEncodeProperties::GetBitrateValueMPEG2 DWORD & bitrate const [inline]
 

Get the current (VBR:min) bitrate for MPEG II.

Parameters:
bitrate   the data that will be filled with the bitrate

Returns:
0 if the bitrate is not found, 1 if the bitrate is found

Definition at line 242 of file AEncodeProperties.cpp.

Referenced by GetBitrateValue().

const char * AEncodeProperties::GetChannelModeString const int a_channelID const
 

Get the channel mode in the form of a string for the specified Channel mode index.

Parameters:
a_channelID   the Channel mode index (see GetChannelLentgh())

Definition at line 201 of file AEncodeProperties.cpp.

const char * AEncodeProperties::GetPresetModeString const int a_presetID const
 

Get the preset in the form of a string for the specified Channel mode index.

Parameters:
a_presetID   the preset index (see GetPresetLentgh())

Definition at line 297 of file AEncodeProperties.cpp.

Referenced by InitConfigDlg().

bool AEncodeProperties::GetVBRValue DWORD & MaxBitrate,
int & Quality,
BOOL & VBRHeader,
const DWORD MPEG_Version
const
 

Get the VBR attributes for a specified MPEG version.

Parameters:
MaxBitrate   receive the maximum bitrate possible in the VBR mode
Quality   receive the quality value (0 to 9 see Lame doc for more info)
VBRHeader   receive the value that indicates wether the VBR/Xing header should be filled
MPEG_Version   The MPEG version (MPEG1 or MPEG2)

Returns:
true if the VBR mode should be used

Definition at line 573 of file AEncodeProperties.cpp.

Referenced by AOut::open().

const bool AEncodeProperties::GetXingFrameMode const [inline]
 

Check wether the Encode process should use the Xing frame in the VBR mode.

Note:
the Xing frame is a silent frame at the beginning that contain VBR statistics about the file.

Definition at line 100 of file AEncodeProperties.h.

Referenced by UpdateDlgFromValue().

void AEncodeProperties::ParamsSave void
 

Save the current parameters (current config in use).

Todo:
save the data in the file !

Definition at line 656 of file AEncodeProperties.cpp.

Referenced by AOut::quit().

void AEncodeProperties::SaveParams const HWND hParentWnd
 

Handle the saving of parameters when something has changed in the config dialog box.

Todo:
save the parameters

Definition at line 963 of file AEncodeProperties.cpp.

Referenced by HandleDialogCommand().

void AEncodeProperties::SetXingFrameMode const bool bMode [inline]
 

Set wether the Encode process should use the Xing frame in the VBR mode.

Note:
the Xing frame is a silent frame at the beginning that contain VBR statistics about the file.

Definition at line 142 of file AEncodeProperties.h.

bool AEncodeProperties::UpdateValueFromDlg HWND HwndDlg
 

Update the instance parameters from the config dialog box.

Todo:
Select the right saved config

Definition at line 544 of file AEncodeProperties.cpp.

Referenced by HandleDialogCommand().


The documentation for this class was generated from the following files:
Generated at Tue Aug 21 21:10:49 2001 for out_lame by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001