![]() |
Audacity 3.2.0
|
#include <Export.h>
Public Types | |
using | ProgressResult = BasicUI::ProgressResult |
Public Member Functions | |
ExportPlugin () | |
virtual | ~ExportPlugin () |
int | AddFormat () |
Add a NEW entry to the list of formats this plug-in can export. More... | |
void | SetFormat (const wxString &format, int index) |
void | SetDescription (const TranslatableString &description, int index) |
void | AddExtension (const FileExtension &extension, int index) |
void | SetExtensions (FileExtensions extensions, int index) |
void | SetMask (FileNames::FileTypes mask, int index) |
void | SetMaxChannels (unsigned maxchannels, unsigned index) |
void | SetCanMetaData (bool canmetadata, int index) |
virtual int | GetFormatCount () |
virtual wxString | GetFormat (int index) |
TranslatableString | GetDescription (int index) |
virtual FileExtension | GetExtension (int index=0) |
Return the (first) file name extension for the sub-format. More... | |
virtual FileExtensions | GetExtensions (int index=0) |
Return all the file name extensions used for the sub-format. More... | |
FileNames::FileTypes | GetMask (int index) |
virtual unsigned | GetMaxChannels (int index) |
virtual bool | GetCanMetaData (int index) |
virtual bool | IsExtension (const FileExtension &ext, int index) |
virtual bool | DisplayOptions (wxWindow *parent, int format=0) |
virtual void | OptionsCreate (ShuttleGui &S, int format)=0 |
virtual bool | CheckFileName (wxFileName &filename, int format=0) |
virtual int | SetNumExportChannels () |
Exporter plug-ins may override this to specify the number of channels in exported file. -1 for unspecified. More... | |
virtual ProgressResult | Export (AudacityProject *project, std::unique_ptr< BasicUI::ProgressDialog > &pDialog, unsigned channels, const wxFileNameWrapper &fName, bool selectedOnly, double t0, double t1, MixerSpec *mixerSpec=NULL, const Tags *metadata=NULL, int subformat=0)=0 |
called to export audio into a file. More... | |
Protected Member Functions | |
std::unique_ptr< Mixer > | CreateMixer (const TrackList &tracks, bool selectionOnly, double startTime, double stopTime, unsigned numOutChannels, size_t outBufferSize, bool outInterleaved, double outRate, sampleFormat outFormat, MixerSpec *mixerSpec) |
Static Protected Member Functions | |
static void | InitProgress (std::unique_ptr< BasicUI::ProgressDialog > &pDialog, const TranslatableString &title, const TranslatableString &message) |
static void | InitProgress (std::unique_ptr< BasicUI::ProgressDialog > &pDialog, const wxFileNameWrapper &title, const TranslatableString &message) |
Private Attributes | |
std::vector< FormatInfo > | mFormatInfos |
ExportPlugin::ExportPlugin | ( | ) |
Definition at line 80 of file Export.cpp.
|
virtual |
Definition at line 84 of file Export.cpp.
void ExportPlugin::AddExtension | ( | const FileExtension & | extension, |
int | index | ||
) |
Definition at line 126 of file Export.cpp.
References mFormatInfos.
Referenced by ExportCL::ExportCL(), ExportFFmpeg::ExportFFmpeg(), ExportFLAC::ExportFLAC(), ExportMP3::ExportMP3(), ExportOGG::ExportOGG(), ExportPCM::ExportPCM(), and ExportWavPack::ExportWavPack().
int ExportPlugin::AddFormat | ( | ) |
Add a NEW entry to the list of formats this plug-in can export.
To configure the format use SetFormat, SetCanMetaData etc with the index of the format.
Definition at line 100 of file Export.cpp.
References mFormatInfos.
Referenced by ExportCL::ExportCL(), ExportFFmpeg::ExportFFmpeg(), ExportFLAC::ExportFLAC(), ExportMP3::ExportMP3(), ExportOGG::ExportOGG(), ExportPCM::ExportPCM(), and ExportWavPack::ExportWavPack().
|
virtual |
Reimplemented in ExportMP3, ExportCL, and ExportFFmpeg.
Definition at line 88 of file Export.cpp.
|
protected |
Definition at line 222 of file Export.cpp.
References TrackList::Any(), Track::Any(), GetEffectStages(), PlayableTrack::GetMute(), PlayableTrack::GetNotSolo(), PlayableTrack::GetSolo(), and Track::IsSelected().
Referenced by ExportCL::Export(), ExportFFmpeg::Export(), ExportFLAC::Export(), ExportMP3::Export(), ExportOGG::Export(), ExportPCM::Export(), and ExportWavPack::Export().
|
virtual |
Definition at line 203 of file Export.cpp.
|
pure virtual |
called to export audio into a file.
pDialog | To be initialized with pointer to a NEW ProgressDialog if it was null, otherwise gives an existing dialog to be reused (working around a problem in wxWidgets for Mac; see bug 1600) |
selectedOnly | Set to true if all tracks should be mixed, to false if only the selected tracks should be mixed and exported. |
metadata | A Tags object that will over-ride the one in *project and be used to tag the file that is exported. |
subformat | Control which of the multiple formats this exporter is capable of exporting should be used. Used where a single export plug-in handles a number of related formats, but they have separate entries in the Format drop-down list box. For example, the options to export to "Other PCM", "AIFF 16 Bit" and "WAV 16 Bit" are all the same libsndfile export plug-in, but with subformat set to 0, 1, and 2 respectively. |
Implemented in ExportCL, ExportFFmpeg, ExportFLAC, ExportMP3, ExportOGG, ExportPCM, and ExportWavPack.
|
virtual |
Definition at line 184 of file Export.cpp.
References mFormatInfos.
Referenced by ExportFFmpeg::Init().
TranslatableString ExportPlugin::GetDescription | ( | int | index | ) |
Definition at line 156 of file Export.cpp.
References mFormatInfos.
Referenced by GetMask().
|
virtual |
Return the (first) file name extension for the sub-format.
index | The sub-format for which the extension is wanted |
Reimplemented in ExportPCM.
Definition at line 161 of file Export.cpp.
References mFormatInfos.
Referenced by ExportPCM::GetExtension(), and IsExtension().
|
virtual |
Return all the file name extensions used for the sub-format.
index | the sub-format for which the extension is required |
Definition at line 166 of file Export.cpp.
References mFormatInfos.
Referenced by GetMask(), and IsExtension().
|
virtual |
Reimplemented in ExportPCM.
Definition at line 151 of file Export.cpp.
References mFormatInfos.
Referenced by ExportPCM::GetFormat().
|
virtual |
Definition at line 107 of file Export.cpp.
References mFormatInfos.
Referenced by IsExtension().
FileNames::FileTypes ExportPlugin::GetMask | ( | int | index | ) |
Definition at line 171 of file Export.cpp.
References GetDescription(), GetExtensions(), and mFormatInfos.
|
virtual |
|
staticprotected |
Definition at line 250 of file Export.cpp.
References title.
Referenced by ExportCL::Export(), ExportFFmpeg::Export(), ExportFLAC::Export(), ExportMP3::Export(), ExportOGG::Export(), ExportPCM::Export(), ExportWavPack::Export(), and InitProgress().
|
staticprotected |
Definition at line 267 of file Export.cpp.
References InitProgress(), title, and Verbatim().
|
virtual |
Definition at line 189 of file Export.cpp.
References GetExtension(), GetExtensions(), and GetFormatCount().
|
pure virtual |
Implemented in ExportCL, ExportFFmpeg, ExportFLAC, ExportMP3, ExportOGG, ExportPCM, and ExportWavPack.
Definition at line 208 of file Export.cpp.
Referenced by ExportFFmpeg::OptionsCreate(), and ExportPCM::OptionsCreate().
void ExportPlugin::SetCanMetaData | ( | bool | canmetadata, |
int | index | ||
) |
Definition at line 146 of file Export.cpp.
References mFormatInfos.
Referenced by ExportCL::ExportCL(), ExportFFmpeg::ExportFFmpeg(), ExportFLAC::ExportFLAC(), ExportMP3::ExportMP3(), ExportOGG::ExportOGG(), ExportPCM::ExportPCM(), and ExportWavPack::ExportWavPack().
void ExportPlugin::SetDescription | ( | const TranslatableString & | description, |
int | index | ||
) |
Definition at line 121 of file Export.cpp.
References mFormatInfos.
Referenced by ExportCL::ExportCL(), ExportFFmpeg::ExportFFmpeg(), ExportFLAC::ExportFLAC(), ExportMP3::ExportMP3(), ExportOGG::ExportOGG(), ExportPCM::ExportPCM(), and ExportWavPack::ExportWavPack().
void ExportPlugin::SetExtensions | ( | FileExtensions | extensions, |
int | index | ||
) |
Definition at line 131 of file Export.cpp.
References mFormatInfos.
Referenced by ExportPCM::ExportPCM().
void ExportPlugin::SetFormat | ( | const wxString & | format, |
int | index | ||
) |
index | The plugin to set the format for (range 0 to one less than the count of formats) |
Definition at line 116 of file Export.cpp.
References format, and mFormatInfos.
Referenced by ExportCL::ExportCL(), ExportFFmpeg::ExportFFmpeg(), ExportFLAC::ExportFLAC(), ExportMP3::ExportMP3(), ExportOGG::ExportOGG(), ExportPCM::ExportPCM(), and ExportWavPack::ExportWavPack().
void ExportPlugin::SetMask | ( | FileNames::FileTypes | mask, |
int | index | ||
) |
Definition at line 136 of file Export.cpp.
References mFormatInfos.
void ExportPlugin::SetMaxChannels | ( | unsigned | maxchannels, |
unsigned | index | ||
) |
Definition at line 141 of file Export.cpp.
References mFormatInfos.
Referenced by ExportCL::ExportCL(), ExportFFmpeg::ExportFFmpeg(), ExportFLAC::ExportFLAC(), ExportMP3::ExportMP3(), ExportOGG::ExportOGG(), ExportPCM::ExportPCM(), and ExportWavPack::ExportWavPack().
|
inlinevirtual |
|
private |
Definition at line 158 of file Export.h.
Referenced by AddExtension(), AddFormat(), GetCanMetaData(), GetDescription(), GetExtension(), GetExtensions(), GetFormat(), GetFormatCount(), GetMask(), GetMaxChannels(), SetCanMetaData(), SetDescription(), SetExtensions(), SetFormat(), SetMask(), and SetMaxChannels().