![]() |
Audacity 3.2.0
|
Custom FFmpeg export dialog. More...
#include <ExportFFmpegDialogs.h>
Public Member Functions | |
ExportFFmpegOptions (wxWindow *parent) | |
~ExportFFmpegOptions () | |
void | PopulateOrExchange (ShuttleGui &S) |
void | OnOK (wxCommandEvent &event) |
void | OnGetURL (wxCommandEvent &event) |
void | OnFormatList (wxCommandEvent &event) |
void | DoOnFormatList () |
void | OnCodecList (wxCommandEvent &event) |
void | DoOnCodecList () |
void | OnAllFormats (wxCommandEvent &event) |
void | OnAllCodecs (wxCommandEvent &event) |
void | OnSavePreset (wxCommandEvent &event) |
void | OnLoadPreset (wxCommandEvent &event) |
void | OnDeletePreset (wxCommandEvent &event) |
void | OnImportPresets (wxCommandEvent &event) |
void | OnExportPresets (wxCommandEvent &event) |
bool | SavePreset (bool bCheckForOverwrite) |
![]() | |
wxDialogWrapper () | |
wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog")) | |
bool | Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog")) |
void | SetTitle (const TranslatableString &title) |
void | SetLabel (const TranslatableString &title) |
void | SetName (const TranslatableString &title) |
void | SetName () |
![]() | |
wxTabTraversalWrapper (Args &&... args) | |
wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete | |
wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Static Public Attributes | |
static CompatibilityEntry | CompatibilityList [] |
static ExposedFormat | fmts [] |
List of export types. More... | |
static const int | iAACSampleRates [] |
static ApplicableFor | apptable [] |
Private Member Functions | |
void | FindSelectedFormat (wxString **name, wxString **longname) |
Finds the format currently selected and returns its name and description. More... | |
void | FindSelectedCodec (wxString **name, wxString **longname) |
Finds the codec currently selected and returns its name and description. More... | |
void | FetchFormatList () |
Retrieves format list from libavformat. More... | |
int | FetchCompatibleFormatList (AudacityAVCodecID id, wxString *selfmt) |
void | FetchCodecList () |
Retrieves codec list from libavcodec. More... | |
int | FetchCompatibleCodecList (const wxChar *fmt, AudacityAVCodecID id) |
void | FetchPresetList () |
Retrieves list of presets from configuration file. More... | |
bool | ReportIfBadCombination () |
void | EnableDisableControls (AVCodecWrapper *cdc, wxString *selfmt) |
Private Attributes | |
wxArrayString | mShownFormatNames |
wxArrayString | mShownFormatLongNames |
wxArrayString | mShownCodecNames |
wxArrayString | mShownCodecLongNames |
wxArrayStringEx | mFormatNames |
wxArrayString | mFormatLongNames |
wxArrayStringEx | mCodecNames |
wxArrayString | mCodecLongNames |
wxListBox * | mFormatList |
wxListBox * | mCodecList |
wxStaticText * | mFormatName |
wxStaticText * | mCodecName |
wxComboBox * | mPresetCombo |
int | mBitRateFromChoice |
int | mSampleRateFromChoice |
std::unique_ptr< FFmpegPresets > | mPresets |
wxArrayStringEx | mPresetNames |
std::shared_ptr< FFmpegFunctions > | mFFmpeg |
Custom FFmpeg export dialog.
Options dialog for Custom FFmpeg export format.
Definition at line 206 of file ExportFFmpegDialogs.h.
ExportFFmpegOptions::ExportFFmpegOptions | ( | wxWindow * | parent | ) |
Definition at line 1719 of file ExportFFmpegDialogs.cpp.
References DoOnCodecList(), DoOnFormatList(), eIsCreatingFromPrefs, FetchCodecList(), FetchFormatList(), gPrefs, FFmpegFunctions::Load(), mCodecList, mFFmpeg, mFormatList, mPresetNames, mPresets, PopulateOrExchange(), S, wxDialogWrapper::SetName(), audacity::ToUTF8(), and wxT().
ExportFFmpegOptions::~ExportFFmpegOptions | ( | ) |
Definition at line 1715 of file ExportFFmpegDialogs.cpp.
void ExportFFmpegOptions::DoOnCodecList | ( | ) |
Definition at line 2519 of file ExportFFmpegDialogs.cpp.
References _, EnableDisableControls(), FetchCompatibleFormatList(), FindSelectedCodec(), FindSelectedFormat(), mCodecName, mFFmpeg, mFormatList, and wxT().
Referenced by ExportFFmpegOptions(), OnCodecList(), and OnLoadPreset().
void ExportFFmpegOptions::DoOnFormatList | ( | ) |
Definition at line 2469 of file ExportFFmpegDialogs.cpp.
References _, AUDACITY_AV_CODEC_ID_NONE, EnableDisableControls(), FetchCompatibleCodecList(), FindSelectedCodec(), FindSelectedFormat(), mCodecList, mFFmpeg, mFormatName, and wxT().
Referenced by ExportFFmpegOptions(), OnFormatList(), and OnLoadPreset().
|
private |
Definition at line 2436 of file ExportFFmpegDialogs.cpp.
References apptable, AUDACITY_AV_CODEC_ID_NONE, ApplicableFor::control, format, AVCodecWrapper::GetId(), mFFmpeg, and wxT().
Referenced by DoOnCodecList(), and DoOnFormatList().
|
private |
Retrieves codec list from libavcodec.
Definition at line 1777 of file ExportFFmpegDialogs.cpp.
References AUDACITY_AV_CODEC_ID_MP2, mCodecLongNames, mCodecNames, mFFmpeg, mShownCodecLongNames, mShownCodecNames, and wxT().
Referenced by ExportFFmpegOptions().
|
private |
Retrieves a list of codecs compatible to format
fmt | Format short name |
id | id of the codec selected at the moment |
Definition at line 2038 of file ExportFFmpegDialogs.cpp.
References AUDACITY_AV_CODEC_ID_MP2, AUDACITY_AV_CODEC_ID_NONE, CompatibilityEntry::codec, CompatibilityList, CompatibilityEntry::fmt, format, make_iterator_range(), mCodecList, mFFmpeg, mShownCodecLongNames, mShownCodecNames, str, and wxT().
Referenced by DoOnFormatList().
|
private |
Retrieves a list of formats compatible to codec
id | Codec ID |
selfmt | format selected at the moment |
Definition at line 2132 of file ExportFFmpegDialogs.cpp.
References AUDACITY_AV_CODEC_ID_NONE, CompatibilityList, CompatibilityEntry::fmt, mFFmpeg, mFormatList, mShownFormatLongNames, mShownFormatNames, audacity::ToUTF8(), and wxT().
Referenced by DoOnCodecList().
|
private |
Retrieves format list from libavformat.
Definition at line 1755 of file ExportFFmpegDialogs.cpp.
References AUDACITY_AV_CODEC_ID_NONE, mFFmpeg, mFormatLongNames, mFormatNames, mShownFormatLongNames, mShownFormatNames, and wxT().
Referenced by ExportFFmpegOptions().
|
private |
Retrieves list of presets from configuration file.
|
private |
Finds the codec currently selected and returns its name and description.
Definition at line 2017 of file ExportFFmpegDialogs.cpp.
References make_iterator_range(), mCodecList, mCodecLongNames, mCodecNames, and name.
Referenced by DoOnCodecList(), DoOnFormatList(), and ReportIfBadCombination().
|
private |
Finds the format currently selected and returns its name and description.
Definition at line 1996 of file ExportFFmpegDialogs.cpp.
References make_iterator_range(), mFormatList, mFormatLongNames, mFormatNames, and name.
Referenced by DoOnCodecList(), DoOnFormatList(), and ReportIfBadCombination().
void ExportFFmpegOptions::OnAllCodecs | ( | wxCommandEvent & | event | ) |
Definition at line 2360 of file ExportFFmpegDialogs.cpp.
References mCodecList, mCodecLongNames, mCodecNames, mShownCodecLongNames, and mShownCodecNames.
void ExportFFmpegOptions::OnAllFormats | ( | wxCommandEvent & | event | ) |
Definition at line 2350 of file ExportFFmpegDialogs.cpp.
References mFormatList, mFormatLongNames, mFormatNames, mShownFormatLongNames, and mShownFormatNames.
void ExportFFmpegOptions::OnCodecList | ( | wxCommandEvent & | event | ) |
Definition at line 2578 of file ExportFFmpegDialogs.cpp.
References DoOnCodecList().
void ExportFFmpegOptions::OnDeletePreset | ( | wxCommandEvent & | event | ) |
Definition at line 2211 of file ExportFFmpegDialogs.cpp.
References AudacityMessageBox(), mPresetNames, mPresets, preset, and XO().
void ExportFFmpegOptions::OnExportPresets | ( | wxCommandEvent & | event | ) |
Definition at line 2320 of file ExportFFmpegDialogs.cpp.
References AudacityMessageBox(), FileTypes(), FileDialog::GetPath(), gPrefs, mPresets, SavePreset(), FileDialog::ShowModal(), wxT(), and XO().
void ExportFFmpegOptions::OnFormatList | ( | wxCommandEvent & | event | ) |
Definition at line 2571 of file ExportFFmpegDialogs.cpp.
References DoOnFormatList().
void ExportFFmpegOptions::OnGetURL | ( | wxCommandEvent & | event | ) |
Definition at line 2607 of file ExportFFmpegDialogs.cpp.
References HelpSystem::ShowHelp().
void ExportFFmpegOptions::OnImportPresets | ( | wxCommandEvent & | event | ) |
Definition at line 2301 of file ExportFFmpegDialogs.cpp.
References FileTypes(), FileDialog::GetPath(), gPrefs, mPresetCombo, mPresetNames, mPresets, FileDialog::ShowModal(), wxT(), and XO().
void ExportFFmpegOptions::OnLoadPreset | ( | wxCommandEvent & | event | ) |
Definition at line 2271 of file ExportFFmpegDialogs.cpp.
References DoOnCodecList(), DoOnFormatList(), mCodecList, mCodecLongNames, mCodecNames, mFormatList, mFormatLongNames, mFormatNames, mPresets, mShownCodecLongNames, mShownCodecNames, mShownFormatLongNames, mShownFormatNames, and preset.
void ExportFFmpegOptions::OnOK | ( | wxCommandEvent & | event | ) |
Definition at line 2586 of file ExportFFmpegDialogs.cpp.
References eIsSavingToPrefs, FileConfig::Flush(), gPrefs, mCodecList, mFormatList, PopulateOrExchange(), ReportIfBadCombination(), S, and wxT().
void ExportFFmpegOptions::OnSavePreset | ( | wxCommandEvent & | event | ) |
Definition at line 2239 of file ExportFFmpegDialogs.cpp.
References SavePreset().
void ExportFFmpegOptions::PopulateOrExchange | ( | ShuttleGui & | S | ) |
Definition at line 1803 of file ExportFFmpegDialogs.cpp.
References AACProfiles, eCancelButton, eHelpButton, eOkButton, gPrefs, mCodecList, mCodecName, mCodecNames, mFormatList, mFormatName, mFormatNames, mPresetCombo, mPresetNames, anonymous_namespace{ExportFFmpegDialogs.cpp}::PredictionOrderMethodNames, S, wxT(), XO(), and XXO().
Referenced by ExportFFmpegOptions(), and OnOK().
|
private |
ReportIfBadCombination will trap bad combinations of format and codec and report using a message box. We may later extend it to catch bad parameters too.
Definition at line 2375 of file ExportFFmpegDialogs.cpp.
References AUDACITY_AV_CODEC_ID_NONE, AudacityMessageBox(), CompatibilityEntry::codec, CompatibilityList, FindSelectedCodec(), FindSelectedFormat(), CompatibilityEntry::fmt, mFFmpeg, and XO().
Referenced by OnOK().
bool ExportFFmpegOptions::SavePreset | ( | bool | bCheckForOverwrite | ) |
Definition at line 2245 of file ExportFFmpegDialogs.cpp.
References AudacityMessageBox(), TranslatableString::empty(), mPresetCombo, mPresetNames, mPresets, name, preset, and XO().
Referenced by OnExportPresets(), and OnSavePreset().
|
static |
Some controls (parameters they represent) are only applicable to a number of codecs and/or formats. Syntax: first, enable a control for each applicable format-codec combination then disable it for anything else "any" - any format AUDACITY_AV_CODEC_ID_NONE - any codec This list must end with {FALSE,FFmpegExportCtrlID(0),AUDACITY_AV_CODEC_ID_NONE,NULL}
Definition at line 233 of file ExportFFmpegDialogs.h.
Referenced by EnableDisableControls().
|
static |
Format-codec compatibility list Must end with NULL entry
Definition at line 230 of file ExportFFmpegDialogs.h.
Referenced by FetchCompatibleCodecList(), FetchCompatibleFormatList(), and ReportIfBadCombination().
|
static |
List of export types.
Definition at line 231 of file ExportFFmpegDialogs.h.
Referenced by AdjustFormatIndex(), ExportFFmpeg::Export(), ExportFFmpeg::ExportFFmpeg(), ExportFFmpeg::Init(), and ExportFFmpeg::InitCodecs().
|
static |
Definition at line 232 of file ExportFFmpegDialogs.h.
|
private |
Definition at line 254 of file ExportFFmpegDialogs.h.
|
private |
Definition at line 247 of file ExportFFmpegDialogs.h.
Referenced by DoOnFormatList(), ExportFFmpegOptions(), FetchCompatibleCodecList(), FindSelectedCodec(), OnAllCodecs(), OnLoadPreset(), OnOK(), and PopulateOrExchange().
|
private |
Definition at line 244 of file ExportFFmpegDialogs.h.
Referenced by FetchCodecList(), FindSelectedCodec(), OnAllCodecs(), and OnLoadPreset().
|
private |
Definition at line 250 of file ExportFFmpegDialogs.h.
Referenced by DoOnCodecList(), and PopulateOrExchange().
|
private |
Definition at line 243 of file ExportFFmpegDialogs.h.
Referenced by FetchCodecList(), FindSelectedCodec(), OnAllCodecs(), OnLoadPreset(), and PopulateOrExchange().
|
private |
Definition at line 261 of file ExportFFmpegDialogs.h.
Referenced by DoOnCodecList(), DoOnFormatList(), EnableDisableControls(), ExportFFmpegOptions(), FetchCodecList(), FetchCompatibleCodecList(), FetchCompatibleFormatList(), FetchFormatList(), and ReportIfBadCombination().
|
private |
Definition at line 246 of file ExportFFmpegDialogs.h.
Referenced by DoOnCodecList(), ExportFFmpegOptions(), FetchCompatibleFormatList(), FindSelectedFormat(), OnAllFormats(), OnLoadPreset(), OnOK(), and PopulateOrExchange().
|
private |
Definition at line 242 of file ExportFFmpegDialogs.h.
Referenced by FetchFormatList(), FindSelectedFormat(), OnAllFormats(), and OnLoadPreset().
|
private |
Definition at line 249 of file ExportFFmpegDialogs.h.
Referenced by DoOnFormatList(), and PopulateOrExchange().
|
private |
Definition at line 241 of file ExportFFmpegDialogs.h.
Referenced by FetchFormatList(), FindSelectedFormat(), OnAllFormats(), OnLoadPreset(), and PopulateOrExchange().
|
private |
Definition at line 252 of file ExportFFmpegDialogs.h.
Referenced by OnImportPresets(), PopulateOrExchange(), and SavePreset().
|
private |
Definition at line 259 of file ExportFFmpegDialogs.h.
Referenced by ExportFFmpegOptions(), OnDeletePreset(), OnImportPresets(), PopulateOrExchange(), and SavePreset().
|
private |
Definition at line 257 of file ExportFFmpegDialogs.h.
Referenced by ExportFFmpegOptions(), OnDeletePreset(), OnExportPresets(), OnImportPresets(), OnLoadPreset(), and SavePreset().
|
private |
Definition at line 255 of file ExportFFmpegDialogs.h.
|
private |
Definition at line 240 of file ExportFFmpegDialogs.h.
Referenced by FetchCodecList(), FetchCompatibleCodecList(), OnAllCodecs(), and OnLoadPreset().
|
private |
Definition at line 239 of file ExportFFmpegDialogs.h.
Referenced by FetchCodecList(), FetchCompatibleCodecList(), OnAllCodecs(), and OnLoadPreset().
|
private |
Definition at line 238 of file ExportFFmpegDialogs.h.
Referenced by FetchCompatibleFormatList(), FetchFormatList(), OnAllFormats(), and OnLoadPreset().
|
private |
Definition at line 237 of file ExportFFmpegDialogs.h.
Referenced by FetchCompatibleFormatList(), FetchFormatList(), OnAllFormats(), and OnLoadPreset().