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 Types

enum  BRMode { BR_CBR, BR_VBR, BR_ABR }
 A bitrate mode (CBR, VBR, ABR).


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 BRMode 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 BRMode mode)
 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.

VBRMETHOD GetVBRValue (DWORD &MaxBitrate, int &Quality, DWORD &AbrBitrate, 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 (const HWND hDialog, const BRMode the_mode)
 Update the config dialog box with the BitRate mode.


Detailed Description

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

Definition at line 52 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 1725 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 232 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 200 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 301 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 279 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 257 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 216 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 312 of file AEncodeProperties.cpp.

Referenced by InitConfigDlg().

VBRMETHOD AEncodeProperties::GetVBRValue DWORD & MaxBitrate,
int & Quality,
DWORD & AbrBitrate,
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:
the VBR mode (Old, New, ABR, MTRH, Default or None)

Definition at line 620 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 115 of file AEncodeProperties.h.

Referenced by UpdateDlgFromValue(), and AOut::close().

void AEncodeProperties::ParamsSave void
 

Save the current parameters (current config in use).

Todo:
save the data in the file !

Definition at line 722 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 1067 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 158 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 581 of file AEncodeProperties.cpp.

Referenced by HandleDialogCommand().


The documentation for this class was generated from the following files:
Generated at Tue Sep 4 20:59:07 2001 for out_lame by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001