1159b3361Sopenharmony_ci/** 2159b3361Sopenharmony_ci * 3159b3361Sopenharmony_ci * Lame ACM wrapper, encode/decode MP3 based RIFF/AVI files in MS Windows 4159b3361Sopenharmony_ci * 5159b3361Sopenharmony_ci * Copyright (c) 2002 Steve Lhomme <steve.lhomme at free.fr> 6159b3361Sopenharmony_ci * 7159b3361Sopenharmony_ci * This library is free software; you can redistribute it and/or 8159b3361Sopenharmony_ci * modify it under the terms of the GNU Lesser General Public 9159b3361Sopenharmony_ci * License as published by the Free Software Foundation; either 10159b3361Sopenharmony_ci * version 2.1 of the License, or (at your option) any later version. 11159b3361Sopenharmony_ci * 12159b3361Sopenharmony_ci * This library is distributed in the hope that it will be useful, 13159b3361Sopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 14159b3361Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15159b3361Sopenharmony_ci * Lesser General Public License for more details. 16159b3361Sopenharmony_ci * 17159b3361Sopenharmony_ci * You should have received a copy of the GNU Lesser General Public 18159b3361Sopenharmony_ci * License along with this library; if not, write to the Free Software 19159b3361Sopenharmony_ci * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20159b3361Sopenharmony_ci * 21159b3361Sopenharmony_ci */ 22159b3361Sopenharmony_ci 23159b3361Sopenharmony_ci/*! 24159b3361Sopenharmony_ci \author Steve Lhomme 25159b3361Sopenharmony_ci \version \$Id$ 26159b3361Sopenharmony_ci*/ 27159b3361Sopenharmony_ci 28159b3361Sopenharmony_ci#if !defined(_AENCODEPROPERTIES_H__INCLUDED_) 29159b3361Sopenharmony_ci#define _AENCODEPROPERTIES_H__INCLUDED_ 30159b3361Sopenharmony_ci 31159b3361Sopenharmony_ci#if _MSC_VER > 1000 32159b3361Sopenharmony_ci#pragma once 33159b3361Sopenharmony_ci#endif // _MSC_VER > 1000 34159b3361Sopenharmony_ci 35159b3361Sopenharmony_ci#include <windows.h> 36159b3361Sopenharmony_ci#include <string> 37159b3361Sopenharmony_ci 38159b3361Sopenharmony_ci#include "ADbg/ADbg.h" 39159b3361Sopenharmony_ci//#include "BladeMP3EncDLL.h" 40159b3361Sopenharmony_ci#include "tinyxml/tinyxml.h" 41159b3361Sopenharmony_ci//#include "AParameters/AParameters.h" 42159b3361Sopenharmony_ci 43159b3361Sopenharmony_citypedef const struct { 44159b3361Sopenharmony_ci UINT id; 45159b3361Sopenharmony_ci const char *tip; 46159b3361Sopenharmony_ci} ToolTipItem; 47159b3361Sopenharmony_ci/** 48159b3361Sopenharmony_ci \class AEncodeProperties 49159b3361Sopenharmony_ci \brief the AEncodeProperties class is responsible for handling all the encoding properties 50159b3361Sopenharmony_ci*/ 51159b3361Sopenharmony_ciclass AEncodeProperties 52159b3361Sopenharmony_ci{ 53159b3361Sopenharmony_cipublic: 54159b3361Sopenharmony_ci /** 55159b3361Sopenharmony_ci \brief default constructor 56159b3361Sopenharmony_ci 57159b3361Sopenharmony_ci \param the windows module with which you can retrieve many informations 58159b3361Sopenharmony_ci */ 59159b3361Sopenharmony_ci AEncodeProperties(HMODULE hModule); 60159b3361Sopenharmony_ci 61159b3361Sopenharmony_ci /** 62159b3361Sopenharmony_ci \brief default destructor 63159b3361Sopenharmony_ci */ 64159b3361Sopenharmony_ci virtual ~AEncodeProperties() {} 65159b3361Sopenharmony_ci 66159b3361Sopenharmony_ci /** 67159b3361Sopenharmony_ci \enum BRMode 68159b3361Sopenharmony_ci \brief A bitrate mode (CBR, VBR, ABR) 69159b3361Sopenharmony_ci */ 70159b3361Sopenharmony_ci enum BRMode { BR_CBR, BR_VBR, BR_ABR }; 71159b3361Sopenharmony_ci 72159b3361Sopenharmony_ci /** 73159b3361Sopenharmony_ci \brief Handle all the commands that occur in the Config dialog box 74159b3361Sopenharmony_ci */ 75159b3361Sopenharmony_ci bool HandleDialogCommand(const HWND parentWnd, const WPARAM wParam, const LPARAM lParam); 76159b3361Sopenharmony_ci /** 77159b3361Sopenharmony_ci \brief check wether 2 instances are equal, ie have the same encoding parameters 78159b3361Sopenharmony_ci */ 79159b3361Sopenharmony_ci bool operator != (const AEncodeProperties & the_instance) const; 80159b3361Sopenharmony_ci 81159b3361Sopenharmony_ci /** 82159b3361Sopenharmony_ci \brief Check wether the Encode process should use the Copyright bit 83159b3361Sopenharmony_ci */ 84159b3361Sopenharmony_ci inline const bool GetCopyrightMode() const { return bCopyright; } 85159b3361Sopenharmony_ci /** 86159b3361Sopenharmony_ci \brief Check wether the Encode process should use the CRC bit 87159b3361Sopenharmony_ci */ 88159b3361Sopenharmony_ci inline const bool GetCRCMode() const { return bCRC; } 89159b3361Sopenharmony_ci /** 90159b3361Sopenharmony_ci \brief Check wether the Encode process should use the Original bit 91159b3361Sopenharmony_ci */ 92159b3361Sopenharmony_ci inline const bool GetOriginalMode() const { return bOriginal; } 93159b3361Sopenharmony_ci /** 94159b3361Sopenharmony_ci \brief Check wether the Encode process should use the Private bit 95159b3361Sopenharmony_ci */ 96159b3361Sopenharmony_ci inline const bool GetPrivateMode() const { return bPrivate; } 97159b3361Sopenharmony_ci /** 98159b3361Sopenharmony_ci \brief Check wether the Encode process should use the Smart Bitrate output 99159b3361Sopenharmony_ci */ 100159b3361Sopenharmony_ci inline const bool GetSmartOutputMode() const { return bSmartOutput; } 101159b3361Sopenharmony_ci /** 102159b3361Sopenharmony_ci \brief Check wether the Encode process should allow Average Bitrate output 103159b3361Sopenharmony_ci */ 104159b3361Sopenharmony_ci inline const bool GetAbrOutputMode() const { return bAbrOutput; } 105159b3361Sopenharmony_ci 106159b3361Sopenharmony_ci /** 107159b3361Sopenharmony_ci \brief Check wether the Encode process shouldn't use the Bit Reservoir 108159b3361Sopenharmony_ci */ 109159b3361Sopenharmony_ci inline const bool GetNoBiResMode() const { return bNoBitRes; } 110159b3361Sopenharmony_ci 111159b3361Sopenharmony_ci /** 112159b3361Sopenharmony_ci \brief Check wether the Encode process should force the channel mode (stereo or mono resampling) 113159b3361Sopenharmony_ci */ 114159b3361Sopenharmony_ci inline const bool GetForceChannelMode() const { return bForceChannel; } 115159b3361Sopenharmony_ci 116159b3361Sopenharmony_ci /** 117159b3361Sopenharmony_ci \brief Check wether the Encode process should use the VBR mode 118159b3361Sopenharmony_ci */ 119159b3361Sopenharmony_ci inline const BRMode GetVBRUseMode() const { return mBRmode; } 120159b3361Sopenharmony_ci /** 121159b3361Sopenharmony_ci \brief Check wether the Encode process should use the Xing frame in the VBR mode 122159b3361Sopenharmony_ci \note the Xing frame is a silent frame at the beginning that contain VBR statistics about the file. 123159b3361Sopenharmony_ci */ 124159b3361Sopenharmony_ci inline const bool GetXingFrameMode() const { return bXingFrame; } 125159b3361Sopenharmony_ci 126159b3361Sopenharmony_ci /** 127159b3361Sopenharmony_ci \brief Check wether the Encode process should resample before encoding 128159b3361Sopenharmony_ci */ 129159b3361Sopenharmony_ci inline const bool GetResampleMode() const { return bResample; } 130159b3361Sopenharmony_ci 131159b3361Sopenharmony_ci /** 132159b3361Sopenharmony_ci \brief Set wether the Encode process should use the Copyright bit 133159b3361Sopenharmony_ci */ 134159b3361Sopenharmony_ci inline void SetCopyrightMode(const bool bMode) { bCopyright = bMode; } 135159b3361Sopenharmony_ci /** 136159b3361Sopenharmony_ci \brief Set wether the Encode process should use the CRC bit 137159b3361Sopenharmony_ci */ 138159b3361Sopenharmony_ci inline void SetCRCMode(const bool bMode) { bCRC = bMode; } 139159b3361Sopenharmony_ci /** 140159b3361Sopenharmony_ci \brief Set wether the Encode process should use the Original bit 141159b3361Sopenharmony_ci */ 142159b3361Sopenharmony_ci inline void SetOriginalMode(const bool bMode) { bOriginal = bMode; } 143159b3361Sopenharmony_ci /** 144159b3361Sopenharmony_ci \brief Set wether the Encode process should use the Private bit 145159b3361Sopenharmony_ci */ 146159b3361Sopenharmony_ci inline void SetPrivateMode(const bool bMode) { bPrivate = bMode; } 147159b3361Sopenharmony_ci 148159b3361Sopenharmony_ci /** 149159b3361Sopenharmony_ci \brief Set wether the Encode process should use the Smart Bitrate output 150159b3361Sopenharmony_ci */ 151159b3361Sopenharmony_ci inline void SetSmartOutputMode(const bool bMode) { bSmartOutput = bMode; } 152159b3361Sopenharmony_ci /** 153159b3361Sopenharmony_ci \brief Set wether the Encode process should use the Average Bitrate output 154159b3361Sopenharmony_ci */ 155159b3361Sopenharmony_ci inline void SetAbrOutputMode(const bool bMode) { bAbrOutput = bMode; } 156159b3361Sopenharmony_ci 157159b3361Sopenharmony_ci 158159b3361Sopenharmony_ci /** 159159b3361Sopenharmony_ci \brief Set wether the Encode process shouldn't use the Bit Reservoir 160159b3361Sopenharmony_ci */ 161159b3361Sopenharmony_ci inline void SetNoBiResMode(const bool bMode) { bNoBitRes = bMode; } 162159b3361Sopenharmony_ci 163159b3361Sopenharmony_ci /** 164159b3361Sopenharmony_ci \brief Set wether the Encode process should force the channel mode (stereo or mono resampling) 165159b3361Sopenharmony_ci */ 166159b3361Sopenharmony_ci inline void SetForceChannelMode(const bool bMode) { bForceChannel = bMode; } 167159b3361Sopenharmony_ci 168159b3361Sopenharmony_ci /** 169159b3361Sopenharmony_ci \brief Set wether the Encode process should use the VBR mode 170159b3361Sopenharmony_ci */ 171159b3361Sopenharmony_ci inline void SetVBRUseMode(const BRMode mode) { mBRmode = mode; } 172159b3361Sopenharmony_ci 173159b3361Sopenharmony_ci /** 174159b3361Sopenharmony_ci \brief Set wether the Encode process should use the Xing frame in the VBR mode 175159b3361Sopenharmony_ci \note the Xing frame is a silent frame at the beginning that contain VBR statistics about the file. 176159b3361Sopenharmony_ci */ 177159b3361Sopenharmony_ci inline void SetXingFrameMode(const bool bMode) { bXingFrame = bMode; } 178159b3361Sopenharmony_ci 179159b3361Sopenharmony_ci /** 180159b3361Sopenharmony_ci \brief CBR : Get the bitrate to use / 181159b3361Sopenharmony_ci VBR : Get the minimum bitrate value 182159b3361Sopenharmony_ci */ 183159b3361Sopenharmony_ci const unsigned int GetBitrateValue() const; 184159b3361Sopenharmony_ci 185159b3361Sopenharmony_ci /** 186159b3361Sopenharmony_ci \brief Get the current (VBR:min) bitrate for the specified MPEG version 187159b3361Sopenharmony_ci 188159b3361Sopenharmony_ci \param bitrate the data that will be filled with the bitrate 189159b3361Sopenharmony_ci \param MPEG_Version The MPEG version (MPEG1 or MPEG2) 190159b3361Sopenharmony_ci 191159b3361Sopenharmony_ci \return 0 if the bitrate is not found, 1 if the bitrate is found 192159b3361Sopenharmony_ci */ 193159b3361Sopenharmony_ci const int GetBitrateValue(DWORD & bitrate, const DWORD MPEG_Version) const; 194159b3361Sopenharmony_ci /** 195159b3361Sopenharmony_ci \brief Get the current (VBR:min) bitrate for MPEG I 196159b3361Sopenharmony_ci 197159b3361Sopenharmony_ci \param bitrate the data that will be filled with the bitrate 198159b3361Sopenharmony_ci 199159b3361Sopenharmony_ci \return 0 if the bitrate is not found, 1 if the bitrate is found 200159b3361Sopenharmony_ci */ 201159b3361Sopenharmony_ci const int GetBitrateValueMPEG1(DWORD & bitrate) const; 202159b3361Sopenharmony_ci /** 203159b3361Sopenharmony_ci \brief Get the current (VBR:min) bitrate for MPEG II 204159b3361Sopenharmony_ci 205159b3361Sopenharmony_ci \param bitrate the data that will be filled with the bitrate 206159b3361Sopenharmony_ci 207159b3361Sopenharmony_ci \return 0 if the bitrate is not found, 1 if the bitrate is found 208159b3361Sopenharmony_ci */ 209159b3361Sopenharmony_ci const int GetBitrateValueMPEG2(DWORD & bitrate) const; 210159b3361Sopenharmony_ci 211159b3361Sopenharmony_ci /** 212159b3361Sopenharmony_ci \brief Get the current (VBR:min) bitrate in the form of a string 213159b3361Sopenharmony_ci 214159b3361Sopenharmony_ci \param string the string that will be filled 215159b3361Sopenharmony_ci \param string_size the size of the string 216159b3361Sopenharmony_ci 217159b3361Sopenharmony_ci \return -1 if the bitrate is not found, and the number of char copied otherwise 218159b3361Sopenharmony_ci */ 219159b3361Sopenharmony_ci inline const int GetBitrateString(char * string, int string_size) const {return GetBitrateString(string,string_size,nMinBitrateIndex); } 220159b3361Sopenharmony_ci 221159b3361Sopenharmony_ci /** 222159b3361Sopenharmony_ci \brief Get the (VBR:min) bitrate corresponding to the specified index in the form of a string 223159b3361Sopenharmony_ci 224159b3361Sopenharmony_ci \param string the string that will be filled 225159b3361Sopenharmony_ci \param string_size the size of the string 226159b3361Sopenharmony_ci \param a_bitrateID the index in the Bitrate table 227159b3361Sopenharmony_ci 228159b3361Sopenharmony_ci \return -1 if the bitrate is not found, and the number of char copied otherwise 229159b3361Sopenharmony_ci */ 230159b3361Sopenharmony_ci const int GetBitrateString(char * string, int string_size, int a_bitrateID) const; 231159b3361Sopenharmony_ci 232159b3361Sopenharmony_ci /** 233159b3361Sopenharmony_ci \brief Get the number of possible bitrates 234159b3361Sopenharmony_ci */ 235159b3361Sopenharmony_ci inline const int GetBitrateLentgh() const { return sizeof(the_Bitrates) / sizeof(unsigned int); } 236159b3361Sopenharmony_ci /** 237159b3361Sopenharmony_ci \brief Get the number of possible sampling frequencies 238159b3361Sopenharmony_ci */ 239159b3361Sopenharmony_ci inline const unsigned int GetResampleFreq() const { return the_SamplingFreqs[nSamplingFreqIndex]; } 240159b3361Sopenharmony_ci /** 241159b3361Sopenharmony_ci \brief Get the max compression ratio allowed (1:15 default) 242159b3361Sopenharmony_ci */ 243159b3361Sopenharmony_ci inline double GetSmartRatio() const { return SmartRatioMax;} 244159b3361Sopenharmony_ci /** 245159b3361Sopenharmony_ci \brief Get the min ABR bitrate possible 246159b3361Sopenharmony_ci */ 247159b3361Sopenharmony_ci inline unsigned int GetAbrBitrateMin() const { return AverageBitrate_Min;} 248159b3361Sopenharmony_ci /** 249159b3361Sopenharmony_ci \brief Get the max ABR bitrate possible 250159b3361Sopenharmony_ci */ 251159b3361Sopenharmony_ci inline unsigned int GetAbrBitrateMax() const { return AverageBitrate_Max;} 252159b3361Sopenharmony_ci /** 253159b3361Sopenharmony_ci \brief Get the step between ABR bitrates 254159b3361Sopenharmony_ci */ 255159b3361Sopenharmony_ci inline unsigned int GetAbrBitrateStep() const { return AverageBitrate_Step;} 256159b3361Sopenharmony_ci 257159b3361Sopenharmony_ci /** 258159b3361Sopenharmony_ci \brief Get the VBR attributes for a specified MPEG version 259159b3361Sopenharmony_ci 260159b3361Sopenharmony_ci \param MaxBitrate receive the maximum bitrate possible in the VBR mode 261159b3361Sopenharmony_ci \param Quality receive the quality value (0 to 9 see Lame doc for more info) 262159b3361Sopenharmony_ci \param VBRHeader receive the value that indicates wether the VBR/Xing header should be filled 263159b3361Sopenharmony_ci \param MPEG_Version The MPEG version (MPEG1 or MPEG2) 264159b3361Sopenharmony_ci 265159b3361Sopenharmony_ci \return the VBR mode (Old, New, ABR, MTRH, Default or None) 266159b3361Sopenharmony_ci */ 267159b3361Sopenharmony_ci// VBRMETHOD GetVBRValue(DWORD & MaxBitrate, int & Quality, DWORD & AbrBitrate, BOOL & VBRHeader, const DWORD MPEG_Version) const; 268159b3361Sopenharmony_ci 269159b3361Sopenharmony_ci /** 270159b3361Sopenharmony_ci \brief Get the Lame DLL Location 271159b3361Sopenharmony_ci */ 272159b3361Sopenharmony_ci// const char * GetDllLocation() const { return DllLocation.c_str(); } 273159b3361Sopenharmony_ci /** 274159b3361Sopenharmony_ci \brief Set the Lame DLL Location 275159b3361Sopenharmony_ci */ 276159b3361Sopenharmony_ci// void SetDllLocation( const char * the_string ) { DllLocation = the_string; } 277159b3361Sopenharmony_ci 278159b3361Sopenharmony_ci /** 279159b3361Sopenharmony_ci \brief Get the output directory for encoding 280159b3361Sopenharmony_ci */ 281159b3361Sopenharmony_ci// const char * GetOutputDirectory() const { return OutputDir.c_str(); } 282159b3361Sopenharmony_ci /** 283159b3361Sopenharmony_ci \brief Set the output directory for encoding 284159b3361Sopenharmony_ci */ 285159b3361Sopenharmony_ci// void SetOutputDirectory( const char * the_string ) { OutputDir = the_string; } 286159b3361Sopenharmony_ci 287159b3361Sopenharmony_ci /** 288159b3361Sopenharmony_ci \brief Get the current channel mode to use 289159b3361Sopenharmony_ci */ 290159b3361Sopenharmony_ci const unsigned int GetChannelModeValue() const; 291159b3361Sopenharmony_ci /** 292159b3361Sopenharmony_ci \brief Get the current channel mode in the form of a string 293159b3361Sopenharmony_ci */ 294159b3361Sopenharmony_ci inline const char * GetChannelModeString() const {return GetChannelModeString(nChannelIndex); } 295159b3361Sopenharmony_ci /** 296159b3361Sopenharmony_ci \brief Get the channel mode in the form of a string for the specified Channel mode index 297159b3361Sopenharmony_ci 298159b3361Sopenharmony_ci \param a_channelID the Channel mode index (see GetChannelLentgh()) 299159b3361Sopenharmony_ci */ 300159b3361Sopenharmony_ci const char * GetChannelModeString(const int a_channelID) const; 301159b3361Sopenharmony_ci /** 302159b3361Sopenharmony_ci \brief Get the number of possible channel mode 303159b3361Sopenharmony_ci */ 304159b3361Sopenharmony_ci inline const int GetChannelLentgh() const { return 3; } 305159b3361Sopenharmony_ci 306159b3361Sopenharmony_ci /** 307159b3361Sopenharmony_ci \brief Get the current preset to use, see lame documentation/code for more info on the possible presets 308159b3361Sopenharmony_ci */ 309159b3361Sopenharmony_ci// const LAME_QUALTIY_PRESET GetPresetModeValue() const; 310159b3361Sopenharmony_ci /** 311159b3361Sopenharmony_ci \brief Get the preset in the form of a string for the specified Channel mode index 312159b3361Sopenharmony_ci 313159b3361Sopenharmony_ci \param a_presetID the preset index (see GetPresetLentgh()) 314159b3361Sopenharmony_ci */ 315159b3361Sopenharmony_ci const char * GetPresetModeString(const int a_presetID) const; 316159b3361Sopenharmony_ci /** 317159b3361Sopenharmony_ci \brief Get the number of possible presets 318159b3361Sopenharmony_ci */ 319159b3361Sopenharmony_ci// inline const int GetPresetLentgh() const { return sizeof(the_Presets) / sizeof(LAME_QUALTIY_PRESET); } 320159b3361Sopenharmony_ci 321159b3361Sopenharmony_ci /** 322159b3361Sopenharmony_ci \brief Start the user configuration process (called by AOut::config()) 323159b3361Sopenharmony_ci */ 324159b3361Sopenharmony_ci bool Config(const HINSTANCE hInstance, const HWND HwndParent); 325159b3361Sopenharmony_ci 326159b3361Sopenharmony_ci /** 327159b3361Sopenharmony_ci \brief Init the config dialog box with the right texts and choices 328159b3361Sopenharmony_ci */ 329159b3361Sopenharmony_ci bool InitConfigDlg(HWND hDialog); 330159b3361Sopenharmony_ci 331159b3361Sopenharmony_ci /** 332159b3361Sopenharmony_ci \brief Update the instance parameters from the config dialog box 333159b3361Sopenharmony_ci */ 334159b3361Sopenharmony_ci bool UpdateValueFromDlg(HWND hDialog); 335159b3361Sopenharmony_ci /** 336159b3361Sopenharmony_ci \brief Update the config dialog box from the instance parameters 337159b3361Sopenharmony_ci */ 338159b3361Sopenharmony_ci bool UpdateDlgFromValue(HWND hDialog); 339159b3361Sopenharmony_ci 340159b3361Sopenharmony_ci /** 341159b3361Sopenharmony_ci \brief Update the config dialog box with the BitRate mode 342159b3361Sopenharmony_ci */ 343159b3361Sopenharmony_ci static void DisplayVbrOptions(const HWND hDialog, const BRMode the_mode); 344159b3361Sopenharmony_ci 345159b3361Sopenharmony_ci /** 346159b3361Sopenharmony_ci \brief Handle the saving of parameters when something has changed in the config dialog box 347159b3361Sopenharmony_ci */ 348159b3361Sopenharmony_ci void SaveParams(const HWND hDialog); 349159b3361Sopenharmony_ci 350159b3361Sopenharmony_ci /** 351159b3361Sopenharmony_ci \brief Save the current parameters (current config in use) 352159b3361Sopenharmony_ci */ 353159b3361Sopenharmony_ci void ParamsSave(void); 354159b3361Sopenharmony_ci /** 355159b3361Sopenharmony_ci \brief Load the parameters (current config in use) 356159b3361Sopenharmony_ci */ 357159b3361Sopenharmony_ci void ParamsRestore(void); 358159b3361Sopenharmony_ci 359159b3361Sopenharmony_ci /** 360159b3361Sopenharmony_ci \brief Select the specified config name as the new default one 361159b3361Sopenharmony_ci */ 362159b3361Sopenharmony_ci void SelectSavedParams(const std::string config_name); 363159b3361Sopenharmony_ci /** 364159b3361Sopenharmony_ci \brief Save the current parameters to the specified config name 365159b3361Sopenharmony_ci */ 366159b3361Sopenharmony_ci void SaveValuesToStringKey(const std::string & config_name); 367159b3361Sopenharmony_ci /** 368159b3361Sopenharmony_ci \brief Rename the current config name to something else 369159b3361Sopenharmony_ci */ 370159b3361Sopenharmony_ci bool RenameCurrentTo(const std::string & new_config_name); 371159b3361Sopenharmony_ci /** 372159b3361Sopenharmony_ci \brief Delete the config name from the saved configs 373159b3361Sopenharmony_ci */ 374159b3361Sopenharmony_ci bool DeleteConfig(const std::string & config_name); 375159b3361Sopenharmony_ci 376159b3361Sopenharmony_ci ADbg my_debug; 377159b3361Sopenharmony_ci 378159b3361Sopenharmony_ci /** 379159b3361Sopenharmony_ci \brief Update the slides value (on scroll) 380159b3361Sopenharmony_ci */ 381159b3361Sopenharmony_ci void UpdateDlgFromSlides(HWND parent_window) const; 382159b3361Sopenharmony_ci 383159b3361Sopenharmony_ci static ToolTipItem Tooltips[13]; 384159b3361Sopenharmony_ciprivate: 385159b3361Sopenharmony_ci 386159b3361Sopenharmony_ci bool bCopyright; 387159b3361Sopenharmony_ci bool bCRC; 388159b3361Sopenharmony_ci bool bOriginal; 389159b3361Sopenharmony_ci bool bPrivate; 390159b3361Sopenharmony_ci bool bNoBitRes; 391159b3361Sopenharmony_ci BRMode mBRmode; 392159b3361Sopenharmony_ci bool bXingFrame; 393159b3361Sopenharmony_ci bool bForceChannel; 394159b3361Sopenharmony_ci bool bResample; 395159b3361Sopenharmony_ci bool bSmartOutput; 396159b3361Sopenharmony_ci bool bAbrOutput; 397159b3361Sopenharmony_ci 398159b3361Sopenharmony_ci int VbrQuality; 399159b3361Sopenharmony_ci unsigned int AverageBitrate_Min; 400159b3361Sopenharmony_ci unsigned int AverageBitrate_Max; 401159b3361Sopenharmony_ci unsigned int AverageBitrate_Step; 402159b3361Sopenharmony_ci 403159b3361Sopenharmony_ci double SmartRatioMax; 404159b3361Sopenharmony_ci 405159b3361Sopenharmony_ci static const unsigned int the_ChannelModes[3]; 406159b3361Sopenharmony_ci int nChannelIndex; 407159b3361Sopenharmony_ci 408159b3361Sopenharmony_ci static const unsigned int the_Bitrates[18]; 409159b3361Sopenharmony_ci static const unsigned int the_MPEG1_Bitrates[14]; 410159b3361Sopenharmony_ci static const unsigned int the_MPEG2_Bitrates[14]; 411159b3361Sopenharmony_ci int nMinBitrateIndex; // CBR and VBR 412159b3361Sopenharmony_ci int nMaxBitrateIndex; // only used in VBR mode 413159b3361Sopenharmony_ci 414159b3361Sopenharmony_ci static const unsigned int the_SamplingFreqs[9]; 415159b3361Sopenharmony_ci int nSamplingFreqIndex; 416159b3361Sopenharmony_ci 417159b3361Sopenharmony_ci// static const LAME_QUALTIY_PRESET the_Presets[17]; 418159b3361Sopenharmony_ci int nPresetIndex; 419159b3361Sopenharmony_ci 420159b3361Sopenharmony_ci// char DllLocation[512]; 421159b3361Sopenharmony_ci// std::string DllLocation; 422159b3361Sopenharmony_ci// char OutputDir[MAX_PATH]; 423159b3361Sopenharmony_ci// std::string OutputDir; 424159b3361Sopenharmony_ci 425159b3361Sopenharmony_ci// AParameters my_base_parameters; 426159b3361Sopenharmony_ci TiXmlDocument my_stored_data; 427159b3361Sopenharmony_ci std::string my_store_location; 428159b3361Sopenharmony_ci std::string my_current_config; 429159b3361Sopenharmony_ci 430159b3361Sopenharmony_ci// HINSTANCE hDllInstance; 431159b3361Sopenharmony_ci 432159b3361Sopenharmony_ci void SaveValuesToElement(TiXmlElement * the_element) const; 433159b3361Sopenharmony_ci inline void SetAttributeBool(TiXmlElement * the_elt,const std::string & the_string, const bool the_value) const; 434159b3361Sopenharmony_ci void UpdateConfigs(const HWND HwndDlg); 435159b3361Sopenharmony_ci void EnableAbrOptions(HWND hDialog, bool enable); 436159b3361Sopenharmony_ci 437159b3361Sopenharmony_ci HMODULE my_hModule; 438159b3361Sopenharmony_ci 439159b3361Sopenharmony_ci /** 440159b3361Sopenharmony_ci \brief 441159b3361Sopenharmony_ci 442159b3361Sopenharmony_ci \param config_name 443159b3361Sopenharmony_ci \param parentNode 444159b3361Sopenharmony_ci */ 445159b3361Sopenharmony_ci void GetValuesFromKey(const std::string & config_name, const TiXmlNode & parentNode); 446159b3361Sopenharmony_ci}; 447159b3361Sopenharmony_ci 448159b3361Sopenharmony_ci#endif // !defined(_AENCODEPROPERTIES_H__INCLUDED_) 449